// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DTCLSH_INIT_PROC=sqlite3TestInit -D_HAVE_SQLITE_CONFIG_H -I/usr/include/tcl8.6 -export-defines "" -export-fields F -trace-translation-units -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt -lmodernc.org/sqlite/libtest -lmodernc.org/tcl/lib -lmodernc.org/z/lib -o internal/testfixture/testfixture_windows_amd64.go -Itestdata/sqlite-src-3350500/ext/async -Itestdata/sqlite-src-3350500/ext/fts3 -Itestdata/sqlite-src-3350500/ext/icu -Itestdata/sqlite-src-3350500/ext/rtree -Itestdata/sqlite-src-3350500/ext/session -Itestdata/sqlite-src-3350500/ext/userauth -Itestdata/sqlite-src-3350500/src -Itestdata/sqlite-amalgamation-3350500 -Itestdata/sqlite-src-3350500 testdata/sqlite-src-3350500/ext/expert/sqlite3expert.c testdata/sqlite-src-3350500/ext/expert/test_expert.c testdata/sqlite-src-3350500/ext/fts3/fts3_term.c testdata/sqlite-src-3350500/ext/fts3/fts3_test.c testdata/sqlite-src-3350500/ext/fts5/fts5_tcl.c testdata/sqlite-src-3350500/ext/fts5/fts5_test_mi.c testdata/sqlite-src-3350500/ext/fts5/fts5_test_tok.c testdata/sqlite-src-3350500/ext/misc/appendvfs.c testdata/sqlite-src-3350500/ext/misc/amatch.c testdata/sqlite-src-3350500/ext/misc/carray.c testdata/sqlite-src-3350500/ext/misc/cksumvfs.c testdata/sqlite-src-3350500/ext/misc/closure.c testdata/sqlite-src-3350500/ext/misc/csv.c testdata/sqlite-src-3350500/ext/misc/decimal.c testdata/sqlite-src-3350500/ext/misc/eval.c testdata/sqlite-src-3350500/ext/misc/explain.c testdata/sqlite-src-3350500/ext/misc/fileio.c testdata/sqlite-src-3350500/ext/misc/fuzzer.c testdata/sqlite-src-3350500/ext/misc/ieee754.c testdata/sqlite-src-3350500/ext/misc/mmapwarm.c testdata/sqlite-src-3350500/ext/misc/nextchar.c testdata/sqlite-src-3350500/ext/misc/normalize.c testdata/sqlite-src-3350500/ext/misc/percentile.c testdata/sqlite-src-3350500/ext/misc/prefixes.c testdata/sqlite-src-3350500/ext/misc/regexp.c testdata/sqlite-src-3350500/ext/misc/remember.c testdata/sqlite-src-3350500/ext/misc/series.c testdata/sqlite-src-3350500/ext/misc/spellfix.c testdata/sqlite-src-3350500/ext/misc/totype.c testdata/sqlite-src-3350500/ext/misc/unionvtab.c testdata/sqlite-src-3350500/ext/misc/wholenumber.c testdata/sqlite-src-3350500/ext/misc/zipfile.c testdata/sqlite-src-3350500/ext/rbu/test_rbu.c testdata/sqlite-src-3350500/ext/userauth/userauth.c testdata/sqlite-src-3350500/src/tclsqlite.c testdata/sqlite-src-3350500/src/test1.c testdata/sqlite-src-3350500/src/test2.c testdata/sqlite-src-3350500/src/test3.c testdata/sqlite-src-3350500/src/test4.c testdata/sqlite-src-3350500/src/test5.c testdata/sqlite-src-3350500/src/test6.c testdata/sqlite-src-3350500/src/test7.c testdata/sqlite-src-3350500/src/test8.c testdata/sqlite-src-3350500/src/test9.c testdata/sqlite-src-3350500/src/test_async.c testdata/sqlite-src-3350500/src/test_autoext.c testdata/sqlite-src-3350500/src/test_backup.c testdata/sqlite-src-3350500/src/test_bestindex.c testdata/sqlite-src-3350500/src/test_blob.c testdata/sqlite-src-3350500/src/test_btree.c testdata/sqlite-src-3350500/src/test_config.c testdata/sqlite-src-3350500/src/test_delete.c testdata/sqlite-src-3350500/src/test_demovfs.c testdata/sqlite-src-3350500/src/test_devsym.c testdata/sqlite-src-3350500/src/test_fs.c testdata/sqlite-src-3350500/src/test_func.c testdata/sqlite-src-3350500/src/test_hexio.c testdata/sqlite-src-3350500/src/test_init.c testdata/sqlite-src-3350500/src/test_intarray.c testdata/sqlite-src-3350500/src/test_journal.c testdata/sqlite-src-3350500/src/test_malloc.c testdata/sqlite-src-3350500/src/test_md5.c testdata/sqlite-src-3350500/src/test_multiplex.c testdata/sqlite-src-3350500/src/test_mutex.c testdata/sqlite-src-3350500/src/test_onefile.c testdata/sqlite-src-3350500/src/test_osinst.c testdata/sqlite-src-3350500/src/test_pcache.c testdata/sqlite-src-3350500/src/test_quota.c testdata/sqlite-src-3350500/src/test_rtree.c testdata/sqlite-src-3350500/src/test_schema.c testdata/sqlite-src-3350500/src/test_server.c testdata/sqlite-src-3350500/src/test_superlock.c testdata/sqlite-src-3350500/src/test_syscall.c testdata/sqlite-src-3350500/src/test_tclsh.c testdata/sqlite-src-3350500/src/test_tclvar.c testdata/sqlite-src-3350500/src/test_thread.c testdata/sqlite-src-3350500/src/test_vdbecov.c testdata/sqlite-src-3350500/src/test_vfs.c testdata/sqlite-src-3350500/src/test_windirent.c testdata/sqlite-src-3350500/src/test_window.c testdata/sqlite-src-3350500/src/test_wsd.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CKSUMVFS_STATIC -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_SOUNDEX -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OS_WIN=1 -D_MSC_VER=1900 -lmodernc.org/sqlite/internal/libc2', DO NOT EDIT. package main import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" "modernc.org/sqlite/libtest" "modernc.org/tcl/lib" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ types.Size_t func main() { libc.Start(main1) } const ( BUFSIZ = 512 EOF = -1 EXPERT_CONFIG_SAMPLE = 1 EXPERT_REPORT_CANDIDATES = 4 EXPERT_REPORT_INDEXES = 2 EXPERT_REPORT_PLAN = 3 EXPERT_REPORT_SQL = 1 FILENAME_MAX = 260 FOPEN_MAX = 20 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 FTS5_TOKENIZE_QUERY = 0x0001 FTS5_TOKEN_COLOCATED = 0x0001 FULLY_WITHIN = 2 HAVE_USLEEP = 1 IDX_HASH_SIZE = 1023 MINGW_DDK_H = 0 MINGW_DDRAW_VERSION = 7 MINGW_HAS_DDK_H = 1 MINGW_HAS_DDRAW_H = 1 MINGW_HAS_SECURE_API = 1 MINGW_SDK_INIT = 0 NDEBUG = 1 NONAMELESSSTRUCT = 1 NONAMELESSUNION = 1 NOT_WITHIN = 0 PARTLY_WITHIN = 1 SEEK_CUR = 1 SEEK_END = 2 SEEK_SET = 0 SQLITE3_H = 0 SQLITE3_TEXT = 3 SQLITEEXPERT_H = 1 SQLITE_ABORT = 4 SQLITE_ABORT_ROLLBACK = 516 SQLITE_ACCESS_EXISTS = 0 SQLITE_ACCESS_READ = 2 SQLITE_ACCESS_READWRITE = 1 SQLITE_ALTER_TABLE = 26 SQLITE_ANALYZE = 28 SQLITE_ANY = 5 SQLITE_API = 0 SQLITE_APICALL = 0 SQLITE_ATTACH = 24 SQLITE_AUTH = 23 SQLITE_AUTH_USER = 279 SQLITE_BLOB = 4 SQLITE_BUSY = 5 SQLITE_BUSY_RECOVERY = 261 SQLITE_BUSY_SNAPSHOT = 517 SQLITE_BUSY_TIMEOUT = 773 SQLITE_CALLBACK = 0 SQLITE_CANTOPEN = 14 SQLITE_CANTOPEN_CONVPATH = 1038 SQLITE_CANTOPEN_DIRTYWAL = 1294 SQLITE_CANTOPEN_FULLPATH = 782 SQLITE_CANTOPEN_ISDIR = 526 SQLITE_CANTOPEN_NOTEMPDIR = 270 SQLITE_CANTOPEN_SYMLINK = 1550 SQLITE_CDECL = 0 SQLITE_CHECKPOINT_FULL = 1 SQLITE_CHECKPOINT_PASSIVE = 0 SQLITE_CHECKPOINT_RESTART = 2 SQLITE_CHECKPOINT_TRUNCATE = 3 SQLITE_CKSUMVFS_STATIC = 1 SQLITE_CONFIG_COVERING_INDEX_SCAN = 20 SQLITE_CONFIG_GETMALLOC = 5 SQLITE_CONFIG_GETMUTEX = 11 SQLITE_CONFIG_GETPCACHE = 15 SQLITE_CONFIG_GETPCACHE2 = 19 SQLITE_CONFIG_HEAP = 8 SQLITE_CONFIG_LOG = 16 SQLITE_CONFIG_LOOKASIDE = 13 SQLITE_CONFIG_MALLOC = 4 SQLITE_CONFIG_MEMDB_MAXSIZE = 29 SQLITE_CONFIG_MEMSTATUS = 9 SQLITE_CONFIG_MMAP_SIZE = 22 SQLITE_CONFIG_MULTITHREAD = 2 SQLITE_CONFIG_MUTEX = 10 SQLITE_CONFIG_PAGECACHE = 7 SQLITE_CONFIG_PCACHE = 14 SQLITE_CONFIG_PCACHE2 = 18 SQLITE_CONFIG_PCACHE_HDRSZ = 24 SQLITE_CONFIG_PMASZ = 25 SQLITE_CONFIG_SCRATCH = 6 SQLITE_CONFIG_SERIALIZED = 3 SQLITE_CONFIG_SINGLETHREAD = 1 SQLITE_CONFIG_SMALL_MALLOC = 27 SQLITE_CONFIG_SORTERREF_SIZE = 28 SQLITE_CONFIG_SQLLOG = 21 SQLITE_CONFIG_STMTJRNL_SPILL = 26 SQLITE_CONFIG_URI = 17 SQLITE_CONFIG_WIN32_HEAPSIZE = 23 SQLITE_CONSTRAINT = 19 SQLITE_CONSTRAINT_CHECK = 275 SQLITE_CONSTRAINT_COMMITHOOK = 531 SQLITE_CONSTRAINT_FOREIGNKEY = 787 SQLITE_CONSTRAINT_FUNCTION = 1043 SQLITE_CONSTRAINT_NOTNULL = 1299 SQLITE_CONSTRAINT_PINNED = 2835 SQLITE_CONSTRAINT_PRIMARYKEY = 1555 SQLITE_CONSTRAINT_ROWID = 2579 SQLITE_CONSTRAINT_TRIGGER = 1811 SQLITE_CONSTRAINT_UNIQUE = 2067 SQLITE_CONSTRAINT_VTAB = 2323 SQLITE_COPY = 0 SQLITE_CORE = 1 SQLITE_CORRUPT = 11 SQLITE_CORRUPT_INDEX = 779 SQLITE_CORRUPT_SEQUENCE = 523 SQLITE_CORRUPT_VTAB = 267 SQLITE_CREATE_INDEX = 1 SQLITE_CREATE_TABLE = 2 SQLITE_CREATE_TEMP_INDEX = 3 SQLITE_CREATE_TEMP_TABLE = 4 SQLITE_CREATE_TEMP_TRIGGER = 5 SQLITE_CREATE_TEMP_VIEW = 6 SQLITE_CREATE_TRIGGER = 7 SQLITE_CREATE_VIEW = 8 SQLITE_CREATE_VTABLE = 29 SQLITE_DBCONFIG_DEFENSIVE = 1010 SQLITE_DBCONFIG_DQS_DDL = 1014 SQLITE_DBCONFIG_DQS_DML = 1013 SQLITE_DBCONFIG_ENABLE_FKEY = 1002 SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004 SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005 SQLITE_DBCONFIG_ENABLE_QPSG = 1007 SQLITE_DBCONFIG_ENABLE_TRIGGER = 1003 SQLITE_DBCONFIG_ENABLE_VIEW = 1015 SQLITE_DBCONFIG_LEGACY_ALTER_TABLE = 1012 SQLITE_DBCONFIG_LEGACY_FILE_FORMAT = 1016 SQLITE_DBCONFIG_LOOKASIDE = 1001 SQLITE_DBCONFIG_MAINDBNAME = 1000 SQLITE_DBCONFIG_MAX = 1017 SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE = 1006 SQLITE_DBCONFIG_RESET_DATABASE = 1009 SQLITE_DBCONFIG_TRIGGER_EQP = 1008 SQLITE_DBCONFIG_TRUSTED_SCHEMA = 1017 SQLITE_DBCONFIG_WRITABLE_SCHEMA = 1011 SQLITE_DBSTATUS_CACHE_HIT = 7 SQLITE_DBSTATUS_CACHE_MISS = 8 SQLITE_DBSTATUS_CACHE_SPILL = 12 SQLITE_DBSTATUS_CACHE_USED = 1 SQLITE_DBSTATUS_CACHE_USED_SHARED = 11 SQLITE_DBSTATUS_CACHE_WRITE = 9 SQLITE_DBSTATUS_DEFERRED_FKS = 10 SQLITE_DBSTATUS_LOOKASIDE_HIT = 4 SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL = 6 SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE = 5 SQLITE_DBSTATUS_LOOKASIDE_USED = 0 SQLITE_DBSTATUS_MAX = 12 SQLITE_DBSTATUS_SCHEMA_USED = 2 SQLITE_DBSTATUS_STMT_USED = 3 SQLITE_DEFAULT_MEMSTATUS = 0 SQLITE_DEFAULT_PAGE_SIZE = 1024 SQLITE_DELETE = 9 SQLITE_DENY = 1 SQLITE_DEPRECATED = 0 SQLITE_DESERIALIZE_FREEONCLOSE = 1 SQLITE_DESERIALIZE_READONLY = 4 SQLITE_DESERIALIZE_RESIZEABLE = 2 SQLITE_DETACH = 25 SQLITE_DETERMINISTIC = 0x000000800 SQLITE_DIRECTONLY = 0x000080000 SQLITE_DONE = 101 SQLITE_DROP_INDEX = 10 SQLITE_DROP_TABLE = 11 SQLITE_DROP_TEMP_INDEX = 12 SQLITE_DROP_TEMP_TABLE = 13 SQLITE_DROP_TEMP_TRIGGER = 14 SQLITE_DROP_TEMP_VIEW = 15 SQLITE_DROP_TRIGGER = 16 SQLITE_DROP_VIEW = 17 SQLITE_DROP_VTABLE = 30 SQLITE_EMPTY = 16 SQLITE_ENABLE_BYTECODE_VTAB = 1 SQLITE_ENABLE_COLUMN_METADATA = 1 SQLITE_ENABLE_DBPAGE_VTAB = 1 SQLITE_ENABLE_DBSTAT_VTAB = 1 SQLITE_ENABLE_DESERIALIZE = 1 SQLITE_ENABLE_EXPLAIN_COMMENTS = 1 SQLITE_ENABLE_FTS5 = 1 SQLITE_ENABLE_GEOPOLY = 1 SQLITE_ENABLE_JSON1 = 1 SQLITE_ENABLE_MEMORY_MANAGEMENT = 1 SQLITE_ENABLE_OFFSET_SQL_FUNC = 1 SQLITE_ENABLE_PREUPDATE_HOOK = 1 SQLITE_ENABLE_RBU = 1 SQLITE_ENABLE_RTREE = 1 SQLITE_ENABLE_SNAPSHOT = 1 SQLITE_ENABLE_STAT4 = 1 SQLITE_ENABLE_STMTVTAB = 1 SQLITE_ENABLE_UNLOCK_NOTIFY = 1 SQLITE_ERROR = 1 SQLITE_ERROR_MISSING_COLLSEQ = 257 SQLITE_ERROR_RETRY = 513 SQLITE_ERROR_SNAPSHOT = 769 SQLITE_EXPERIMENTAL = 0 SQLITE_FAIL = 3 SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31 SQLITE_FCNTL_BUSYHANDLER = 15 SQLITE_FCNTL_CHUNK_SIZE = 6 SQLITE_FCNTL_CKPT_DONE = 37 SQLITE_FCNTL_CKPT_START = 39 SQLITE_FCNTL_COMMIT_ATOMIC_WRITE = 32 SQLITE_FCNTL_COMMIT_PHASETWO = 22 SQLITE_FCNTL_DATA_VERSION = 35 SQLITE_FCNTL_FILE_POINTER = 7 SQLITE_FCNTL_GET_LOCKPROXYFILE = 2 SQLITE_FCNTL_HAS_MOVED = 20 SQLITE_FCNTL_JOURNAL_POINTER = 28 SQLITE_FCNTL_LAST_ERRNO = 4 SQLITE_FCNTL_LOCKSTATE = 1 SQLITE_FCNTL_LOCK_TIMEOUT = 34 SQLITE_FCNTL_MMAP_SIZE = 18 SQLITE_FCNTL_OVERWRITE = 11 SQLITE_FCNTL_PDB = 30 SQLITE_FCNTL_PERSIST_WAL = 10 SQLITE_FCNTL_POWERSAFE_OVERWRITE = 13 SQLITE_FCNTL_PRAGMA = 14 SQLITE_FCNTL_RBU = 26 SQLITE_FCNTL_RESERVE_BYTES = 38 SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 SQLITE_FCNTL_SIZE_HINT = 5 SQLITE_FCNTL_SIZE_LIMIT = 36 SQLITE_FCNTL_SYNC = 21 SQLITE_FCNTL_SYNC_OMITTED = 8 SQLITE_FCNTL_TEMPFILENAME = 16 SQLITE_FCNTL_TRACE = 19 SQLITE_FCNTL_VFSNAME = 12 SQLITE_FCNTL_VFS_POINTER = 27 SQLITE_FCNTL_WAL_BLOCK = 24 SQLITE_FCNTL_WIN32_AV_RETRY = 9 SQLITE_FCNTL_WIN32_GET_HANDLE = 29 SQLITE_FCNTL_WIN32_SET_HANDLE = 23 SQLITE_FCNTL_ZIPVFS = 25 SQLITE_FLOAT = 2 SQLITE_FORMAT = 24 SQLITE_FULL = 13 SQLITE_FUNCTION = 31 SQLITE_GET_LOCKPROXYFILE = 2 SQLITE_HAVE_ZLIB = 1 SQLITE_IGNORE = 2 SQLITE_INDEX_CONSTRAINT_EQ = 2 SQLITE_INDEX_CONSTRAINT_FUNCTION = 150 SQLITE_INDEX_CONSTRAINT_GE = 32 SQLITE_INDEX_CONSTRAINT_GLOB = 66 SQLITE_INDEX_CONSTRAINT_GT = 4 SQLITE_INDEX_CONSTRAINT_IS = 72 SQLITE_INDEX_CONSTRAINT_ISNOT = 69 SQLITE_INDEX_CONSTRAINT_ISNOTNULL = 70 SQLITE_INDEX_CONSTRAINT_ISNULL = 71 SQLITE_INDEX_CONSTRAINT_LE = 8 SQLITE_INDEX_CONSTRAINT_LIKE = 65 SQLITE_INDEX_CONSTRAINT_LT = 16 SQLITE_INDEX_CONSTRAINT_MATCH = 64 SQLITE_INDEX_CONSTRAINT_NE = 68 SQLITE_INDEX_CONSTRAINT_REGEXP = 67 SQLITE_INDEX_SCAN_UNIQUE = 1 SQLITE_INNOCUOUS = 0x000200000 SQLITE_INSERT = 18 SQLITE_INTEGER = 1 SQLITE_INTERNAL = 2 SQLITE_INTERRUPT = 9 SQLITE_IOCAP_ATOMIC = 0x00000001 SQLITE_IOCAP_ATOMIC16K = 0x00000040 SQLITE_IOCAP_ATOMIC1K = 0x00000004 SQLITE_IOCAP_ATOMIC2K = 0x00000008 SQLITE_IOCAP_ATOMIC32K = 0x00000080 SQLITE_IOCAP_ATOMIC4K = 0x00000010 SQLITE_IOCAP_ATOMIC512 = 0x00000002 SQLITE_IOCAP_ATOMIC64K = 0x00000100 SQLITE_IOCAP_ATOMIC8K = 0x00000020 SQLITE_IOCAP_BATCH_ATOMIC = 0x00004000 SQLITE_IOCAP_IMMUTABLE = 0x00002000 SQLITE_IOCAP_POWERSAFE_OVERWRITE = 0x00001000 SQLITE_IOCAP_SAFE_APPEND = 0x00000200 SQLITE_IOCAP_SEQUENTIAL = 0x00000400 SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN = 0x00000800 SQLITE_IOERR = 10 SQLITE_IOERR_ACCESS = 3338 SQLITE_IOERR_AUTH = 7178 SQLITE_IOERR_BEGIN_ATOMIC = 7434 SQLITE_IOERR_BLOCKED = 2826 SQLITE_IOERR_CHECKRESERVEDLOCK = 3594 SQLITE_IOERR_CLOSE = 4106 SQLITE_IOERR_COMMIT_ATOMIC = 7690 SQLITE_IOERR_CONVPATH = 6666 SQLITE_IOERR_CORRUPTFS = 8458 SQLITE_IOERR_DATA = 8202 SQLITE_IOERR_DELETE = 2570 SQLITE_IOERR_DELETE_NOENT = 5898 SQLITE_IOERR_DIR_CLOSE = 4362 SQLITE_IOERR_DIR_FSYNC = 1290 SQLITE_IOERR_FSTAT = 1802 SQLITE_IOERR_FSYNC = 1034 SQLITE_IOERR_GETTEMPPATH = 6410 SQLITE_IOERR_LOCK = 3850 SQLITE_IOERR_MMAP = 6154 SQLITE_IOERR_NOMEM = 3082 SQLITE_IOERR_RDLOCK = 2314 SQLITE_IOERR_READ = 266 SQLITE_IOERR_ROLLBACK_ATOMIC = 7946 SQLITE_IOERR_SEEK = 5642 SQLITE_IOERR_SHMLOCK = 5130 SQLITE_IOERR_SHMMAP = 5386 SQLITE_IOERR_SHMOPEN = 4618 SQLITE_IOERR_SHMSIZE = 4874 SQLITE_IOERR_SHORT_READ = 522 SQLITE_IOERR_TRUNCATE = 1546 SQLITE_IOERR_UNLOCK = 2058 SQLITE_IOERR_VNODE = 6922 SQLITE_IOERR_WRITE = 778 SQLITE_LAST_ERRNO = 4 SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 SQLITE_LIMIT_ATTACHED = 7 SQLITE_LIMIT_COLUMN = 2 SQLITE_LIMIT_COMPOUND_SELECT = 4 SQLITE_LIMIT_EXPR_DEPTH = 3 SQLITE_LIMIT_FUNCTION_ARG = 6 SQLITE_LIMIT_LENGTH = 0 SQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8 SQLITE_LIMIT_SQL_LENGTH = 1 SQLITE_LIMIT_TRIGGER_DEPTH = 10 SQLITE_LIMIT_VARIABLE_NUMBER = 9 SQLITE_LIMIT_VDBE_OP = 5 SQLITE_LIMIT_WORKER_THREADS = 11 SQLITE_LOCKED = 6 SQLITE_LOCKED_SHAREDCACHE = 262 SQLITE_LOCKED_VTAB = 518 SQLITE_LOCK_EXCLUSIVE = 4 SQLITE_LOCK_NONE = 0 SQLITE_LOCK_PENDING = 3 SQLITE_LOCK_RESERVED = 2 SQLITE_LOCK_SHARED = 1 SQLITE_MISMATCH = 20 SQLITE_MISUSE = 21 SQLITE_MUTEX_APPDEF = 1 SQLITE_MUTEX_FAST = 0 SQLITE_MUTEX_NOOP = 1 SQLITE_MUTEX_RECURSIVE = 1 SQLITE_MUTEX_STATIC_APP1 = 8 SQLITE_MUTEX_STATIC_APP2 = 9 SQLITE_MUTEX_STATIC_APP3 = 10 SQLITE_MUTEX_STATIC_LRU = 6 SQLITE_MUTEX_STATIC_LRU2 = 7 SQLITE_MUTEX_STATIC_MAIN = 2 SQLITE_MUTEX_STATIC_MASTER = 2 SQLITE_MUTEX_STATIC_MEM = 3 SQLITE_MUTEX_STATIC_MEM2 = 4 SQLITE_MUTEX_STATIC_OPEN = 4 SQLITE_MUTEX_STATIC_PMEM = 7 SQLITE_MUTEX_STATIC_PRNG = 5 SQLITE_MUTEX_STATIC_VFS1 = 11 SQLITE_MUTEX_STATIC_VFS2 = 12 SQLITE_MUTEX_STATIC_VFS3 = 13 SQLITE_NOLFS = 22 SQLITE_NOMEM = 7 SQLITE_NOTADB = 26 SQLITE_NOTFOUND = 12 SQLITE_NOTICE = 27 SQLITE_NOTICE_RECOVER_ROLLBACK = 539 SQLITE_NOTICE_RECOVER_WAL = 283 SQLITE_NULL = 5 SQLITE_OK = 0 SQLITE_OK_LOAD_PERMANENTLY = 256 SQLITE_OK_SYMLINK = 512 SQLITE_OMIT_LOAD_EXTENSION = 1 SQLITE_OPEN_AUTOPROXY = 0x00000020 SQLITE_OPEN_CREATE = 0x00000004 SQLITE_OPEN_DELETEONCLOSE = 0x00000008 SQLITE_OPEN_EXCLUSIVE = 0x00000010 SQLITE_OPEN_FULLMUTEX = 0x00010000 SQLITE_OPEN_MAIN_DB = 0x00000100 SQLITE_OPEN_MAIN_JOURNAL = 0x00000800 SQLITE_OPEN_MASTER_JOURNAL = 0x00004000 SQLITE_OPEN_MEMORY = 0x00000080 SQLITE_OPEN_NOFOLLOW = 0x01000000 SQLITE_OPEN_NOMUTEX = 0x00008000 SQLITE_OPEN_PRIVATECACHE = 0x00040000 SQLITE_OPEN_READONLY = 0x00000001 SQLITE_OPEN_READWRITE = 0x00000002 SQLITE_OPEN_SHAREDCACHE = 0x00020000 SQLITE_OPEN_SUBJOURNAL = 0x00002000 SQLITE_OPEN_SUPER_JOURNAL = 0x00004000 SQLITE_OPEN_TEMP_DB = 0x00000200 SQLITE_OPEN_TEMP_JOURNAL = 0x00001000 SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 SQLITE_OS_WIN = 1 SQLITE_PERM = 3 SQLITE_PRAGMA = 19 SQLITE_PREPARE_NORMALIZE = 0x02 SQLITE_PREPARE_NO_VTAB = 0x04 SQLITE_PREPARE_PERSISTENT = 0x01 SQLITE_PROTOCOL = 15 SQLITE_RANGE = 25 SQLITE_READ = 20 SQLITE_READONLY = 8 SQLITE_READONLY_CANTINIT = 1288 SQLITE_READONLY_CANTLOCK = 520 SQLITE_READONLY_DBMOVED = 1032 SQLITE_READONLY_DIRECTORY = 1544 SQLITE_READONLY_RECOVERY = 264 SQLITE_READONLY_ROLLBACK = 776 SQLITE_RECURSIVE = 33 SQLITE_REINDEX = 27 SQLITE_REPLACE = 5 SQLITE_ROLLBACK = 1 SQLITE_ROW = 100 SQLITE_SAVEPOINT = 32 SQLITE_SCANSTAT_EST = 2 SQLITE_SCANSTAT_EXPLAIN = 4 SQLITE_SCANSTAT_NAME = 3 SQLITE_SCANSTAT_NLOOP = 0 SQLITE_SCANSTAT_NVISIT = 1 SQLITE_SCANSTAT_SELECTID = 5 SQLITE_SCHEMA = 17 SQLITE_SELECT = 21 SQLITE_SERIALIZE_NOCOPY = 0x001 SQLITE_SERIES_CONSTRAINT_VERIFY = 1 SQLITE_SERVER = 1 SQLITE_SET_LOCKPROXYFILE = 3 SQLITE_SHM_EXCLUSIVE = 8 SQLITE_SHM_LOCK = 2 SQLITE_SHM_NLOCK = 8 SQLITE_SHM_SHARED = 4 SQLITE_SHM_UNLOCK = 1 SQLITE_SOUNDEX = 1 SQLITE_SOURCE_ID = "2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886" SQLITE_STATUS_MALLOC_COUNT = 9 SQLITE_STATUS_MALLOC_SIZE = 5 SQLITE_STATUS_MEMORY_USED = 0 SQLITE_STATUS_PAGECACHE_OVERFLOW = 2 SQLITE_STATUS_PAGECACHE_SIZE = 7 SQLITE_STATUS_PAGECACHE_USED = 1 SQLITE_STATUS_PARSER_STACK = 6 SQLITE_STATUS_SCRATCH_OVERFLOW = 4 SQLITE_STATUS_SCRATCH_SIZE = 8 SQLITE_STATUS_SCRATCH_USED = 3 SQLITE_STDCALL = 0 SQLITE_STMTSTATUS_AUTOINDEX = 3 SQLITE_STMTSTATUS_FULLSCAN_STEP = 1 SQLITE_STMTSTATUS_MEMUSED = 99 SQLITE_STMTSTATUS_REPREPARE = 5 SQLITE_STMTSTATUS_RUN = 6 SQLITE_STMTSTATUS_SORT = 2 SQLITE_STMTSTATUS_VM_STEP = 4 SQLITE_SUBTYPE = 0x000100000 SQLITE_SYNC_DATAONLY = 0x00010 SQLITE_SYNC_FULL = 0x00003 SQLITE_SYNC_NORMAL = 0x00002 SQLITE_SYSAPI = 0 SQLITE_TEMP_STORE = 1 SQLITE_TEST = 1 SQLITE_TESTCTRL_ALWAYS = 13 SQLITE_TESTCTRL_ASSERT = 12 SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS = 10 SQLITE_TESTCTRL_BITVEC_TEST = 8 SQLITE_TESTCTRL_BYTEORDER = 22 SQLITE_TESTCTRL_EXPLAIN_STMT = 19 SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS = 29 SQLITE_TESTCTRL_FAULT_INSTALL = 9 SQLITE_TESTCTRL_FIRST = 5 SQLITE_TESTCTRL_IMPOSTER = 25 SQLITE_TESTCTRL_INTERNAL_FUNCTIONS = 17 SQLITE_TESTCTRL_ISINIT = 23 SQLITE_TESTCTRL_ISKEYWORD = 16 SQLITE_TESTCTRL_LAST = 31 SQLITE_TESTCTRL_LOCALTIME_FAULT = 18 SQLITE_TESTCTRL_NEVER_CORRUPT = 20 SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD = 19 SQLITE_TESTCTRL_OPTIMIZATIONS = 15 SQLITE_TESTCTRL_PARSER_COVERAGE = 26 SQLITE_TESTCTRL_PENDING_BYTE = 11 SQLITE_TESTCTRL_PRNG_RESET = 7 SQLITE_TESTCTRL_PRNG_RESTORE = 6 SQLITE_TESTCTRL_PRNG_SAVE = 5 SQLITE_TESTCTRL_PRNG_SEED = 28 SQLITE_TESTCTRL_RESERVE = 14 SQLITE_TESTCTRL_RESULT_INTREAL = 27 SQLITE_TESTCTRL_SCRATCHMALLOC = 17 SQLITE_TESTCTRL_SEEK_COUNT = 30 SQLITE_TESTCTRL_SORTER_MMAP = 24 SQLITE_TESTCTRL_TRACEFLAGS = 31 SQLITE_TESTCTRL_VDBE_COVERAGE = 21 SQLITE_TEXT = 3 SQLITE_THREADSAFE = 1 SQLITE_TOOBIG = 18 SQLITE_TRACE_CLOSE = 0x08 SQLITE_TRACE_PROFILE = 0x02 SQLITE_TRACE_ROW = 0x04 SQLITE_TRACE_STMT = 0x01 SQLITE_TRANSACTION = 22 SQLITE_TXN_NONE = 0 SQLITE_TXN_READ = 1 SQLITE_TXN_WRITE = 2 SQLITE_UPDATE = 23 SQLITE_UTF16 = 4 SQLITE_UTF16BE = 3 SQLITE_UTF16LE = 2 SQLITE_UTF16_ALIGNED = 8 SQLITE_UTF8 = 1 SQLITE_VERSION = "3.35.5" SQLITE_VERSION_NUMBER = 3035005 SQLITE_VTAB_CONSTRAINT_SUPPORT = 1 SQLITE_VTAB_DIRECTONLY = 3 SQLITE_VTAB_INNOCUOUS = 2 SQLITE_WARNING = 28 SQLITE_WARNING_AUTOINDEX = 284 SQLITE_WIN32_DATA_DIRECTORY_TYPE = 1 SQLITE_WIN32_TEMP_DIRECTORY_TYPE = 2 STDERR_FILENO = 2 STDIN_FILENO = 0 STDOUT_FILENO = 1 SYS_OPEN = 20 TMP_MAX = 32767 UNALIGNED = 0 UNIQUE_TABLE_NAME = "t592690916721053953805701627921227776" USE___UUIDOF = 1 WIN32 = 1 WIN64 = 1 WINNT = 1 X_AGLOBAL = 0 X_ANONYMOUS_STRUCT = 0 X_ANONYMOUS_UNION = 0 X_ANSI_STDARG_H_ = 0 X_ARGMAX = 100 X_CONST_RETURN = 0 X_CRTNOALIAS = 0 X_CRTRESTRICT = 0 X_CRT_ALTERNATIVE_IMPORTED = 0 X_CRT_DIRECTORY_DEFINED = 0 X_CRT_MANAGED_HEAP_DEPRECATE = 0 X_CRT_MEMORY_DEFINED = 0 X_CRT_PACKING = 8 X_CRT_PERROR_DEFINED = 0 X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 X_CRT_TERMINATE_DEFINED = 0 X_CRT_WPERROR_DEFINED = 0 X_DLL = 0 X_ERRCODE_DEFINED = 0 X_FILE_DEFINED = 0 X_FILE_OFFSET_BITS = 64 X_FILE_OFFSET_BITS_SET_FSEEKO = 0 X_FILE_OFFSET_BITS_SET_FTELLO = 0 X_FILE_OFFSET_BITS_SET_OFFT = 0 X_FPOS_T_DEFINED = 0 X_FTS5_H = 0 X_HAVE_SQLITE_CONFIG_H = 1 X_INC_CRTDEFS = 0 X_INC_CRTDEFS_MACRO = 0 X_INC_MINGW_SECAPI = 0 X_INC_STDARG = 0 X_INC_STDIO = 0 X_INC_STDIO_S = 0 X_INC_STRING = 0 X_INC_STRING_S = 0 X_INC_SWPRINTF_INL = 0 X_INC_VADEFS = 0 X_INC__MINGW_H = 0 X_INT128_DEFINED = 0 X_INTEGRAL_MAX_BITS = 64 X_INTPTR_T_DEFINED = 0 X_IOB_ENTRIES = 20 X_IOEOF = 0x0010 X_IOERR = 0x0020 X_IOFBF = 0x0000 X_IOLBF = 0x0040 X_IOMYBUF = 0x0008 X_IONBF = 0x0004 X_IOREAD = 0x0001 X_IORW = 0x0080 X_IOSTRG = 0x0040 X_IOWRT = 0x0002 X_MSC_VER = 1900 X_MT = 0 X_M_AMD64 = 100 X_M_X64 = 100 X_NFILE = 512 X_NLSCMPERROR = 2147483647 X_NLSCMP_DEFINED = 0 X_NSTREAM_ = 512 X_OFF64_T_DEFINED = 0 X_OFF_T_ = 0 X_OFF_T_DEFINED = 0 X_OLD_P_OVERLAY = 2 X_PGLOBAL = 0 X_PTRDIFF_T_ = 0 X_PTRDIFF_T_DEFINED = 0 X_P_DETACH = 4 X_P_NOWAIT = 1 X_P_NOWAITO = 3 X_P_OVERLAY = 2 X_P_WAIT = 0 X_P_tmpdir = "\\" X_RSIZE_T_DEFINED = 0 X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD X_SIZE_T_DEFINED = 0 X_SPAWNV_DEFINED = 0 X_SQLITE3RTREE_H_ = 0 X_SSIZE_T_DEFINED = 0 X_STDARG_H = 0 X_STDIO_DEFINED = 0 X_STDIO_S_DEFINED = 0 X_STDSTREAM_DEFINED = 0 X_SYS_OPEN = 20 X_TAGLC_ID_DEFINED = 0 X_THREADLOCALEINFO = 0 X_TIME32_T_DEFINED = 0 X_TIME64_T_DEFINED = 0 X_TIME_T_DEFINED = 0 X_TWO_DIGIT_EXPONENT = 0x1 X_UINTPTR_T_DEFINED = 0 X_VA_LIST = 0 X_VA_LIST_ = 0 X_VA_LIST_DEFINED = 0 X_VA_LIST_T_H = 0 X_W64 = 0 X_WAIT_CHILD = 0 X_WAIT_GRANDCHILD = 1 X_WCHAR_T_DEFINED = 0 X_WCTYPE_T_DEFINED = 0 X_WConst_return = 0 X_WIN32 = 1 X_WIN32_WINNT = 0x502 X_WIN64 = 1 X_WINT_T = 0 X_WSPAWN_DEFINED = 0 X_WSTDIO_DEFINED = 0 X_WSTDIO_S_DEFINED = 0 X_WSTRING_DEFINED = 0 X_WSTRING_S_DEFINED = 0 HAVE_DECLSPEC = 1 INLINE = 0 MP_DIGIT_DECLARED = 0 MP_INT_DECLARED = 0 NUM_STATIC_TOKENS = 20 SQLITE_TCLAPI = 0 TCL_ALLOW_INLINE_COMPILATION = 0x20000 TCL_ALL_EVENTS = -3 TCL_ALPHA_RELEASE = 0 TCL_APPEND_VALUE = 4 TCL_ARGV_CONSTANT = 15 TCL_ARGV_END = 23 TCL_ARGV_FLOAT = 19 TCL_ARGV_FUNC = 20 TCL_ARGV_GENFUNC = 21 TCL_ARGV_HELP = 22 TCL_ARGV_INT = 16 TCL_ARGV_REST = 18 TCL_ARGV_STRING = 17 TCL_BETA_RELEASE = 1 TCL_BREAK = 3 TCL_CANCEL_UNWIND = 0x100000 TCL_CHANNEL_THREAD_INSERT = 0 TCL_CHANNEL_THREAD_REMOVE = 1 TCL_CLOSE_READ = 2 TCL_CLOSE_WRITE = 4 TCL_CONTINUE = 4 TCL_CONVERT_MULTIBYTE = -1 TCL_CONVERT_NOSPACE = -4 TCL_CONVERT_SYNTAX = -2 TCL_CONVERT_UNKNOWN = -3 TCL_CREATE_HARD_LINK = 0x02 TCL_CREATE_SYMBOLIC_LINK = 0x01 TCL_CUSTOM_PTR_KEYS = -1 TCL_CUSTOM_TYPE_KEYS = -2 TCL_DONT_QUOTE_HASH = 8 TCL_DONT_USE_BRACES = 1 TCL_DONT_WAIT = 2 TCL_DOUBLE_SPACE = 27 TCL_DSTRING_STATIC_SIZE = 200 TCL_ENCODING_CHAR_LIMIT = 0x10 TCL_ENCODING_END = 0x02 TCL_ENCODING_NO_TERMINATE = 0x08 TCL_ENCODING_START = 0x01 TCL_ENCODING_STOPONERROR = 0x04 TCL_ENFORCE_MODE = 16 TCL_ENSEMBLE_PREFIX = 0x02 TCL_ERROR = 1 TCL_EVAL_DIRECT = 0x040000 TCL_EVAL_GLOBAL = 0x020000 TCL_EVAL_INVOKE = 0x080000 TCL_EVAL_NOERR = 0x200000 TCL_EXACT = 1 TCL_EXCEPTION = 8 TCL_FILE_EVENTS = 8 TCL_FINAL_RELEASE = 2 TCL_GLOBAL_ONLY = 1 TCL_GLOB_PERM_HIDDEN = 2 TCL_GLOB_PERM_R = 4 TCL_GLOB_PERM_RONLY = 1 TCL_GLOB_PERM_W = 8 TCL_GLOB_PERM_X = 16 TCL_GLOB_TYPE_BLOCK = 1 TCL_GLOB_TYPE_CHAR = 2 TCL_GLOB_TYPE_DIR = 4 TCL_GLOB_TYPE_FILE = 16 TCL_GLOB_TYPE_LINK = 32 TCL_GLOB_TYPE_MOUNT = 128 TCL_GLOB_TYPE_PIPE = 8 TCL_GLOB_TYPE_SOCK = 64 TCL_HASH_KEY_RANDOMIZE_HASH = 0x1 TCL_HASH_KEY_STORE_HASH = 1 TCL_HASH_KEY_SYSTEM_HASH = 0x2 TCL_HASH_KEY_TYPE_VERSION = 1 TCL_IDLE_EVENTS = 32 TCL_INTEGER_SPACE = 24 TCL_INTERP_DESTROYED = 0x100 TCL_LEAVE_ERR_MSG = 0x200 TCL_LIMIT_COMMANDS = 0x01 TCL_LIMIT_TIME = 0x02 TCL_LINK_BOOLEAN = 3 TCL_LINK_CHAR = 6 TCL_LINK_DOUBLE = 2 TCL_LINK_FLOAT = 13 TCL_LINK_INT = 1 TCL_LINK_LONG = 11 TCL_LINK_READ_ONLY = 0x80 TCL_LINK_SHORT = 8 TCL_LINK_STRING = 4 TCL_LINK_UCHAR = 7 TCL_LINK_UINT = 10 TCL_LINK_ULONG = 12 TCL_LINK_USHORT = 9 TCL_LINK_WIDE_INT = 5 TCL_LINK_WIDE_UINT = 14 TCL_LIST_ELEMENT = 8 TCL_LL_MODIFIER = "I64" TCL_LOAD_GLOBAL = 1 TCL_LOAD_LAZY = 2 TCL_MAJOR_VERSION = 8 TCL_MATCH_NOCASE = 1 TCL_MAX_PREC = 17 TCL_MINOR_VERSION = 6 TCL_MODE_BLOCKING = 0 TCL_MODE_NONBLOCKING = 1 TCL_NAMESPACE_ONLY = 2 TCL_NORETURN1 = 0 TCL_NO_EVAL = 0x010000 TCL_OK = 0 TCL_ONE_WORD_KEYS = 1 TCL_PARSE_BAD_NUMBER = 9 TCL_PARSE_BRACE_EXTRA = 2 TCL_PARSE_MISSING_BRACE = 3 TCL_PARSE_MISSING_BRACKET = 4 TCL_PARSE_MISSING_PAREN = 5 TCL_PARSE_MISSING_QUOTE = 6 TCL_PARSE_MISSING_VAR_BRACE = 7 TCL_PARSE_PART1 = 0x400 TCL_PARSE_QUOTE_EXTRA = 1 TCL_PARSE_SUCCESS = 0 TCL_PARSE_SYNTAX = 8 TCL_PATCH_LEVEL = "8.6.9" TCL_READABLE = 2 TCL_REG_ADVANCED = 000003 TCL_REG_ADVF = 000002 TCL_REG_BASIC = 000000 TCL_REG_CANMATCH = 001000 TCL_REG_EXPANDED = 000040 TCL_REG_EXTENDED = 000001 TCL_REG_NEWLINE = 000300 TCL_REG_NLANCH = 000200 TCL_REG_NLSTOP = 000100 TCL_REG_NOCASE = 000010 TCL_REG_NOSUB = 000020 TCL_REG_NOTBOL = 0001 TCL_REG_NOTEOL = 0002 TCL_REG_QUOTE = 000004 TCL_RELEASE_LEVEL = 2 TCL_RELEASE_SERIAL = 9 TCL_RESULT_SIZE = 200 TCL_RETURN = 2 TCL_SERVICE_ALL = 1 TCL_SERVICE_NONE = 0 TCL_SMALL_HASH_TABLE = 4 TCL_STDERR = 8 TCL_STDIN = 2 TCL_STDOUT = 4 TCL_STRING_KEYS = 0 TCL_SUBST_ALL = 007 TCL_SUBST_BACKSLASHES = 004 TCL_SUBST_COMMANDS = 001 TCL_SUBST_VARIABLES = 002 TCL_THREAD_JOINABLE = 1 TCL_THREAD_NOFLAGS = 0 TCL_THREAD_STACK_DEFAULT = 0 TCL_TIMER_EVENTS = 16 TCL_TOKEN_BS = 8 TCL_TOKEN_COMMAND = 16 TCL_TOKEN_EXPAND_WORD = 256 TCL_TOKEN_OPERATOR = 128 TCL_TOKEN_SIMPLE_WORD = 2 TCL_TOKEN_SUB_EXPR = 64 TCL_TOKEN_TEXT = 4 TCL_TOKEN_VARIABLE = 32 TCL_TOKEN_WORD = 1 TCL_TRACE_ARRAY = 0x800 TCL_TRACE_DELETE = 0x4000 TCL_TRACE_DESTROYED = 0x80 TCL_TRACE_OLD_STYLE = 0x1000 TCL_TRACE_READS = 0x10 TCL_TRACE_RENAME = 0x2000 TCL_TRACE_RESULT_DYNAMIC = 0x8000 TCL_TRACE_RESULT_OBJECT = 0x10000 TCL_TRACE_UNSETS = 0x40 TCL_TRACE_WRITES = 0x20 TCL_UNLOAD_DETACH_FROM_INTERPRETER = 1 TCL_UNLOAD_DETACH_FROM_PROCESS = 2 TCL_UTF_MAX = 3 TCL_VERSION = "8.6" TCL_WINDOW_EVENTS = 4 TCL_WRITABLE = 4 TCL_ZLIB_COMPRESS_BEST = 9 TCL_ZLIB_COMPRESS_DEFAULT = -1 TCL_ZLIB_COMPRESS_FAST = 1 TCL_ZLIB_COMPRESS_NONE = 0 TCL_ZLIB_FINALIZE = 4 TCL_ZLIB_FLUSH = 2 TCL_ZLIB_FORMAT_AUTO = 8 TCL_ZLIB_FORMAT_GZIP = 4 TCL_ZLIB_FORMAT_RAW = 1 TCL_ZLIB_FORMAT_ZLIB = 2 TCL_ZLIB_FULLFLUSH = 3 TCL_ZLIB_NO_FLUSH = 0 TCL_ZLIB_STREAM_DEFLATE = 16 TCL_ZLIB_STREAM_INFLATE = 32 X_CLIENTDATA = 0 X_TCHAR_DEFINED = 0 X_TCL = 0 X_TCLDECLS = 0 X_TCLPLATDECLS = 0 X_FTSINT_H = 0 FTS3_TOK_SCHEMA = "CREATE TABLE x(input HIDDEN, token, start, end, position)" APND_MARK_FOS_SZ = 8 APND_MARK_PREFIX = "Start-Of-SQLite3-" APND_MARK_PREFIX_SZ = 17 APND_MARK_SIZE = 25 APND_MAX_SIZE = 1073741824 APND_ROUNDUP = 4096 SQLITE3EXT_H = 0 SQLITE_EXTENSION_INIT1 = 0 SQLITE_EXTENSION_INIT3 = 0 AMATCH_COL_COMMAND = 3 AMATCH_COL_DISTANCE = 1 AMATCH_COL_LANGUAGE = 2 AMATCH_COL_NWORD = 4 AMATCH_COL_WORD = 0 AMATCH_MX_COST = 1000 AMATCH_MX_LANGID = 2147483647 AMATCH_MX_LENGTH = 50 CHAR_BIT = 8 CHAR_MAX = 127 CHAR_MIN = -128 EXIT_FAILURE = 1 EXIT_SUCCESS = 0 INT_MAX = 2147483647 INT_MIN = -2147483648 LLONG_MAX = 9223372036854775807 LLONG_MIN = -9223372036854775808 LONG_LONG_MAX = 9223372036854775807 LONG_LONG_MIN = -9223372036854775808 LONG_MAX = 2147483647 LONG_MIN = -2147483648 MB_LEN_MAX = 5 PATH_MAX = 260 RAND_MAX = 0x7fff SCHAR_MAX = 127 SCHAR_MIN = -128 SHRT_MAX = 32767 SHRT_MIN = -32768 SIZE_MAX = 18446744073709551615 SSIZE_MAX = 9223372036854775807 UCHAR_MAX = 255 UINT_MAX = 4294967295 ULLONG_MAX = 18446744073709551615 ULONG_LONG_MAX = 18446744073709551615 ULONG_MAX = 4294967295 USHRT_MAX = 65535 X_ALLOCA_S_HEAP_MARKER = 0xDDDD X_ALLOCA_S_MARKER_SIZE = 16 X_ALLOCA_S_STACK_MARKER = 0xCCCC X_ALLOCA_S_THRESHOLD = 1024 X_ALPHA = 259 X_BLANK = 0x40 X_CALL_REPORTFAULT = 0x2 X_CONTROL = 0x20 X_CRT_ABS_DEFINED = 0 X_CRT_ALGO_DEFINED = 0 X_CRT_ALLOCATION_DEFINED = 0 X_CRT_ATOF_DEFINED = 0 X_CRT_CTYPEDATA_DEFINED = 0 X_CRT_DOUBLE_DEC = 0 X_CRT_ERRNO_DEFINED = 0 X_CRT_SWAB_DEFINED = 0 X_CRT_SYSTEM_DEFINED = 0 X_CRT_WCTYPEDATA_DEFINED = 0 X_CRT_WSYSTEM_DEFINED = 0 X_CTYPE_DEFINED = 0 X_CVTBUFSIZE = 349 X_DIGIT = 0x4 X_DIV_T_DEFINED = 0 X_FREEA_INLINE = 0 X_FREEENTRY = 0 X_GCC_LIMITS_H_ = 0 X_HEAPBADBEGIN = -3 X_HEAPBADNODE = -4 X_HEAPBADPTR = -6 X_HEAPEMPTY = -1 X_HEAPEND = -5 X_HEAPINFO_DEFINED = 0 X_HEAPOK = -2 X_HEAP_MAXREQ = 0xFFFFFFFFFFFFFFE0 X_HEX = 0x80 X_I16_MAX = 32767 X_I16_MIN = -32768 X_I32_MAX = 2147483647 X_I32_MIN = -2147483648 X_I64_MAX = 9223372036854775807 X_I64_MIN = -9223372036854775808 X_I8_MAX = 127 X_I8_MIN = -128 X_INC_CTYPE = 0 X_INC_LIMITS = 0 X_INC_STDLIB = 0 X_INC_STDLIB_S = 0 X_LEADBYTE = 0x8000 X_LIMITS_H___ = 0 X_LOWER = 0x2 X_MALLOC_H_ = 0 X_MAX_DIR = 256 X_MAX_DRIVE = 3 X_MAX_ENV = 32767 X_MAX_EXT = 256 X_MAX_FNAME = 256 X_MAX_PATH = 260 X_MAX_WAIT_MALLOC_CRT = 60000 X_MM_MALLOC_H_INCLUDED = 0 X_ONEXIT_T_DEFINED = 0 X_OUT_TO_DEFAULT = 0 X_OUT_TO_MSGBOX = 2 X_OUT_TO_STDERR = 1 X_PUNCT = 0x10 X_QSORT_S_DEFINED = 0 X_REPORT_ERRMODE = 3 X_SPACE = 0x8 X_UI16_MAX = 0xffff X_UI32_MAX = 0xffffffff X_UI64_MAX = 0xffffffffffffffff X_UI8_MAX = 0xff X_UPPER = 0x1 X_USEDENTRY = 1 X_WCTYPE_DEFINED = 0 X_WCTYPE_INLINE_DEFINED = 0 X_WRITE_ABORT_MSG = 0x1 X_WSTDLIBP_DEFINED = 0 X_WSTDLIBP_S_DEFINED = 0 X_WSTDLIB_DEFINED = 0 X_WSTDLIB_S_DEFINED = 0 CARRAY_COLUMN_COUNT = 2 CARRAY_COLUMN_CTYPE = 3 CARRAY_COLUMN_POINTER = 1 CARRAY_COLUMN_VALUE = 0 CARRAY_DOUBLE = 2 CARRAY_INT32 = 0 CARRAY_INT64 = 1 CARRAY_TEXT = 3 CLOSURE_COL_DEPTH = 1 CLOSURE_COL_ID = 0 CLOSURE_COL_IDCOLUMN = 4 CLOSURE_COL_PARENTCOLUMN = 5 CLOSURE_COL_ROOT = 2 CLOSURE_COL_TABLENAME = 3 CSVTEST_FIDX = 0x0001 CSV_INBUFSZ = 1024 CSV_MXERR = 200 EXPLN_COLUMN_ADDR = 0 EXPLN_COLUMN_COMMENT = 7 EXPLN_COLUMN_OPCODE = 1 EXPLN_COLUMN_P1 = 2 EXPLN_COLUMN_P2 = 3 EXPLN_COLUMN_P3 = 4 EXPLN_COLUMN_P4 = 5 EXPLN_COLUMN_P5 = 6 EXPLN_COLUMN_SQL = 8 ABE_BOTTOM = 3 ABE_LEFT = 0 ABE_RIGHT = 2 ABE_TOP = 1 ABM_ACTIVATE = 0x00000006 ABM_GETAUTOHIDEBAR = 0x00000007 ABM_GETSTATE = 0x00000004 ABM_GETTASKBARPOS = 0x00000005 ABM_NEW = 0x00000000 ABM_QUERYPOS = 0x00000002 ABM_REMOVE = 0x00000001 ABM_SETAUTOHIDEBAR = 0x00000008 ABM_SETPOS = 0x00000003 ABM_SETSTATE = 0x0000000a ABM_WINDOWPOSCHANGED = 0x0000009 ABN_FULLSCREENAPP = 0x0000002 ABN_POSCHANGED = 0x0000001 ABN_STATECHANGE = 0x0000000 ABN_WINDOWARRANGE = 0x0000003 ABORTDOC = 2 ABOVE_NORMAL_PRIORITY_CLASS = 0x8000 ABSOLUTE = 1 ABS_ALWAYSONTOP = 0x0000002 ABS_AUTOHIDE = 0x0000001 ACCESS_ALLOWED_ACE_TYPE = 0 ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 9 ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 11 ACCESS_ALLOWED_COMPOUND_ACE_TYPE = 4 ACCESS_ALLOWED_OBJECT_ACE_TYPE = 5 ACCESS_DENIED_ACE_TYPE = 1 ACCESS_DENIED_CALLBACK_ACE_TYPE = 10 ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 12 ACCESS_DENIED_OBJECT_ACE_TYPE = 6 ACCESS_DS_OBJECT_TYPE_NAME_A = "Directory Service Object" ACCESS_DS_SOURCE_A = "DS" ACCESS_FILTERKEYS = 0x0002 ACCESS_MAX_LEVEL = 4 ACCESS_MAX_MS_ACE_TYPE = 8 ACCESS_MAX_MS_OBJECT_ACE_TYPE = 8 ACCESS_MAX_MS_V2_ACE_TYPE = 3 ACCESS_MAX_MS_V3_ACE_TYPE = 4 ACCESS_MAX_MS_V4_ACE_TYPE = 8 ACCESS_MAX_MS_V5_ACE_TYPE = 19 ACCESS_MIN_MS_ACE_TYPE = 0 ACCESS_MIN_MS_OBJECT_ACE_TYPE = 5 ACCESS_MOUSEKEYS = 0x0003 ACCESS_OBJECT_GUID = 0 ACCESS_PROPERTY_GUID = 2 ACCESS_PROPERTY_SET_GUID = 1 ACCESS_REASON_DATA_MASK = 0x0000ffff ACCESS_REASON_EXDATA_MASK = 0x7f000000 ACCESS_REASON_STAGING_MASK = 0x80000000 ACCESS_REASON_TYPE_MASK = 0x00ff0000 ACCESS_STICKYKEYS = 0x0001 ACCESS_SYSTEM_SECURITY = 16777216 ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2 ACE_OBJECT_TYPE_PRESENT = 0x1 ACL_REVISION = 2 ACL_REVISION1 = 1 ACL_REVISION2 = 2 ACL_REVISION3 = 3 ACL_REVISION4 = 4 ACL_REVISION_DS = 4 ACPI_PPM_HARDWARE_ALL = 0xfe ACPI_PPM_SOFTWARE_ALL = 0xfc ACPI_PPM_SOFTWARE_ANY = 0xfd ACTCTX_FLAG_APPLICATION_NAME_VALID = 32 ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = 4 ACTCTX_FLAG_HMODULE_VALID = 128 ACTCTX_FLAG_LANGID_VALID = 2 ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 1 ACTCTX_FLAG_RESOURCE_NAME_VALID = 8 ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF = 64 ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1 ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = 4 ACTIVATION_CONTEXT_PATH_TYPE_NONE = 1 ACTIVATION_CONTEXT_PATH_TYPE_URL = 3 ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = 2 ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS = 10 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = 1 ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = 9 ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO = 11 ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = 5 ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = 7 ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = 4 ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = 6 ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = 2 ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = 8 ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = 3 ACTIVEOBJECT_STRONG = 0x0 ACTIVEOBJECT_WEAK = 0x1 AC_LINE_BACKUP_POWER = 0x02 AC_LINE_OFFLINE = 0x00 AC_LINE_ONLINE = 0x01 AC_LINE_UNKNOWN = 0xff AC_SRC_ALPHA = 0x01 AC_SRC_OVER = 0x00 ADDRESS_TAG_BIT = 0x40000000000 AD_CLOCKWISE = 2 AD_COUNTERCLOCKWISE = 1 AF_APPLETALK = 16 AF_BAN = 21 AF_CCITT = 10 AF_CHAOS = 5 AF_DATAKIT = 9 AF_DECnet = 12 AF_DLI = 13 AF_ECMA = 8 AF_FIREFOX = 19 AF_HYLINK = 15 AF_IMPLINK = 3 AF_INET = 2 AF_IPX = 6 AF_ISO = 7 AF_LAT = 14 AF_MAX = 22 AF_NETBIOS = 17 AF_NS = 6 AF_OSI = 7 AF_PUP = 4 AF_SNA = 11 AF_UNIX = 1 AF_UNKNOWN1 = 20 AF_UNSPEC = 0 AF_VOICEVIEW = 18 ALERT_SYSTEM_CRITICAL = 5 ALERT_SYSTEM_ERROR = 3 ALERT_SYSTEM_INFORMATIONAL = 1 ALERT_SYSTEM_QUERY = 4 ALERT_SYSTEM_WARNING = 2 ALGIDDEF = 0 ALG_CLASS_ALL = 57344 ALG_CLASS_ANY = 0 ALG_CLASS_DATA_ENCRYPT = 24576 ALG_CLASS_HASH = 32768 ALG_CLASS_KEY_EXCHANGE = 40960 ALG_CLASS_MSG_ENCRYPT = 16384 ALG_CLASS_SIGNATURE = 8192 ALG_SID_3DES = 3 ALG_SID_3DES_112 = 9 ALG_SID_AES = 17 ALG_SID_AES_128 = 14 ALG_SID_AES_192 = 15 ALG_SID_AES_256 = 16 ALG_SID_AGREED_KEY_ANY = 3 ALG_SID_ANY = 0 ALG_SID_CAST = 6 ALG_SID_CYLINK_MEK = 12 ALG_SID_DES = 1 ALG_SID_DESX = 4 ALG_SID_DH_EPHEM = 2 ALG_SID_DH_SANDF = 1 ALG_SID_DSS_ANY = 0 ALG_SID_DSS_DMS = 2 ALG_SID_DSS_PKCS = 1 ALG_SID_EXAMPLE = 80 ALG_SID_HASH_REPLACE_OWF = 11 ALG_SID_HMAC = 9 ALG_SID_IDEA = 5 ALG_SID_KEA = 4 ALG_SID_MAC = 5 ALG_SID_MD2 = 1 ALG_SID_MD4 = 2 ALG_SID_MD5 = 3 ALG_SID_PCT1_MASTER = 4 ALG_SID_RC2 = 2 ALG_SID_RC4 = 1 ALG_SID_RC5 = 13 ALG_SID_RIPEMD = 6 ALG_SID_RIPEMD160 = 7 ALG_SID_RSA_ANY = 0 ALG_SID_RSA_ENTRUST = 3 ALG_SID_RSA_MSATWORK = 2 ALG_SID_RSA_PGP = 4 ALG_SID_RSA_PKCS = 1 ALG_SID_SAFERSK128 = 8 ALG_SID_SAFERSK64 = 7 ALG_SID_SCHANNEL_ENC_KEY = 7 ALG_SID_SCHANNEL_MAC_KEY = 3 ALG_SID_SCHANNEL_MASTER_HASH = 2 ALG_SID_SEAL = 2 ALG_SID_SHA = 4 ALG_SID_SHA1 = 4 ALG_SID_SHA_256 = 12 ALG_SID_SHA_384 = 13 ALG_SID_SHA_512 = 14 ALG_SID_SKIPJACK = 10 ALG_SID_SSL2_MASTER = 5 ALG_SID_SSL3SHAMD5 = 8 ALG_SID_SSL3_MASTER = 1 ALG_SID_TEK = 11 ALG_SID_TLS1PRF = 10 ALG_SID_TLS1_MASTER = 6 ALG_TYPE_ANY = 0 ALG_TYPE_BLOCK = 1536 ALG_TYPE_DH = 2560 ALG_TYPE_DSS = 512 ALG_TYPE_RSA = 1024 ALG_TYPE_SECURECHANNEL = 3072 ALG_TYPE_STREAM = 2048 ALIGNMENT_MACHINE = 0 ALTERNATE = 1 ANSI_CHARSET = 0 ANSI_FIXED_FONT = 11 ANSI_VAR_FONT = 12 ANTIALIASED_QUALITY = 4 ANYSIZE_ARRAY = 1 APD_COPY_ALL_FILES = 0x00000004 APD_COPY_FROM_DIRECTORY = 0x00000010 APD_COPY_NEW_FILES = 0x00000008 APD_STRICT_DOWNGRADE = 0x00000002 APD_STRICT_UPGRADE = 0x00000001 APIENTRY = 0 APIPRIVATE = 0 API_SET_EXTENSION_NAME_A = "EXT-" API_SET_LOAD_SCHEMA_ORDINAL = 1 API_SET_LOOKUP_ORDINAL = 2 API_SET_PREFIX_NAME_A = "API-" API_SET_RELEASE_SCHEMA_ORDINAL = 3 API_SET_SCHEMA_VERSION = 2 API_SET_SECTION_NAME = ".apiset" APPCLASS_MASK = 15 APPCLASS_MONITOR = 1 APPCLASS_STANDARD = 0 APPCMD_CLIENTONLY = 16 APPCMD_FILTERINITS = 32 APPCMD_MASK = 4080 APPCOMMAND_BASS_BOOST = 20 APPCOMMAND_BASS_DOWN = 19 APPCOMMAND_BASS_UP = 21 APPCOMMAND_BROWSER_BACKWARD = 1 APPCOMMAND_BROWSER_FAVORITES = 6 APPCOMMAND_BROWSER_FORWARD = 2 APPCOMMAND_BROWSER_HOME = 7 APPCOMMAND_BROWSER_REFRESH = 3 APPCOMMAND_BROWSER_SEARCH = 5 APPCOMMAND_BROWSER_STOP = 4 APPCOMMAND_CLOSE = 31 APPCOMMAND_COPY = 36 APPCOMMAND_CORRECTION_LIST = 45 APPCOMMAND_CUT = 37 APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43 APPCOMMAND_FIND = 28 APPCOMMAND_FORWARD_MAIL = 40 APPCOMMAND_HELP = 27 APPCOMMAND_LAUNCH_APP1 = 17 APPCOMMAND_LAUNCH_APP2 = 18 APPCOMMAND_LAUNCH_MAIL = 15 APPCOMMAND_LAUNCH_MEDIA_SELECT = 16 APPCOMMAND_MEDIA_CHANNEL_DOWN = 52 APPCOMMAND_MEDIA_CHANNEL_UP = 51 APPCOMMAND_MEDIA_FAST_FORWARD = 49 APPCOMMAND_MEDIA_NEXTTRACK = 11 APPCOMMAND_MEDIA_PAUSE = 47 APPCOMMAND_MEDIA_PLAY = 46 APPCOMMAND_MEDIA_PLAY_PAUSE = 14 APPCOMMAND_MEDIA_PREVIOUSTRACK = 12 APPCOMMAND_MEDIA_RECORD = 48 APPCOMMAND_MEDIA_REWIND = 50 APPCOMMAND_MEDIA_STOP = 13 APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25 APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24 APPCOMMAND_MICROPHONE_VOLUME_UP = 26 APPCOMMAND_MIC_ON_OFF_TOGGLE = 44 APPCOMMAND_NEW = 29 APPCOMMAND_OPEN = 30 APPCOMMAND_PASTE = 38 APPCOMMAND_PRINT = 33 APPCOMMAND_REDO = 35 APPCOMMAND_REPLY_TO_MAIL = 39 APPCOMMAND_SAVE = 32 APPCOMMAND_SEND_MAIL = 41 APPCOMMAND_SPELL_CHECK = 42 APPCOMMAND_TREBLE_DOWN = 22 APPCOMMAND_TREBLE_UP = 23 APPCOMMAND_UNDO = 34 APPCOMMAND_VOLUME_DOWN = 9 APPCOMMAND_VOLUME_MUTE = 8 APPCOMMAND_VOLUME_UP = 10 APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP = 0x1 APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY = 0x4 APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY = 0x20 APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION = 0x10 APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN = 0x8 APPIDREGFLAGS_RESERVED1 = 0x40 APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND = 0x2 APPLICATION_ERROR_MASK = 0x20000000 APPLICATION_VERIFIER_ACCESS_VIOLATION = 0x0002 APPLICATION_VERIFIER_BAD_HEAP_HANDLE = 0x0005 APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = 0x0401 APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = 0x040A APPLICATION_VERIFIER_COM_ERROR = 0x0400 APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = 0x040B APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = 0x0410 APPLICATION_VERIFIER_COM_NULL_DACL = 0x0406 APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = 0x040C APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = 0x040D APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = 0x0409 APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = 0x0408 APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = 0x0403 APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = 0x0404 APPLICATION_VERIFIER_COM_UNBALANCED_SWC = 0x0405 APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = 0x0402 APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = 0x0407 APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = 0x040E APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = 0x040F APPLICATION_VERIFIER_CONTINUABLE_BREAK = 0x10000000 APPLICATION_VERIFIER_CORRUPTED_FREED_HEAP_BLOCK = 0x000E APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = 0x0008 APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_END_STAMP = 0x0011 APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_HEADER = 0x000B APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_PROBING = 0x000C APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_HEADER = 0x000D APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_PREFIX = 0x0012 APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_START_STAMP = 0x0010 APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_SUFFIX = 0x000F APPLICATION_VERIFIER_CORRUPTED_HEAP_LIST = 0x0014 APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = 0x0009 APPLICATION_VERIFIER_DOUBLE_FREE = 0x0007 APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = 0x0200 APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = 0x0004 APPLICATION_VERIFIER_FIRST_CHANCE_ACCESS_VIOLATION = 0x0013 APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = 0x0302 APPLICATION_VERIFIER_INTERNAL_ERROR = 0x80000000 APPLICATION_VERIFIER_INTERNAL_WARNING = 0x40000000 APPLICATION_VERIFIER_INVALID_ALLOCMEM = 0x0601 APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = 0x0102 APPLICATION_VERIFIER_INVALID_FREEMEM = 0x0600 APPLICATION_VERIFIER_INVALID_HANDLE = 0x0300 APPLICATION_VERIFIER_INVALID_MAPVIEW = 0x0602 APPLICATION_VERIFIER_INVALID_TLS_VALUE = 0x0301 APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = 0x0211 APPLICATION_VERIFIER_LOCK_CORRUPTED = 0x0205 APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = 0x0203 APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = 0x0208 APPLICATION_VERIFIER_LOCK_INVALID_OWNER = 0x0206 APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = 0x0207 APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = 0x0202 APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = 0x0204 APPLICATION_VERIFIER_LOCK_IN_FREED_VMEM = 0x0212 APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = 0x0201 APPLICATION_VERIFIER_LOCK_IN_UNMAPPED_MEM = 0x0213 APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = 0x0210 APPLICATION_VERIFIER_LOCK_OVER_RELEASED = 0x0209 APPLICATION_VERIFIER_NO_BREAK = 0x20000000 APPLICATION_VERIFIER_NULL_HANDLE = 0x0303 APPLICATION_VERIFIER_PROBE_FREE_MEM = 0x0604 APPLICATION_VERIFIER_PROBE_GUARD_PAGE = 0x0605 APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = 0x0603 APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = 0x0607 APPLICATION_VERIFIER_PROBE_NULL = 0x0606 APPLICATION_VERIFIER_RPC_ERROR = 0x0500 APPLICATION_VERIFIER_SIZE_HEAP_UNEXPECTED_EXCEPTION = 0x0618 APPLICATION_VERIFIER_STACK_OVERFLOW = 0x0101 APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = 0x0006 APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = 0x0100 APPLICATION_VERIFIER_THREAD_NOT_LOCK_OWNER = 0x0214 APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = 0x000A APPLICATION_VERIFIER_UNKNOWN_ERROR = 0x0001 APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = 0x0003 APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = 0x0304 APPMODEL_ERROR_NO_APPLICATION = 15703 APPMODEL_ERROR_NO_PACKAGE = 15700 APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT = 15702 APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT = 15701 ARABIC_CHARSET = 178 ARW_BOTTOMLEFT = 0 ARW_BOTTOMRIGHT = 1 ARW_DOWN = 4 ARW_HIDE = 8 ARW_LEFT = 0 ARW_RIGHT = 0 ARW_STARTMASK = 3 ARW_STARTRIGHT = 1 ARW_STARTTOP = 2 ARW_TOPLEFT = 2 ARW_TOPRIGHT = 3 ARW_UP = 4 ASPECTX = 40 ASPECTXY = 44 ASPECTY = 42 ASPECT_FILTERING = 0x0001 ASSERT_ALTERNATE = 0x9 ASSERT_PRIMARY = 0x8 ASYNCH = 0x80 ASYNC_MODE_COMPATIBILITY = 1 ASYNC_MODE_DEFAULT = 0 ATAPI_ID_CMD = 0xA1 ATF_ONOFFFEEDBACK = 0x00000002 ATF_TIMEOUTON = 0x00000001 ATOM_FLAG_GLOBAL = 0x2 ATTRIBUTE_SECURITY_INFORMATION = 32 ATTR_CONVERTED = 0x02 ATTR_FIXEDCONVERTED = 0x05 ATTR_INPUT = 0x00 ATTR_INPUT_ERROR = 0x04 ATTR_TARGET_CONVERTED = 0x01 ATTR_TARGET_NOTCONVERTED = 0x03 AT_KEYEXCHANGE = 1 AT_SIGNATURE = 2 AUDIT_ALLOW_NO_PRIVILEGE = 0x1 AUTHTYPE_CLIENT = 1 AUTHTYPE_SERVER = 2 AUXCAPS_AUXIN = 2 AUXCAPS_CDAUDIO = 1 AUXCAPS_LRVOLUME = 0x0002 AUXCAPS_VOLUME = 0x0001 AW_ACTIVATE = 0x00020000 AW_BLEND = 0x00080000 AW_CENTER = 0x00000010 AW_HIDE = 0x00010000 AW_HOR_NEGATIVE = 0x00000002 AW_HOR_POSITIVE = 0x00000001 AW_SLIDE = 0x00040000 AW_VER_NEGATIVE = 0x00000008 AW_VER_POSITIVE = 0x00000004 BACKGROUND_BLUE = 0x10 BACKGROUND_GREEN = 0x20 BACKGROUND_INTENSITY = 0x80 BACKGROUND_RED = 0x40 BACKUP_ALTERNATE_DATA = 0x00000004 BACKUP_DATA = 0x00000001 BACKUP_EA_DATA = 0x00000002 BACKUP_INVALID = 0x00000000 BACKUP_LINK = 0x00000005 BACKUP_OBJECT_ID = 0x00000007 BACKUP_PROPERTY_DATA = 0x00000006 BACKUP_REPARSE_DATA = 0x00000008 BACKUP_SECURITY_DATA = 0x00000003 BACKUP_SECURITY_INFORMATION = 65536 BACKUP_SPARSE_BLOCK = 0x00000009 BACKUP_TXFS_DATA = 0x0000000a BALTIC_CHARSET = 186 BANDINFO = 24 BASETYPES = 0 BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE = 0x10000 BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE = 0x1 BASE_SEARCH_PATH_INVALID_FLAGS = -98306 BASE_SEARCH_PATH_PERMANENT = 0x8000 BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG = 0x80000000 BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG = 0x40000000 BATTERY_DISCHARGE_FLAGS_ENABLE = 0x80000000 BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK = 0x00000007 BATTERY_FLAG_CHARGING = 0x08 BATTERY_FLAG_CRITICAL = 0x04 BATTERY_FLAG_HIGH = 0x01 BATTERY_FLAG_LOW = 0x02 BATTERY_FLAG_NO_BATTERY = 0x80 BATTERY_FLAG_UNKNOWN = 0xff BATTERY_LIFE_UNKNOWN = 0xffffffff BATTERY_PERCENTAGE_UNKNOWN = 0xff BCRYPTBUFFER_VERSION = 0 BCRYPT_ALG_HANDLE_HMAC_FLAG = 0x00000008 BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE = 0x00000003 BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 0x00000004 BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION = 1 BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG = 0x00000001 BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG = 0x00000002 BCRYPT_BLOCK_PADDING = 0x00000001 BCRYPT_BUFFERS_LOCKED_FLAG = 0x00000040 BCRYPT_CAPI_AES_FLAG = 0x00000010 BCRYPT_CIPHER_INTERFACE = 0x00000001 BCRYPT_CIPHER_OPERATION = 0x00000001 BCRYPT_DH_PARAMETERS_MAGIC = 0x4d504844 BCRYPT_DH_PRIVATE_MAGIC = 0x56504844 BCRYPT_DH_PUBLIC_MAGIC = 0x42504844 BCRYPT_DSA_PARAMETERS_MAGIC = 0x4d505344 BCRYPT_DSA_PARAMETERS_MAGIC_V2 = 0x324d5044 BCRYPT_DSA_PRIVATE_MAGIC = 0x56505344 BCRYPT_DSA_PRIVATE_MAGIC_V2 = 0x32565044 BCRYPT_DSA_PUBLIC_MAGIC = 0x42505344 BCRYPT_DSA_PUBLIC_MAGIC_V2 = 0x32425044 BCRYPT_ECDH_PRIVATE_P256_MAGIC = 0x324b4345 BCRYPT_ECDH_PRIVATE_P384_MAGIC = 0x344b4345 BCRYPT_ECDH_PRIVATE_P521_MAGIC = 0x364b4345 BCRYPT_ECDH_PUBLIC_P256_MAGIC = 0x314b4345 BCRYPT_ECDH_PUBLIC_P384_MAGIC = 0x334b4345 BCRYPT_ECDH_PUBLIC_P521_MAGIC = 0x354b4345 BCRYPT_ECDSA_PRIVATE_P256_MAGIC = 0x32534345 BCRYPT_ECDSA_PRIVATE_P384_MAGIC = 0x34534345 BCRYPT_ECDSA_PRIVATE_P521_MAGIC = 0x36534345 BCRYPT_ECDSA_PUBLIC_P256_MAGIC = 0x31534345 BCRYPT_ECDSA_PUBLIC_P384_MAGIC = 0x33534345 BCRYPT_ECDSA_PUBLIC_P521_MAGIC = 0x35534345 BCRYPT_HASH_INTERFACE = 0x00000002 BCRYPT_HASH_OPERATION = 0x00000002 BCRYPT_HASH_REUSABLE_FLAG = 0x00000020 BCRYPT_KEY_DATA_BLOB_MAGIC = 0x4d42444b BCRYPT_KEY_DATA_BLOB_VERSION1 = 0x1 BCRYPT_KEY_DERIVATION_INTERFACE = 0x00000007 BCRYPT_KEY_DERIVATION_OPERATION = 0x00000040 BCRYPT_NO_KEY_VALIDATION = 0x00000008 BCRYPT_OBJECT_ALIGNMENT = 16 BCRYPT_PAD_NONE = 0x00000001 BCRYPT_PAD_OAEP = 0x00000004 BCRYPT_PAD_PKCS1 = 0x00000002 BCRYPT_PAD_PSS = 0x00000008 BCRYPT_PRIVATE_KEY_FLAG = 0x00000002 BCRYPT_PROV_DISPATCH = 0x00000001 BCRYPT_PUBLIC_KEY_FLAG = 0x00000001 BCRYPT_RNG_INTERFACE = 0x00000006 BCRYPT_RNG_OPERATION = 0x00000020 BCRYPT_RNG_USE_ENTROPY_IN_BUFFER = 0x00000001 BCRYPT_RSAFULLPRIVATE_MAGIC = 0x33415352 BCRYPT_RSAPRIVATE_MAGIC = 0x32415352 BCRYPT_RSAPUBLIC_MAGIC = 0x31415352 BCRYPT_SECRET_AGREEMENT_INTERFACE = 0x00000004 BCRYPT_SECRET_AGREEMENT_OPERATION = 0x00000008 BCRYPT_SIGNATURE_INTERFACE = 0x00000005 BCRYPT_SIGNATURE_OPERATION = 0x00000010 BCRYPT_STRUCT_ALIGNMENT = 0 BCRYPT_SUPPORTED_PAD_OAEP = 0x00000008 BCRYPT_SUPPORTED_PAD_PKCS1_ENC = 0x00000002 BCRYPT_SUPPORTED_PAD_PKCS1_SIG = 0x00000004 BCRYPT_SUPPORTED_PAD_PSS = 0x00000010 BCRYPT_SUPPORTED_PAD_ROUTER = 0x00000001 BCRYPT_USE_SYSTEM_PREFERRED_RNG = 0x00000002 BDR_INNER = 12 BDR_OUTER = 3 BDR_RAISED = 5 BDR_RAISEDINNER = 0x0004 BDR_RAISEDOUTER = 0x0001 BDR_SUNKEN = 10 BDR_SUNKENINNER = 0x0008 BDR_SUNKENOUTER = 0x0002 BEGIN_INTERFACE = 0 BEGIN_PATH = 4096 BELOW_NORMAL_PRIORITY_CLASS = 0x4000 BF_ADJUST = 0x2000 BF_BOTTOM = 0x0008 BF_BOTTOMLEFT = 9 BF_BOTTOMRIGHT = 12 BF_DIAGONAL = 0x0010 BF_DIAGONAL_ENDBOTTOMLEFT = 25 BF_DIAGONAL_ENDBOTTOMRIGHT = 28 BF_DIAGONAL_ENDTOPLEFT = 19 BF_DIAGONAL_ENDTOPRIGHT = 22 BF_FLAT = 0x4000 BF_LEFT = 0x0001 BF_MIDDLE = 0x0800 BF_MONO = 0x8000 BF_RECT = 15 BF_RIGHT = 0x0004 BF_SOFT = 0x1000 BF_TOP = 0x0002 BF_TOPLEFT = 3 BF_TOPRIGHT = 6 BIDI_ACCESS_ADMINISTRATOR = 0x1 BIDI_ACCESS_USER = 0x2 BITSPIXEL = 12 BI_BITFIELDS = 3 BI_JPEG = 4 BI_PNG = 5 BI_RGB = 0 BI_RLE4 = 2 BI_RLE8 = 1 BKMODE_LAST = 2 BLACKONWHITE = 1 BLACK_BRUSH = 4 BLACK_PEN = 7 BLTALIGNMENT = 119 BM_CLICK = 0x00F5 BM_GETCHECK = 0x00F0 BM_GETIMAGE = 0x00F6 BM_GETSTATE = 0x00F2 BM_SETCHECK = 0x00F1 BM_SETIMAGE = 0x00F7 BM_SETSTATE = 0x00F3 BM_SETSTYLE = 0x00F4 BN_CLICKED = 0 BN_DBLCLK = 5 BN_DISABLE = 4 BN_DOUBLECLICKED = 5 BN_HILITE = 2 BN_KILLFOCUS = 7 BN_PAINT = 1 BN_PUSHED = 2 BN_SETFOCUS = 6 BN_UNHILITE = 3 BN_UNPUSHED = 3 BOLD_FONTTYPE = 0x100 BROADCAST_QUERY_DENY = 0x424D5144 BSF_ALLOWSFW = 0x00000080 BSF_FLUSHDISK = 0x00000004 BSF_FORCEIFHUNG = 0x00000020 BSF_IGNORECURRENTTASK = 0x00000002 BSF_LUID = 0x00000400 BSF_NOHANG = 0x00000008 BSF_NOTIMEOUTIFNOTHUNG = 0x00000040 BSF_POSTMESSAGE = 0x00000010 BSF_QUERY = 0x00000001 BSF_RETURNHDESK = 0x00000200 BSF_SENDNOTIFYMESSAGE = 0x00000100 BSM_ALLCOMPONENTS = 0x00000000 BSM_ALLDESKTOPS = 0x00000010 BSM_APPLICATIONS = 0x00000008 BSM_INSTALLABLEDRIVERS = 0x00000004 BSM_NETDRIVER = 0x00000002 BSM_VXDS = 0x00000001 BST_CHECKED = 0x0001 BST_FOCUS = 0x0008 BST_INDETERMINATE = 0x0002 BST_PUSHED = 0x0004 BST_UNCHECKED = 0x0000 BS_3STATE = 5 BS_AUTO3STATE = 6 BS_AUTOCHECKBOX = 3 BS_AUTORADIOBUTTON = 9 BS_BITMAP = 128 BS_BOTTOM = 2048 BS_CENTER = 768 BS_CHECKBOX = 2 BS_DEFPUSHBUTTON = 1 BS_DIBPATTERN = 5 BS_DIBPATTERN8X8 = 8 BS_DIBPATTERNPT = 6 BS_FLAT = 32768 BS_GROUPBOX = 7 BS_HATCHED = 2 BS_HOLLOW = 1 BS_ICON = 64 BS_INDEXED = 4 BS_LEFT = 256 BS_LEFTTEXT = 32 BS_MONOPATTERN = 9 BS_MULTILINE = 8192 BS_NOTIFY = 16384 BS_NULL = 1 BS_OWNERDRAW = 11 BS_PATTERN = 3 BS_PATTERN8X8 = 7 BS_PUSHBOX = 10 BS_PUSHBUTTON = 0 BS_PUSHLIKE = 4096 BS_RADIOBUTTON = 4 BS_RIGHT = 512 BS_RIGHTBUTTON = 32 BS_SOLID = 0 BS_TEXT = 0 BS_TOP = 1024 BS_TYPEMASK = 15 BS_USERBUTTON = 8 BS_VCENTER = 3072 C1_ALPHA = 0x0100 C1_BLANK = 0x0040 C1_CNTRL = 0x0020 C1_DEFINED = 0x0200 C1_DIGIT = 0x0004 C1_LOWER = 0x0002 C1_PUNCT = 0x0010 C1_SPACE = 0x0008 C1_UPPER = 0x0001 C1_XDIGIT = 0x0080 C2_ARABICNUMBER = 0x0006 C2_BLOCKSEPARATOR = 0x0008 C2_COMMONSEPARATOR = 0x0007 C2_EUROPENUMBER = 0x0003 C2_EUROPESEPARATOR = 0x0004 C2_EUROPETERMINATOR = 0x0005 C2_LEFTTORIGHT = 0x0001 C2_NOTAPPLICABLE = 0x0000 C2_OTHERNEUTRAL = 0x000b C2_RIGHTTOLEFT = 0x0002 C2_SEGMENTSEPARATOR = 0x0009 C2_WHITESPACE = 0x000a C3_ALPHA = 0x8000 C3_DIACRITIC = 0x0002 C3_FULLWIDTH = 0x0080 C3_HALFWIDTH = 0x0040 C3_HIGHSURROGATE = 0x0800 C3_HIRAGANA = 0x0020 C3_IDEOGRAPH = 0x0100 C3_KASHIDA = 0x0200 C3_KATAKANA = 0x0010 C3_LEXICAL = 0x0400 C3_LOWSURROGATE = 0x1000 C3_NONSPACING = 0x0001 C3_NOTAPPLICABLE = 0x0000 C3_SYMBOL = 0x0008 C3_VOWELMARK = 0x0004 CACHE_E_FIRST = 2147746160 CACHE_E_LAST = 2147746175 CACHE_FULLY_ASSOCIATIVE = 0xFF CACHE_S_FIRST = 262512 CACHE_S_LAST = 262527 CADV_LATEACK = 0xFFFF CALERT_SYSTEM = 6 CALG_3DES = 26115 CALG_3DES_112 = 26121 CALG_AES = 26129 CALG_AES_128 = 26126 CALG_AES_192 = 26127 CALG_AES_256 = 26128 CALG_AGREEDKEY_ANY = 43523 CALG_CYLINK_MEK = 26124 CALG_DES = 26113 CALG_DESX = 26116 CALG_DH_EPHEM = 43522 CALG_DH_SF = 43521 CALG_DSS_SIGN = 8704 CALG_HASH_REPLACE_OWF = 32779 CALG_HMAC = 32777 CALG_HUGHES_MD5 = 40963 CALG_KEA_KEYX = 43524 CALG_MAC = 32773 CALG_MD2 = 32769 CALG_MD4 = 32770 CALG_MD5 = 32771 CALG_NO_SIGN = 8192 CALG_OID_INFO_CNG_ONLY = 0xffffffff CALG_OID_INFO_PARAMETERS = 0xfffffffe CALG_PCT1_MASTER = 19460 CALG_RC2 = 26114 CALG_RC4 = 26625 CALG_RC5 = 26125 CALG_RSA_KEYX = 41984 CALG_RSA_SIGN = 9216 CALG_SCHANNEL_ENC_KEY = 19463 CALG_SCHANNEL_MAC_KEY = 19459 CALG_SCHANNEL_MASTER_HASH = 19458 CALG_SEAL = 26626 CALG_SHA = 32772 CALG_SHA1 = 32772 CALG_SHA_256 = 32780 CALG_SHA_384 = 32781 CALG_SHA_512 = 32782 CALG_SKIPJACK = 26122 CALG_SSL2_MASTER = 19461 CALG_SSL3_MASTER = 19457 CALG_SSL3_SHAMD5 = 32776 CALG_TEK = 26123 CALG_TLS1PRF = 32778 CALG_TLS1_MASTER = 19462 CALLBACK = 0 CALLBACK_CHUNK_FINISHED = 0x0 CALLBACK_EVENT = 327680 CALLBACK_FUNCTION = 196608 CALLBACK_NULL = 0 CALLBACK_STREAM_SWITCH = 0x1 CALLBACK_TASK = 131072 CALLBACK_THREAD = 131072 CALLBACK_TYPEMASK = 458752 CALLBACK_WINDOW = 65536 CALL_PENDING = 0x02 CAL_GREGORIAN = 1 CAL_GREGORIAN_ARABIC = 10 CAL_GREGORIAN_ME_FRENCH = 9 CAL_GREGORIAN_US = 2 CAL_GREGORIAN_XLIT_ENGLISH = 11 CAL_GREGORIAN_XLIT_FRENCH = 12 CAL_HEBREW = 8 CAL_HIJRI = 6 CAL_ICALINTVALUE = 0x00000001 CAL_ITWODIGITYEARMAX = 0x00000030 CAL_IYEAROFFSETRANGE = 0x00000003 CAL_JAPAN = 3 CAL_KOREA = 5 CAL_NOUSEROVERRIDE = 2147483648 CAL_RETURN_NUMBER = 536870912 CAL_SABBREVDAYNAME1 = 0x0000000e CAL_SABBREVDAYNAME2 = 0x0000000f CAL_SABBREVDAYNAME3 = 0x00000010 CAL_SABBREVDAYNAME4 = 0x00000011 CAL_SABBREVDAYNAME5 = 0x00000012 CAL_SABBREVDAYNAME6 = 0x00000013 CAL_SABBREVDAYNAME7 = 0x00000014 CAL_SABBREVMONTHNAME1 = 0x00000022 CAL_SABBREVMONTHNAME10 = 0x0000002b CAL_SABBREVMONTHNAME11 = 0x0000002c CAL_SABBREVMONTHNAME12 = 0x0000002d CAL_SABBREVMONTHNAME13 = 0x0000002e CAL_SABBREVMONTHNAME2 = 0x00000023 CAL_SABBREVMONTHNAME3 = 0x00000024 CAL_SABBREVMONTHNAME4 = 0x00000025 CAL_SABBREVMONTHNAME5 = 0x00000026 CAL_SABBREVMONTHNAME6 = 0x00000027 CAL_SABBREVMONTHNAME7 = 0x00000028 CAL_SABBREVMONTHNAME8 = 0x00000029 CAL_SABBREVMONTHNAME9 = 0x0000002a CAL_SCALNAME = 0x00000002 CAL_SDAYNAME1 = 0x00000007 CAL_SDAYNAME2 = 0x00000008 CAL_SDAYNAME3 = 0x00000009 CAL_SDAYNAME4 = 0x0000000a CAL_SDAYNAME5 = 0x0000000b CAL_SDAYNAME6 = 0x0000000c CAL_SDAYNAME7 = 0x0000000d CAL_SERASTRING = 0x00000004 CAL_SLONGDATE = 0x00000006 CAL_SMONTHNAME1 = 0x00000015 CAL_SMONTHNAME10 = 0x0000001e CAL_SMONTHNAME11 = 0x0000001f CAL_SMONTHNAME12 = 0x00000020 CAL_SMONTHNAME13 = 0x00000021 CAL_SMONTHNAME2 = 0x00000016 CAL_SMONTHNAME3 = 0x00000017 CAL_SMONTHNAME4 = 0x00000018 CAL_SMONTHNAME5 = 0x00000019 CAL_SMONTHNAME6 = 0x0000001a CAL_SMONTHNAME7 = 0x0000001b CAL_SMONTHNAME8 = 0x0000001c CAL_SMONTHNAME9 = 0x0000001d CAL_SSHORTDATE = 0x00000005 CAL_SYEARMONTH = 0x0000002f CAL_TAIWAN = 4 CAL_THAI = 7 CAL_UMALQURA = 23 CAL_USE_CP_ACP = 1073741824 CAPSLOCK_ON = 0x80 CAP_ATAPI_ID_CMD = 2 CAP_ATA_ID_CMD = 1 CAP_SMART_CMD = 4 CAT_E_FIRST = 2147746144 CAT_E_LAST = 2147746145 CA_LOG_FILTER = 0x0002 CA_NEGATIVE = 0x0001 CBF_FAIL_ADVISES = 0x00004000 CBF_FAIL_ALLSVRXACTIONS = 0x0003f000 CBF_FAIL_CONNECTIONS = 0x00002000 CBF_FAIL_EXECUTES = 0x00008000 CBF_FAIL_POKES = 0x00010000 CBF_FAIL_REQUESTS = 0x00020000 CBF_FAIL_SELFCONNECTIONS = 0x00001000 CBF_SKIP_ALLNOTIFICATIONS = 0x003c0000 CBF_SKIP_CONNECT_CONFIRMS = 0x00040000 CBF_SKIP_DISCONNECTS = 0x00200000 CBF_SKIP_REGISTRATIONS = 0x00080000 CBF_SKIP_UNREGISTRATIONS = 0x00100000 CBM_INIT = 4 CBN_CLOSEUP = 8 CBN_DBLCLK = 2 CBN_DROPDOWN = 7 CBN_EDITCHANGE = 5 CBN_EDITUPDATE = 6 CBN_ERRSPACE = -1 CBN_KILLFOCUS = 4 CBN_SELCHANGE = 1 CBN_SELENDCANCEL = 10 CBN_SELENDOK = 9 CBN_SETFOCUS = 3 CBR_110 = 110 CBR_115200 = 115200 CBR_1200 = 1200 CBR_128000 = 128000 CBR_14400 = 14400 CBR_19200 = 19200 CBR_2400 = 2400 CBR_256000 = 256000 CBR_300 = 300 CBR_38400 = 38400 CBR_4800 = 4800 CBR_56000 = 56000 CBR_57600 = 57600 CBR_600 = 600 CBR_9600 = 9600 CBS_AUTOHSCROLL = 64 CBS_DISABLENOSCROLL = 2048 CBS_DROPDOWN = 2 CBS_DROPDOWNLIST = 3 CBS_HASSTRINGS = 512 CBS_LOWERCASE = 16384 CBS_NOINTEGRALHEIGHT = 1024 CBS_OEMCONVERT = 128 CBS_OWNERDRAWFIXED = 16 CBS_OWNERDRAWVARIABLE = 32 CBS_SIMPLE = 1 CBS_SORT = 256 CBS_UPPERCASE = 8192 CB_ADDSTRING = 0x0143 CB_DELETESTRING = 0x0144 CB_DIR = 0x0145 CB_ERR = -1 CB_ERRSPACE = -2 CB_FINDSTRING = 0x014C CB_FINDSTRINGEXACT = 0x0158 CB_GETCOMBOBOXINFO = 0x0164 CB_GETCOUNT = 0x0146 CB_GETCURSEL = 0x0147 CB_GETDROPPEDCONTROLRECT = 0x0152 CB_GETDROPPEDSTATE = 0x0157 CB_GETDROPPEDWIDTH = 0x015f CB_GETEDITSEL = 0x0140 CB_GETEXTENDEDUI = 0x0156 CB_GETHORIZONTALEXTENT = 0x015d CB_GETITEMDATA = 0x0150 CB_GETITEMHEIGHT = 0x0154 CB_GETLBTEXT = 0x0148 CB_GETLBTEXTLEN = 0x0149 CB_GETLOCALE = 0x015A CB_GETTOPINDEX = 0x015b CB_INITSTORAGE = 0x0161 CB_INSERTSTRING = 0x014A CB_LIMITTEXT = 0x0141 CB_MSGMAX = 0x0165 CB_OKAY = 0 CB_RESETCONTENT = 0x014B CB_SELECTSTRING = 0x014D CB_SETCURSEL = 0x014E CB_SETDROPPEDWIDTH = 0x0160 CB_SETEDITSEL = 0x0142 CB_SETEXTENDEDUI = 0x0155 CB_SETHORIZONTALEXTENT = 0x015e CB_SETITEMDATA = 0x0151 CB_SETITEMHEIGHT = 0x0153 CB_SETLOCALE = 0x0159 CB_SETTOPINDEX = 0x015c CB_SHOWDROPDOWN = 0x014F CCERR_CHOOSECOLORCODES = 0x5000 CCHDEVICENAME = 32 CCHFORMNAME = 32 CCHILDREN_SCROLLBAR = 5 CCHILDREN_TITLEBAR = 5 CCH_MAX_PROPSTG_NAME = 31 CC_ANYCOLOR = 0x100 CC_CHORD = 4 CC_CIRCLES = 1 CC_ELLIPSES = 8 CC_ENABLEHOOK = 0x10 CC_ENABLETEMPLATE = 0x20 CC_ENABLETEMPLATEHANDLE = 0x40 CC_FULLOPEN = 0x2 CC_INTERIORS = 128 CC_NONE = 0 CC_PIE = 2 CC_PREVENTFULLOPEN = 0x4 CC_RGBINIT = 0x1 CC_ROUNDRECT = 256 CC_SHOWHELP = 0x8 CC_SOLIDCOLOR = 0x80 CC_STYLED = 32 CC_WIDE = 16 CC_WIDESTYLED = 64 CDECL = 0 CDERR_DIALOGFAILURE = 0xFFFF CDERR_FINDRESFAILURE = 0x0006 CDERR_GENERALCODES = 0x0000 CDERR_INITIALIZATION = 0x0002 CDERR_LOADRESFAILURE = 0x0007 CDERR_LOADSTRFAILURE = 0x0005 CDERR_LOCKRESFAILURE = 0x0008 CDERR_MEMALLOCFAILURE = 0x0009 CDERR_MEMLOCKFAILURE = 0x000A CDERR_NOHINSTANCE = 0x0004 CDERR_NOHOOK = 0x000B CDERR_NOTEMPLATE = 0x0003 CDERR_REGISTERMSGFAIL = 0x000C CDERR_STRUCTSIZE = 0x0001 CDM_FIRST = 1124 CDM_GETFILEPATH = 1125 CDM_GETFOLDERIDLIST = 1127 CDM_GETFOLDERPATH = 1126 CDM_GETSPEC = 1124 CDM_HIDECONTROL = 1129 CDM_LAST = 1224 CDM_SETCONTROLTEXT = 1128 CDM_SETDEFEXT = 1130 CDN_FILEOK = 18446744073709551010 CDN_FIRST = 18446744073709551015 CDN_FOLDERCHANGE = 18446744073709551013 CDN_HELP = 18446744073709551011 CDN_INCLUDEITEM = 18446744073709551008 CDN_INITDONE = 18446744073709551015 CDN_LAST = 18446744073709550917 CDN_SELCHANGE = 18446744073709551014 CDN_SHAREVIOLATION = 18446744073709551012 CDN_TYPECHANGE = 18446744073709551009 CDS_FULLSCREEN = 0x00000004 CDS_GLOBAL = 0x00000008 CDS_NORESET = 0x10000000 CDS_RESET = 0x40000000 CDS_RESET_EX = 0x20000000 CDS_SET_PRIMARY = 0x00000010 CDS_TEST = 0x00000002 CDS_UPDATEREGISTRY = 0x00000001 CDS_VIDEOPARAMETERS = 0x00000020 CD_LBSELADD = 2 CD_LBSELCHANGE = 0 CD_LBSELNOITEMS = -1 CD_LBSELSUB = 1 CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG = 0x8 CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG = 0x4 CERT_ACCESS_STATE_PROP_ID = 14 CERT_ACCESS_STATE_SHARED_USER_FLAG = 0x10 CERT_ACCESS_STATE_SYSTEM_STORE_FLAG = 0x2 CERT_ACCESS_STATE_WRITE_PERSIST_FLAG = 0x1 CERT_AIA_URL_RETRIEVED_PROP_ID = 67 CERT_ALT_NAME_DIRECTORY_NAME = 5 CERT_ALT_NAME_DNS_NAME = 3 CERT_ALT_NAME_EDI_PARTY_NAME = 6 CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK = 0xff CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT = 16 CERT_ALT_NAME_IP_ADDRESS = 8 CERT_ALT_NAME_OTHER_NAME = 1 CERT_ALT_NAME_REGISTERED_ID = 9 CERT_ALT_NAME_RFC822_NAME = 2 CERT_ALT_NAME_URL = 7 CERT_ALT_NAME_VALUE_ERR_INDEX_MASK = 0x0000ffff CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT = 0 CERT_ALT_NAME_X400_ADDRESS = 4 CERT_ARCHIVED_KEY_HASH_PROP_ID = 65 CERT_ARCHIVED_PROP_ID = 19 CERT_AUTHORITY_INFO_ACCESS_PROP_ID = 68 CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_PARTIAL_CHAIN_LOGGING_FLAG = 0x2 CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_UNTRUSTED_ROOT_LOGGING_FLAG = 0x1 CERT_AUTH_ROOT_CTL_FILENAME_A = "authroot.stl" CERT_AUTH_ROOT_SHA256_HASH_PROP_ID = 98 CERT_AUTO_ENROLL_PROP_ID = 21 CERT_AUTO_ENROLL_RETRY_PROP_ID = 66 CERT_AUTO_UPDATE_DISABLE_RANDOM_QUERY_STRING_FLAG = 0x4 CERT_BACKED_UP_PROP_ID = 69 CERT_BIOMETRIC_OID_DATA_CHOICE = 2 CERT_BIOMETRIC_PICTURE_TYPE = 0 CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE = 1 CERT_BIOMETRIC_SIGNATURE_TYPE = 1 CERT_BUNDLE_CERTIFICATE = 0 CERT_BUNDLE_CRL = 1 CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG = 0x2 CERT_CA_DISABLE_CRL_PROP_ID = 82 CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID = 81 CERT_CA_SUBJECT_FLAG = 0x80 CERT_CEP_PROP_ID = 87 CERT_CHAIN_CACHE_END_CERT = 0x1 CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL = 0x4 CERT_CHAIN_CRL_VALIDITY_EXT_PERIOD_HOURS_DEFAULT = 12 CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_DEFAULT = 168 CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE = 0x100 CERT_CHAIN_DISABLE_MD2_MD4 = 0x1000 CERT_CHAIN_DISABLE_MY_PEER_TRUST = 0x800 CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING = 0x40 CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE = 0x10 CERT_CHAIN_ENABLE_MD2_MD4_FLAG = 0x1 CERT_CHAIN_ENABLE_ONLY_WEAK_LOGGING_FLAG = 0x8 CERT_CHAIN_ENABLE_PEER_TRUST = 0x400 CERT_CHAIN_ENABLE_SHARE_STORE = 0x20 CERT_CHAIN_ENABLE_WEAK_LOGGING_FLAG = 0x4 CERT_CHAIN_ENABLE_WEAK_RSA_ROOT_FLAG = 0x2 CERT_CHAIN_FIND_BY_ISSUER = 1 CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = 0x8000 CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = 0x4 CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = 0x1 CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = 0x2 CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = 0x8 CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = 0x4000 CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_DEFAULT = 5 CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_DEFAULT = 100000 CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_DEFAULT = 10 CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_DEFAULT = 3 CERT_CHAIN_MAX_URL_RETRIEVAL_BYTE_COUNT_DEFAULT = 104857600 CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DEFAULT = 1023 CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DISABLE = 0xffffffff CERT_CHAIN_OCSP_VALIDITY_SECONDS_DEFAULT = 43200 CERT_CHAIN_OPTION_DISABLE_AIA_URL_RETRIEVAL = 0x2 CERT_CHAIN_OPTION_ENABLE_SIA_URL_RETRIEVAL = 0x4 CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG = 0x8000 CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG = 0x10 CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS = 7 CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS = 3840 CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG = 0x400 CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG = 0x2 CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG = 0x200 CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG = 0x100 CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG = 0x8 CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG = 0x40 CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG = 0x80 CERT_CHAIN_POLICY_IGNORE_NOT_SUPPORTED_CRITICAL_EXT_FLAG = 0x2000 CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG = 0x4 CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG = 0x1 CERT_CHAIN_POLICY_IGNORE_PEER_TRUST_FLAG = 0x1000 CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG = 0x800 CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG = 0x20 CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG = 0x4000 CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS = 0x80 CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT = 0x8000000 CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY = 0x80000000 CERT_CHAIN_REVOCATION_CHECK_CHAIN = 0x20000000 CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x40000000 CERT_CHAIN_REVOCATION_CHECK_END_CERT = 0x10000000 CERT_CHAIN_REVOCATION_CHECK_OCSP_CERT = 0x4000000 CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT = 20000 CERT_CHAIN_STRONG_SIGN_DISABLE_END_CHECK_FLAG = 0x1 CERT_CHAIN_THREAD_STORE_SYNC = 0x2 CERT_CHAIN_TIMESTAMP_TIME = 0x200 CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT = 15000 CERT_CHAIN_USE_LOCAL_MACHINE_STORE = 0x8 CERT_CHAIN_WEAK_RSA_PUB_KEY_TIME_DEFAULT = 0x01ca8a755c6e0000 CERT_CLOSE_STORE_CHECK_FLAG = 0x2 CERT_CLOSE_STORE_FORCE_FLAG = 0x1 CERT_COMPARE_ANY = 0 CERT_COMPARE_ATTR = 3 CERT_COMPARE_CERT_ID = 16 CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17 CERT_COMPARE_CTL_USAGE = 10 CERT_COMPARE_ENHKEY_USAGE = 10 CERT_COMPARE_EXISTING = 13 CERT_COMPARE_HASH = 1 CERT_COMPARE_HASH_STR = 20 CERT_COMPARE_HAS_PRIVATE_KEY = 21 CERT_COMPARE_ISSUER_OF = 12 CERT_COMPARE_KEY_IDENTIFIER = 15 CERT_COMPARE_KEY_SPEC = 9 CERT_COMPARE_MASK = 0xffff CERT_COMPARE_MD5_HASH = 4 CERT_COMPARE_NAME = 2 CERT_COMPARE_NAME_STR_A = 7 CERT_COMPARE_NAME_STR_W = 8 CERT_COMPARE_PROPERTY = 5 CERT_COMPARE_PUBKEY_MD5_HASH = 18 CERT_COMPARE_PUBLIC_KEY = 6 CERT_COMPARE_SHA1_HASH = 1 CERT_COMPARE_SHIFT = 16 CERT_COMPARE_SIGNATURE_HASH = 14 CERT_COMPARE_SUBJECT_CERT = 11 CERT_COMPARE_SUBJECT_INFO_ACCESS = 19 CERT_CONTEXT_REVOCATION_TYPE = 1 CERT_CREATE_CONTEXT_NOCOPY_FLAG = 0x1 CERT_CREATE_CONTEXT_NO_ENTRY_FLAG = 0x8 CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG = 0x4 CERT_CREATE_CONTEXT_SORTED_FLAG = 0x2 CERT_CREATE_SELFSIGN_NO_KEY_INFO = 2 CERT_CREATE_SELFSIGN_NO_SIGN = 1 CERT_CROSS_CERT_DIST_POINTS_PROP_ID = 23 CERT_CTL_USAGE_PROP_ID = 9 CERT_DATA_ENCIPHERMENT_KEY_USAGE = 0x10 CERT_DATE_STAMP_PROP_ID = 27 CERT_DECIPHER_ONLY_KEY_USAGE = 0x80 CERT_DESCRIPTION_PROP_ID = 13 CERT_DIGITAL_SIGNATURE_KEY_USAGE = 0x80 CERT_DISALLOWED_CERT_CTL_FILENAME_A = "disallowedcert.stl" CERT_DISALLOWED_FILETIME_PROP_ID = 104 CERT_DSS_R_LEN = 20 CERT_DSS_SIGNATURE_LEN = 40 CERT_DSS_S_LEN = 20 CERT_EFS_PROP_ID = 17 CERT_ENCIPHER_ONLY_KEY_USAGE = 0x01 CERT_ENCODING_TYPE_MASK = 0x0000ffff CERT_END_ENTITY_SUBJECT_FLAG = 0x40 CERT_ENHKEY_USAGE_PROP_ID = 9 CERT_ENROLLMENT_PROP_ID = 26 CERT_EXCLUDED_SUBTREE_BIT = 2147483648 CERT_EXTENDED_ERROR_INFO_PROP_ID = 30 CERT_FILE_STORE_COMMIT_ENABLE_FLAG = 0x10000 CERT_FIND_ANY = 0 CERT_FIND_CERT_ID = 1048576 CERT_FIND_CROSS_CERT_DIST_POINTS = 1114112 CERT_FIND_CTL_USAGE = 655360 CERT_FIND_ENHKEY_USAGE = 655360 CERT_FIND_EXISTING = 851968 CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = 2 CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = 0x2 CERT_FIND_HASH = 65536 CERT_FIND_HASH_STR = 1310720 CERT_FIND_HAS_PRIVATE_KEY = 1376256 CERT_FIND_ISSUER_ATTR = 196612 CERT_FIND_ISSUER_NAME = 131076 CERT_FIND_ISSUER_OF = 786432 CERT_FIND_ISSUER_STR = 524292 CERT_FIND_ISSUER_STR_A = 458756 CERT_FIND_ISSUER_STR_W = 524292 CERT_FIND_KEY_IDENTIFIER = 983040 CERT_FIND_KEY_SPEC = 589824 CERT_FIND_MD5_HASH = 262144 CERT_FIND_NO_CTL_USAGE_FLAG = 8 CERT_FIND_NO_ENHKEY_USAGE_FLAG = 0x8 CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = 1 CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = 0x1 CERT_FIND_OR_CTL_USAGE_FLAG = 16 CERT_FIND_OR_ENHKEY_USAGE_FLAG = 0x10 CERT_FIND_PROPERTY = 327680 CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = 4 CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = 0x4 CERT_FIND_PUBKEY_MD5_HASH = 1179648 CERT_FIND_PUBLIC_KEY = 393216 CERT_FIND_SHA1_HASH = 65536 CERT_FIND_SIGNATURE_HASH = 917504 CERT_FIND_SUBJECT_ATTR = 196615 CERT_FIND_SUBJECT_CERT = 720896 CERT_FIND_SUBJECT_INFO_ACCESS = 1245184 CERT_FIND_SUBJECT_NAME = 131079 CERT_FIND_SUBJECT_STR = 524295 CERT_FIND_SUBJECT_STR_A = 458759 CERT_FIND_SUBJECT_STR_W = 524295 CERT_FIND_VALID_CTL_USAGE_FLAG = 32 CERT_FIND_VALID_ENHKEY_USAGE_FLAG = 0x20 CERT_FIRST_RESERVED_PROP_ID = 107 CERT_FIRST_USER_PROP_ID = 0x8000 CERT_FORTEZZA_DATA_PROP_ID = 18 CERT_FRIENDLY_NAME_PROP_ID = 11 CERT_HASH_PROP_ID = 3 CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID = 79 CERT_HCRYPTPROV_TRANSFER_PROP_ID = 100 CERT_ID_ISSUER_SERIAL_NUMBER = 1 CERT_ID_KEY_IDENTIFIER = 2 CERT_ID_SHA1_HASH = 3 CERT_IE30_RESERVED_PROP_ID = 7 CERT_INFO_EXTENSION_FLAG = 11 CERT_INFO_ISSUER_FLAG = 4 CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9 CERT_INFO_NOT_AFTER_FLAG = 6 CERT_INFO_NOT_BEFORE_FLAG = 5 CERT_INFO_SERIAL_NUMBER_FLAG = 2 CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3 CERT_INFO_SUBJECT_FLAG = 7 CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8 CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10 CERT_INFO_VERSION_FLAG = 1 CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID = 96 CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID = 95 CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID = 24 CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID = 94 CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID = 28 CERT_KEYGEN_REQUEST_V1 = 0 CERT_KEY_AGREEMENT_KEY_USAGE = 0x08 CERT_KEY_CERT_SIGN_KEY_USAGE = 0x04 CERT_KEY_CONTEXT_PROP_ID = 5 CERT_KEY_ENCIPHERMENT_KEY_USAGE = 0x20 CERT_KEY_IDENTIFIER_PROP_ID = 20 CERT_KEY_PROV_HANDLE_PROP_ID = 1 CERT_KEY_PROV_INFO_PROP_ID = 2 CERT_KEY_REPAIR_ATTEMPTED_PROP_ID = 103 CERT_KEY_SPEC_PROP_ID = 6 CERT_LAST_RESERVED_PROP_ID = 0x00007fff CERT_LAST_USER_PROP_ID = 0x0000ffff CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG = 0x20000 CERT_LDAP_STORE_OPENED_FLAG = 0x40000 CERT_LDAP_STORE_SIGN_FLAG = 0x10000 CERT_LDAP_STORE_UNBIND_FLAG = 0x80000 CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE = 1 CERT_LOGOTYPE_COLOR_IMAGE_INFO_CHOICE = 2 CERT_LOGOTYPE_DIRECT_INFO_CHOICE = 1 CERT_LOGOTYPE_GRAY_SCALE_IMAGE_INFO_CHOICE = 1 CERT_LOGOTYPE_INDIRECT_INFO_CHOICE = 2 CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE = 0 CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE = 2 CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN = 48 CERT_MD5_HASH_PROP_ID = 4 CERT_NAME_ATTR_TYPE = 3 CERT_NAME_DISABLE_IE4_UTF8_FLAG = 0x10000 CERT_NAME_DNS_TYPE = 6 CERT_NAME_EMAIL_TYPE = 1 CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5 CERT_NAME_ISSUER_FLAG = 0x1 CERT_NAME_RDN_TYPE = 2 CERT_NAME_SEARCH_ALL_NAMES_FLAG = 0x2 CERT_NAME_SIMPLE_DISPLAY_TYPE = 4 CERT_NAME_STR_COMMA_FLAG = 0x4000000 CERT_NAME_STR_CRLF_FLAG = 0x8000000 CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG = 0x10000 CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG = 0x100000 CERT_NAME_STR_ENABLE_PUNYCODE_FLAG = 0x200000 CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG = 0x20000 CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG = 0x40000 CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG = 0x80000 CERT_NAME_STR_FORWARD_FLAG = 0x1000000 CERT_NAME_STR_NO_PLUS_FLAG = 0x20000000 CERT_NAME_STR_NO_QUOTING_FLAG = 0x10000000 CERT_NAME_STR_REVERSE_FLAG = 0x2000000 CERT_NAME_STR_SEMICOLON_FLAG = 0x40000000 CERT_NAME_UPN_TYPE = 8 CERT_NAME_URL_TYPE = 7 CERT_NCRYPT_KEY_HANDLE_PROP_ID = 78 CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID = 99 CERT_NCRYPT_KEY_SPEC = 0xffffffff CERT_NEW_KEY_PROP_ID = 74 CERT_NEXT_UPDATE_LOCATION_PROP_ID = 10 CERT_NON_REPUDIATION_KEY_USAGE = 0x40 CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID = 77 CERT_NO_EXPIRE_NOTIFICATION_PROP_ID = 97 CERT_OCSP_CACHE_PREFIX_PROP_ID = 75 CERT_OCSP_RESPONSE_PROP_ID = 70 CERT_OFFLINE_CRL_SIGN_KEY_USAGE = 0x02 CERT_OID_NAME_STR = 2 CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG = 0x1 CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG = 0x8 CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG = 0x2 CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG = 0x1 CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG = 0x4 CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG = 0x1 CERT_PROT_ROOT_DISABLE_LM_AUTH_FLAG = 0x8 CERT_PROT_ROOT_DISABLE_NOT_DEFINED_NAME_CONSTRAINT_FLAG = 0x20 CERT_PROT_ROOT_DISABLE_NT_AUTH_REQUIRED_FLAG = 0x10 CERT_PROT_ROOT_DISABLE_PEER_TRUST = 0x10000 CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG = 0x2 CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG = 0x4 CERT_PROT_ROOT_ONLY_LM_GPT_FLAG = 0x8 CERT_PROT_ROOT_PEER_USAGES_VALUE_NAME_A = "PeerUsages" CERT_PUBKEY_ALG_PARA_PROP_ID = 22 CERT_PUBKEY_HASH_RESERVED_PROP_ID = 8 CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID = 93 CERT_PVK_FILE_PROP_ID = 12 CERT_QUERY_CONTENT_CERT = 1 CERT_QUERY_CONTENT_CERT_PAIR = 13 CERT_QUERY_CONTENT_CRL = 3 CERT_QUERY_CONTENT_CTL = 2 CERT_QUERY_CONTENT_FLAG_ALL = 16382 CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT = 818 CERT_QUERY_CONTENT_FLAG_CERT = 2 CERT_QUERY_CONTENT_FLAG_CERT_PAIR = 8192 CERT_QUERY_CONTENT_FLAG_CRL = 8 CERT_QUERY_CONTENT_FLAG_CTL = 4 CERT_QUERY_CONTENT_FLAG_PFX = 4096 CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD = 16384 CERT_QUERY_CONTENT_FLAG_PKCS10 = 2048 CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = 256 CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = 1024 CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = 512 CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = 32 CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = 128 CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = 64 CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = 16 CERT_QUERY_CONTENT_PFX = 12 CERT_QUERY_CONTENT_PFX_AND_LOAD = 14 CERT_QUERY_CONTENT_PKCS10 = 11 CERT_QUERY_CONTENT_PKCS7_SIGNED = 8 CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10 CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9 CERT_QUERY_CONTENT_SERIALIZED_CERT = 5 CERT_QUERY_CONTENT_SERIALIZED_CRL = 7 CERT_QUERY_CONTENT_SERIALIZED_CTL = 6 CERT_QUERY_CONTENT_SERIALIZED_STORE = 4 CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED = 3 CERT_QUERY_FORMAT_BASE64_ENCODED = 2 CERT_QUERY_FORMAT_BINARY = 1 CERT_QUERY_FORMAT_FLAG_ALL = 14 CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED = 8 CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = 4 CERT_QUERY_FORMAT_FLAG_BINARY = 2 CERT_QUERY_OBJECT_BLOB = 0x2 CERT_QUERY_OBJECT_FILE = 0x1 CERT_RDN_ANY_TYPE = 0 CERT_RDN_BMP_STRING = 12 CERT_RDN_DISABLE_CHECK_TYPE_FLAG = 0x40000000 CERT_RDN_DISABLE_IE4_UTF8_FLAG = 0x1000000 CERT_RDN_ENABLE_PUNYCODE_FLAG = 0x2000000 CERT_RDN_ENABLE_T61_UNICODE_FLAG = 0x80000000 CERT_RDN_ENABLE_UTF8_UNICODE_FLAG = 0x20000000 CERT_RDN_ENCODED_BLOB = 1 CERT_RDN_FLAGS_MASK = 0xff000000 CERT_RDN_FORCE_UTF8_UNICODE_FLAG = 0x10000000 CERT_RDN_GENERAL_STRING = 10 CERT_RDN_GRAPHIC_STRING = 8 CERT_RDN_IA5_STRING = 7 CERT_RDN_INT4_STRING = 11 CERT_RDN_ISO646_STRING = 9 CERT_RDN_NUMERIC_STRING = 3 CERT_RDN_OCTET_STRING = 2 CERT_RDN_PRINTABLE_STRING = 4 CERT_RDN_T61_STRING = 5 CERT_RDN_TELETEX_STRING = 5 CERT_RDN_TYPE_MASK = 0x000000ff CERT_RDN_UNICODE_STRING = 12 CERT_RDN_UNIVERSAL_STRING = 11 CERT_RDN_UTF8_STRING = 13 CERT_RDN_VIDEOTEX_STRING = 6 CERT_RDN_VISIBLE_STRING = 9 CERT_REGISTRY_STORE_CLIENT_GPT_FLAG = 0x80000000 CERT_REGISTRY_STORE_EXTERNAL_FLAG = 0x100000 CERT_REGISTRY_STORE_LM_GPT_FLAG = 0x1000000 CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = 0x80000 CERT_REGISTRY_STORE_REMOTE_FLAG = 0x10000 CERT_REGISTRY_STORE_ROAMING_FLAG = 0x40000 CERT_REGISTRY_STORE_SERIALIZED_FLAG = 0x20000 CERT_RENEWAL_PROP_ID = 64 CERT_REQUEST_ORIGINATOR_PROP_ID = 71 CERT_REQUEST_V1 = 0 CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID = 83 CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID = 105 CERT_ROOT_PROGRAM_FLAG_ADDRESS = 0x08 CERT_ROOT_PROGRAM_FLAG_LSC = 0x40 CERT_ROOT_PROGRAM_FLAG_ORG = 0x80 CERT_ROOT_PROGRAM_FLAG_OU = 0x10 CERT_ROOT_PROGRAM_FLAG_SUBJECT_LOGO = 0x20 CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID = 84 CERT_SCARD_PIN_ID_PROP_ID = 90 CERT_SCARD_PIN_INFO_PROP_ID = 91 CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID = 102 CERT_SET_KEY_CONTEXT_PROP_ID = 0x1 CERT_SET_KEY_PROV_HANDLE_PROP_ID = 0x1 CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG = 0x80000000 CERT_SET_PROPERTY_INHIBIT_PERSIST_FLAG = 0x40000000 CERT_SHA1_HASH_PROP_ID = 3 CERT_SIGNATURE_HASH_PROP_ID = 15 CERT_SIGN_HASH_CNG_ALG_PROP_ID = 89 CERT_SIMPLE_NAME_STR = 1 CERT_SMART_CARD_DATA_PROP_ID = 16 CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID = 106 CERT_SMART_CARD_READER_PROP_ID = 101 CERT_SMART_CARD_ROOT_INFO_PROP_ID = 76 CERT_SOURCE_LOCATION_PROP_ID = 72 CERT_SOURCE_URL_PROP_ID = 73 CERT_SRV_OCSP_RESP_MAX_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT = 14400 CERT_SRV_OCSP_RESP_MIN_AFTER_NEXT_UPDATE_SECONDS_DEFAULT = 60 CERT_SRV_OCSP_RESP_MIN_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT = 120 CERT_SRV_OCSP_RESP_MIN_VALIDITY_SECONDS_DEFAULT = 600 CERT_SRV_OCSP_RESP_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT = 15000 CERT_STORE_ADD_ALWAYS = 4 CERT_STORE_ADD_NEW = 1 CERT_STORE_ADD_NEWER = 6 CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES = 7 CERT_STORE_ADD_REPLACE_EXISTING = 3 CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5 CERT_STORE_ADD_USE_EXISTING = 2 CERT_STORE_ALL_CONTEXT_FLAG = 18446744073709551615 CERT_STORE_BACKUP_RESTORE_FLAG = 0x800 CERT_STORE_BASE_CRL_FLAG = 0x100 CERT_STORE_CERTIFICATE_CONTEXT = 1 CERT_STORE_CERTIFICATE_CONTEXT_FLAG = 2 CERT_STORE_CREATE_NEW_FLAG = 0x2000 CERT_STORE_CRL_CONTEXT = 2 CERT_STORE_CRL_CONTEXT_FLAG = 4 CERT_STORE_CTL_CONTEXT = 3 CERT_STORE_CTL_CONTEXT_FLAG = 8 CERT_STORE_CTRL_AUTO_RESYNC = 4 CERT_STORE_CTRL_CANCEL_NOTIFY = 5 CERT_STORE_CTRL_COMMIT = 3 CERT_STORE_CTRL_COMMIT_CLEAR_FLAG = 0x2 CERT_STORE_CTRL_COMMIT_FORCE_FLAG = 0x1 CERT_STORE_CTRL_INHIBIT_DUPLICATE_HANDLE_FLAG = 0x1 CERT_STORE_CTRL_NOTIFY_CHANGE = 2 CERT_STORE_CTRL_RESYNC = 1 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x4 CERT_STORE_DELETE_FLAG = 0x10 CERT_STORE_DELTA_CRL_FLAG = 0x200 CERT_STORE_ENUM_ARCHIVED_FLAG = 0x200 CERT_STORE_LOCALIZED_NAME_PROP_ID = 0x1000 CERT_STORE_MANIFOLD_FLAG = 0x100 CERT_STORE_MAXIMUM_ALLOWED_FLAG = 0x1000 CERT_STORE_NO_CRL_FLAG = 0x10000 CERT_STORE_NO_CRYPT_RELEASE_FLAG = 0x1 CERT_STORE_NO_ISSUER_FLAG = 0x20000 CERT_STORE_OPEN_EXISTING_FLAG = 0x4000 CERT_STORE_PROV_CLOSE_FUNC = 0 CERT_STORE_PROV_CONTROL_FUNC = 13 CERT_STORE_PROV_DELETED_FLAG = 0x2 CERT_STORE_PROV_DELETE_CERT_FUNC = 3 CERT_STORE_PROV_DELETE_CRL_FUNC = 7 CERT_STORE_PROV_DELETE_CTL_FUNC = 11 CERT_STORE_PROV_EXTERNAL_FLAG = 0x1 CERT_STORE_PROV_FIND_CERT_FUNC = 14 CERT_STORE_PROV_FIND_CRL_FUNC = 17 CERT_STORE_PROV_FIND_CTL_FUNC = 20 CERT_STORE_PROV_FREE_FIND_CERT_FUNC = 15 CERT_STORE_PROV_FREE_FIND_CRL_FUNC = 18 CERT_STORE_PROV_FREE_FIND_CTL_FUNC = 21 CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC = 16 CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC = 19 CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC = 22 CERT_STORE_PROV_GP_SYSTEM_STORE_FLAG = 0x20 CERT_STORE_PROV_LM_SYSTEM_STORE_FLAG = 0x10 CERT_STORE_PROV_NO_PERSIST_FLAG = 0x4 CERT_STORE_PROV_READ_CERT_FUNC = 1 CERT_STORE_PROV_READ_CRL_FUNC = 5 CERT_STORE_PROV_READ_CTL_FUNC = 9 CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC = 4 CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC = 8 CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC = 12 CERT_STORE_PROV_SHARED_USER_FLAG = 0x40 CERT_STORE_PROV_SYSTEM_STORE_FLAG = 0x8 CERT_STORE_PROV_WRITE_ADD_FLAG = 0x1 CERT_STORE_PROV_WRITE_CERT_FUNC = 2 CERT_STORE_PROV_WRITE_CRL_FUNC = 6 CERT_STORE_PROV_WRITE_CTL_FUNC = 10 CERT_STORE_READONLY_FLAG = 0x8000 CERT_STORE_REVOCATION_FLAG = 0x4 CERT_STORE_SAVE_AS_PKCS12 = 3 CERT_STORE_SAVE_AS_PKCS7 = 2 CERT_STORE_SAVE_AS_STORE = 1 CERT_STORE_SAVE_TO_FILE = 1 CERT_STORE_SAVE_TO_FILENAME = 4 CERT_STORE_SAVE_TO_FILENAME_A = 3 CERT_STORE_SAVE_TO_FILENAME_W = 4 CERT_STORE_SAVE_TO_MEMORY = 2 CERT_STORE_SET_LOCALIZED_NAME_FLAG = 0x2 CERT_STORE_SHARE_CONTEXT_FLAG = 0x80 CERT_STORE_SHARE_STORE_FLAG = 0x40 CERT_STORE_SIGNATURE_FLAG = 0x1 CERT_STORE_TIME_VALIDITY_FLAG = 0x2 CERT_STORE_UNSAFE_PHYSICAL_FLAG = 0x20 CERT_STORE_UPDATE_KEYID_FLAG = 0x400 CERT_STRONG_SIGN_ENABLE_CRL_CHECK = 0x1 CERT_STRONG_SIGN_ENABLE_OCSP_CHECK = 0x2 CERT_STRONG_SIGN_OID_INFO_CHOICE = 2 CERT_STRONG_SIGN_SERIALIZED_INFO_CHOICE = 1 CERT_SUBJECT_DISABLE_CRL_PROP_ID = 86 CERT_SUBJECT_INFO_ACCESS_PROP_ID = 80 CERT_SUBJECT_NAME_MD5_HASH_PROP_ID = 29 CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID = 85 CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID = 25 CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID = 92 CERT_SYSTEM_STORE_CURRENT_SERVICE = 262144 CERT_SYSTEM_STORE_CURRENT_SERVICE_ID = 4 CERT_SYSTEM_STORE_CURRENT_USER = 65536 CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY = 458752 CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID = 7 CERT_SYSTEM_STORE_CURRENT_USER_ID = 1 CERT_SYSTEM_STORE_DEFER_READ_FLAG = 0x20000000 CERT_SYSTEM_STORE_LOCAL_MACHINE = 131072 CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE = 589824 CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID = 9 CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = 524288 CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID = 8 CERT_SYSTEM_STORE_LOCAL_MACHINE_ID = 2 CERT_SYSTEM_STORE_LOCATION_MASK = 0x00ff0000 CERT_SYSTEM_STORE_LOCATION_SHIFT = 16 CERT_SYSTEM_STORE_MASK = 0xffff0000 CERT_SYSTEM_STORE_RELOCATE_FLAG = 0x80000000 CERT_SYSTEM_STORE_SERVICES = 327680 CERT_SYSTEM_STORE_SERVICES_ID = 5 CERT_SYSTEM_STORE_UNPROTECTED_FLAG = 0x40000000 CERT_SYSTEM_STORE_USERS = 393216 CERT_SYSTEM_STORE_USERS_ID = 6 CERT_TRUST_AUTO_UPDATE_CA_REVOCATION = 0x10 CERT_TRUST_AUTO_UPDATE_END_REVOCATION = 0x20 CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID = 0x40000 CERT_TRUST_CTL_IS_NOT_TIME_VALID = 0x20000 CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 0x80000 CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED = 0x1000 CERT_TRUST_HAS_EXACT_MATCH_ISSUER = 0x1 CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x8000 CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY = 0x200 CERT_TRUST_HAS_KEY_MATCH_ISSUER = 0x2 CERT_TRUST_HAS_NAME_MATCH_ISSUER = 0x4 CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x2000 CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x4000 CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x8000000 CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x1000 CERT_TRUST_HAS_PREFERRED_ISSUER = 0x100 CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS = 0x400 CERT_TRUST_HAS_WEAK_SIGNATURE = 0x100000 CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x400 CERT_TRUST_INVALID_EXTENSION = 0x100 CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x800 CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x200 CERT_TRUST_IS_COMPLEX_CHAIN = 0x10000 CERT_TRUST_IS_CYCLIC = 0x80 CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x4000000 CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE = 0x2000 CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x8 CERT_TRUST_IS_NOT_TIME_NESTED = 0x2 CERT_TRUST_IS_NOT_TIME_VALID = 0x1 CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x10 CERT_TRUST_IS_OFFLINE_REVOCATION = 0x1000000 CERT_TRUST_IS_PARTIAL_CHAIN = 0x10000 CERT_TRUST_IS_PEER_TRUSTED = 0x800 CERT_TRUST_IS_REVOKED = 0x4 CERT_TRUST_IS_SELF_SIGNED = 0x8 CERT_TRUST_IS_UNTRUSTED_ROOT = 0x20 CERT_TRUST_NO_ERROR = 0x0 CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x2000000 CERT_TRUST_NO_OCSP_FAILOVER_TO_CRL = 0x40 CERT_TRUST_PUB_ALLOW_END_USER_TRUST = 0x0 CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST = 0x2 CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST = 0x1 CERT_TRUST_PUB_ALLOW_TRUST_MASK = 0x3 CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG = 0x100 CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG = 0x200 CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x40 CERT_UNICODE_ATTR_ERR_INDEX_MASK = 0x3f CERT_UNICODE_ATTR_ERR_INDEX_SHIFT = 16 CERT_UNICODE_IS_RDN_ATTRS_FLAG = 0x1 CERT_UNICODE_RDN_ERR_INDEX_MASK = 0x3ff CERT_UNICODE_RDN_ERR_INDEX_SHIFT = 22 CERT_UNICODE_VALUE_ERR_INDEX_MASK = 0xffff CERT_UNICODE_VALUE_ERR_INDEX_SHIFT = 0 CERT_V1 = 0 CERT_V2 = 1 CERT_V3 = 2 CERT_VERIFY_ALLOW_MORE_USAGE_FLAG = 0x8 CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION = 0x2 CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG = 0x1 CERT_VERIFY_NO_TIME_CHECK_FLAG = 0x4 CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG = 0x4 CERT_VERIFY_REV_CHAIN_FLAG = 0x1 CERT_VERIFY_REV_NO_OCSP_FAILOVER_TO_CRL_FLAG = 0x10 CERT_VERIFY_REV_SERVER_OCSP_FLAG = 0x8 CERT_VERIFY_TRUSTED_SIGNERS_FLAG = 0x2 CERT_VERIFY_UPDATED_CTL_FLAG = 0x1 CERT_X500_NAME_STR = 3 CERT_XML_NAME_STR = 4 CE_BREAK = 0x10 CE_DNS = 0x800 CE_FRAME = 0x8 CE_IOE = 0x400 CE_MODE = 0x8000 CE_OOP = 0x1000 CE_OVERRUN = 0x2 CE_PTO = 0x200 CE_RXOVER = 0x1 CE_RXPARITY = 0x4 CE_TXFULL = 0x100 CFERR_CHOOSEFONTCODES = 0x2000 CFERR_MAXLESSTHANMIN = 0x2002 CFERR_NOFONTS = 0x2001 CFSEPCHAR = 43 CFS_CANDIDATEPOS = 0x0040 CFS_DEFAULT = 0x0000 CFS_EXCLUDE = 0x0080 CFS_FORCE_POSITION = 0x0020 CFS_POINT = 0x0002 CFS_RECT = 0x0001 CF_ANSIONLY = 1024 CF_APPLY = 512 CF_BITMAP = 2 CF_BOTH = 3 CF_DIB = 8 CF_DIBV5 = 17 CF_DIF = 5 CF_DSPBITMAP = 0x0082 CF_DSPENHMETAFILE = 0x008E CF_DSPMETAFILEPICT = 0x0083 CF_DSPTEXT = 0x0081 CF_EFFECTS = 256 CF_ENABLEHOOK = 8 CF_ENABLETEMPLATE = 16 CF_ENABLETEMPLATEHANDLE = 32 CF_ENHMETAFILE = 14 CF_FIXEDPITCHONLY = 16384 CF_FORCEFONTEXIST = 65536 CF_GDIOBJFIRST = 0x0300 CF_GDIOBJLAST = 0x03FF CF_HDROP = 15 CF_INITTOLOGFONTSTRUCT = 64 CF_LIMITSIZE = 8192 CF_LOCALE = 16 CF_MAX = 18 CF_METAFILEPICT = 3 CF_NOFACESEL = 524288 CF_NOOEMFONTS = 2048 CF_NOSCRIPTSEL = 8388608 CF_NOSIMULATIONS = 4096 CF_NOSIZESEL = 2097152 CF_NOSTYLESEL = 1048576 CF_NOVECTORFONTS = 2048 CF_NOVERTFONTS = 16777216 CF_NULL = 0 CF_OEMTEXT = 7 CF_OWNERDISPLAY = 0x0080 CF_PALETTE = 9 CF_PENDATA = 10 CF_PRINTERFONTS = 0x2 CF_PRIVATEFIRST = 0x0200 CF_PRIVATELAST = 0x02FF CF_RIFF = 11 CF_SCALABLEONLY = 131072 CF_SCREENFONTS = 0x1 CF_SCRIPTSONLY = 1024 CF_SELECTSCRIPT = 4194304 CF_SHOWHELP = 4 CF_SYLK = 4 CF_TEXT = 1 CF_TIFF = 6 CF_TTONLY = 262144 CF_UNICODETEXT = 13 CF_USESTYLE = 128 CF_WAVE = 12 CF_WYSIWYG = 32768 CHANGER_BAR_CODE_SCANNER_INSTALLED = 0x00000001 CHANGER_CARTRIDGE_MAGAZINE = 0x00000100 CHANGER_CLEANER_ACCESS_NOT_VALID = 0x00040000 CHANGER_CLEANER_AUTODISMOUNT = 0x80000004 CHANGER_CLEANER_OPS_NOT_SUPPORTED = 0x80000040 CHANGER_CLEANER_SLOT = 0x00000040 CHANGER_CLOSE_IEPORT = 0x00000004 CHANGER_DEVICE_REINITIALIZE_CAPABLE = 0x08000000 CHANGER_DRIVE_CLEANING_REQUIRED = 0x00010000 CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS = 0x20000000 CHANGER_EXCHANGE_MEDIA = 0x00000020 CHANGER_IEPORT_USER_CONTROL_CLOSE = 0x80000100 CHANGER_IEPORT_USER_CONTROL_OPEN = 0x80000080 CHANGER_INIT_ELEM_STAT_WITH_RANGE = 0x00000002 CHANGER_KEYPAD_ENABLE_DISABLE = 0x10000000 CHANGER_LOCK_UNLOCK = 0x00000080 CHANGER_MEDIUM_FLIP = 0x00000200 CHANGER_MOVE_EXTENDS_IEPORT = 0x80000200 CHANGER_MOVE_RETRACTS_IEPORT = 0x80000400 CHANGER_OPEN_IEPORT = 0x00000008 CHANGER_POSITION_TO_ELEMENT = 0x00000400 CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = 0x80000002 CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = 0x80000001 CHANGER_PREDISMOUNT_EJECT_REQUIRED = 0x00020000 CHANGER_PREMOUNT_EJECT_REQUIRED = 0x00080000 CHANGER_REPORT_IEPORT_STATE = 0x00000800 CHANGER_RESERVED_BIT = 0x80000000 CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = 0x80000020 CHANGER_SERIAL_NUMBER_VALID = 0x04000000 CHANGER_SLOTS_USE_TRAYS = 0x80000010 CHANGER_STATUS_NON_VOLATILE = 0x00000010 CHANGER_STORAGE_DRIVE = 0x00001000 CHANGER_STORAGE_IEPORT = 0x00002000 CHANGER_STORAGE_SLOT = 0x00004000 CHANGER_STORAGE_TRANSPORT = 0x00008000 CHANGER_TO_DRIVE = 0x08 CHANGER_TO_IEPORT = 0x04 CHANGER_TO_SLOT = 0x02 CHANGER_TO_TRANSPORT = 0x01 CHANGER_TRUE_EXCHANGE_CAPABLE = 0x80000008 CHANGER_VOLUME_ASSERT = 0x00400000 CHANGER_VOLUME_IDENTIFICATION = 0x00100000 CHANGER_VOLUME_REPLACE = 0x00800000 CHANGER_VOLUME_SEARCH = 0x00200000 CHANGER_VOLUME_UNDEFINE = 0x01000000 CHECKJPEGFORMAT = 4119 CHECKPNGFORMAT = 4120 CHILDID_SELF = 0 CHINESEBIG5_CHARSET = 136 CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION = 1 CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1 = 1 CLAIM_SECURITY_ATTRIBUTE_CUSTOM_FLAGS = 0xffff0000 CLAIM_SECURITY_ATTRIBUTE_DISABLED = 0x0010 CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT = 0x0008 CLAIM_SECURITY_ATTRIBUTE_MANDATORY = 0x0020 CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE = 0x0001 CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN = 0x06 CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN = 0x04 CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64 = 0x01 CLAIM_SECURITY_ATTRIBUTE_TYPE_INVALID = 0x00 CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING = 0x10 CLAIM_SECURITY_ATTRIBUTE_TYPE_SID = 0x05 CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING = 0x03 CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64 = 0x02 CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY = 0x0004 CLAIM_SECURITY_ATTRIBUTE_VALID_FLAGS = 63 CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE = 0x0002 CLASSFACTORY_E_FIRST = 2147746064 CLASSFACTORY_E_LAST = 2147746079 CLASSFACTORY_S_FIRST = 262416 CLASSFACTORY_S_LAST = 262431 CLEARTYPE_NATURAL_QUALITY = 6 CLEARTYPE_QUALITY = 5 CLIENTSITE_E_FIRST = 2147746192 CLIENTSITE_E_LAST = 2147746207 CLIENTSITE_S_FIRST = 262544 CLIENTSITE_S_LAST = 262559 CLIPBRD_E_FIRST = 2147746256 CLIPBRD_E_LAST = 2147746271 CLIPBRD_S_FIRST = 262608 CLIPBRD_S_LAST = 262623 CLIPCAPS = 36 CLIP_CHARACTER_PRECIS = 1 CLIP_DEFAULT_PRECIS = 0 CLIP_EMBEDDED = 128 CLIP_LH_ANGLES = 16 CLIP_MASK = 0xf CLIP_STROKE_PRECIS = 2 CLIP_TO_PATH = 4097 CLIP_TT_ALWAYS = 32 CLK_TCK = 1000 CLOCKS_PER_SEC = 1000 CLOCK_MONOTONIC = 1 CLOCK_PROCESS_CPUTIME_ID = 2 CLOCK_REALTIME = 0 CLOCK_THREAD_CPUTIME_ID = 3 CLOSECHANNEL = 4112 CLRBREAK = 9 CLRDTR = 6 CLRRTS = 4 CLR_INVALID = 0xFFFFFFFF CLSID_DEFINED = 0 CMC_FAIL_BAD_ALG = 0 CMC_FAIL_BAD_CERT_ID = 4 CMC_FAIL_BAD_IDENTITY = 7 CMC_FAIL_BAD_MESSAGE_CHECK = 1 CMC_FAIL_BAD_REQUEST = 2 CMC_FAIL_BAD_TIME = 3 CMC_FAIL_INTERNAL_CA_ERROR = 11 CMC_FAIL_MUST_ARCHIVE_KEYS = 6 CMC_FAIL_NO_KEY_REUSE = 10 CMC_FAIL_POP_FAILED = 9 CMC_FAIL_POP_REQUIRED = 8 CMC_FAIL_TRY_LATER = 12 CMC_FAIL_UNSUPORTED_EXT = 5 CMC_OTHER_INFO_FAIL_CHOICE = 1 CMC_OTHER_INFO_NO_CHOICE = 0 CMC_OTHER_INFO_PEND_CHOICE = 2 CMC_STATUS_CONFIRM_REQUIRED = 5 CMC_STATUS_FAILED = 2 CMC_STATUS_NO_SUPPORT = 4 CMC_STATUS_PENDING = 3 CMC_STATUS_SUCCESS = 0 CMC_TAGGED_CERT_REQUEST_CHOICE = 1 CMSG_ALL_FLAGS = 18446744073709551615 CMSG_ATTR_CERT_COUNT_PARAM = 31 CMSG_ATTR_CERT_PARAM = 32 CMSG_AUTHENTICATED_ATTRIBUTES_FLAG = 0x8 CMSG_BARE_CONTENT_FLAG = 0x1 CMSG_BARE_CONTENT_PARAM = 3 CMSG_CERT_COUNT_PARAM = 11 CMSG_CERT_PARAM = 12 CMSG_CMS_ENCAPSULATED_CONTENT_FLAG = 0x40 CMSG_CMS_ENCAPSULATED_CTL_FLAG = 0x8000 CMSG_CMS_RECIPIENT_COUNT_PARAM = 33 CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM = 35 CMSG_CMS_RECIPIENT_INDEX_PARAM = 34 CMSG_CMS_RECIPIENT_INFO_PARAM = 36 CMSG_CMS_SIGNER_INFO_PARAM = 39 CMSG_COMPUTED_HASH_PARAM = 22 CMSG_CONTENTS_OCTETS_FLAG = 0x10 CMSG_CONTENT_ENCRYPT_FREE_OBJID_FLAG = 0x2 CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG = 0x1 CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG = 0x1 CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG = 0x8000 CMSG_CONTENT_PARAM = 2 CMSG_CRL_COUNT_PARAM = 13 CMSG_CRL_PARAM = 14 CMSG_CRYPT_RELEASE_CONTEXT_FLAG = 0x8000 CMSG_CTRL_ADD_ATTR_CERT = 14 CMSG_CTRL_ADD_CERT = 10 CMSG_CTRL_ADD_CMS_SIGNER_INFO = 20 CMSG_CTRL_ADD_CRL = 12 CMSG_CTRL_ADD_SIGNER = 6 CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR = 8 CMSG_CTRL_DECRYPT = 2 CMSG_CTRL_DEL_ATTR_CERT = 15 CMSG_CTRL_DEL_CERT = 11 CMSG_CTRL_DEL_CRL = 13 CMSG_CTRL_DEL_SIGNER = 7 CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR = 9 CMSG_CTRL_ENABLE_STRONG_SIGNATURE = 21 CMSG_CTRL_KEY_AGREE_DECRYPT = 17 CMSG_CTRL_KEY_TRANS_DECRYPT = 16 CMSG_CTRL_MAIL_LIST_DECRYPT = 18 CMSG_CTRL_VERIFY_HASH = 5 CMSG_CTRL_VERIFY_SIGNATURE = 1 CMSG_CTRL_VERIFY_SIGNATURE_EX = 19 CMSG_DATA = 1 CMSG_DATA_FLAG = 2 CMSG_DETACHED_FLAG = 0x4 CMSG_ENCODED_MESSAGE = 29 CMSG_ENCODED_SIGNER = 28 CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = 0x2 CMSG_ENCODE_SORTED_CTL_FLAG = 0x1 CMSG_ENCODING_TYPE_MASK = 0xffff0000 CMSG_ENCRYPTED = 6 CMSG_ENCRYPTED_DIGEST = 27 CMSG_ENCRYPTED_FLAG = 64 CMSG_ENCRYPT_PARAM = 26 CMSG_ENVELOPED = 3 CMSG_ENVELOPED_DATA_CMS_VERSION = 2 CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION = 0 CMSG_ENVELOPED_DATA_V0 = 0 CMSG_ENVELOPED_DATA_V2 = 2 CMSG_ENVELOPED_FLAG = 8 CMSG_ENVELOPED_RECIPIENT_V0 = 0 CMSG_ENVELOPED_RECIPIENT_V2 = 2 CMSG_ENVELOPED_RECIPIENT_V3 = 3 CMSG_ENVELOPED_RECIPIENT_V4 = 4 CMSG_ENVELOPE_ALGORITHM_PARAM = 15 CMSG_HASHED = 5 CMSG_HASHED_DATA_CMS_VERSION = 2 CMSG_HASHED_DATA_PKCS_1_5_VERSION = 0 CMSG_HASHED_DATA_V0 = 0 CMSG_HASHED_DATA_V2 = 2 CMSG_HASHED_FLAG = 32 CMSG_HASH_ALGORITHM_PARAM = 20 CMSG_HASH_DATA_PARAM = 21 CMSG_INDEFINITE_LENGTH = 4294967295 CMSG_INNER_CONTENT_TYPE_PARAM = 4 CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG = 0x2 CMSG_KEY_AGREE_ENCRYPT_FREE_OBJID_FLAG = 0x20 CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG = 0x1 CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG = 0x4 CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG = 0x10 CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG = 0x8 CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE = 1 CMSG_KEY_AGREE_ORIGINATOR_CERT = 1 CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY = 2 CMSG_KEY_AGREE_RECIPIENT = 2 CMSG_KEY_AGREE_STATIC_KEY_CHOICE = 2 CMSG_KEY_AGREE_VERSION = 3 CMSG_KEY_TRANS_CMS_VERSION = 2 CMSG_KEY_TRANS_ENCRYPT_FREE_OBJID_FLAG = 0x2 CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG = 0x1 CMSG_KEY_TRANS_PKCS_1_5_VERSION = 0 CMSG_KEY_TRANS_RECIPIENT = 1 CMSG_LENGTH_ONLY_FLAG = 0x2 CMSG_MAIL_LIST_ENCRYPT_FREE_OBJID_FLAG = 0x2 CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG = 0x1 CMSG_MAIL_LIST_HANDLE_KEY_CHOICE = 1 CMSG_MAIL_LIST_RECIPIENT = 3 CMSG_MAIL_LIST_VERSION = 4 CMSG_MAX_LENGTH_FLAG = 0x20 CMSG_OID_CNG_EXPORT_KEY_AGREE_FUNC = "CryptMsgDllCNGExportKeyAgree" CMSG_OID_CNG_EXPORT_KEY_TRANS_FUNC = "CryptMsgDllCNGExportKeyTrans" CMSG_OID_CNG_GEN_CONTENT_ENCRYPT_KEY_FUNC = "CryptMsgDllCNGGenContentEncryptKey" CMSG_OID_CNG_IMPORT_CONTENT_ENCRYPT_KEY_FUNC = "CryptMsgDllCNGImportContentEncryptKey" CMSG_OID_CNG_IMPORT_KEY_AGREE_FUNC = "CryptMsgDllCNGImportKeyAgree" CMSG_OID_CNG_IMPORT_KEY_TRANS_FUNC = "CryptMsgDllCNGImportKeyTrans" CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC = "CryptMsgDllExportEncryptKey" CMSG_OID_EXPORT_KEY_AGREE_FUNC = "CryptMsgDllExportKeyAgree" CMSG_OID_EXPORT_KEY_TRANS_FUNC = "CryptMsgDllExportKeyTrans" CMSG_OID_EXPORT_MAIL_LIST_FUNC = "CryptMsgDllExportMailList" CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC = "CryptMsgDllGenContentEncryptKey" CMSG_OID_GEN_ENCRYPT_KEY_FUNC = "CryptMsgDllGenEncryptKey" CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC = "CryptMsgDllImportEncryptKey" CMSG_OID_IMPORT_KEY_AGREE_FUNC = "CryptMsgDllImportKeyAgree" CMSG_OID_IMPORT_KEY_TRANS_FUNC = "CryptMsgDllImportKeyTrans" CMSG_OID_IMPORT_MAIL_LIST_FUNC = "CryptMsgDllImportMailList" CMSG_RC4_NO_SALT_FLAG = 0x40000000 CMSG_RECIPIENT_COUNT_PARAM = 17 CMSG_RECIPIENT_INDEX_PARAM = 18 CMSG_RECIPIENT_INFO_PARAM = 19 CMSG_SIGNED = 2 CMSG_SIGNED_AND_ENVELOPED = 4 CMSG_SIGNED_AND_ENVELOPED_FLAG = 16 CMSG_SIGNED_DATA_CMS_VERSION = 3 CMSG_SIGNED_DATA_PKCS_1_5_VERSION = 1 CMSG_SIGNED_DATA_V1 = 1 CMSG_SIGNED_DATA_V3 = 3 CMSG_SIGNED_FLAG = 4 CMSG_SIGNER_AUTH_ATTR_PARAM = 9 CMSG_SIGNER_CERT_ID_PARAM = 38 CMSG_SIGNER_CERT_INFO_PARAM = 7 CMSG_SIGNER_COUNT_PARAM = 5 CMSG_SIGNER_HASH_ALGORITHM_PARAM = 8 CMSG_SIGNER_INFO_CMS_VERSION = 3 CMSG_SIGNER_INFO_PARAM = 6 CMSG_SIGNER_INFO_PKCS_1_5_VERSION = 1 CMSG_SIGNER_INFO_V1 = 1 CMSG_SIGNER_INFO_V3 = 3 CMSG_SIGNER_ONLY_FLAG = 0x2 CMSG_SIGNER_UNAUTH_ATTR_PARAM = 10 CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG = 0x80000000 CMSG_TRUSTED_SIGNER_FLAG = 0x1 CMSG_TYPE_PARAM = 1 CMSG_UNPROTECTED_ATTR_PARAM = 37 CMSG_USE_SIGNER_INDEX_FLAG = 0x4 CMSG_VERIFY_COUNTER_SIGN_ENABLE_STRONG_FLAG = 0x1 CMSG_VERIFY_SIGNER_CERT = 2 CMSG_VERIFY_SIGNER_CHAIN = 3 CMSG_VERIFY_SIGNER_NULL = 4 CMSG_VERIFY_SIGNER_PUBKEY = 1 CMSG_VERSION_PARAM = 30 CM_CMYK_COLOR = 0x00000004 CM_DEVICE_ICM = 0x00000001 CM_GAMMA_RAMP = 0x00000002 CM_IN_GAMUT = 0 CM_NONE = 0x00000000 CM_OUT_OF_GAMUT = 255 CM_SERVICE_MEASURED_BOOT_LOAD = 0x00000020 CM_SERVICE_NETWORK_BOOT_LOAD = 0x00000001 CM_SERVICE_SD_DISK_BOOT_LOAD = 0x00000008 CM_SERVICE_USB3_DISK_BOOT_LOAD = 0x00000010 CM_SERVICE_USB_DISK_BOOT_LOAD = 0x00000004 CM_SERVICE_VALID_PROMOTION_MASK = 255 CM_SERVICE_VERIFIER_BOOT_LOAD = 0x00000040 CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD = 0x00000002 CM_SERVICE_WINPE_BOOT_LOAD = 0x00000080 COLORMATCHTOTARGET_EMBEDED = 0x00000001 COLORMGMTCAPS = 121 COLORMGMTDLGORD = 1551 COLOROKSTRINGA = "commdlg_ColorOK" COLORONCOLOR = 3 COLORRES = 108 COLOR_3DDKSHADOW = 21 COLOR_3DFACE = 15 COLOR_3DHIGHLIGHT = 20 COLOR_3DHILIGHT = 20 COLOR_3DLIGHT = 22 COLOR_3DSHADOW = 16 COLOR_ACTIVEBORDER = 10 COLOR_ACTIVECAPTION = 2 COLOR_APPWORKSPACE = 12 COLOR_BACKGROUND = 1 COLOR_BTNFACE = 15 COLOR_BTNHIGHLIGHT = 20 COLOR_BTNHILIGHT = 20 COLOR_BTNSHADOW = 16 COLOR_BTNTEXT = 18 COLOR_CAPTIONTEXT = 9 COLOR_DESKTOP = 1 COLOR_GRADIENTACTIVECAPTION = 27 COLOR_GRADIENTINACTIVECAPTION = 28 COLOR_GRAYTEXT = 17 COLOR_HIGHLIGHT = 13 COLOR_HIGHLIGHTTEXT = 14 COLOR_HOTLIGHT = 26 COLOR_INACTIVEBORDER = 11 COLOR_INACTIVECAPTION = 3 COLOR_INACTIVECAPTIONTEXT = 19 COLOR_INFOBK = 24 COLOR_INFOTEXT = 23 COLOR_MENU = 4 COLOR_MENUBAR = 30 COLOR_MENUHILIGHT = 29 COLOR_MENUTEXT = 7 COLOR_SCROLLBAR = 0 COLOR_WINDOW = 5 COLOR_WINDOWFRAME = 6 COLOR_WINDOWTEXT = 8 COMMON_LVB_GRID_HORIZONTAL = 0x400 COMMON_LVB_GRID_LVERTICAL = 0x800 COMMON_LVB_GRID_RVERTICAL = 0x1000 COMMON_LVB_LEADING_BYTE = 0x100 COMMON_LVB_REVERSE_VIDEO = 0x4000 COMMON_LVB_SBCSDBCS = 0x300 COMMON_LVB_TRAILING_BYTE = 0x200 COMMON_LVB_UNDERSCORE = 0x8000 COMPLEXREGION = 3 COMPRESSION_ENGINE_HIBER = 512 COMPRESSION_ENGINE_MAXIMUM = 256 COMPRESSION_ENGINE_STANDARD = 0 COMPRESSION_FORMAT_DEFAULT = 1 COMPRESSION_FORMAT_LZNT1 = 2 COMPRESSION_FORMAT_NONE = 0 COMPRESSION_FORMAT_SPARSE = 16384 COMPRESSION_FORMAT_XPRESS = 3 COMPRESSION_FORMAT_XPRESS_HUFF = 4 COM_RIGHTS_ACTIVATE_LOCAL = 8 COM_RIGHTS_ACTIVATE_REMOTE = 16 COM_RIGHTS_EXECUTE = 1 COM_RIGHTS_EXECUTE_LOCAL = 2 COM_RIGHTS_EXECUTE_REMOTE = 4 CONDITION_VARIABLE_LOCKMODE_SHARED = 1 CONFIRMSAFETYACTION_LOADOBJECT = 0x1 CONNDLG_CONN_POINT = 0x00000002 CONNDLG_HIDE_BOX = 0x00000008 CONNDLG_NOT_PERSIST = 0x00000020 CONNDLG_PERSIST = 0x00000010 CONNDLG_RO_PATH = 0x00000001 CONNDLG_USE_MRU = 0x00000004 CONNECT_CMD_SAVECRED = 0x00001000 CONNECT_COMMANDLINE = 0x00000800 CONNECT_CURRENT_MEDIA = 0x00000200 CONNECT_DEFERRED = 0x00000400 CONNECT_INTERACTIVE = 0x00000008 CONNECT_LOCALDRIVE = 0x00000100 CONNECT_NEED_DRIVE = 0x00000020 CONNECT_PROMPT = 0x00000010 CONNECT_REDIRECT = 0x00000080 CONNECT_REFCOUNT = 0x00000040 CONNECT_RESERVED = 0xFF000000 CONNECT_TEMPORARY = 0x00000004 CONNECT_UPDATE_PROFILE = 0x00000001 CONNECT_UPDATE_RECENT = 0x00000002 CONSOLE_APPLICATION_16BIT = 0x0000 CONSOLE_CARET_SELECTION = 0x0001 CONSOLE_CARET_VISIBLE = 0x0002 CONSOLE_FULLSCREEN = 1 CONSOLE_FULLSCREEN_HARDWARE = 2 CONSOLE_FULLSCREEN_MODE = 1 CONSOLE_MOUSE_DOWN = 0x8 CONSOLE_MOUSE_SELECTION = 0x4 CONSOLE_NO_SELECTION = 0x0 CONSOLE_SELECTION_IN_PROGRESS = 0x1 CONSOLE_SELECTION_NOT_EMPTY = 0x2 CONSOLE_TEXTMODE_BUFFER = 1 CONSOLE_WINDOWED_MODE = 2 CONST_VTBL = 0 CONTAINER_INHERIT_ACE = 2 CONTEXT_ALL = 1048607 CONTEXT_AMD64 = 0x100000 CONTEXT_CONTROL = 1048577 CONTEXT_DEBUG_REGISTERS = 1048592 CONTEXT_EXCEPTION_ACTIVE = 0x8000000 CONTEXT_EXCEPTION_REPORTING = 0x80000000 CONTEXT_EXCEPTION_REQUEST = 0x40000000 CONTEXT_E_FIRST = 2147803136 CONTEXT_E_LAST = 2147803183 CONTEXT_FLOATING_POINT = 1048584 CONTEXT_FULL = 1048587 CONTEXT_INTEGER = 1048578 CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC = "ContextDllCreateObjectContext" CONTEXT_SEGMENTS = 1048580 CONTEXT_SERVICE_ACTIVE = 0x10000000 CONTEXT_S_FIRST = 319488 CONTEXT_S_LAST = 319535 CONVERT10_E_FIRST = 2147746240 CONVERT10_E_LAST = 2147746255 CONVERT10_S_FIRST = 262592 CONVERT10_S_LAST = 262607 COPYFILE_SIS_FLAGS = 0x0003 COPYFILE_SIS_LINK = 0x0001 COPYFILE_SIS_REPLACE = 0x0002 COPY_FILE_ALLOW_DECRYPTED_DESTINATION = 0x8 COPY_FILE_FAIL_IF_EXISTS = 0x1 COPY_FILE_OPEN_SOURCE_FOR_WRITE = 0x4 COPY_FILE_RESTARTABLE = 0x2 CORE_PARKING_POLICY_CHANGE_IDEAL = 0 CORE_PARKING_POLICY_CHANGE_MAX = 3 CORE_PARKING_POLICY_CHANGE_MULTISTEP = 3 CORE_PARKING_POLICY_CHANGE_ROCKET = 2 CORE_PARKING_POLICY_CHANGE_SINGLE = 1 CO_E_FIRST = 2147746288 CO_E_LAST = 2147746303 CO_S_FIRST = 262640 CO_S_LAST = 262655 CPS_CANCEL = 0x0004 CPS_COMPLETE = 0x0001 CPS_CONVERT = 0x0002 CPS_REVERT = 0x0003 CP_ACP = 0 CP_INSTALLED = 0x00000001 CP_MACCP = 2 CP_NONE = 0 CP_OEMCP = 1 CP_RECTANGLE = 1 CP_REGION = 2 CP_SUPPORTED = 0x00000002 CP_SYMBOL = 42 CP_THREAD_ACP = 3 CP_UTF7 = 65000 CP_UTF8 = 65001 CP_WINANSI = 1004 CP_WINNEUTRAL = 1004 CP_WINUNICODE = 1200 CREATECOLORSPACE_EMBEDED = 0x00000001 CREATE_ALWAYS = 2 CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID = 0x1 CREATE_BREAKAWAY_FROM_JOB = 0x1000000 CREATE_DEFAULT_ERROR_MODE = 0x4000000 CREATE_FORCEDOS = 0x2000 CREATE_FOR_DIR = 2 CREATE_FOR_IMPORT = 1 CREATE_IGNORE_SYSTEM_DEFAULT = 0x80000000 CREATE_NEW = 1 CREATE_NEW_CONSOLE = 0x10 CREATE_NEW_PROCESS_GROUP = 0x200 CREATE_NO_WINDOW = 0x8000000 CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x2000000 CREATE_PROCESS_DEBUG_EVENT = 3 CREATE_PROTECTED_PROCESS = 0x40000 CREATE_SEPARATE_WOW_VDM = 0x800 CREATE_SHARED_WOW_VDM = 0x1000 CREATE_SUSPENDED = 0x4 CREATE_THREAD_DEBUG_EVENT = 2 CREATE_UNICODE_ENVIRONMENT = 0x400 CRITICAL_SECTION_NO_DEBUG_INFO = 16777216 CRL_DIST_POINT_ERR_CRL_ISSUER_BIT = 2147483648 CRL_DIST_POINT_ERR_INDEX_MASK = 0x7f CRL_DIST_POINT_ERR_INDEX_SHIFT = 24 CRL_DIST_POINT_FULL_NAME = 1 CRL_DIST_POINT_ISSUER_RDN_NAME = 2 CRL_DIST_POINT_NO_NAME = 0 CRL_FIND_ANY = 0 CRL_FIND_EXISTING = 2 CRL_FIND_ISSUED_BY = 1 CRL_FIND_ISSUED_BY_AKI_FLAG = 0x1 CRL_FIND_ISSUED_BY_BASE_FLAG = 0x8 CRL_FIND_ISSUED_BY_DELTA_FLAG = 0x4 CRL_FIND_ISSUED_BY_SIGNATURE_FLAG = 0x2 CRL_FIND_ISSUED_FOR = 3 CRL_FIND_ISSUED_FOR_SET_STRONG_PROPERTIES_FLAG = 0x10 CRL_REASON_AFFILIATION_CHANGED = 3 CRL_REASON_AFFILIATION_CHANGED_FLAG = 0x10 CRL_REASON_CA_COMPROMISE = 2 CRL_REASON_CA_COMPROMISE_FLAG = 0x20 CRL_REASON_CERTIFICATE_HOLD = 6 CRL_REASON_CERTIFICATE_HOLD_FLAG = 0x02 CRL_REASON_CESSATION_OF_OPERATION = 5 CRL_REASON_CESSATION_OF_OPERATION_FLAG = 0x04 CRL_REASON_KEY_COMPROMISE = 1 CRL_REASON_KEY_COMPROMISE_FLAG = 0x40 CRL_REASON_REMOVE_FROM_CRL = 8 CRL_REASON_SUPERSEDED = 4 CRL_REASON_SUPERSEDED_FLAG = 0x08 CRL_REASON_UNSPECIFIED = 0 CRL_REASON_UNUSED_FLAG = 0x80 CRL_V1 = 0 CRL_V2 = 1 CRM_PROTOCOL_DYNAMIC_MARSHAL_INFO = 0x00000002 CRM_PROTOCOL_EXPLICIT_MARSHAL_ONLY = 0x00000001 CRM_PROTOCOL_MAXIMUM_OPTION = 0x00000003 CROSS_CERT_DIST_POINT_ERR_INDEX_MASK = 0xff CROSS_CERT_DIST_POINT_ERR_INDEX_SHIFT = 24 CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_DEFAULT = 50 CRYPTNET_CRL_BEFORE_OCSP_ENABLE = 0xffffffff CRYPTNET_MAX_CACHED_OCSP_PER_CRL_COUNT_DEFAULT = 500 CRYPTNET_OCSP_AFTER_CRL_DISABLE = 0xffffffff CRYPTNET_PRE_FETCH_AFTER_CURRENT_TIME_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 1800 CRYPTNET_PRE_FETCH_AFTER_PUBLISH_PRE_FETCH_DIVISOR_DEFAULT = 10 CRYPTNET_PRE_FETCH_BEFORE_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT = 20 CRYPTNET_PRE_FETCH_MAX_AFTER_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 14400 CRYPTNET_PRE_FETCH_MAX_MAX_AGE_SECONDS_DEFAULT = 1209600 CRYPTNET_PRE_FETCH_MIN_AFTER_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 1800 CRYPTNET_PRE_FETCH_MIN_BEFORE_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 3600 CRYPTNET_PRE_FETCH_MIN_MAX_AGE_SECONDS_DEFAULT = 3600 CRYPTNET_PRE_FETCH_MIN_OCSP_VALIDITY_PERIOD_SECONDS_DEFAULT = 1209600 CRYPTNET_PRE_FETCH_RETRIEVAL_TIMEOUT_SECONDS_DEFAULT = 300 CRYPTNET_PRE_FETCH_SCAN_AFTER_TRIGGER_DELAY_SECONDS_DEFAULT = 30 CRYPTNET_PRE_FETCH_TRIGGER_DISABLE = 0xffffffff CRYPTNET_PRE_FETCH_TRIGGER_PERIOD_SECONDS_DEFAULT = 600 CRYPTNET_PRE_FETCH_VALIDITY_PERIOD_AFTER_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT = 10 CRYPTNET_URL_CACHE_DEFAULT_FLUSH = 0 CRYPTNET_URL_CACHE_DEFAULT_FLUSH_EXEMPT_SECONDS_DEFAULT = 2419200 CRYPTNET_URL_CACHE_DISABLE_FLUSH = 0xffffffff CRYPTNET_URL_CACHE_PRE_FETCH_AUTOROOT_CAB = 5 CRYPTNET_URL_CACHE_PRE_FETCH_BLOB = 1 CRYPTNET_URL_CACHE_PRE_FETCH_CRL = 2 CRYPTNET_URL_CACHE_PRE_FETCH_DISALLOWED_CERT_CAB = 6 CRYPTNET_URL_CACHE_PRE_FETCH_NONE = 0 CRYPTNET_URL_CACHE_PRE_FETCH_OCSP = 3 CRYPTNET_URL_CACHE_RESPONSE_HTTP = 1 CRYPTNET_URL_CACHE_RESPONSE_NONE = 0 CRYPTNET_URL_CACHE_RESPONSE_VALIDATED = 0x8000 CRYPTO_BLOBS_DEFINED = 0 CRYPTPROTECTMEMORY_BLOCK_SIZE = 16 CRYPTPROTECTMEMORY_CROSS_PROCESS = 0x1 CRYPTPROTECTMEMORY_SAME_LOGON = 0x2 CRYPTPROTECTMEMORY_SAME_PROCESS = 0x0 CRYPTPROTECT_AUDIT = 0x10 CRYPTPROTECT_CRED_REGENERATE = 0x80 CRYPTPROTECT_CRED_SYNC = 0x8 CRYPTPROTECT_FIRST_RESERVED_FLAGVAL = 0x0fffffff CRYPTPROTECT_LAST_RESERVED_FLAGVAL = 0xffffffff CRYPTPROTECT_LOCAL_MACHINE = 0x4 CRYPTPROTECT_NO_RECOVERY = 0x20 CRYPTPROTECT_PROMPT_ON_PROTECT = 0x2 CRYPTPROTECT_PROMPT_ON_UNPROTECT = 0x1 CRYPTPROTECT_PROMPT_REQUIRE_STRONG = 0x10 CRYPTPROTECT_PROMPT_RESERVED = 0x04 CRYPTPROTECT_PROMPT_STRONG = 0x08 CRYPTPROTECT_UI_FORBIDDEN = 0x1 CRYPTPROTECT_VERIFY_PROTECTION = 0x40 CRYPT_ACCUMULATIVE_TIMEOUT = 0x800 CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x10000 CRYPT_ACQUIRE_CACHE_FLAG = 0x1 CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x4 CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x70000 CRYPT_ACQUIRE_NO_HEALING = 0x8 CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x40000 CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x20000 CRYPT_ACQUIRE_SILENT_FLAG = 0x40 CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x2 CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x80 CRYPT_AIA_RETRIEVAL = 0x80000 CRYPT_ALL_FUNCTIONS = 1 CRYPT_ALL_PROVIDERS = 2 CRYPT_ANY = 4 CRYPT_ARCHIVABLE = 0x4000 CRYPT_ARCHIVE = 0x100 CRYPT_ASN_ENCODING = 0x1 CRYPT_ASYNC_RETRIEVAL = 0x10 CRYPT_BLOB_VER3 = 0x80 CRYPT_CACHE_ONLY_RETRIEVAL = 0x2 CRYPT_CHECK_FRESHNESS_TIME_VALIDITY = 0x400 CRYPT_CREATE_IV = 0x200 CRYPT_CREATE_SALT = 0x4 CRYPT_DATA_KEY = 0x800 CRYPT_DECODE_ALLOC_FLAG = 0x8000 CRYPT_DECODE_ENABLE_IA5CONVERSION_FLAG = 100663296 CRYPT_DECODE_ENABLE_PUNYCODE_FLAG = 0x2000000 CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG = 0x4000000 CRYPT_DECODE_NOCOPY_FLAG = 0x1 CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = 0x8 CRYPT_DECODE_SHARE_OID_STRING_FLAG = 0x4 CRYPT_DECODE_TO_BE_SIGNED_FLAG = 0x2 CRYPT_DECRYPT = 0x2 CRYPT_DECRYPT_RSA_NO_PADDING_CHECK = 0x20 CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG = 0x1 CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID = 1 CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID = 2 CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG = 0x2 CRYPT_DEFAULT_OID = "DEFAULT" CRYPT_DELETEKEYSET = 0x10 CRYPT_DELETE_DEFAULT = 0x4 CRYPT_DELETE_KEYSET = 16 CRYPT_DESTROYKEY = 0x4 CRYPT_DOMAIN = 2 CRYPT_DONT_CACHE_RESULT = 0x8 CRYPT_DONT_CHECK_TIME_VALIDITY = 0x200 CRYPT_DONT_VERIFY_SIGNATURE = 0x100 CRYPT_ECC_CMS_SHARED_INFO_SUPPPUBINFO_BYTE_LENGTH = 4 CRYPT_ECC_PRIVATE_KEY_INFO_v1 = 1 CRYPT_ENABLE_SSL_REVOCATION_RETRIEVAL = 0x800000 CRYPT_ENCODE_ALLOC_FLAG = 0x8000 CRYPT_ENCODE_DECODE_NONE = 0 CRYPT_ENCODE_ENABLE_IA5CONVERSION_FLAG = 393216 CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG = 0x20000 CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG = 0x40000 CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = 0x8 CRYPT_ENCRYPT = 0x1 CRYPT_ENCRYPT_ALG_OID_GROUP_ID = 2 CRYPT_ENHKEY_USAGE_OID_GROUP_ID = 7 CRYPT_EXCLUSIVE = 1 CRYPT_EXPORT = 0x4 CRYPT_EXPORTABLE = 0x1 CRYPT_EXPORT_KEY = 0x40 CRYPT_EXT_OR_ATTR_OID_GROUP_ID = 6 CRYPT_FAILED = 0 CRYPT_FASTSGC = 0x2 CRYPT_FIND_MACHINE_KEYSET_FLAG = 0x2 CRYPT_FIND_SILENT_KEYSET_FLAG = 0x40 CRYPT_FIND_USER_KEYSET_FLAG = 0x1 CRYPT_FIRST = 1 CRYPT_FIRST_ALG_OID_GROUP_ID = 1 CRYPT_FLAG_IPSEC = 0x10 CRYPT_FLAG_PCT1 = 0x1 CRYPT_FLAG_SIGNING = 0x20 CRYPT_FLAG_SSL2 = 0x2 CRYPT_FLAG_SSL3 = 0x4 CRYPT_FLAG_TLS1 = 0x8 CRYPT_FORMAT_COMMA = 0x1000 CRYPT_FORMAT_CRLF = 512 CRYPT_FORMAT_OID = 0x4 CRYPT_FORMAT_RDN_CRLF = 0x200 CRYPT_FORMAT_RDN_REVERSE = 0x800 CRYPT_FORMAT_RDN_SEMICOLON = 0x100 CRYPT_FORMAT_RDN_UNQUOTE = 0x400 CRYPT_FORMAT_SEMICOLON = 256 CRYPT_FORMAT_SIMPLE = 0x1 CRYPT_FORMAT_STR_MULTI_LINE = 0x1 CRYPT_FORMAT_STR_NO_HEX = 0x10 CRYPT_FORMAT_X509 = 0x2 CRYPT_GET_INSTALLED_OID_FUNC_FLAG = 0x1 CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE = 0x8 CRYPT_GET_URL_FROM_EXTENSION = 0x2 CRYPT_GET_URL_FROM_PROPERTY = 0x1 CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE = 0x4 CRYPT_HASH_ALG_OID_GROUP_ID = 1 CRYPT_HTTP_POST_RETRIEVAL = 0x100000 CRYPT_IMPL_HARDWARE = 1 CRYPT_IMPL_MIXED = 3 CRYPT_IMPL_REMOVABLE = 8 CRYPT_IMPL_SOFTWARE = 2 CRYPT_IMPL_UNKNOWN = 4 CRYPT_IMPORT_KEY = 0x80 CRYPT_INITIATOR = 0x40 CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG = 1 CRYPT_INSTALL_OID_INFO_BEFORE_FLAG = 1 CRYPT_IPSEC_HMAC_KEY = 0x100 CRYPT_KDF_OID_GROUP_ID = 10 CRYPT_KEEP_TIME_VALID = 0x80 CRYPT_KEK = 0x400 CRYPT_KEYID_ALLOC_FLAG = 0x8000 CRYPT_KEYID_DELETE_FLAG = 0x10 CRYPT_KEYID_MACHINE_FLAG = 0x20 CRYPT_KEYID_SET_NEW_FLAG = 0x2000 CRYPT_KM = 2 CRYPT_LAST_ALG_OID_GROUP_ID = 4 CRYPT_LAST_OID_GROUP_ID = 10 CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL = 0x40000 CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE = 0x8000 CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL = 0x2000 CRYPT_LDAP_SIGN_RETRIEVAL = 0x10000 CRYPT_LITTLE_ENDIAN = 0x1 CRYPT_LOCAL = 1 CRYPT_LOCALIZED_NAME_ENCODING_TYPE = 0 CRYPT_LOCALIZED_NAME_OID = "LocalizedNames" CRYPT_MAC = 0x20 CRYPT_MACHINE_DEFAULT = 0x1 CRYPT_MACHINE_KEYSET = 0x20 CRYPT_MATCH_ANY_ENCODING_TYPE = 0xffffffff CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG = 0x1 CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG = 0x2 CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG = 0x4 CRYPT_MESSAGE_KEYID_SIGNER_FLAG = 0x4 CRYPT_MESSAGE_SILENT_KEYSET_FLAG = 0x40 CRYPT_MIN_DEPENDENCIES = 1 CRYPT_MM = 3 CRYPT_MODE_CBC = 1 CRYPT_MODE_CBCI = 6 CRYPT_MODE_CBCOFM = 9 CRYPT_MODE_CBCOFMI = 10 CRYPT_MODE_CFB = 4 CRYPT_MODE_CFBP = 7 CRYPT_MODE_CTS = 5 CRYPT_MODE_ECB = 2 CRYPT_MODE_OFB = 3 CRYPT_MODE_OFBP = 8 CRYPT_NDR_ENCODING = 0x2 CRYPT_NEWKEYSET = 0x8 CRYPT_NEXT = 2 CRYPT_NOHASHOID = 0x1 CRYPT_NOT_MODIFIED_RETRIEVAL = 0x400000 CRYPT_NO_AUTH_RETRIEVAL = 0x20000 CRYPT_NO_OCSP_FAILOVER_TO_CRL_RETRIEVAL = 0x2000000 CRYPT_NO_SALT = 0x10 CRYPT_OAEP = 0x40 CRYPT_OCSP_ONLY_RETRIEVAL = 0x1000000 CRYPT_OFFLINE_CHECK_RETRIEVAL = 0x4000 CRYPT_OID_CREATE_COM_OBJECT_FUNC = "CryptDllCreateCOMObject" CRYPT_OID_DECODE_OBJECT_EX_FUNC = "CryptDllDecodeObjectEx" CRYPT_OID_DECODE_OBJECT_FUNC = "CryptDllDecodeObject" CRYPT_OID_DISABLE_SEARCH_DS_FLAG = 0x80000000 CRYPT_OID_ENCODE_OBJECT_EX_FUNC = "CryptDllEncodeObjectEx" CRYPT_OID_ENCODE_OBJECT_FUNC = "CryptDllEncodeObject" CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC = "CertDllEnumPhysicalStore" CRYPT_OID_ENUM_SYSTEM_STORE_FUNC = "CertDllEnumSystemStore" CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC = "CryptDllExportPrivateKeyInfoEx" CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC = "CryptDllExportPublicKeyInfoEx2" CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC = "CryptDllExportPublicKeyInfoEx" CRYPT_OID_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC = "CryptDllExtractEncodedSignatureParameters" CRYPT_OID_FIND_LOCALIZED_NAME_FUNC = "CryptDllFindLocalizedName" CRYPT_OID_FIND_OID_INFO_FUNC = "CryptDllFindOIDInfo" CRYPT_OID_FORMAT_OBJECT_FUNC = "CryptDllFormatObject" CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC = "CryptDllImportPrivateKeyInfoEx" CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC = "CryptDllImportPublicKeyInfoEx" CRYPT_OID_INFO_ALGID_KEY = 3 CRYPT_OID_INFO_CNG_ALGID_KEY = 5 CRYPT_OID_INFO_CNG_SIGN_KEY = 6 CRYPT_OID_INFO_NAME_KEY = 2 CRYPT_OID_INFO_OID_GROUP_BIT_LEN_MASK = 0x0fff0000 CRYPT_OID_INFO_OID_GROUP_BIT_LEN_SHIFT = 16 CRYPT_OID_INFO_OID_KEY = 1 CRYPT_OID_INFO_OID_KEY_FLAGS_MASK = 0xffff0000 CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG = 0x40000000 CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG = 0x80000000 CRYPT_OID_INFO_SIGN_KEY = 4 CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG = 0x1 CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG = 0x4 CRYPT_OID_OPEN_STORE_PROV_FUNC = "CertDllOpenStoreProv" CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC = "CertDllOpenSystemStoreProv" CRYPT_OID_PUBKEY_ENCRYPT_ONLY_FLAG = 0x40000000 CRYPT_OID_PUBKEY_SIGN_ONLY_FLAG = 0x80000000 CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC = "CertDllRegisterPhysicalStore" CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC = "CertDllRegisterSystemStore" CRYPT_OID_REGPATH = "Software\\Microsoft\\Cryptography\\OID" CRYPT_OID_REG_ENCODING_TYPE_PREFIX = "EncodingType " CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A = "FuncName" CRYPT_OID_SIGN_AND_ENCODE_HASH_FUNC = "CryptDllSignAndEncodeHash" CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC = "CertDllUnregisterPhysicalStore" CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC = "CertDllUnregisterSystemStore" CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG = 0x2 CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC = "CertDllVerifyCertificateChainPolicy" CRYPT_OID_VERIFY_CTL_USAGE_FUNC = "CertDllVerifyCTLUsage" CRYPT_OID_VERIFY_ENCODED_SIGNATURE_FUNC = "CryptDllVerifyEncodedSignature" CRYPT_OID_VERIFY_REVOCATION_FUNC = "CertDllVerifyRevocation" CRYPT_ONLINE = 0x80 CRYPT_OVERRIDE = 65536 CRYPT_OVERWRITE = 1 CRYPT_OWF_REPL_LM_HASH = 0x1 CRYPT_POLICY_OID_GROUP_ID = 8 CRYPT_PREGEN = 0x40 CRYPT_PRIORITY_BOTTOM = 4294967295 CRYPT_PRIORITY_TOP = 0 CRYPT_PROCESS_ISOLATE = 65536 CRYPT_PROXY_CACHE_RETRIEVAL = 0x200000 CRYPT_PSTORE = 0x2 CRYPT_PUBKEY_ALG_OID_GROUP_ID = 3 CRYPT_RANDOM_QUERY_STRING_RETRIEVAL = 0x4000000 CRYPT_RC2_128BIT_VERSION = 58 CRYPT_RC2_40BIT_VERSION = 160 CRYPT_RC2_56BIT_VERSION = 52 CRYPT_RC2_64BIT_VERSION = 120 CRYPT_RDN_ATTR_OID_GROUP_ID = 5 CRYPT_READ = 0x8 CRYPT_RECIPIENT = 0x10 CRYPT_REGISTER_FIRST_INDEX = 0 CRYPT_REGISTER_LAST_INDEX = 0xffffffff CRYPT_RETRIEVE_MULTIPLE_OBJECTS = 0x1 CRYPT_SECRETDIGEST = 0x1 CRYPT_SEC_DESCR = 0x1 CRYPT_SERVER = 0x400 CRYPT_SF = 0x100 CRYPT_SGC = 0x1 CRYPT_SGCKEY = 0x2000 CRYPT_SGC_ENUM = 4 CRYPT_SIGN_ALG_OID_GROUP_ID = 4 CRYPT_SILENT = 0x40 CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = 0x10000 CRYPT_SSL2_FALLBACK = 0x2 CRYPT_STICKY_CACHE_RETRIEVAL = 0x1000 CRYPT_STRING_ANY = 0x00000007 CRYPT_STRING_BASE64 = 0x1 CRYPT_STRING_BASE64HEADER = 0x0 CRYPT_STRING_BASE64REQUESTHEADER = 0x00000003 CRYPT_STRING_BASE64X509CRLHEADER = 0x00000009 CRYPT_STRING_BASE64_ANY = 0x00000006 CRYPT_STRING_BINARY = 0x2 CRYPT_STRING_HASHDATA = 0x10000000 CRYPT_STRING_HEX = 0x4 CRYPT_STRING_HEXADDR = 0x0000000a CRYPT_STRING_HEXASCII = 0x00000005 CRYPT_STRING_HEXASCIIADDR = 0x0000000b CRYPT_STRING_HEXRAW = 0x0000000c CRYPT_STRING_HEX_ANY = 0x8 CRYPT_STRING_NOCR = 0x80000000 CRYPT_STRING_NOCRLF = 0x40000000 CRYPT_STRING_STRICT = 0x20000000 CRYPT_SUCCEED = 1 CRYPT_TEMPLATE_OID_GROUP_ID = 9 CRYPT_TYPE2_FORMAT = 0x2 CRYPT_UI_PROMPT = 0x4 CRYPT_UM = 1 CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG = 16777216 CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG = 1073741824 CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG = 2147483648 CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG = 536870912 CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG = 268435456 CRYPT_UPDATE_KEY = 0x8 CRYPT_USERDATA = 1 CRYPT_USER_DEFAULT = 0x2 CRYPT_USER_KEYSET = 0x1000 CRYPT_USER_PROTECTED = 0x2 CRYPT_USER_PROTECTED_STRONG = 0x100000 CRYPT_VERIFYCONTEXT = 0xf0000000 CRYPT_VERIFY_CERT_SIGN_DISABLE_MD2_MD4_FLAG = 0x1 CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT = 2 CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN = 3 CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL = 4 CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY = 1 CRYPT_VERIFY_CERT_SIGN_RETURN_STRONG_PROPERTIES_FLAG = 0x4 CRYPT_VERIFY_CERT_SIGN_SET_STRONG_PROPERTIES_FLAG = 0x2 CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB = 1 CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT = 2 CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL = 3 CRYPT_VERIFY_CERT_SIGN_SUBJECT_OCSP_BASIC_SIGNED_RESPONSE = 4 CRYPT_VERIFY_CONTEXT_SIGNATURE = 0x20 CRYPT_VERIFY_DATA_HASH = 0x40 CRYPT_VOLATILE = 0x1000 CRYPT_WIRE_ONLY_RETRIEVAL = 0x4 CRYPT_WRITE = 0x10 CRYPT_X931_FORMAT = 0x4 CRYPT_X942_COUNTER_BYTE_LENGTH = 4 CRYPT_X942_KEY_LENGTH_BYTE_LENGTH = 4 CRYPT_X942_PUB_INFO_BYTE_LENGTH = 64 CRYPT_Y_ONLY = 0x1 CSOUND_SYSTEM = 16 CSTR_EQUAL = 2 CSTR_GREATER_THAN = 3 CSTR_LESS_THAN = 1 CS_BYTEALIGNCLIENT = 0x1000 CS_BYTEALIGNWINDOW = 0x2000 CS_CLASSDC = 0x0040 CS_DBLCLKS = 0x0008 CS_DELETE_TRANSFORM = 3 CS_DISABLE = 2 CS_DROPSHADOW = 0x00020000 CS_ENABLE = 1 CS_E_FIRST = 2147746148 CS_E_LAST = 2147746159 CS_GLOBALCLASS = 0x4000 CS_HREDRAW = 0x0002 CS_IME = 0x00010000 CS_INSERTCHAR = 0x2000 CS_NOCLOSE = 0x0200 CS_NOMOVECARET = 0x4000 CS_OWNDC = 0x0020 CS_PARENTDC = 0x0080 CS_SAVEBITS = 0x0800 CS_VREDRAW = 0x0001 CTLCOLOR_BTN = 3 CTLCOLOR_DLG = 4 CTLCOLOR_EDIT = 1 CTLCOLOR_LISTBOX = 2 CTLCOLOR_MAX = 7 CTLCOLOR_MSGBOX = 0 CTLCOLOR_SCROLLBAR = 5 CTLCOLOR_STATIC = 6 CTL_ANY_SUBJECT_TYPE = 1 CTL_CERT_SUBJECT_TYPE = 2 CTL_ENTRY_FROM_PROP_CHAIN_FLAG = 0x1 CTL_FIND_ANY = 0 CTL_FIND_EXISTING = 5 CTL_FIND_MD5_HASH = 2 CTL_FIND_NO_LIST_ID_CBDATA = 0xffffffff CTL_FIND_SAME_USAGE_FLAG = 0x1 CTL_FIND_SHA1_HASH = 1 CTL_FIND_SUBJECT = 4 CTL_FIND_USAGE = 3 CTL_V1 = 0 CTRL_BREAK_EVENT = 1 CTRL_CLOSE_EVENT = 2 CTRL_C_EVENT = 0 CTRL_LOGOFF_EVENT = 5 CTRL_SHUTDOWN_EVENT = 6 CTRY_ALBANIA = 355 CTRY_ALGERIA = 213 CTRY_ARGENTINA = 54 CTRY_ARMENIA = 374 CTRY_AUSTRALIA = 61 CTRY_AUSTRIA = 43 CTRY_AZERBAIJAN = 994 CTRY_BAHRAIN = 973 CTRY_BELARUS = 375 CTRY_BELGIUM = 32 CTRY_BELIZE = 501 CTRY_BOLIVIA = 591 CTRY_BRAZIL = 55 CTRY_BRUNEI_DARUSSALAM = 673 CTRY_BULGARIA = 359 CTRY_CANADA = 2 CTRY_CARIBBEAN = 1 CTRY_CHILE = 56 CTRY_COLOMBIA = 57 CTRY_COSTA_RICA = 506 CTRY_CROATIA = 385 CTRY_CZECH = 420 CTRY_DEFAULT = 0 CTRY_DENMARK = 45 CTRY_DOMINICAN_REPUBLIC = 1 CTRY_ECUADOR = 593 CTRY_EGYPT = 20 CTRY_EL_SALVADOR = 503 CTRY_ESTONIA = 372 CTRY_FAEROE_ISLANDS = 298 CTRY_FINLAND = 358 CTRY_FRANCE = 33 CTRY_GEORGIA = 995 CTRY_GERMANY = 49 CTRY_GREECE = 30 CTRY_GUATEMALA = 502 CTRY_HONDURAS = 504 CTRY_HONG_KONG = 852 CTRY_HUNGARY = 36 CTRY_ICELAND = 354 CTRY_INDIA = 91 CTRY_INDONESIA = 62 CTRY_IRAN = 981 CTRY_IRAQ = 964 CTRY_IRELAND = 353 CTRY_ISRAEL = 972 CTRY_ITALY = 39 CTRY_JAMAICA = 1 CTRY_JAPAN = 81 CTRY_JORDAN = 962 CTRY_KAZAKSTAN = 7 CTRY_KENYA = 254 CTRY_KUWAIT = 965 CTRY_KYRGYZSTAN = 996 CTRY_LATVIA = 371 CTRY_LEBANON = 961 CTRY_LIBYA = 218 CTRY_LIECHTENSTEIN = 41 CTRY_LITHUANIA = 370 CTRY_LUXEMBOURG = 352 CTRY_MACAU = 853 CTRY_MACEDONIA = 389 CTRY_MALAYSIA = 60 CTRY_MALDIVES = 960 CTRY_MEXICO = 52 CTRY_MONACO = 33 CTRY_MONGOLIA = 976 CTRY_MOROCCO = 212 CTRY_NETHERLANDS = 31 CTRY_NEW_ZEALAND = 64 CTRY_NICARAGUA = 505 CTRY_NORWAY = 47 CTRY_OMAN = 968 CTRY_PAKISTAN = 92 CTRY_PANAMA = 507 CTRY_PARAGUAY = 595 CTRY_PERU = 51 CTRY_PHILIPPINES = 63 CTRY_POLAND = 48 CTRY_PORTUGAL = 351 CTRY_PRCHINA = 86 CTRY_PUERTO_RICO = 1 CTRY_QATAR = 974 CTRY_ROMANIA = 40 CTRY_RUSSIA = 7 CTRY_SAUDI_ARABIA = 966 CTRY_SERBIA = 381 CTRY_SINGAPORE = 65 CTRY_SLOVAK = 421 CTRY_SLOVENIA = 386 CTRY_SOUTH_AFRICA = 27 CTRY_SOUTH_KOREA = 82 CTRY_SPAIN = 34 CTRY_SWEDEN = 46 CTRY_SWITZERLAND = 41 CTRY_SYRIA = 963 CTRY_TAIWAN = 886 CTRY_TATARSTAN = 7 CTRY_THAILAND = 66 CTRY_TRINIDAD_Y_TOBAGO = 1 CTRY_TUNISIA = 216 CTRY_TURKEY = 90 CTRY_UAE = 971 CTRY_UKRAINE = 380 CTRY_UNITED_KINGDOM = 44 CTRY_UNITED_STATES = 1 CTRY_URUGUAY = 598 CTRY_UZBEKISTAN = 7 CTRY_VENEZUELA = 58 CTRY_VIET_NAM = 84 CTRY_YEMEN = 967 CTRY_ZIMBABWE = 263 CT_CTYPE1 = 0x00000001 CT_CTYPE2 = 0x00000002 CT_CTYPE3 = 0x00000004 CURSOR_SHOWING = 0x00000001 CURVECAPS = 28 CUR_BLOB_VERSION = 2 CWCSTORAGENAME = 32 CWF_CREATE_ONLY = 0x00000001 CWMO_MAX_HANDLES = 56 CWP_ALL = 0x0000 CWP_SKIPDISABLED = 0x0002 CWP_SKIPINVISIBLE = 0x0001 CWP_SKIPTRANSPARENT = 0x0004 DACL_SECURITY_INFORMATION = 4 DATA_E_FIRST = 2147746096 DATA_E_LAST = 2147746111 DATA_S_FIRST = 262448 DATA_S_LAST = 262463 DATE_LONGDATE = 0x00000002 DATE_LTRREADING = 0x00000010 DATE_RTLREADING = 0x00000020 DATE_SHORTDATE = 0x00000001 DATE_USE_ALT_CALENDAR = 0x00000004 DATE_YEARMONTH = 0x00000008 DCBA_FACEDOWNCENTER = 0x0101 DCBA_FACEDOWNLEFT = 0x0102 DCBA_FACEDOWNNONE = 0x0100 DCBA_FACEDOWNRIGHT = 0x0103 DCBA_FACEUPCENTER = 0x0001 DCBA_FACEUPLEFT = 0x0002 DCBA_FACEUPNONE = 0x0000 DCBA_FACEUPRIGHT = 0x0003 DCB_ACCUMULATE = 0x0002 DCB_DIRTY = 2 DCB_DISABLE = 0x0008 DCB_ENABLE = 0x0004 DCB_RESET = 0x0001 DCB_SET = 3 DCE_C_ERROR_STRING_LEN = 256 DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL = 0x2 DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES = 0x1 DCOMSCM_PING_DISALLOW_UNSECURE_CALL = 0x20 DCOMSCM_PING_USE_MID_AUTHNSERVICE = 0x10 DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL = 0x8 DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES = 0x4 DCTT_BITMAP = 1 DCTT_DOWNLOAD = 2 DCTT_DOWNLOAD_OUTLINE = 8 DCTT_SUBDEV = 4 DCX_CACHE = 2 DCX_CLIPCHILDREN = 8 DCX_CLIPSIBLINGS = 16 DCX_EXCLUDERGN = 64 DCX_EXCLUDEUPDATE = 256 DCX_INTERSECTRGN = 128 DCX_INTERSECTUPDATE = 512 DCX_LOCKWINDOWUPDATE = 1024 DCX_NORESETATTRS = 4 DCX_PARENTCLIP = 32 DCX_VALIDATE = 2097152 DCX_WINDOW = 1 DC_ACTIVE = 0x0001 DC_BINADJUST = 19 DC_BINNAMES = 12 DC_BINS = 6 DC_BRUSH = 18 DC_BUTTONS = 0x1000 DC_COLLATE = 22 DC_COLORDEVICE = 32 DC_COPIES = 18 DC_DATATYPE_PRODUCED = 21 DC_DRIVER = 11 DC_DUPLEX = 7 DC_EMF_COMPLIANT = 20 DC_ENUMRESOLUTIONS = 13 DC_EXTRA = 9 DC_FIELDS = 1 DC_FILEDEPENDENCIES = 14 DC_GRADIENT = 0x0020 DC_HASDEFID = 0x534B DC_ICON = 0x0004 DC_INBUTTON = 0x0010 DC_MANUFACTURER = 23 DC_MAXEXTENT = 5 DC_MEDIAREADY = 29 DC_MEDIATYPENAMES = 34 DC_MEDIATYPES = 35 DC_MINEXTENT = 4 DC_MODEL = 24 DC_NUP = 33 DC_ORIENTATION = 17 DC_PAPERNAMES = 16 DC_PAPERS = 2 DC_PAPERSIZE = 3 DC_PEN = 19 DC_PERSONALITY = 25 DC_PRINTERMEM = 28 DC_PRINTRATE = 26 DC_PRINTRATEPPM = 31 DC_PRINTRATEUNIT = 27 DC_SIZE = 8 DC_SMALLCAP = 0x0002 DC_STAPLE = 30 DC_TEXT = 0x0008 DC_TRUETYPE = 15 DC_VERSION = 10 DDD_EXACT_MATCH_ON_REMOVE = 0x00000004 DDD_LUID_BROADCAST_DRIVE = 0x00000010 DDD_NO_BROADCAST_SYSTEM = 0x00000008 DDD_RAW_TARGET_PATH = 0x00000001 DDD_REMOVE_DEFINITION = 0x00000002 DDE_FACK = 0x8000 DDE_FACKREQ = 0x8000 DDE_FACKRESERVED = -49408 DDE_FADVRESERVED = -49153 DDE_FAPPSTATUS = 0x00ff DDE_FBUSY = 0x4000 DDE_FDATRESERVED = -45057 DDE_FDEFERUPD = 0x4000 DDE_FNOTPROCESSED = 0x0000 DDE_FPOKRESERVED = -8193 DDE_FRELEASE = 0x2000 DDE_FREQUESTED = 0x1000 DDL_ARCHIVE = 0x0020 DDL_DIRECTORY = 0x0010 DDL_DRIVES = 0x4000 DDL_EXCLUSIVE = 0x8000 DDL_HIDDEN = 0x0002 DDL_POSTMSGS = 0x2000 DDL_READONLY = 0x0001 DDL_READWRITE = 0x0000 DDL_SYSTEM = 0x0004 DD_DEFDRAGDELAY = 200 DD_DEFDRAGMINDIST = 2 DD_DEFSCROLLDELAY = 50 DD_DEFSCROLLINSET = 11 DD_DEFSCROLLINTERVAL = 50 DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION = 1 DEBUG_ONLY_THIS_PROCESS = 0x2 DEBUG_PROCESS = 0x1 DECLSPEC_ADDRSAFE = 0 DECLSPEC_DEPRECATED_DDK = 0 DECLSPEC_NOVTABLE = 0 DEFAULT_CHARSET = 1 DEFAULT_GUI_FONT = 17 DEFAULT_PALETTE = 15 DEFAULT_PITCH = 0 DEFAULT_QUALITY = 0 DEFAULT_UNREACHABLE = 0 DEFINDE_LPTYPEINFO = 0 DEFINED_DISPID_MEMBERID = 0 DEFINED_LPCREATETYPELIB = 0 DEFINED_LPDISPATCH = 0 DEFINED_LPTYPECOMP = 0 DEFINED_LPTYPELIB = 0 DEFINED_LPUINT = 0 DEFINE_LPCREATETYPEINFO = 0 DEF_PRIORITY = 1 DELETE = 65536 DEPRECATE_SUPPORTED = 0 DEREGISTERED = 0x05 DESKTOPHORZRES = 118 DESKTOPVERTRES = 117 DESKTOP_CREATEMENU = 4 DESKTOP_CREATEWINDOW = 2 DESKTOP_ENUMERATE = 64 DESKTOP_HOOKCONTROL = 8 DESKTOP_JOURNALPLAYBACK = 32 DESKTOP_JOURNALRECORD = 16 DESKTOP_READOBJECTS = 1 DESKTOP_SWITCHDESKTOP = 256 DESKTOP_WRITEOBJECTS = 128 DETACHED_PROCESS = 0x8 DEVICEDATA = 19 DEVICE_DEFAULT_FONT = 14 DEVICE_FONTTYPE = 0x002 DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = 0x00000004 DEVICE_NOTIFY_SERVICE_HANDLE = 0x00000001 DEVICE_NOTIFY_WINDOW_HANDLE = 0x00000000 DFCS_ADJUSTRECT = 0x2000 DFCS_BUTTON3STATE = 0x0008 DFCS_BUTTONCHECK = 0x0000 DFCS_BUTTONPUSH = 0x0010 DFCS_BUTTONRADIO = 0x0004 DFCS_BUTTONRADIOIMAGE = 0x0001 DFCS_BUTTONRADIOMASK = 0x0002 DFCS_CAPTIONCLOSE = 0x0000 DFCS_CAPTIONHELP = 0x0004 DFCS_CAPTIONMAX = 0x0002 DFCS_CAPTIONMIN = 0x0001 DFCS_CAPTIONRESTORE = 0x0003 DFCS_CHECKED = 0x0400 DFCS_FLAT = 0x4000 DFCS_HOT = 0x1000 DFCS_INACTIVE = 0x0100 DFCS_MENUARROW = 0x0000 DFCS_MENUARROWRIGHT = 0x0004 DFCS_MENUBULLET = 0x0002 DFCS_MENUCHECK = 0x0001 DFCS_MONO = 0x8000 DFCS_PUSHED = 0x0200 DFCS_SCROLLCOMBOBOX = 0x0005 DFCS_SCROLLDOWN = 0x0001 DFCS_SCROLLLEFT = 0x0002 DFCS_SCROLLRIGHT = 0x0003 DFCS_SCROLLSIZEGRIP = 0x0008 DFCS_SCROLLSIZEGRIPRIGHT = 0x0010 DFCS_SCROLLUP = 0x0000 DFCS_TRANSPARENT = 0x0800 DFC_BUTTON = 4 DFC_CAPTION = 1 DFC_MENU = 2 DFC_POPUPMENU = 5 DFC_SCROLL = 3 DF_ALLOWOTHERACCOUNTHOOK = 1 DIAGNOSTIC_REASON_DETAILED_STRING = 0x00000002 DIAGNOSTIC_REASON_INVALID_FLAGS = -2147483652 DIAGNOSTIC_REASON_NOT_SPECIFIED = 0x80000000 DIAGNOSTIC_REASON_SIMPLE_STRING = 0x00000001 DIAGNOSTIC_REASON_VERSION = 0 DIALOPTION_BILLING = 0x00000040 DIALOPTION_DIALTONE = 0x00000100 DIALOPTION_QUIET = 0x00000080 DIB_PAL_COLORS = 1 DIB_RGB_COLORS = 0 DIFFERENCE = 11 DIRENT_DEFINED = 0 DIR_DEFINED = 0 DISABLE_MAX_PRIVILEGE = 0x1 DISABLE_SMART = 0xD9 DISCHARGE_POLICY_CRITICAL = 0 DISCHARGE_POLICY_LOW = 1 DISC_NO_FORCE = 0x00000040 DISC_UPDATE_PROFILE = 0x00000001 DISK_BINNING = 3 DISK_LOGGING_DUMP = 2 DISK_LOGGING_START = 0 DISK_LOGGING_STOP = 1 DISPATCH_METHOD = 0x1 DISPATCH_PROPERTYGET = 0x2 DISPATCH_PROPERTYPUT = 0x4 DISPATCH_PROPERTYPUTREF = 0x8 DISPID_COLLECT = -8 DISPID_CONSTRUCTOR = -6 DISPID_DESTRUCTOR = -7 DISPID_EVALUATE = -5 DISPID_NEWENUM = -4 DISPID_PROPERTYPUT = -3 DISPID_UNKNOWN = -1 DISPID_VALUE = 0 DISPLAY_DEVICE_ACTIVE = 0x00000001 DISPLAY_DEVICE_ATTACHED = 0x00000002 DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = 0x00000001 DISPLAY_DEVICE_DISCONNECT = 0x02000000 DISPLAY_DEVICE_MIRRORING_DRIVER = 0x00000008 DISPLAY_DEVICE_MODESPRUNED = 0x08000000 DISPLAY_DEVICE_MULTI_DRIVER = 0x00000002 DISPLAY_DEVICE_PRIMARY_DEVICE = 0x00000004 DISPLAY_DEVICE_REMOTE = 0x04000000 DISPLAY_DEVICE_REMOVABLE = 0x00000020 DISPLAY_DEVICE_TS_COMPATIBLE = 0x00200000 DISPLAY_DEVICE_VGA_COMPATIBLE = 0x00000010 DISP_CHANGE_BADDUALVIEW = -6 DISP_CHANGE_BADFLAGS = -4 DISP_CHANGE_BADMODE = -2 DISP_CHANGE_BADPARAM = -5 DISP_CHANGE_FAILED = -1 DISP_CHANGE_NOTUPDATED = -3 DISP_CHANGE_RESTART = 1 DISP_CHANGE_SUCCESSFUL = 0 DI_APPBANDING = 0x00000001 DI_CHANNEL = 1 DI_COMPAT = 0x0004 DI_DEFAULTSIZE = 0x0008 DI_IMAGE = 0x0002 DI_MASK = 0x0001 DI_MEMORYMAP_WRITE = 0x00000001 DI_NOMIRROR = 0x0010 DI_NORMAL = 0x0003 DI_READ_SPOOL_JOB = 3 DI_ROPS_READ_DESTINATION = 0x00000002 DKGRAY_BRUSH = 3 DLGC_BUTTON = 0x2000 DLGC_DEFPUSHBUTTON = 0x0010 DLGC_HASSETSEL = 0x0008 DLGC_RADIOBUTTON = 0x0040 DLGC_STATIC = 0x0100 DLGC_UNDEFPUSHBUTTON = 0x0020 DLGC_WANTALLKEYS = 0x0004 DLGC_WANTARROWS = 0x0001 DLGC_WANTCHARS = 0x0080 DLGC_WANTMESSAGE = 0x0004 DLGC_WANTTAB = 0x0002 DLGWINDOWEXTRA = 30 DLL_PROCESS_ATTACH = 1 DLL_PROCESS_DETACH = 0 DLL_PROCESS_VERIFIER = 4 DLL_THREAD_ATTACH = 2 DLL_THREAD_DETACH = 3 DMBIN_AUTO = 7 DMBIN_CASSETTE = 14 DMBIN_ENVELOPE = 5 DMBIN_ENVMANUAL = 6 DMBIN_FIRST = 1 DMBIN_FORMSOURCE = 15 DMBIN_LARGECAPACITY = 11 DMBIN_LARGEFMT = 10 DMBIN_LAST = 15 DMBIN_LOWER = 2 DMBIN_MANUAL = 4 DMBIN_MIDDLE = 3 DMBIN_ONLYONE = 1 DMBIN_SMALLFMT = 9 DMBIN_TRACTOR = 8 DMBIN_UPPER = 1 DMBIN_USER = 256 DMCOLLATE_FALSE = 0 DMCOLLATE_TRUE = 1 DMCOLOR_COLOR = 2 DMCOLOR_MONOCHROME = 1 DMDFO_CENTER = 2 DMDFO_DEFAULT = 0 DMDFO_STRETCH = 1 DMDISPLAYFLAGS_TEXTMODE = 0x00000004 DMDITHER_COARSE = 2 DMDITHER_ERRORDIFFUSION = 5 DMDITHER_FINE = 3 DMDITHER_GRAYSCALE = 10 DMDITHER_LINEART = 4 DMDITHER_NONE = 1 DMDITHER_RESERVED6 = 6 DMDITHER_RESERVED7 = 7 DMDITHER_RESERVED8 = 8 DMDITHER_RESERVED9 = 9 DMDITHER_USER = 256 DMDO_180 = 2 DMDO_270 = 3 DMDO_90 = 1 DMDO_DEFAULT = 0 DMDUP_HORIZONTAL = 3 DMDUP_SIMPLEX = 1 DMDUP_VERTICAL = 2 DMICMMETHOD_DEVICE = 4 DMICMMETHOD_DRIVER = 3 DMICMMETHOD_NONE = 1 DMICMMETHOD_SYSTEM = 2 DMICMMETHOD_USER = 256 DMICM_ABS_COLORIMETRIC = 4 DMICM_COLORIMETRIC = 3 DMICM_CONTRAST = 2 DMICM_SATURATE = 1 DMICM_USER = 256 DMLERR_ADVACKTIMEOUT = 0x4000 DMLERR_BUSY = 0x4001 DMLERR_DATAACKTIMEOUT = 0x4002 DMLERR_DLL_NOT_INITIALIZED = 0x4003 DMLERR_DLL_USAGE = 0x4004 DMLERR_EXECACKTIMEOUT = 0x4005 DMLERR_FIRST = 0x4000 DMLERR_INVALIDPARAMETER = 0x4006 DMLERR_LAST = 0x4011 DMLERR_LOW_MEMORY = 0x4007 DMLERR_MEMORY_ERROR = 0x4008 DMLERR_NOTPROCESSED = 0x4009 DMLERR_NO_CONV_ESTABLISHED = 0x400a DMLERR_NO_ERROR = 0 DMLERR_POKEACKTIMEOUT = 0x400b DMLERR_POSTMSG_FAILED = 0x400c DMLERR_REENTRANCY = 0x400d DMLERR_SERVER_DIED = 0x400e DMLERR_SYS_ERROR = 0x400f DMLERR_UNADVACKTIMEOUT = 0x4010 DMLERR_UNFOUND_QUEUE_ID = 0x4011 DMMEDIA_GLOSSY = 3 DMMEDIA_STANDARD = 1 DMMEDIA_TRANSPARENCY = 2 DMMEDIA_USER = 256 DMNUP_ONEUP = 2 DMNUP_SYSTEM = 1 DMORIENT_LANDSCAPE = 2 DMORIENT_PORTRAIT = 1 DMPAPER_10X11 = 45 DMPAPER_10X14 = 16 DMPAPER_11X17 = 17 DMPAPER_12X11 = 90 DMPAPER_15X11 = 46 DMPAPER_9X11 = 44 DMPAPER_A2 = 66 DMPAPER_A3 = 8 DMPAPER_A3_EXTRA = 63 DMPAPER_A3_EXTRA_TRANSVERSE = 68 DMPAPER_A3_ROTATED = 76 DMPAPER_A3_TRANSVERSE = 67 DMPAPER_A4 = 9 DMPAPER_A4SMALL = 10 DMPAPER_A4_EXTRA = 53 DMPAPER_A4_PLUS = 60 DMPAPER_A4_ROTATED = 77 DMPAPER_A4_TRANSVERSE = 55 DMPAPER_A5 = 11 DMPAPER_A5_EXTRA = 64 DMPAPER_A5_ROTATED = 78 DMPAPER_A5_TRANSVERSE = 61 DMPAPER_A6 = 70 DMPAPER_A6_ROTATED = 83 DMPAPER_A_PLUS = 57 DMPAPER_B4 = 12 DMPAPER_B4_JIS_ROTATED = 79 DMPAPER_B5 = 13 DMPAPER_B5_EXTRA = 65 DMPAPER_B5_JIS_ROTATED = 80 DMPAPER_B5_TRANSVERSE = 62 DMPAPER_B6_JIS = 88 DMPAPER_B6_JIS_ROTATED = 89 DMPAPER_B_PLUS = 58 DMPAPER_CSHEET = 24 DMPAPER_DBL_JAPANESE_POSTCARD = 69 DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82 DMPAPER_DSHEET = 25 DMPAPER_ENV_10 = 20 DMPAPER_ENV_11 = 21 DMPAPER_ENV_12 = 22 DMPAPER_ENV_14 = 23 DMPAPER_ENV_9 = 19 DMPAPER_ENV_B4 = 33 DMPAPER_ENV_B5 = 34 DMPAPER_ENV_B6 = 35 DMPAPER_ENV_C3 = 29 DMPAPER_ENV_C4 = 30 DMPAPER_ENV_C5 = 28 DMPAPER_ENV_C6 = 31 DMPAPER_ENV_C65 = 32 DMPAPER_ENV_DL = 27 DMPAPER_ENV_INVITE = 47 DMPAPER_ENV_ITALY = 36 DMPAPER_ENV_MONARCH = 37 DMPAPER_ENV_PERSONAL = 38 DMPAPER_ESHEET = 26 DMPAPER_EXECUTIVE = 7 DMPAPER_FANFOLD_LGL_GERMAN = 41 DMPAPER_FANFOLD_STD_GERMAN = 40 DMPAPER_FANFOLD_US = 39 DMPAPER_FIRST = 1 DMPAPER_FOLIO = 14 DMPAPER_ISO_B4 = 42 DMPAPER_JAPANESE_POSTCARD = 43 DMPAPER_JAPANESE_POSTCARD_ROTATED = 81 DMPAPER_JENV_CHOU3 = 73 DMPAPER_JENV_CHOU3_ROTATED = 86 DMPAPER_JENV_CHOU4 = 74 DMPAPER_JENV_CHOU4_ROTATED = 87 DMPAPER_JENV_KAKU2 = 71 DMPAPER_JENV_KAKU2_ROTATED = 84 DMPAPER_JENV_KAKU3 = 72 DMPAPER_JENV_KAKU3_ROTATED = 85 DMPAPER_JENV_YOU4 = 91 DMPAPER_JENV_YOU4_ROTATED = 92 DMPAPER_LAST = 118 DMPAPER_LEDGER = 4 DMPAPER_LEGAL = 5 DMPAPER_LEGAL_EXTRA = 51 DMPAPER_LETTER = 1 DMPAPER_LETTERSMALL = 2 DMPAPER_LETTER_EXTRA = 50 DMPAPER_LETTER_EXTRA_TRANSVERSE = 56 DMPAPER_LETTER_PLUS = 59 DMPAPER_LETTER_ROTATED = 75 DMPAPER_LETTER_TRANSVERSE = 54 DMPAPER_NOTE = 18 DMPAPER_P16K = 93 DMPAPER_P16K_ROTATED = 106 DMPAPER_P32K = 94 DMPAPER_P32KBIG = 95 DMPAPER_P32KBIG_ROTATED = 108 DMPAPER_P32K_ROTATED = 107 DMPAPER_PENV_1 = 96 DMPAPER_PENV_10 = 105 DMPAPER_PENV_10_ROTATED = 118 DMPAPER_PENV_1_ROTATED = 109 DMPAPER_PENV_2 = 97 DMPAPER_PENV_2_ROTATED = 110 DMPAPER_PENV_3 = 98 DMPAPER_PENV_3_ROTATED = 111 DMPAPER_PENV_4 = 99 DMPAPER_PENV_4_ROTATED = 112 DMPAPER_PENV_5 = 100 DMPAPER_PENV_5_ROTATED = 113 DMPAPER_PENV_6 = 101 DMPAPER_PENV_6_ROTATED = 114 DMPAPER_PENV_7 = 102 DMPAPER_PENV_7_ROTATED = 115 DMPAPER_PENV_8 = 103 DMPAPER_PENV_8_ROTATED = 116 DMPAPER_PENV_9 = 104 DMPAPER_PENV_9_ROTATED = 117 DMPAPER_QUARTO = 15 DMPAPER_RESERVED_48 = 48 DMPAPER_RESERVED_49 = 49 DMPAPER_STATEMENT = 6 DMPAPER_TABLOID = 3 DMPAPER_TABLOID_EXTRA = 52 DMPAPER_USER = 256 DMRES_DRAFT = -1 DMRES_HIGH = -4 DMRES_LOW = -2 DMRES_MEDIUM = -3 DMTT_BITMAP = 1 DMTT_DOWNLOAD = 2 DMTT_DOWNLOAD_OUTLINE = 4 DMTT_SUBDEV = 3 DM_BITSPERPEL = 262144 DM_COLLATE = 32768 DM_COLOR = 2048 DM_COPIES = 256 DM_COPY = 2 DM_DEFAULTSOURCE = 512 DM_DISPLAYFIXEDOUTPUT = 536870912 DM_DISPLAYFLAGS = 2097152 DM_DISPLAYFREQUENCY = 4194304 DM_DISPLAYORIENTATION = 128 DM_DITHERTYPE = 67108864 DM_DUPLEX = 4096 DM_FORMNAME = 65536 DM_GETDEFID = 1024 DM_ICMINTENT = 16777216 DM_ICMMETHOD = 8388608 DM_INTERLACED = 0x00000002 DM_IN_BUFFER = 8 DM_IN_PROMPT = 4 DM_LOGPIXELS = 131072 DM_MEDIATYPE = 33554432 DM_MODIFY = 8 DM_NUP = 64 DM_ORIENTATION = 1 DM_OUT_BUFFER = 2 DM_OUT_DEFAULT = 1 DM_PANNINGHEIGHT = 268435456 DM_PANNINGWIDTH = 134217728 DM_PAPERLENGTH = 4 DM_PAPERSIZE = 2 DM_PAPERWIDTH = 8 DM_PELSHEIGHT = 1048576 DM_PELSWIDTH = 524288 DM_POSITION = 32 DM_PRINTQUALITY = 1024 DM_PROMPT = 4 DM_REPOSITION = 1026 DM_SCALE = 16 DM_SETDEFID = 1025 DM_SPECVERSION = 0x0401 DM_TTOPTION = 16384 DM_UPDATE = 1 DM_YRESOLUTION = 8192 DNS_ERROR_AUTOZONE_ALREADY_EXISTS = 9610 DNS_ERROR_AXFR = 9752 DNS_ERROR_BAD_PACKET = 9502 DNS_ERROR_CANNOT_FIND_ROOT_HINTS = 9564 DNS_ERROR_CNAME_COLLISION = 9709 DNS_ERROR_CNAME_LOOP = 9707 DNS_ERROR_DATABASE_BASE = 9700 DNS_ERROR_DATAFILE_BASE = 9650 DNS_ERROR_DATAFILE_OPEN_FAILURE = 9653 DNS_ERROR_DATAFILE_PARSING = 9655 DNS_ERROR_DP_ALREADY_ENLISTED = 9904 DNS_ERROR_DP_ALREADY_EXISTS = 9902 DNS_ERROR_DP_BASE = 9900 DNS_ERROR_DP_DOES_NOT_EXIST = 9901 DNS_ERROR_DP_FSMO_ERROR = 9906 DNS_ERROR_DP_NOT_AVAILABLE = 9905 DNS_ERROR_DP_NOT_ENLISTED = 9903 DNS_ERROR_DS_UNAVAILABLE = 9717 DNS_ERROR_DS_ZONE_ALREADY_EXISTS = 9718 DNS_ERROR_FILE_WRITEBACK_FAILED = 9654 DNS_ERROR_FORWARDER_ALREADY_EXISTS = 9619 DNS_ERROR_GENERAL_API_BASE = 9550 DNS_ERROR_INCONSISTENT_ROOT_HINTS = 9565 DNS_ERROR_INVALID_DATA = 13 DNS_ERROR_INVALID_DATAFILE_NAME = 9652 DNS_ERROR_INVALID_IP_ADDRESS = 9552 DNS_ERROR_INVALID_NAME = 123 DNS_ERROR_INVALID_NAME_CHAR = 9560 DNS_ERROR_INVALID_PROPERTY = 9553 DNS_ERROR_INVALID_TYPE = 9551 DNS_ERROR_INVALID_ZONE_OPERATION = 9603 DNS_ERROR_INVALID_ZONE_TYPE = 9611 DNS_ERROR_MASK = 0x00002328 DNS_ERROR_NAME_DOES_NOT_EXIST = 9714 DNS_ERROR_NAME_NOT_IN_ZONE = 9706 DNS_ERROR_NBSTAT_INIT_FAILED = 9617 DNS_ERROR_NEED_SECONDARY_ADDRESSES = 9614 DNS_ERROR_NEED_WINS_SERVERS = 9616 DNS_ERROR_NODE_CREATION_FAILED = 9703 DNS_ERROR_NODE_IS_CNAME = 9708 DNS_ERROR_NON_RFC_NAME = 9556 DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER = 9562 DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION = 9563 DNS_ERROR_NOT_UNIQUE = 9555 DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE = 9719 DNS_ERROR_NO_CREATE_CACHE_DATA = 9713 DNS_ERROR_NO_DNS_SERVERS = 9852 DNS_ERROR_NO_MEMORY = 14 DNS_ERROR_NO_PACKET = 9503 DNS_ERROR_NO_TCPIP = 9851 DNS_ERROR_NO_ZONE_INFO = 9602 DNS_ERROR_NUMERIC_NAME = 9561 DNS_ERROR_OPERATION_BASE = 9750 DNS_ERROR_PACKET_FMT_BASE = 9500 DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = 9651 DNS_ERROR_RCODE = 9504 DNS_ERROR_RCODE_BADKEY = 9017 DNS_ERROR_RCODE_BADSIG = 9016 DNS_ERROR_RCODE_BADTIME = 9018 DNS_ERROR_RCODE_FORMAT_ERROR = 9001 DNS_ERROR_RCODE_LAST = 9018 DNS_ERROR_RCODE_NAME_ERROR = 9003 DNS_ERROR_RCODE_NOTAUTH = 9009 DNS_ERROR_RCODE_NOTZONE = 9010 DNS_ERROR_RCODE_NOT_IMPLEMENTED = 9004 DNS_ERROR_RCODE_NO_ERROR = 0 DNS_ERROR_RCODE_NXRRSET = 9008 DNS_ERROR_RCODE_REFUSED = 9005 DNS_ERROR_RCODE_SERVER_FAILURE = 9002 DNS_ERROR_RCODE_YXDOMAIN = 9006 DNS_ERROR_RCODE_YXRRSET = 9007 DNS_ERROR_RECORD_ALREADY_EXISTS = 9711 DNS_ERROR_RECORD_DOES_NOT_EXIST = 9701 DNS_ERROR_RECORD_FORMAT = 9702 DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT = 9710 DNS_ERROR_RECORD_TIMED_OUT = 9705 DNS_ERROR_RESPONSE_CODES_BASE = 9000 DNS_ERROR_SECONDARY_DATA = 9712 DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP = 9612 DNS_ERROR_SECURE_BASE = 9800 DNS_ERROR_SETUP_BASE = 9850 DNS_ERROR_SOA_DELETE_INVALID = 9618 DNS_ERROR_TRY_AGAIN_LATER = 9554 DNS_ERROR_UNKNOWN_RECORD_TYPE = 9704 DNS_ERROR_UNSECURE_PACKET = 9505 DNS_ERROR_WINS_INIT_FAILED = 9615 DNS_ERROR_ZONE_ALREADY_EXISTS = 9609 DNS_ERROR_ZONE_BASE = 9600 DNS_ERROR_ZONE_CONFIGURATION_ERROR = 9604 DNS_ERROR_ZONE_CREATION_FAILED = 9608 DNS_ERROR_ZONE_DOES_NOT_EXIST = 9601 DNS_ERROR_ZONE_HAS_NO_NS_RECORDS = 9606 DNS_ERROR_ZONE_HAS_NO_SOA_RECORD = 9605 DNS_ERROR_ZONE_IS_SHUTDOWN = 9621 DNS_ERROR_ZONE_LOCKED = 9607 DNS_ERROR_ZONE_NOT_SECONDARY = 9613 DNS_ERROR_ZONE_REQUIRES_MASTER_IP = 9620 DNS_FILTEROFF = 0x0008 DNS_FILTERON = 0x0004 DNS_INFO_ADDED_LOCAL_WINS = 9753 DNS_INFO_AXFR_COMPLETE = 9751 DNS_INFO_NO_RECORDS = 9501 DNS_REGISTER = 0x0001 DNS_STATUS_CONTINUE_NEEDED = 9801 DNS_STATUS_DOTTED_NAME = 9558 DNS_STATUS_FQDN = 9557 DNS_STATUS_PACKET_UNSECURE = 9505 DNS_STATUS_SINGLE_PART_NAME = 9559 DNS_UNREGISTER = 0x0002 DNS_WARNING_DOMAIN_UNDELETED = 9716 DNS_WARNING_PTR_CREATE_FAILED = 9715 DN_DEFAULTPRN = 0x1 DOCKINFO_DOCKED = 2 DOCKINFO_UNDOCKED = 1 DOCKINFO_USER_DOCKED = 6 DOCKINFO_USER_SUPPLIED = 4 DOCKINFO_USER_UNDOCKED = 5 DOF_DIRECTORY = 0x8003 DOF_DOCUMENT = 0x8002 DOF_EXECUTABLE = 0x8001 DOF_MULTIPLE = 0x8004 DOF_PROGMAN = 0x0001 DOF_SHELLDATA = 0x0002 DOMAIN_ALIAS_RID_ACCESS_CONTROL_ASSISTANCE_OPS = 579 DOMAIN_ALIAS_RID_ACCOUNT_OPS = 548 DOMAIN_ALIAS_RID_ADMINS = 544 DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 560 DOMAIN_ALIAS_RID_BACKUP_OPS = 551 DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 571 DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP = 574 DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 569 DOMAIN_ALIAS_RID_DCOM_USERS = 562 DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 573 DOMAIN_ALIAS_RID_GUESTS = 546 DOMAIN_ALIAS_RID_HYPER_V_ADMINS = 578 DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 557 DOMAIN_ALIAS_RID_IUSERS = 568 DOMAIN_ALIAS_RID_LOGGING_USERS = 559 DOMAIN_ALIAS_RID_MONITORING_USERS = 558 DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 556 DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 572 DOMAIN_ALIAS_RID_POWER_USERS = 547 DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = 554 DOMAIN_ALIAS_RID_PRINT_OPS = 550 DOMAIN_ALIAS_RID_RAS_SERVERS = 553 DOMAIN_ALIAS_RID_RDS_ENDPOINT_SERVERS = 576 DOMAIN_ALIAS_RID_RDS_MANAGEMENT_SERVERS = 577 DOMAIN_ALIAS_RID_RDS_REMOTE_ACCESS_SERVERS = 575 DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 555 DOMAIN_ALIAS_RID_REMOTE_MANAGEMENT_USERS = 580 DOMAIN_ALIAS_RID_REPLICATOR = 552 DOMAIN_ALIAS_RID_SYSTEM_OPS = 549 DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 561 DOMAIN_ALIAS_RID_USERS = 545 DOMAIN_GROUP_RID_ADMINS = 512 DOMAIN_GROUP_RID_AUTHORIZATION_DATA_CONTAINS_CLAIMS = 497 DOMAIN_GROUP_RID_AUTHORIZATION_DATA_IS_COMPOUNDED = 496 DOMAIN_GROUP_RID_CERT_ADMINS = 517 DOMAIN_GROUP_RID_CLONEABLE_CONTROLLERS = 522 DOMAIN_GROUP_RID_COMPUTERS = 515 DOMAIN_GROUP_RID_CONTROLLERS = 516 DOMAIN_GROUP_RID_ENTERPRISE_ADMINS = 519 DOMAIN_GROUP_RID_ENTERPRISE_READONLY_DOMAIN_CONTROLLERS = 498 DOMAIN_GROUP_RID_GUESTS = 514 DOMAIN_GROUP_RID_POLICY_ADMINS = 520 DOMAIN_GROUP_RID_READONLY_CONTROLLERS = 521 DOMAIN_GROUP_RID_SCHEMA_ADMINS = 518 DOMAIN_GROUP_RID_USERS = 513 DOMAIN_USER_RID_ADMIN = 500 DOMAIN_USER_RID_GUEST = 501 DOMAIN_USER_RID_KRBTGT = 502 DOMAIN_USER_RID_MAX = 999 DONT_RESOLVE_DLL_REFERENCES = 0x1 DOUBLE_CLICK = 0x2 DOWNLOADFACE = 514 DOWNLOADHEADER = 4111 DO_DROPFILE = 1162627398 DO_PRINTFILE = 1414419024 DPD_DELETE_ALL_FILES = 0x00000004 DPD_DELETE_SPECIFIC_VERSION = 0x00000002 DPD_DELETE_UNUSED_FILES = 0x00000001 DRAFTMODE = 7 DRAFT_QUALITY = 1 DRAGDROP_E_FIRST = 2147746048 DRAGDROP_E_LAST = 2147746063 DRAGDROP_S_FIRST = 262400 DRAGDROP_S_LAST = 262415 DRAWPATTERNRECT = 25 DRIVERVERSION = 0 DRIVER_KERNELMODE = 0x00000001 DRIVER_USERMODE = 0x00000002 DRIVE_CDROM = 5 DRIVE_FIXED = 3 DRIVE_NO_ROOT_DIR = 1 DRIVE_RAMDISK = 6 DRIVE_REMOTE = 4 DRIVE_REMOVABLE = 2 DRIVE_UNKNOWN = 0 DROPEFFECT_COPY = 1 DROPEFFECT_LINK = 4 DROPEFFECT_MOVE = 2 DROPEFFECT_NONE = 0 DROPEFFECT_SCROLL = 2147483648 DRVCNF_CANCEL = 0x0000 DRVCNF_OK = 0x0001 DRVCNF_RESTART = 0x0002 DRV_CANCEL = 0 DRV_CLOSE = 0x0004 DRV_CONFIGURE = 0x0007 DRV_DISABLE = 0x0005 DRV_ENABLE = 0x0002 DRV_EXITSESSION = 0x000B DRV_FREE = 0x0006 DRV_INSTALL = 0x0009 DRV_LOAD = 0x0001 DRV_MCI_FIRST = 2048 DRV_MCI_LAST = 6143 DRV_OK = 1 DRV_OPEN = 0x0003 DRV_POWER = 0x000F DRV_QUERYCONFIGURE = 0x0008 DRV_REMOVE = 0x000A DRV_RESERVED = 0x0800 DRV_RESTART = 2 DRV_USER = 0x4000 DSPRINT_PENDING = 0x80000000 DSPRINT_PUBLISH = 0x00000001 DSPRINT_REPUBLISH = 0x00000008 DSPRINT_UNPUBLISH = 0x00000004 DSPRINT_UPDATE = 0x00000002 DSS_DISABLED = 0x0020 DSS_HIDEPREFIX = 0x0200 DSS_MONO = 0x0080 DSS_NORMAL = 0x0000 DSS_PREFIXONLY = 0x0400 DSS_RIGHT = 0x8000 DSS_UNION = 0x0010 DST_BITMAP = 0x0004 DST_COMPLEX = 0x0000 DST_ICON = 0x0003 DST_PREFIXTEXT = 0x0002 DST_TEXT = 0x0001 DS_3DLOOK = 4 DS_ABSALIGN = 1 DS_CENTER = 2048 DS_CENTERMOUSE = 4096 DS_CONTEXTHELP = 8192 DS_CONTROL = 1024 DS_FIXEDSYS = 8 DS_LOCALEDIT = 32 DS_MODALFRAME = 128 DS_NOFAILCREATE = 16 DS_NOIDLEMSG = 256 DS_SETFONT = 64 DS_SETFOREGROUND = 512 DS_SHELLFONT = 72 DS_SYSMODAL = 2 DS_S_SUCCESS = 0 DTR_CONTROL_DISABLE = 0x0 DTR_CONTROL_ENABLE = 0x1 DTR_CONTROL_HANDSHAKE = 0x2 DT_BOTTOM = 0x00000008 DT_CALCRECT = 0x00000400 DT_CENTER = 0x00000001 DT_CHARSTREAM = 4 DT_DISPFILE = 6 DT_EDITCONTROL = 0x00002000 DT_END_ELLIPSIS = 0x00008000 DT_EXPANDTABS = 0x00000040 DT_EXTERNALLEADING = 0x00000200 DT_HIDEPREFIX = 0x00100000 DT_INTERNAL = 0x00001000 DT_LEFT = 0x00000000 DT_METAFILE = 5 DT_MODIFYSTRING = 0x00010000 DT_NOCLIP = 0x00000100 DT_NOFULLWIDTHCHARBREAK = 0x00080000 DT_NOPREFIX = 0x00000800 DT_PATH_ELLIPSIS = 0x00004000 DT_PLOTTER = 0 DT_PREFIXONLY = 0x00200000 DT_RASCAMERA = 3 DT_RASDISPLAY = 1 DT_RASPRINTER = 2 DT_RIGHT = 0x00000002 DT_RTLREADING = 0x00020000 DT_SINGLELINE = 0x00000020 DT_TABSTOP = 0x00000080 DT_TOP = 0x00000000 DT_VCENTER = 0x00000004 DT_WORDBREAK = 0x00000010 DT_WORD_ELLIPSIS = 0x00040000 DUPLICATE = 0x06 DUPLICATE_CLOSE_SOURCE = 0x00000001 DUPLICATE_DEREG = 0x07 DUPLICATE_SAME_ACCESS = 0x00000002 DWLP_MSGRESULT = 0 E2BIG = 7 EACCES = 13 EADDRINUSE = 100 EADDRNOTAVAIL = 101 EAFNOSUPPORT = 102 EAGAIN = 11 EALREADY = 103 EASTEUROPE_CHARSET = 238 EBADF = 9 EBADMSG = 104 EBUSY = 16 ECANCELED = 105 ECHILD = 10 ECONNABORTED = 106 ECONNREFUSED = 107 ECONNRESET = 108 EC_DISABLE = 8 EC_ENABLEALL = 0 EC_ENABLEONE = 128 EC_LEFTMARGIN = 0x0001 EC_QUERYWAITING = 2 EC_RIGHTMARGIN = 0x0002 EC_USEFONTINFO = 0xffff EDD_GET_DEVICE_INTERFACE_NAME = 0x00000001 EDEADLK = 36 EDEADLOCK = 36 EDESTADDRREQ = 109 EDGE_BUMP = 9 EDGE_ETCHED = 6 EDGE_RAISED = 5 EDGE_SUNKEN = 10 EDOM = 33 EDS_RAWMODE = 0x00000002 EEInfoGCCOM = 11 EEInfoGCFRS = 12 EEInfoNextRecordsMissing = 2 EEInfoPreviousRecordsMissing = 1 EEInfoUseFileTime = 4 EEXIST = 17 EFAULT = 14 EFBIG = 27 EFSRPC_SECURE_ONLY = 8 EFS_USE_RECOVERY_KEYS = 1 EHOSTUNREACH = 110 EIDRM = 111 EILSEQ = 42 EIMES_CANCELCOMPSTRINFOCUS = 0x0002 EIMES_COMPLETECOMPSTRKILLFOCUS = 0x0004 EIMES_GETCOMPSTRATONCE = 0x0001 EINPROGRESS = 112 EINTR = 4 EINVAL = 22 EIO = 5 EISCONN = 113 EISDIR = 21 ELEMENT_STATUS_ACCESS = 0x00000008 ELEMENT_STATUS_AVOLTAG = 0x20000000 ELEMENT_STATUS_EXCEPT = 0x00000004 ELEMENT_STATUS_EXENAB = 0x00000010 ELEMENT_STATUS_FULL = 0x00000001 ELEMENT_STATUS_ID_VALID = 0x00002000 ELEMENT_STATUS_IMPEXP = 0x00000002 ELEMENT_STATUS_INENAB = 0x00000020 ELEMENT_STATUS_INVERT = 0x00400000 ELEMENT_STATUS_LUN_VALID = 0x00001000 ELEMENT_STATUS_NOT_BUS = 0x00008000 ELEMENT_STATUS_PRODUCT_DATA = 0x00000040 ELEMENT_STATUS_PVOLTAG = 0x10000000 ELEMENT_STATUS_SVALID = 0x00800000 ELF_CULTURE_LATIN = 0 ELF_VENDOR_SIZE = 4 ELF_VERSION = 0 ELOOP = 114 EMARCH_ENC_I17_IC_INST_WORD_POS_X = 12 EMARCH_ENC_I17_IC_INST_WORD_X = 3 EMARCH_ENC_I17_IC_SIZE_X = 1 EMARCH_ENC_I17_IC_VAL_POS_X = 21 EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X = 14 EMARCH_ENC_I17_IMM41a_INST_WORD_X = 1 EMARCH_ENC_I17_IMM41a_SIZE_X = 10 EMARCH_ENC_I17_IMM41a_VAL_POS_X = 22 EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X = 24 EMARCH_ENC_I17_IMM41b_INST_WORD_X = 1 EMARCH_ENC_I17_IMM41b_SIZE_X = 8 EMARCH_ENC_I17_IMM41b_VAL_POS_X = 32 EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X = 0 EMARCH_ENC_I17_IMM41c_INST_WORD_X = 2 EMARCH_ENC_I17_IMM41c_SIZE_X = 23 EMARCH_ENC_I17_IMM41c_VAL_POS_X = 40 EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X = 13 EMARCH_ENC_I17_IMM5C_INST_WORD_X = 3 EMARCH_ENC_I17_IMM5C_SIZE_X = 5 EMARCH_ENC_I17_IMM5C_VAL_POS_X = 16 EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X = 4 EMARCH_ENC_I17_IMM7B_INST_WORD_X = 3 EMARCH_ENC_I17_IMM7B_SIZE_X = 7 EMARCH_ENC_I17_IMM7B_VAL_POS_X = 0 EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X = 18 EMARCH_ENC_I17_IMM9D_INST_WORD_X = 3 EMARCH_ENC_I17_IMM9D_SIZE_X = 9 EMARCH_ENC_I17_IMM9D_VAL_POS_X = 7 EMARCH_ENC_I17_SIGN_INST_WORD_POS_X = 27 EMARCH_ENC_I17_SIGN_INST_WORD_X = 3 EMARCH_ENC_I17_SIGN_SIZE_X = 1 EMARCH_ENC_I17_SIGN_VAL_POS_X = 63 EMBDHLP_CREATENOW = 0 EMBDHLP_DELAYCREATE = 65536 EMBDHLP_INPROC_HANDLER = 0 EMBDHLP_INPROC_SERVER = 1 EMFILE = 24 EMLINK = 31 EMR_ABORTPATH = 68 EMR_ALPHABLEND = 114 EMR_ANGLEARC = 41 EMR_ARC = 45 EMR_ARCTO = 55 EMR_BEGINPATH = 59 EMR_BITBLT = 76 EMR_CHORD = 46 EMR_CLOSEFIGURE = 61 EMR_COLORCORRECTPALETTE = 111 EMR_COLORMATCHTOTARGETW = 121 EMR_CREATEBRUSHINDIRECT = 39 EMR_CREATECOLORSPACE = 99 EMR_CREATECOLORSPACEW = 122 EMR_CREATEDIBPATTERNBRUSHPT = 94 EMR_CREATEMONOBRUSH = 93 EMR_CREATEPALETTE = 49 EMR_CREATEPEN = 38 EMR_DELETECOLORSPACE = 101 EMR_DELETEOBJECT = 40 EMR_ELLIPSE = 42 EMR_ENDPATH = 60 EMR_EOF = 14 EMR_EXCLUDECLIPRECT = 29 EMR_EXTCREATEFONTINDIRECTW = 82 EMR_EXTCREATEPEN = 95 EMR_EXTFLOODFILL = 53 EMR_EXTSELECTCLIPRGN = 75 EMR_EXTTEXTOUTA = 83 EMR_EXTTEXTOUTW = 84 EMR_FILLPATH = 62 EMR_FILLRGN = 71 EMR_FLATTENPATH = 65 EMR_FRAMERGN = 72 EMR_GDICOMMENT = 70 EMR_GLSBOUNDEDRECORD = 103 EMR_GLSRECORD = 102 EMR_GRADIENTFILL = 118 EMR_HEADER = 1 EMR_INTERSECTCLIPRECT = 30 EMR_INVERTRGN = 73 EMR_LINETO = 54 EMR_MASKBLT = 78 EMR_MAX = 122 EMR_MIN = 1 EMR_MODIFYWORLDTRANSFORM = 36 EMR_MOVETOEX = 27 EMR_OFFSETCLIPRGN = 26 EMR_PAINTRGN = 74 EMR_PIE = 47 EMR_PIXELFORMAT = 104 EMR_PLGBLT = 79 EMR_POLYBEZIER = 2 EMR_POLYBEZIER16 = 85 EMR_POLYBEZIERTO = 5 EMR_POLYBEZIERTO16 = 88 EMR_POLYDRAW = 56 EMR_POLYDRAW16 = 92 EMR_POLYGON = 3 EMR_POLYGON16 = 86 EMR_POLYLINE = 4 EMR_POLYLINE16 = 87 EMR_POLYLINETO = 6 EMR_POLYLINETO16 = 89 EMR_POLYPOLYGON = 8 EMR_POLYPOLYGON16 = 91 EMR_POLYPOLYLINE = 7 EMR_POLYPOLYLINE16 = 90 EMR_POLYTEXTOUTA = 96 EMR_POLYTEXTOUTW = 97 EMR_REALIZEPALETTE = 52 EMR_RECTANGLE = 43 EMR_RESERVED_105 = 105 EMR_RESERVED_106 = 106 EMR_RESERVED_107 = 107 EMR_RESERVED_108 = 108 EMR_RESERVED_109 = 109 EMR_RESERVED_110 = 110 EMR_RESERVED_117 = 117 EMR_RESERVED_119 = 119 EMR_RESERVED_120 = 120 EMR_RESIZEPALETTE = 51 EMR_RESTOREDC = 34 EMR_ROUNDRECT = 44 EMR_SAVEDC = 33 EMR_SCALEVIEWPORTEXTEX = 31 EMR_SCALEWINDOWEXTEX = 32 EMR_SELECTCLIPPATH = 67 EMR_SELECTOBJECT = 37 EMR_SELECTPALETTE = 48 EMR_SETARCDIRECTION = 57 EMR_SETBKCOLOR = 25 EMR_SETBKMODE = 18 EMR_SETBRUSHORGEX = 13 EMR_SETCOLORADJUSTMENT = 23 EMR_SETCOLORSPACE = 100 EMR_SETDIBITSTODEVICE = 80 EMR_SETICMMODE = 98 EMR_SETICMPROFILEA = 112 EMR_SETICMPROFILEW = 113 EMR_SETLAYOUT = 115 EMR_SETMAPMODE = 17 EMR_SETMAPPERFLAGS = 16 EMR_SETMETARGN = 28 EMR_SETMITERLIMIT = 58 EMR_SETPALETTEENTRIES = 50 EMR_SETPIXELV = 15 EMR_SETPOLYFILLMODE = 19 EMR_SETROP2 = 20 EMR_SETSTRETCHBLTMODE = 21 EMR_SETTEXTALIGN = 22 EMR_SETTEXTCOLOR = 24 EMR_SETVIEWPORTEXTEX = 11 EMR_SETVIEWPORTORGEX = 12 EMR_SETWINDOWEXTEX = 9 EMR_SETWINDOWORGEX = 10 EMR_SETWORLDTRANSFORM = 35 EMR_STRETCHBLT = 77 EMR_STRETCHDIBITS = 81 EMR_STROKEANDFILLPATH = 63 EMR_STROKEPATH = 64 EMR_TRANSPARENTBLT = 116 EMR_WIDENPATH = 66 EMSGSIZE = 115 EMSIS_COMPOSITIONSTRING = 0x0001 EM_CANUNDO = 0x00C6 EM_CHARFROMPOS = 0x00D7 EM_EMPTYUNDOBUFFER = 0x00CD EM_FMTLINES = 0x00C8 EM_GETFIRSTVISIBLELINE = 0x00CE EM_GETHANDLE = 0x00BD EM_GETIMESTATUS = 0x00D9 EM_GETLIMITTEXT = 0x00D5 EM_GETLINE = 0x00C4 EM_GETLINECOUNT = 0x00BA EM_GETMARGINS = 0x00D4 EM_GETMODIFY = 0x00B8 EM_GETPASSWORDCHAR = 0x00D2 EM_GETRECT = 0x00B2 EM_GETSEL = 0x00B0 EM_GETTHUMB = 0x00BE EM_GETWORDBREAKPROC = 0x00D1 EM_LIMITTEXT = 0x00C5 EM_LINEFROMCHAR = 0x00C9 EM_LINEINDEX = 0x00BB EM_LINELENGTH = 0x00C1 EM_LINESCROLL = 0x00B6 EM_POSFROMCHAR = 0x00D6 EM_REPLACESEL = 0x00C2 EM_SCROLL = 0x00B5 EM_SCROLLCARET = 0x00B7 EM_SETHANDLE = 0x00BC EM_SETIMESTATUS = 0x00D8 EM_SETLIMITTEXT = 197 EM_SETMARGINS = 0x00D3 EM_SETMODIFY = 0x00B9 EM_SETPASSWORDCHAR = 0x00CC EM_SETREADONLY = 0x00CF EM_SETRECT = 0x00B3 EM_SETRECTNP = 0x00B4 EM_SETSEL = 0x00B1 EM_SETTABSTOPS = 0x00CB EM_SETWORDBREAKPROC = 0x00D0 EM_UNDO = 0x00C7 ENABLEDUPLEX = 28 ENABLEPAIRKERNING = 769 ENABLERELATIVEWIDTHS = 768 ENABLE_AUTO_POSITION = 0x100 ENABLE_DISABLE_AUTOSAVE = 0xD2 ENABLE_DISABLE_AUTO_OFFLINE = 0xDB ENABLE_ECHO_INPUT = 0x4 ENABLE_EXTENDED_FLAGS = 0x80 ENABLE_INSERT_MODE = 0x20 ENABLE_LINE_INPUT = 0x2 ENABLE_MOUSE_INPUT = 0x10 ENABLE_PROCESSED_INPUT = 0x1 ENABLE_PROCESSED_OUTPUT = 0x1 ENABLE_QUICK_EDIT_MODE = 0x40 ENABLE_SMART = 0xD8 ENABLE_WINDOW_INPUT = 0x8 ENABLE_WRAP_AT_EOL_OUTPUT = 0x2 ENAMETOOLONG = 38 ENCAPSULATED_POSTSCRIPT = 4116 ENCRYPTION_FORMAT_DEFAULT = 1 ENDDOC = 11 ENDSESSION_CLOSEAPP = 0x00000001 ENDSESSION_CRITICAL = 0x40000000 ENDSESSION_LOGOFF = 0x80000000 END_INTERFACE = 0 END_PATH = 4098 ENETDOWN = 116 ENETRESET = 117 ENETUNREACH = 118 ENFILE = 23 ENHANCED_KEY = 0x100 ENHMETA_SIGNATURE = 0x464D4520 ENHMETA_STOCK_OBJECT = 0x80000000 ENLISTMENT_ALL_ACCESS = 983071 ENLISTMENT_GENERIC_EXECUTE = 131100 ENLISTMENT_GENERIC_READ = 131073 ENLISTMENT_GENERIC_WRITE = 131102 ENLISTMENT_MAXIMUM_OPTION = 0x00000001 ENLISTMENT_QUERY_INFORMATION = 1 ENLISTMENT_RECOVER = 4 ENLISTMENT_SET_INFORMATION = 2 ENLISTMENT_SUBORDINATE_RIGHTS = 8 ENLISTMENT_SUPERIOR = 0x00000001 ENLISTMENT_SUPERIOR_RIGHTS = 0x10 ENOBUFS = 119 ENODATA = 120 ENODEV = 19 ENOENT = 2 ENOEXEC = 8 ENOFILE = 2 ENOLCK = 39 ENOLINK = 121 ENOMEM = 12 ENOMSG = 122 ENOPROTOOPT = 123 ENOSPC = 28 ENOSR = 124 ENOSTR = 125 ENOSYS = 40 ENOTCONN = 126 ENOTDIR = 20 ENOTEMPTY = 41 ENOTRECOVERABLE = 127 ENOTSOCK = 128 ENOTSUP = 129 ENOTTY = 25 ENUMPAPERBINS = 31 ENUMPAPERMETRICS = 34 ENUM_ALL_CALENDARS = 0xffffffff ENUM_E_FIRST = 2147746224 ENUM_E_LAST = 2147746239 ENUM_S_FIRST = 262576 ENUM_S_LAST = 262591 ENXIO = 6 EN_ALIGN_LTR_EC = 0x0700 EN_ALIGN_RTL_EC = 0x0701 EN_CHANGE = 0x0300 EN_ERRSPACE = 0x0500 EN_HSCROLL = 0x0601 EN_KILLFOCUS = 0x0200 EN_MAXTEXT = 0x0501 EN_SETFOCUS = 0x0100 EN_UPDATE = 0x0400 EN_VSCROLL = 0x0602 EOPNOTSUPP = 130 EOVERFLOW = 132 EOWNERDEAD = 133 EPERM = 1 EPIPE = 32 EPROTO = 134 EPROTONOSUPPORT = 135 EPROTOTYPE = 136 EPSPRINTING = 33 EPS_SIGNATURE = 0x46535045 EPT_S_CANT_CREATE = 1899 EPT_S_CANT_PERFORM_OP = 1752 EPT_S_INVALID_ENTRY = 1751 EPT_S_NOT_REGISTERED = 1753 ERANGE = 34 EROFS = 30 ERROR = 0 ERROR_ABANDONED_WAIT_0 = 735 ERROR_ABANDONED_WAIT_63 = 736 ERROR_ACCESS_DENIED = 5 ERROR_ACCESS_DISABLED_BY_POLICY = 1260 ERROR_ACCESS_DISABLED_WEBBLADE = 1277 ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER = 1278 ERROR_ACCOUNT_DISABLED = 1331 ERROR_ACCOUNT_EXPIRED = 1793 ERROR_ACCOUNT_LOCKED_OUT = 1909 ERROR_ACCOUNT_RESTRICTION = 1327 ERROR_ACTIVATION_COUNT_EXCEEDED = 7059 ERROR_ACTIVE_CONNECTIONS = 2402 ERROR_ADAP_HDW_ERR = 57 ERROR_ADDRESS_ALREADY_ASSOCIATED = 1227 ERROR_ADDRESS_NOT_ASSOCIATED = 1228 ERROR_ADVANCED_INSTALLER_FAILED = 14099 ERROR_ALERTED = 739 ERROR_ALIAS_EXISTS = 1379 ERROR_ALLOTTED_SPACE_EXCEEDED = 1344 ERROR_ALL_NODES_NOT_AVAILABLE = 5037 ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = 1933 ERROR_ALREADY_ASSIGNED = 85 ERROR_ALREADY_EXISTS = 183 ERROR_ALREADY_FIBER = 1280 ERROR_ALREADY_INITIALIZED = 1247 ERROR_ALREADY_REGISTERED = 1242 ERROR_ALREADY_RUNNING_LKG = 1074 ERROR_ALREADY_THREAD = 1281 ERROR_ALREADY_WAITING = 1904 ERROR_AMBIGUOUS_SYSTEM_DEVICE = 15250 ERROR_API_UNAVAILABLE = 15841 ERROR_APPHELP_BLOCK = 1259 ERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN = 15624 ERROR_APP_WRONG_OS = 1151 ERROR_ARENA_TRASHED = 7 ERROR_ARITHMETIC_OVERFLOW = 534 ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174 ERROR_AUTHENTICATION_FIREWALL_FAILED = 1935 ERROR_AUTHIP_FAILURE = 1469 ERROR_AUTODATASEG_EXCEEDS_64k = 199 ERROR_BADDB = 1009 ERROR_BADKEY = 1010 ERROR_BAD_ARGUMENTS = 160 ERROR_BAD_COMMAND = 22 ERROR_BAD_CONFIGURATION = 1610 ERROR_BAD_DESCRIPTOR_FORMAT = 1361 ERROR_BAD_DEVICE = 1200 ERROR_BAD_DEV_TYPE = 66 ERROR_BAD_DRIVER = 2001 ERROR_BAD_DRIVER_LEVEL = 119 ERROR_BAD_ENVIRONMENT = 10 ERROR_BAD_EXE_FORMAT = 193 ERROR_BAD_FILE_TYPE = 222 ERROR_BAD_FORMAT = 11 ERROR_BAD_IMPERSONATION_LEVEL = 1346 ERROR_BAD_INHERITANCE_ACL = 1340 ERROR_BAD_LENGTH = 24 ERROR_BAD_LOGON_SESSION_STATE = 1365 ERROR_BAD_NETPATH = 53 ERROR_BAD_NET_NAME = 67 ERROR_BAD_NET_RESP = 58 ERROR_BAD_PATHNAME = 161 ERROR_BAD_PIPE = 230 ERROR_BAD_PROFILE = 1206 ERROR_BAD_PROVIDER = 1204 ERROR_BAD_QUERY_SYNTAX = 1615 ERROR_BAD_RECOVERY_POLICY = 6012 ERROR_BAD_REM_ADAP = 60 ERROR_BAD_THREADID_ADDR = 159 ERROR_BAD_TOKEN_TYPE = 1349 ERROR_BAD_UNIT = 20 ERROR_BAD_USERNAME = 2202 ERROR_BAD_USER_PROFILE = 1253 ERROR_BAD_VALIDATION_CLASS = 1348 ERROR_BEGINNING_OF_MEDIA = 1102 ERROR_BIDI_DEVICE_OFFLINE = 13004 ERROR_BIDI_ERROR_BASE = 13000 ERROR_BIDI_NOT_SUPPORTED = 50 ERROR_BIDI_SCHEMA_NOT_SUPPORTED = 13005 ERROR_BIDI_SCHEMA_READ_ONLY = 13002 ERROR_BIDI_SERVER_OFFLINE = 13003 ERROR_BIDI_STATUS_OK = 0 ERROR_BIDI_STATUS_WARNING = 13001 ERROR_BOOT_ALREADY_ACCEPTED = 1076 ERROR_BROKEN_PIPE = 109 ERROR_BUFFER_OVERFLOW = 111 ERROR_BUSY = 170 ERROR_BUSY_DRIVE = 142 ERROR_BUS_RESET = 1111 ERROR_CALLBACK_SUPPLIED_INVALID_DATA = 1273 ERROR_CALL_NOT_IMPLEMENTED = 120 ERROR_CANCELLED = 1223 ERROR_CANCEL_VIOLATION = 173 ERROR_CANNOT_COPY = 266 ERROR_CANNOT_DETECT_DRIVER_FAILURE = 1080 ERROR_CANNOT_DETECT_PROCESS_ABORT = 1081 ERROR_CANNOT_FIND_WND_CLASS = 1407 ERROR_CANNOT_IMPERSONATE = 1368 ERROR_CANNOT_MAKE = 82 ERROR_CANNOT_OPEN_PROFILE = 1205 ERROR_CANNOT_SWITCH_RUNLEVEL = 15400 ERROR_CANTOPEN = 1011 ERROR_CANTREAD = 1012 ERROR_CANTWRITE = 1013 ERROR_CANT_ACCESS_DOMAIN_INFO = 1351 ERROR_CANT_ACCESS_FILE = 1920 ERROR_CANT_DELETE_LAST_ITEM = 4335 ERROR_CANT_DISABLE_MANDATORY = 1310 ERROR_CANT_EVICT_ACTIVE_NODE = 5009 ERROR_CANT_OPEN_ANONYMOUS = 1347 ERROR_CANT_RESOLVE_FILENAME = 1921 ERROR_CAN_NOT_COMPLETE = 1003 ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001 ERROR_CHECKOUT_REQUIRED = 221 ERROR_CHILD_MUST_BE_VOLATILE = 1021 ERROR_CHILD_NOT_COMPLETE = 129 ERROR_CHILD_WINDOW_MENU = 1436 ERROR_CIRCULAR_DEPENDENCY = 1059 ERROR_CLASS_ALREADY_EXISTS = 1410 ERROR_CLASS_DOES_NOT_EXIST = 1411 ERROR_CLASS_HAS_WINDOWS = 1412 ERROR_CLEANER_CARTRIDGE_INSTALLED = 4340 ERROR_CLEANER_CARTRIDGE_SPENT = 4333 ERROR_CLEANER_SLOT_NOT_SET = 4332 ERROR_CLEANER_SLOT_SET = 4331 ERROR_CLIPBOARD_NOT_OPEN = 1418 ERROR_CLIPPING_NOT_SUPPORTED = 2005 ERROR_CLUSCFG_ALREADY_COMMITTED = 5901 ERROR_CLUSCFG_ROLLBACK_FAILED = 5902 ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT = 5903 ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND = 5032 ERROR_CLUSTERLOG_CORRUPT = 5029 ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE = 5031 ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE = 5033 ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE = 5030 ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME = 5900 ERROR_CLUSTER_DATABASE_SEQMISMATCH = 5083 ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP = 5896 ERROR_CLUSTER_GUM_NOT_LOCKER = 5085 ERROR_CLUSTER_INCOMPATIBLE_VERSIONS = 5075 ERROR_CLUSTER_INSTANCE_ID_MISMATCH = 5893 ERROR_CLUSTER_INVALID_NETWORK = 5054 ERROR_CLUSTER_INVALID_NETWORK_PROVIDER = 5049 ERROR_CLUSTER_INVALID_NODE = 5039 ERROR_CLUSTER_INVALID_REQUEST = 5048 ERROR_CLUSTER_IPADDR_IN_USE = 5057 ERROR_CLUSTER_JOIN_ABORTED = 5074 ERROR_CLUSTER_JOIN_IN_PROGRESS = 5041 ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS = 5053 ERROR_CLUSTER_LAST_INTERNAL_NETWORK = 5066 ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND = 5043 ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED = 5076 ERROR_CLUSTER_MEMBERSHIP_HALT = 5892 ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = 5890 ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME = 5905 ERROR_CLUSTER_NETINTERFACE_EXISTS = 5046 ERROR_CLUSTER_NETINTERFACE_NOT_FOUND = 5047 ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE = 5064 ERROR_CLUSTER_NETWORK_ALREADY_ONLINE = 5063 ERROR_CLUSTER_NETWORK_EXISTS = 5044 ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS = 5067 ERROR_CLUSTER_NETWORK_NOT_FOUND = 5045 ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP = 5894 ERROR_CLUSTER_NETWORK_NOT_INTERNAL = 5060 ERROR_CLUSTER_NODE_ALREADY_DOWN = 5062 ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT = 5088 ERROR_CLUSTER_NODE_ALREADY_MEMBER = 5065 ERROR_CLUSTER_NODE_ALREADY_UP = 5061 ERROR_CLUSTER_NODE_DOWN = 5050 ERROR_CLUSTER_NODE_EXISTS = 5040 ERROR_CLUSTER_NODE_NOT_FOUND = 5042 ERROR_CLUSTER_NODE_NOT_MEMBER = 5052 ERROR_CLUSTER_NODE_NOT_PAUSED = 5058 ERROR_CLUSTER_NODE_NOT_READY = 5072 ERROR_CLUSTER_NODE_PAUSED = 5070 ERROR_CLUSTER_NODE_SHUTTING_DOWN = 5073 ERROR_CLUSTER_NODE_UNREACHABLE = 5051 ERROR_CLUSTER_NODE_UP = 5056 ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED = 5081 ERROR_CLUSTER_NO_SECURITY_CONTEXT = 5059 ERROR_CLUSTER_OLD_VERSION = 5904 ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST = 5082 ERROR_CLUSTER_PARAMETER_MISMATCH = 5897 ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH = 5895 ERROR_CLUSTER_QUORUMLOG_NOT_FOUND = 5891 ERROR_CLUSTER_RESNAME_NOT_FOUND = 5080 ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND = 5078 ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED = 5079 ERROR_CLUSTER_SHUTTING_DOWN = 5022 ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED = 5077 ERROR_CLUSTER_WRONG_OS_VERSION = 5899 ERROR_COLORSPACE_MISMATCH = 2021 ERROR_COMMITMENT_LIMIT = 1455 ERROR_COM_TASK_STOP_PENDING = 15501 ERROR_CONNECTED_OTHER_PASSWORD = 2108 ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT = 2109 ERROR_CONNECTION_ABORTED = 1236 ERROR_CONNECTION_ACTIVE = 1230 ERROR_CONNECTION_COUNT_LIMIT = 1238 ERROR_CONNECTION_INVALID = 1229 ERROR_CONNECTION_REFUSED = 1225 ERROR_CONNECTION_UNAVAIL = 1201 ERROR_CONTEXT_EXPIRED = 1931 ERROR_CONTINUE = 1246 ERROR_CONTROLLING_IEPORT = 4329 ERROR_CONTROL_ID_NOT_FOUND = 1421 ERROR_CORE_RESOURCE = 5026 ERROR_COUNTER_TIMEOUT = 1121 ERROR_CRC = 23 ERROR_CREATE_FAILED = 1631 ERROR_CSCSHARE_OFFLINE = 1262 ERROR_CTX_BAD_VIDEO_MODE = 7025 ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY = 7005 ERROR_CTX_CLIENT_LICENSE_IN_USE = 7052 ERROR_CTX_CLIENT_LICENSE_NOT_SET = 7053 ERROR_CTX_CLIENT_QUERY_TIMEOUT = 7040 ERROR_CTX_CLOSE_PENDING = 7007 ERROR_CTX_CONSOLE_CONNECT = 7042 ERROR_CTX_CONSOLE_DISCONNECT = 7041 ERROR_CTX_GRAPHICS_INVALID = 7035 ERROR_CTX_INVALID_MODEMNAME = 7010 ERROR_CTX_INVALID_PD = 7002 ERROR_CTX_INVALID_WD = 7049 ERROR_CTX_LICENSE_CLIENT_INVALID = 7055 ERROR_CTX_LICENSE_EXPIRED = 7056 ERROR_CTX_LICENSE_NOT_AVAILABLE = 7054 ERROR_CTX_LOGON_DISABLED = 7037 ERROR_CTX_MODEM_INF_NOT_FOUND = 7009 ERROR_CTX_MODEM_RESPONSE_BUSY = 7015 ERROR_CTX_MODEM_RESPONSE_ERROR = 7011 ERROR_CTX_MODEM_RESPONSE_NO_CARRIER = 7013 ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE = 7014 ERROR_CTX_MODEM_RESPONSE_TIMEOUT = 7012 ERROR_CTX_MODEM_RESPONSE_VOICE = 7016 ERROR_CTX_NOT_CONSOLE = 7038 ERROR_CTX_NO_OUTBUF = 7008 ERROR_CTX_PD_NOT_FOUND = 7003 ERROR_CTX_SERVICE_NAME_COLLISION = 7006 ERROR_CTX_SHADOW_DENIED = 7044 ERROR_CTX_SHADOW_DISABLED = 7051 ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 7058 ERROR_CTX_SHADOW_INVALID = 7050 ERROR_CTX_SHADOW_NOT_RUNNING = 7057 ERROR_CTX_TD_ERROR = 7017 ERROR_CTX_WD_NOT_FOUND = 7004 ERROR_CTX_WINSTATION_ACCESS_DENIED = 7045 ERROR_CTX_WINSTATION_ALREADY_EXISTS = 7023 ERROR_CTX_WINSTATION_BUSY = 7024 ERROR_CTX_WINSTATION_NAME_INVALID = 7001 ERROR_CTX_WINSTATION_NOT_FOUND = 7022 ERROR_CURRENT_DIRECTORY = 16 ERROR_CURRENT_DOMAIN_NOT_ALLOWED = 1399 ERROR_DATABASE_BACKUP_CORRUPT = 5087 ERROR_DATABASE_DOES_NOT_EXIST = 1065 ERROR_DATABASE_FAILURE = 4313 ERROR_DATABASE_FULL = 4314 ERROR_DATATYPE_MISMATCH = 1629 ERROR_DC_NOT_FOUND = 1425 ERROR_DDE_FAIL = 1156 ERROR_DEBUGGER_INACTIVE = 1284 ERROR_DECRYPTION_FAILED = 6001 ERROR_DELAY_LOAD_FAILED = 1285 ERROR_DELETE_PENDING = 303 ERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED = 15621 ERROR_DELETING_ICM_XFORM = 2019 ERROR_DEPENDENCY_ALREADY_EXISTS = 5003 ERROR_DEPENDENCY_NOT_ALLOWED = 5069 ERROR_DEPENDENCY_NOT_FOUND = 5002 ERROR_DEPENDENT_RESOURCE_EXISTS = 5001 ERROR_DEPENDENT_SERVICES_RUNNING = 1051 ERROR_DEPLOYMENT_BLOCKED_BY_POLICY = 15617 ERROR_DESTINATION_ELEMENT_FULL = 1161 ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435 ERROR_DEVICE_ALREADY_REMEMBERED = 1202 ERROR_DEVICE_DOOR_OPEN = 1166 ERROR_DEVICE_IN_USE = 2404 ERROR_DEVICE_NOT_AVAILABLE = 4319 ERROR_DEVICE_NOT_CONNECTED = 1167 ERROR_DEVICE_NOT_PARTITIONED = 1107 ERROR_DEVICE_REINITIALIZATION_NEEDED = 1164 ERROR_DEVICE_REMOVED = 1617 ERROR_DEVICE_REQUIRES_CLEANING = 1165 ERROR_DEV_NOT_EXIST = 55 ERROR_DHCP_ADDRESS_CONFLICT = 4100 ERROR_DIFFERENT_SERVICE_ACCOUNT = 1079 ERROR_DIRECTORY = 267 ERROR_DIRECT_ACCESS_HANDLE = 130 ERROR_DIR_EFS_DISALLOWED = 6010 ERROR_DIR_NOT_EMPTY = 145 ERROR_DIR_NOT_ROOT = 144 ERROR_DISCARDED = 157 ERROR_DISK_CHANGE = 107 ERROR_DISK_CORRUPT = 1393 ERROR_DISK_FULL = 112 ERROR_DISK_OPERATION_FAILED = 1127 ERROR_DISK_RECALIBRATE_FAILED = 1126 ERROR_DISK_RESET_FAILED = 1128 ERROR_DISK_TOO_FRAGMENTED = 302 ERROR_DLL_INIT_FAILED = 1114 ERROR_DLL_NOT_FOUND = 1157 ERROR_DOMAIN_CONTROLLER_EXISTS = 1250 ERROR_DOMAIN_CONTROLLER_NOT_FOUND = 1908 ERROR_DOMAIN_EXISTS = 1356 ERROR_DOMAIN_LIMIT_EXCEEDED = 1357 ERROR_DOMAIN_TRUST_INCONSISTENT = 1810 ERROR_DOWNGRADE_DETECTED = 1265 ERROR_DRIVER_BLOCKED = 1275 ERROR_DRIVE_LOCKED = 108 ERROR_DRIVE_MEDIA_MISMATCH = 4303 ERROR_DRIVE_NOT_INSTALLED = 0x00000008 ERROR_DS_ADD_REPLICA_INHIBITED = 8302 ERROR_DS_ADMIN_LIMIT_EXCEEDED = 8228 ERROR_DS_AFFECTS_MULTIPLE_DSAS = 8249 ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 8578 ERROR_DS_ALIASED_OBJ_MISSING = 8334 ERROR_DS_ALIAS_DEREF_PROBLEM = 8244 ERROR_DS_ALIAS_POINTS_TO_ALIAS = 8336 ERROR_DS_ALIAS_PROBLEM = 8241 ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = 8205 ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = 8346 ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = 8204 ERROR_DS_ATT_ALREADY_EXISTS = 8318 ERROR_DS_ATT_IS_NOT_ON_OBJ = 8310 ERROR_DS_ATT_NOT_DEF_FOR_CLASS = 8317 ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = 8303 ERROR_DS_ATT_SCHEMA_REQ_ID = 8399 ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = 8416 ERROR_DS_ATT_VAL_ALREADY_EXISTS = 8323 ERROR_DS_AUTHORIZATION_FAILED = 8599 ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = 8231 ERROR_DS_AUTH_UNKNOWN = 8234 ERROR_DS_AUX_CLS_TEST_FAIL = 8389 ERROR_DS_BACKLINK_WITHOUT_LINK = 8482 ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = 8400 ERROR_DS_BAD_HIERARCHY_FILE = 8425 ERROR_DS_BAD_INSTANCE_TYPE = 8313 ERROR_DS_BAD_NAME_SYNTAX = 8335 ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = 8392 ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = 8426 ERROR_DS_BUSY = 8206 ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = 8585 ERROR_DS_CANT_ADD_ATT_VALUES = 8320 ERROR_DS_CANT_ADD_SYSTEM_ONLY = 8358 ERROR_DS_CANT_ADD_TO_GC = 8550 ERROR_DS_CANT_CACHE_ATT = 8401 ERROR_DS_CANT_CACHE_CLASS = 8402 ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = 8553 ERROR_DS_CANT_CREATE_UNDER_SCHEMA = 8510 ERROR_DS_CANT_DELETE = 8398 ERROR_DS_CANT_DELETE_DSA_OBJ = 8340 ERROR_DS_CANT_DEL_MASTER_CROSSREF = 8375 ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = 8604 ERROR_DS_CANT_DEREF_ALIAS = 8337 ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = 8603 ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = 8589 ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = 8537 ERROR_DS_CANT_FIND_DSA_OBJ = 8419 ERROR_DS_CANT_FIND_EXPECTED_NC = 8420 ERROR_DS_CANT_FIND_NC_IN_CACHE = 8421 ERROR_DS_CANT_MIX_MASTER_AND_REPS = 8331 ERROR_DS_CANT_MOD_OBJ_CLASS = 8215 ERROR_DS_CANT_MOD_PRIMARYGROUPID = 8506 ERROR_DS_CANT_MOD_SYSTEM_ONLY = 8369 ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = 8498 ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = 8608 ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = 8609 ERROR_DS_CANT_MOVE_DELETED_OBJECT = 8489 ERROR_DS_CANT_MOVE_RESOURCE_GROUP = 8499 ERROR_DS_CANT_ON_NON_LEAF = 8213 ERROR_DS_CANT_ON_RDN = 8214 ERROR_DS_CANT_REMOVE_ATT_CACHE = 8403 ERROR_DS_CANT_REMOVE_CLASS_CACHE = 8404 ERROR_DS_CANT_REM_MISSING_ATT = 8324 ERROR_DS_CANT_REM_MISSING_ATT_VAL = 8325 ERROR_DS_CANT_REPLACE_HIDDEN_REC = 8424 ERROR_DS_CANT_RETRIEVE_ATTS = 8481 ERROR_DS_CANT_RETRIEVE_CHILD = 8422 ERROR_DS_CANT_RETRIEVE_DN = 8405 ERROR_DS_CANT_RETRIEVE_INSTANCE = 8407 ERROR_DS_CANT_RETRIEVE_SD = 8526 ERROR_DS_CANT_START = 8531 ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = 8560 ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = 8493 ERROR_DS_CHILDREN_EXIST = 8332 ERROR_DS_CLASS_MUST_BE_CONCRETE = 8359 ERROR_DS_CLASS_NOT_DSA = 8343 ERROR_DS_CLIENT_LOOP = 8259 ERROR_DS_CODE_INCONSISTENCY = 8408 ERROR_DS_COMPARE_FALSE = 8229 ERROR_DS_COMPARE_TRUE = 8230 ERROR_DS_CONFIDENTIALITY_REQUIRED = 8237 ERROR_DS_CONFIG_PARAM_MISSING = 8427 ERROR_DS_CONSTRAINT_VIOLATION = 8239 ERROR_DS_CONSTRUCTED_ATT_MOD = 8475 ERROR_DS_CONTROL_NOT_FOUND = 8258 ERROR_DS_COULDNT_CONTACT_FSMO = 8367 ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = 8503 ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = 8502 ERROR_DS_COULDNT_UPDATE_SPNS = 8525 ERROR_DS_COUNTING_AB_INDICES_FAILED = 8428 ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = 8491 ERROR_DS_CROSS_DOM_MOVE_ERROR = 8216 ERROR_DS_CROSS_NC_DN_RENAME = 8368 ERROR_DS_CROSS_REF_BUSY = 8602 ERROR_DS_CROSS_REF_EXISTS = 8374 ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = 8495 ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = 8586 ERROR_DS_DATABASE_ERROR = 8409 ERROR_DS_DECODING_ERROR = 8253 ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = 8536 ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = 8535 ERROR_DS_DIFFERENT_REPL_EPOCHS = 8593 ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = 8615 ERROR_DS_DNS_LOOKUP_FAILURE = 8524 ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = 8612 ERROR_DS_DOMAIN_VERSION_TOO_HIGH = 8564 ERROR_DS_DOMAIN_VERSION_TOO_LOW = 8566 ERROR_DS_DRA_ABANDON_SYNC = 8462 ERROR_DS_DRA_ACCESS_DENIED = 8453 ERROR_DS_DRA_BAD_DN = 8439 ERROR_DS_DRA_BAD_INSTANCE_TYPE = 8445 ERROR_DS_DRA_BAD_NC = 8440 ERROR_DS_DRA_BUSY = 8438 ERROR_DS_DRA_CONNECTION_FAILED = 8444 ERROR_DS_DRA_DB_ERROR = 8451 ERROR_DS_DRA_DN_EXISTS = 8441 ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = 8544 ERROR_DS_DRA_EXTN_CONNECTION_FAILED = 8466 ERROR_DS_DRA_GENERIC = 8436 ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = 8464 ERROR_DS_DRA_INCONSISTENT_DIT = 8443 ERROR_DS_DRA_INTERNAL_ERROR = 8442 ERROR_DS_DRA_INVALID_PARAMETER = 8437 ERROR_DS_DRA_MAIL_PROBLEM = 8447 ERROR_DS_DRA_MISSING_PARENT = 8460 ERROR_DS_DRA_NAME_COLLISION = 8458 ERROR_DS_DRA_NOT_SUPPORTED = 8454 ERROR_DS_DRA_NO_REPLICA = 8452 ERROR_DS_DRA_OBJ_IS_REP_SOURCE = 8450 ERROR_DS_DRA_OBJ_NC_MISMATCH = 8545 ERROR_DS_DRA_OUT_OF_MEM = 8446 ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = 8617 ERROR_DS_DRA_PREEMPTED = 8461 ERROR_DS_DRA_REF_ALREADY_EXISTS = 8448 ERROR_DS_DRA_REF_NOT_FOUND = 8449 ERROR_DS_DRA_REPL_PENDING = 8477 ERROR_DS_DRA_RPC_CANCELLED = 8455 ERROR_DS_DRA_SCHEMA_CONFLICT = 8543 ERROR_DS_DRA_SCHEMA_INFO_SHIP = 8542 ERROR_DS_DRA_SCHEMA_MISMATCH = 8418 ERROR_DS_DRA_SHUTDOWN = 8463 ERROR_DS_DRA_SINK_DISABLED = 8457 ERROR_DS_DRA_SOURCE_DISABLED = 8456 ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = 8465 ERROR_DS_DRA_SOURCE_REINSTALLED = 8459 ERROR_DS_DRS_EXTENSIONS_CHANGED = 8594 ERROR_DS_DSA_MUST_BE_INT_MASTER = 8342 ERROR_DS_DST_DOMAIN_NOT_NATIVE = 8496 ERROR_DS_DST_NC_MISMATCH = 8486 ERROR_DS_DS_REQUIRED = 8478 ERROR_DS_DUPLICATE_ID_FOUND = 8605 ERROR_DS_DUP_LDAP_DISPLAY_NAME = 8382 ERROR_DS_DUP_LINK_ID = 8468 ERROR_DS_DUP_MAPI_ID = 8380 ERROR_DS_DUP_MSDS_INTID = 8597 ERROR_DS_DUP_OID = 8379 ERROR_DS_DUP_RDN = 8378 ERROR_DS_DUP_SCHEMA_ID_GUID = 8381 ERROR_DS_ENCODING_ERROR = 8252 ERROR_DS_EPOCH_MISMATCH = 8483 ERROR_DS_EXISTING_AD_CHILD_NC = 8613 ERROR_DS_EXISTS_IN_AUX_CLS = 8393 ERROR_DS_EXISTS_IN_MAY_HAVE = 8386 ERROR_DS_EXISTS_IN_MUST_HAVE = 8385 ERROR_DS_EXISTS_IN_POSS_SUP = 8395 ERROR_DS_EXISTS_IN_RDNATTID = 8598 ERROR_DS_EXISTS_IN_SUB_CLS = 8394 ERROR_DS_FILTER_UNKNOWN = 8254 ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = 8555 ERROR_DS_FOREST_VERSION_TOO_HIGH = 8563 ERROR_DS_FOREST_VERSION_TOO_LOW = 8565 ERROR_DS_GCVERIFY_ERROR = 8417 ERROR_DS_GC_NOT_AVAILABLE = 8217 ERROR_DS_GC_REQUIRED = 8547 ERROR_DS_GENERIC_ERROR = 8341 ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 8519 ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 8516 ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 8517 ERROR_DS_GOVERNSID_MISSING = 8410 ERROR_DS_GROUP_CONVERSION_ERROR = 8607 ERROR_DS_HAVE_PRIMARY_MEMBERS = 8521 ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = 8429 ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = 8507 ERROR_DS_ILLEGAL_MOD_OPERATION = 8311 ERROR_DS_ILLEGAL_SUPERIOR = 8345 ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = 8492 ERROR_DS_INAPPROPRIATE_AUTH = 8233 ERROR_DS_INAPPROPRIATE_MATCHING = 8238 ERROR_DS_INCOMPATIBLE_CONTROLS_USED = 8574 ERROR_DS_INCOMPATIBLE_VERSION = 8567 ERROR_DS_INCORRECT_ROLE_OWNER = 8210 ERROR_DS_INIT_FAILURE = 8532 ERROR_DS_INIT_FAILURE_CONSOLE = 8561 ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = 8512 ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = 8511 ERROR_DS_INSTALL_SCHEMA_MISMATCH = 8467 ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = 8606 ERROR_DS_INSUFF_ACCESS_RIGHTS = 8344 ERROR_DS_INTERNAL_FAILURE = 8430 ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = 8203 ERROR_DS_INVALID_DMD = 8360 ERROR_DS_INVALID_DN_SYNTAX = 8242 ERROR_DS_INVALID_GROUP_TYPE = 8513 ERROR_DS_INVALID_LDAP_DISPLAY_NAME = 8479 ERROR_DS_INVALID_NAME_FOR_SPN = 8554 ERROR_DS_INVALID_ROLE_OWNER = 8366 ERROR_DS_INVALID_SCRIPT = 8600 ERROR_DS_INVALID_SEARCH_FLAG = 8500 ERROR_DS_IS_LEAF = 8243 ERROR_DS_KEY_NOT_UNIQUE = 8527 ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616 ERROR_DS_LINK_ID_NOT_AVAILABLE = 8577 ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 8520 ERROR_DS_LOCAL_ERROR = 8251 ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 8548 ERROR_DS_LOOP_DETECT = 8246 ERROR_DS_LOW_DSA_VERSION = 8568 ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = 8572 ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 8557 ERROR_DS_MASTERDSA_REQUIRED = 8314 ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = 8304 ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = 8201 ERROR_DS_MISSING_EXPECTED_ATT = 8411 ERROR_DS_MISSING_FSMO_SETTINGS = 8434 ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = 8497 ERROR_DS_MISSING_REQUIRED_ATT = 8316 ERROR_DS_MISSING_SUPREF = 8406 ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = 8581 ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = 8579 ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = 8582 ERROR_DS_MUST_BE_RUN_ON_DST_DC = 8558 ERROR_DS_NAME_ERROR_DOMAIN_ONLY = 8473 ERROR_DS_NAME_ERROR_NOT_FOUND = 8470 ERROR_DS_NAME_ERROR_NOT_UNIQUE = 8471 ERROR_DS_NAME_ERROR_NO_MAPPING = 8472 ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 8474 ERROR_DS_NAME_ERROR_RESOLVING = 8469 ERROR_DS_NAME_ERROR_TRUST_REFERRAL = 8583 ERROR_DS_NAME_NOT_UNIQUE = 8571 ERROR_DS_NAME_REFERENCE_INVALID = 8373 ERROR_DS_NAME_TOO_LONG = 8348 ERROR_DS_NAME_TOO_MANY_PARTS = 8347 ERROR_DS_NAME_TYPE_UNKNOWN = 8351 ERROR_DS_NAME_UNPARSEABLE = 8350 ERROR_DS_NAME_VALUE_TOO_LONG = 8349 ERROR_DS_NAMING_MASTER_GC = 8523 ERROR_DS_NAMING_VIOLATION = 8247 ERROR_DS_NCNAME_MISSING_CR_REF = 8412 ERROR_DS_NCNAME_MUST_BE_NC = 8357 ERROR_DS_NC_MUST_HAVE_NC_PARENT = 8494 ERROR_DS_NC_STILL_HAS_DSAS = 8546 ERROR_DS_NONEXISTENT_MAY_HAVE = 8387 ERROR_DS_NONEXISTENT_MUST_HAVE = 8388 ERROR_DS_NONEXISTENT_POSS_SUP = 8390 ERROR_DS_NONSAFE_SCHEMA_CHANGE = 8508 ERROR_DS_NON_BASE_SEARCH = 8480 ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = 8377 ERROR_DS_NOT_AN_OBJECT = 8352 ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = 8487 ERROR_DS_NOT_CLOSEST = 8588 ERROR_DS_NOT_INSTALLED = 8200 ERROR_DS_NOT_ON_BACKLINK = 8362 ERROR_DS_NOT_SUPPORTED = 8256 ERROR_DS_NOT_SUPPORTED_SORT_ORDER = 8570 ERROR_DS_NO_ATTRIBUTE_OR_VALUE = 8202 ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = 8569 ERROR_DS_NO_CHAINED_EVAL = 8328 ERROR_DS_NO_CHAINING = 8327 ERROR_DS_NO_CHECKPOINT_WITH_PDC = 8551 ERROR_DS_NO_CROSSREF_FOR_NC = 8363 ERROR_DS_NO_DELETED_NAME = 8355 ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 8549 ERROR_DS_NO_MORE_RIDS = 8209 ERROR_DS_NO_MSDS_INTID = 8596 ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 8514 ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 8515 ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = 8580 ERROR_DS_NO_PARENT_OBJECT = 8329 ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = 8533 ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = 8306 ERROR_DS_NO_REF_DOMAIN = 8575 ERROR_DS_NO_REQUESTED_ATTS_FOUND = 8308 ERROR_DS_NO_RESULTS_RETURNED = 8257 ERROR_DS_NO_RIDS_ALLOCATED = 8208 ERROR_DS_NO_SUCH_OBJECT = 8240 ERROR_DS_NO_TREE_DELETE_ABOVE_NC = 8501 ERROR_DS_NTDSCRIPT_PROCESS_ERROR = 8592 ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = 8591 ERROR_DS_OBJECT_BEING_REMOVED = 8339 ERROR_DS_OBJECT_CLASS_REQUIRED = 8315 ERROR_DS_OBJECT_RESULTS_TOO_LARGE = 8248 ERROR_DS_OBJ_CLASS_NOT_DEFINED = 8371 ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = 8372 ERROR_DS_OBJ_CLASS_VIOLATION = 8212 ERROR_DS_OBJ_GUID_EXISTS = 8361 ERROR_DS_OBJ_NOT_FOUND = 8333 ERROR_DS_OBJ_STRING_NAME_EXISTS = 8305 ERROR_DS_OBJ_TOO_LARGE = 8312 ERROR_DS_OFFSET_RANGE_ERROR = 8262 ERROR_DS_OPERATIONS_ERROR = 8224 ERROR_DS_OUT_OF_SCOPE = 8338 ERROR_DS_OUT_OF_VERSION_STORE = 8573 ERROR_DS_PARAM_ERROR = 8255 ERROR_DS_PARENT_IS_AN_ALIAS = 8330 ERROR_DS_PDC_OPERATION_IN_PROGRESS = 8490 ERROR_DS_PROTOCOL_ERROR = 8225 ERROR_DS_RANGE_CONSTRAINT = 8322 ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = 8307 ERROR_DS_RECALCSCHEMA_FAILED = 8396 ERROR_DS_REFERRAL = 8235 ERROR_DS_REFERRAL_LIMIT_EXCEEDED = 8260 ERROR_DS_REFUSING_FSMO_ROLES = 8433 ERROR_DS_REMOTE_CROSSREF_OP_FAILED = 8601 ERROR_DS_REPLICATOR_ONLY = 8370 ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = 8595 ERROR_DS_REPL_LIFETIME_EXCEEDED = 8614 ERROR_DS_RESERVED_LINK_ID = 8576 ERROR_DS_RIDMGR_INIT_ERROR = 8211 ERROR_DS_ROLE_NOT_VERIFIED = 8610 ERROR_DS_ROOT_CANT_BE_SUBREF = 8326 ERROR_DS_ROOT_MUST_BE_NC = 8301 ERROR_DS_ROOT_REQUIRES_CLASS_TOP = 8432 ERROR_DS_SAM_INIT_FAILURE = 8504 ERROR_DS_SAM_INIT_FAILURE_CONSOLE = 8562 ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = 8530 ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = 8529 ERROR_DS_SCHEMA_ALLOC_FAILED = 8415 ERROR_DS_SCHEMA_NOT_LOADED = 8414 ERROR_DS_SCHEMA_UPDATE_DISALLOWED = 8509 ERROR_DS_SECURITY_CHECKING_ERROR = 8413 ERROR_DS_SECURITY_ILLEGAL_MODIFY = 8423 ERROR_DS_SEC_DESC_INVALID = 8354 ERROR_DS_SEC_DESC_TOO_SHORT = 8353 ERROR_DS_SEMANTIC_ATT_TEST = 8383 ERROR_DS_SENSITIVE_GROUP_VIOLATION = 8505 ERROR_DS_SERVER_DOWN = 8250 ERROR_DS_SHUTTING_DOWN = 8364 ERROR_DS_SINGLE_USER_MODE_FAILED = 8590 ERROR_DS_SINGLE_VALUE_CONSTRAINT = 8321 ERROR_DS_SIZELIMIT_EXCEEDED = 8227 ERROR_DS_SORT_CONTROL_MISSING = 8261 ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = 8552 ERROR_DS_SOURCE_DOMAIN_IN_FOREST = 8534 ERROR_DS_SRC_AND_DST_NC_IDENTICAL = 8485 ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = 8540 ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = 8559 ERROR_DS_SRC_GUID_MISMATCH = 8488 ERROR_DS_SRC_NAME_MISMATCH = 8484 ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = 8538 ERROR_DS_SRC_SID_EXISTS_IN_FOREST = 8539 ERROR_DS_STRING_SD_CONVERSION_FAILED = 8522 ERROR_DS_STRONG_AUTH_REQUIRED = 8232 ERROR_DS_SUBREF_MUST_HAVE_PARENT = 8356 ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = 8376 ERROR_DS_SUB_CLS_TEST_FAIL = 8391 ERROR_DS_SYNTAX_MISMATCH = 8384 ERROR_DS_THREAD_LIMIT_EXCEEDED = 8587 ERROR_DS_TIMELIMIT_EXCEEDED = 8226 ERROR_DS_TREE_DELETE_NOT_FINISHED = 8397 ERROR_DS_UNABLE_TO_SURRENDER_ROLES = 8435 ERROR_DS_UNAVAILABLE = 8207 ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = 8236 ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = 8556 ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 8518 ERROR_DS_UNKNOWN_ERROR = 8431 ERROR_DS_UNKNOWN_OPERATION = 8365 ERROR_DS_UNWILLING_TO_PERFORM = 8245 ERROR_DS_USER_BUFFER_TO_SMALL = 8309 ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = 8611 ERROR_DS_WRONG_LINKED_ATT_SYNTAX = 8528 ERROR_DS_WRONG_OM_OBJ_CLASS = 8476 ERROR_DUPLICATE_SERVICE_NAME = 1078 ERROR_DUPLICATE_TAG = 2014 ERROR_DUP_DOMAINNAME = 1221 ERROR_DUP_NAME = 52 ERROR_DYNLINK_FROM_INVALID_RING = 196 ERROR_EAS_DIDNT_FIT = 275 ERROR_EAS_NOT_SUPPORTED = 282 ERROR_EA_ACCESS_DENIED = 994 ERROR_EA_FILE_CORRUPT = 276 ERROR_EA_LIST_INCONSISTENT = 255 ERROR_EA_TABLE_FULL = 277 ERROR_EC_CIRCULAR_FORWARDING = 15082 ERROR_EC_CREDSTORE_FULL = 15083 ERROR_EC_CRED_NOT_FOUND = 15084 ERROR_EC_LOG_DISABLED = 15081 ERROR_EC_NO_ACTIVE_CHANNEL = 15085 ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE = 15080 ERROR_EFS_ALG_BLOB_TOO_BIG = 6013 ERROR_EFS_DISABLED = 6015 ERROR_EFS_SERVER_NOT_TRUSTED = 6011 ERROR_EFS_VERSION_NOT_SUPPORT = 6016 ERROR_EMPTY = 4306 ERROR_ENCRYPTION_FAILED = 6000 ERROR_END_OF_MEDIA = 1100 ERROR_ENVVAR_NOT_FOUND = 203 ERROR_EOM_OVERFLOW = 1129 ERROR_EVENTLOG_CANT_START = 1501 ERROR_EVENTLOG_FILE_CHANGED = 1503 ERROR_EVENTLOG_FILE_CORRUPT = 1500 ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY = 15036 ERROR_EVT_CHANNEL_CANNOT_ACTIVATE = 15025 ERROR_EVT_CHANNEL_NOT_FOUND = 15007 ERROR_EVT_CONFIGURATION_ERROR = 15010 ERROR_EVT_EVENT_DEFINITION_NOT_FOUND = 15032 ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND = 15003 ERROR_EVT_FILTER_ALREADYSCOPED = 15014 ERROR_EVT_FILTER_INVARG = 15016 ERROR_EVT_FILTER_INVTEST = 15017 ERROR_EVT_FILTER_INVTYPE = 15018 ERROR_EVT_FILTER_NOTELTSET = 15015 ERROR_EVT_FILTER_OUT_OF_RANGE = 15038 ERROR_EVT_FILTER_PARSEERR = 15019 ERROR_EVT_FILTER_TOO_COMPLEX = 15026 ERROR_EVT_FILTER_UNEXPECTEDTOKEN = 15021 ERROR_EVT_FILTER_UNSUPPORTEDOP = 15020 ERROR_EVT_INVALID_CHANNEL_PATH = 15000 ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE = 15023 ERROR_EVT_INVALID_EVENT_DATA = 15005 ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL = 15022 ERROR_EVT_INVALID_PUBLISHER_NAME = 15004 ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE = 15024 ERROR_EVT_INVALID_QUERY = 15001 ERROR_EVT_MALFORMED_XML_TEXT = 15008 ERROR_EVT_MAX_INSERTS_REACHED = 15031 ERROR_EVT_MESSAGE_ID_NOT_FOUND = 15028 ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND = 15033 ERROR_EVT_MESSAGE_NOT_FOUND = 15027 ERROR_EVT_NON_VALIDATING_MSXML = 15013 ERROR_EVT_PUBLISHER_DISABLED = 15037 ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND = 15002 ERROR_EVT_QUERY_RESULT_INVALID_POSITION = 15012 ERROR_EVT_QUERY_RESULT_STALE = 15011 ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL = 15009 ERROR_EVT_UNRESOLVED_PARAMETER_INSERT = 15030 ERROR_EVT_UNRESOLVED_VALUE_INSERT = 15029 ERROR_EVT_VERSION_TOO_NEW = 15035 ERROR_EVT_VERSION_TOO_OLD = 15034 ERROR_EXCEPTION_IN_SERVICE = 1064 ERROR_EXCL_SEM_ALREADY_OWNED = 101 ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY = 217 ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = 218 ERROR_EXE_MACHINE_TYPE_MISMATCH = 216 ERROR_EXE_MARKED_INVALID = 192 ERROR_EXTENDED_ERROR = 1208 ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063 ERROR_FAIL_I24 = 83 ERROR_FILEMARK_DETECTED = 1101 ERROR_FILENAME_EXCED_RANGE = 206 ERROR_FILE_CHECKED_OUT = 220 ERROR_FILE_CORRUPT = 1392 ERROR_FILE_ENCRYPTED = 6002 ERROR_FILE_EXISTS = 80 ERROR_FILE_INVALID = 1006 ERROR_FILE_NOT_ENCRYPTED = 6007 ERROR_FILE_NOT_FOUND = 2 ERROR_FILE_OFFLINE = 4350 ERROR_FILE_READ_ONLY = 6009 ERROR_FILE_TOO_LARGE = 223 ERROR_FLOPPY_BAD_REGISTERS = 1125 ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122 ERROR_FLOPPY_UNKNOWN_ERROR = 1124 ERROR_FLOPPY_WRONG_CYLINDER = 1123 ERROR_FORMS_AUTH_REQUIRED = 224 ERROR_FULLSCREEN_MODE = 1007 ERROR_FULL_BACKUP = 4004 ERROR_FUNCTION_FAILED = 1627 ERROR_FUNCTION_NOT_CALLED = 1626 ERROR_GENERIC_COMMAND_FAILED = 14109 ERROR_GENERIC_NOT_MAPPED = 1360 ERROR_GEN_FAILURE = 31 ERROR_GLOBAL_ONLY_HOOK = 1429 ERROR_GPIO_CLIENT_INFORMATION_INVALID = 15322 ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE = 15326 ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED = 15327 ERROR_GPIO_INVALID_REGISTRATION_PACKET = 15324 ERROR_GPIO_OPERATION_DENIED = 15325 ERROR_GPIO_VERSION_NOT_SUPPORTED = 15323 ERROR_GRACEFUL_DISCONNECT = 1226 ERROR_GROUP_EXISTS = 1318 ERROR_GROUP_NOT_AVAILABLE = 5012 ERROR_GROUP_NOT_FOUND = 5013 ERROR_GROUP_NOT_ONLINE = 5014 ERROR_HANDLE_DISK_FULL = 39 ERROR_HANDLE_EOF = 38 ERROR_HASH_NOT_PRESENT = 15301 ERROR_HASH_NOT_SUPPORTED = 15300 ERROR_HOOK_NEEDS_HMOD = 1428 ERROR_HOOK_NOT_INSTALLED = 1431 ERROR_HOOK_TYPE_NOT_ALLOWED = 1458 ERROR_HOST_DOWN = 1256 ERROR_HOST_NODE_NOT_AVAILABLE = 5005 ERROR_HOST_NODE_NOT_GROUP_OWNER = 5016 ERROR_HOST_NODE_NOT_RESOURCE_OWNER = 5015 ERROR_HOST_UNREACHABLE = 1232 ERROR_HOTKEY_ALREADY_REGISTERED = 1409 ERROR_HOTKEY_NOT_REGISTERED = 1419 ERROR_HWNDS_HAVE_DIFF_PARENT = 1441 ERROR_ICM_NOT_ENABLED = 2018 ERROR_IEPORT_FULL = 4341 ERROR_ILLEGAL_ELEMENT_ADDRESS = 1162 ERROR_ILL_FORMED_PASSWORD = 1324 ERROR_INCORRECT_ADDRESS = 1241 ERROR_INCORRECT_SIZE = 1462 ERROR_INC_BACKUP = 4003 ERROR_INDEX_ABSENT = 1611 ERROR_INDIGENOUS_TYPE = 4338 ERROR_INFLOOP_IN_RELOC_CHAIN = 202 ERROR_INIT_STATUS_NEEDED = 0x00000011 ERROR_INSTALL_ALREADY_RUNNING = 1618 ERROR_INSTALL_CANCEL = 15608 ERROR_INSTALL_DEREGISTRATION_FAILURE = 15607 ERROR_INSTALL_FAILED = 15609 ERROR_INSTALL_FAILURE = 1603 ERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING = 15626 ERROR_INSTALL_INVALID_PACKAGE = 15602 ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623 ERROR_INSTALL_LOG_FAILURE = 1622 ERROR_INSTALL_NETWORK_FAILURE = 15605 ERROR_INSTALL_NOTUSED = 1634 ERROR_INSTALL_OPEN_PACKAGE_FAILED = 15600 ERROR_INSTALL_OUT_OF_DISK_SPACE = 15604 ERROR_INSTALL_PACKAGE_DOWNGRADE = 15622 ERROR_INSTALL_PACKAGE_INVALID = 1620 ERROR_INSTALL_PACKAGE_NOT_FOUND = 15601 ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619 ERROR_INSTALL_PACKAGE_REJECTED = 1625 ERROR_INSTALL_PACKAGE_VERSION = 1613 ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633 ERROR_INSTALL_POLICY_FAILURE = 15615 ERROR_INSTALL_PREREQUISITE_FAILED = 15613 ERROR_INSTALL_REGISTRATION_FAILURE = 15606 ERROR_INSTALL_REMOTE_DISALLOWED = 1640 ERROR_INSTALL_REMOTE_PROHIBITED = 1645 ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED = 15603 ERROR_INSTALL_SERVICE_FAILURE = 1601 ERROR_INSTALL_SOURCE_ABSENT = 1612 ERROR_INSTALL_SUSPEND = 1604 ERROR_INSTALL_TEMP_UNWRITABLE = 1632 ERROR_INSTALL_TRANSFORM_FAILURE = 1624 ERROR_INSTALL_TRANSFORM_REJECTED = 1644 ERROR_INSTALL_UI_FAILURE = 1621 ERROR_INSTALL_USEREXIT = 1602 ERROR_INSUFFICIENT_BUFFER = 122 ERROR_INTERNAL_DB_CORRUPTION = 1358 ERROR_INTERNAL_DB_ERROR = 1383 ERROR_INTERNAL_ERROR = 1359 ERROR_INVALID_ACCEL_HANDLE = 1403 ERROR_INVALID_ACCESS = 12 ERROR_INVALID_ACCOUNT_NAME = 1315 ERROR_INVALID_ACL = 1336 ERROR_INVALID_ADDRESS = 487 ERROR_INVALID_AT_INTERRUPT_TIME = 104 ERROR_INVALID_BLOCK = 9 ERROR_INVALID_BLOCK_LENGTH = 1106 ERROR_INVALID_CATEGORY = 117 ERROR_INVALID_CLEANER = 4310 ERROR_INVALID_CMM = 2010 ERROR_INVALID_COLORINDEX = 2022 ERROR_INVALID_COLORSPACE = 2017 ERROR_INVALID_COMBOBOX_MESSAGE = 1422 ERROR_INVALID_COMMAND_LINE = 1639 ERROR_INVALID_COMPUTERNAME = 1210 ERROR_INVALID_CURSOR_HANDLE = 1402 ERROR_INVALID_DATA = 13 ERROR_INVALID_DATATYPE = 1804 ERROR_INVALID_DLL = 1154 ERROR_INVALID_DOMAINNAME = 1212 ERROR_INVALID_DOMAIN_ROLE = 1354 ERROR_INVALID_DOMAIN_STATE = 1353 ERROR_INVALID_DRIVE = 15 ERROR_INVALID_DRIVE_OBJECT = 4321 ERROR_INVALID_DWP_HANDLE = 1405 ERROR_INVALID_EA_HANDLE = 278 ERROR_INVALID_EA_NAME = 254 ERROR_INVALID_EDIT_HEIGHT = 1424 ERROR_INVALID_ENVIRONMENT = 1805 ERROR_INVALID_EVENTNAME = 1211 ERROR_INVALID_EVENT_COUNT = 151 ERROR_INVALID_EXE_SIGNATURE = 191 ERROR_INVALID_FIELD = 1616 ERROR_INVALID_FILTER_PROC = 1427 ERROR_INVALID_FLAGS = 1004 ERROR_INVALID_FLAG_NUMBER = 186 ERROR_INVALID_FORM_NAME = 1902 ERROR_INVALID_FORM_SIZE = 1903 ERROR_INVALID_FUNCTION = 1 ERROR_INVALID_GROUPNAME = 1209 ERROR_INVALID_GROUP_ATTRIBUTES = 1345 ERROR_INVALID_GW_COMMAND = 1443 ERROR_INVALID_HANDLE = 6 ERROR_INVALID_HANDLE_STATE = 1609 ERROR_INVALID_HOOK_FILTER = 1426 ERROR_INVALID_HOOK_HANDLE = 1404 ERROR_INVALID_ICON_HANDLE = 1414 ERROR_INVALID_ID_AUTHORITY = 1343 ERROR_INVALID_IMPORT_OF_NON_DLL = 1276 ERROR_INVALID_INDEX = 1413 ERROR_INVALID_KEYBOARD_HANDLE = 1457 ERROR_INVALID_LB_MESSAGE = 1432 ERROR_INVALID_LEVEL = 124 ERROR_INVALID_LIBRARY = 4301 ERROR_INVALID_LIST_FORMAT = 153 ERROR_INVALID_LOGON_HOURS = 1328 ERROR_INVALID_LOGON_TYPE = 1367 ERROR_INVALID_MEDIA = 4300 ERROR_INVALID_MEDIA_POOL = 4302 ERROR_INVALID_MEMBER = 1388 ERROR_INVALID_MENU_HANDLE = 1401 ERROR_INVALID_MESSAGE = 1002 ERROR_INVALID_MESSAGEDEST = 1218 ERROR_INVALID_MESSAGENAME = 1217 ERROR_INVALID_MINALLOCSIZE = 195 ERROR_INVALID_MODULETYPE = 190 ERROR_INVALID_MONITOR_HANDLE = 1461 ERROR_INVALID_MSGBOX_STYLE = 1438 ERROR_INVALID_NAME = 123 ERROR_INVALID_NETNAME = 1214 ERROR_INVALID_OPERATION = 4317 ERROR_INVALID_OPERATION_ON_QUORUM = 5068 ERROR_INVALID_OPLOCK_PROTOCOL = 301 ERROR_INVALID_ORDINAL = 182 ERROR_INVALID_OWNER = 1307 ERROR_INVALID_PARAMETER = 87 ERROR_INVALID_PASSWORD = 86 ERROR_INVALID_PASSWORDNAME = 1216 ERROR_INVALID_PIXEL_FORMAT = 2000 ERROR_INVALID_PRIMARY_GROUP = 1308 ERROR_INVALID_PRINTER_COMMAND = 1803 ERROR_INVALID_PRINTER_NAME = 1801 ERROR_INVALID_PRINTER_STATE = 1906 ERROR_INVALID_PRINT_MONITOR = 3007 ERROR_INVALID_PRIORITY = 1800 ERROR_INVALID_PROFILE = 2011 ERROR_INVALID_REPARSE_DATA = 4392 ERROR_INVALID_RUNLEVEL_SETTING = 15401 ERROR_INVALID_SCROLLBAR_RANGE = 1448 ERROR_INVALID_SECURITY_DESCR = 1338 ERROR_INVALID_SEGDPL = 198 ERROR_INVALID_SEGMENT_NUMBER = 180 ERROR_INVALID_SEPARATOR_FILE = 1799 ERROR_INVALID_SERVER_STATE = 1352 ERROR_INVALID_SERVICENAME = 1213 ERROR_INVALID_SERVICE_ACCOUNT = 1057 ERROR_INVALID_SERVICE_CONTROL = 1052 ERROR_INVALID_SERVICE_LOCK = 1071 ERROR_INVALID_SHARENAME = 1215 ERROR_INVALID_SHOWWIN_COMMAND = 1449 ERROR_INVALID_SID = 1337 ERROR_INVALID_SIGNAL_NUMBER = 209 ERROR_INVALID_SPI_VALUE = 1439 ERROR_INVALID_STACKSEG = 189 ERROR_INVALID_STAGED_SIGNATURE = 15620 ERROR_INVALID_STARTING_CODESEG = 188 ERROR_INVALID_STATE = 5023 ERROR_INVALID_SUB_AUTHORITY = 1335 ERROR_INVALID_TABLE = 1628 ERROR_INVALID_TARGET_HANDLE = 114 ERROR_INVALID_THREAD_ID = 1444 ERROR_INVALID_TIME = 1901 ERROR_INVALID_TOKEN = 315 ERROR_INVALID_TRANSFORM = 2020 ERROR_INVALID_USER_BUFFER = 1784 ERROR_INVALID_VERIFY_SWITCH = 118 ERROR_INVALID_WINDOW_HANDLE = 1400 ERROR_INVALID_WINDOW_STYLE = 2002 ERROR_INVALID_WORKSTATION = 1329 ERROR_IOPL_NOT_ENABLED = 197 ERROR_IO_DEVICE = 1117 ERROR_IO_INCOMPLETE = 996 ERROR_IO_PENDING = 997 ERROR_IPSEC_AUTH_FIREWALL_DROP = 13917 ERROR_IPSEC_BAD_SPI = 13910 ERROR_IPSEC_CLEAR_TEXT_DROP = 13916 ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND = 13014 ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND = 13013 ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND = 13015 ERROR_IPSEC_DOSP_BLOCK = 13925 ERROR_IPSEC_DOSP_INVALID_PACKET = 13927 ERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 13930 ERROR_IPSEC_DOSP_MAX_ENTRIES = 13929 ERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 13932 ERROR_IPSEC_DOSP_NOT_INSTALLED = 13931 ERROR_IPSEC_DOSP_RECEIVED_MULTICAST = 13926 ERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED = 13928 ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED = 13860 ERROR_IPSEC_IKE_ATTRIB_FAIL = 13802 ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE = 13905 ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY = 13907 ERROR_IPSEC_IKE_AUTH_FAIL = 13801 ERROR_IPSEC_IKE_BENIGN_REINIT = 13878 ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH = 13887 ERROR_IPSEC_IKE_CGA_AUTH_FAILED = 13892 ERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS = 13902 ERROR_IPSEC_IKE_CRL_FAILED = 13817 ERROR_IPSEC_IKE_DECRYPT = 13867 ERROR_IPSEC_IKE_DH_FAIL = 13822 ERROR_IPSEC_IKE_DH_FAILURE = 13864 ERROR_IPSEC_IKE_DOS_COOKIE_SENT = 13890 ERROR_IPSEC_IKE_DROP_NO_RESPONSE = 13813 ERROR_IPSEC_IKE_ENCRYPT = 13866 ERROR_IPSEC_IKE_ERROR = 13816 ERROR_IPSEC_IKE_FAILQUERYSSP = 13854 ERROR_IPSEC_IKE_FAILSSPINIT = 13853 ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR = 13804 ERROR_IPSEC_IKE_GETSPIFAIL = 13857 ERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE = 13899 ERROR_IPSEC_IKE_INVALID_AUTH_ALG = 13874 ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD = 13889 ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = 13881 ERROR_IPSEC_IKE_INVALID_CERT_TYPE = 13819 ERROR_IPSEC_IKE_INVALID_COOKIE = 13846 ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG = 13873 ERROR_IPSEC_IKE_INVALID_FILTER = 13858 ERROR_IPSEC_IKE_INVALID_GROUP = 13865 ERROR_IPSEC_IKE_INVALID_HASH = 13870 ERROR_IPSEC_IKE_INVALID_HASH_ALG = 13871 ERROR_IPSEC_IKE_INVALID_HASH_SIZE = 13872 ERROR_IPSEC_IKE_INVALID_HEADER = 13824 ERROR_IPSEC_IKE_INVALID_KEY_USAGE = 13818 ERROR_IPSEC_IKE_INVALID_MM_FOR_QM = 13894 ERROR_IPSEC_IKE_INVALID_PAYLOAD = 13843 ERROR_IPSEC_IKE_INVALID_POLICY = 13861 ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = 13879 ERROR_IPSEC_IKE_INVALID_SIG = 13875 ERROR_IPSEC_IKE_INVALID_SIGNATURE = 13826 ERROR_IPSEC_IKE_INVALID_SITUATION = 13863 ERROR_IPSEC_IKE_KERBEROS_ERROR = 13827 ERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL = 13898 ERROR_IPSEC_IKE_LOAD_FAILED = 13876 ERROR_IPSEC_IKE_LOAD_SOFT_SA = 13844 ERROR_IPSEC_IKE_MM_ACQUIRE_DROP = 13809 ERROR_IPSEC_IKE_MM_DELAY_DROP = 13814 ERROR_IPSEC_IKE_MM_EXPIRED = 13885 ERROR_IPSEC_IKE_MM_LIMIT = 13882 ERROR_IPSEC_IKE_NEGOTIATION_DISABLED = 13883 ERROR_IPSEC_IKE_NEGOTIATION_PENDING = 13803 ERROR_IPSEC_IKE_NEG_STATUS_BEGIN = 13800 ERROR_IPSEC_IKE_NEG_STATUS_END = 13897 ERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END = 13909 ERROR_IPSEC_IKE_NOTCBPRIV = 13851 ERROR_IPSEC_IKE_NO_CERT = 13806 ERROR_IPSEC_IKE_NO_MM_POLICY = 13850 ERROR_IPSEC_IKE_NO_PEER_CERT = 13847 ERROR_IPSEC_IKE_NO_POLICY = 13825 ERROR_IPSEC_IKE_NO_PRIVATE_KEY = 13820 ERROR_IPSEC_IKE_NO_PUBLIC_KEY = 13828 ERROR_IPSEC_IKE_OUT_OF_MEMORY = 13859 ERROR_IPSEC_IKE_PEER_CRL_FAILED = 13848 ERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE = 13904 ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID = 13886 ERROR_IPSEC_IKE_POLICY_CHANGE = 13849 ERROR_IPSEC_IKE_POLICY_MATCH = 13868 ERROR_IPSEC_IKE_PROCESS_ERR = 13829 ERROR_IPSEC_IKE_PROCESS_ERR_CERT = 13835 ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ = 13836 ERROR_IPSEC_IKE_PROCESS_ERR_DELETE = 13841 ERROR_IPSEC_IKE_PROCESS_ERR_HASH = 13837 ERROR_IPSEC_IKE_PROCESS_ERR_ID = 13834 ERROR_IPSEC_IKE_PROCESS_ERR_KE = 13833 ERROR_IPSEC_IKE_PROCESS_ERR_NATOA = 13893 ERROR_IPSEC_IKE_PROCESS_ERR_NONCE = 13839 ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY = 13840 ERROR_IPSEC_IKE_PROCESS_ERR_PROP = 13831 ERROR_IPSEC_IKE_PROCESS_ERR_SA = 13830 ERROR_IPSEC_IKE_PROCESS_ERR_SIG = 13838 ERROR_IPSEC_IKE_PROCESS_ERR_TRANS = 13832 ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR = 13842 ERROR_IPSEC_IKE_QM_ACQUIRE_DROP = 13810 ERROR_IPSEC_IKE_QM_DELAY_DROP = 13815 ERROR_IPSEC_IKE_QM_EXPIRED = 13895 ERROR_IPSEC_IKE_QM_LIMIT = 13884 ERROR_IPSEC_IKE_QUEUE_DROP_MM = 13811 ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM = 13812 ERROR_IPSEC_IKE_RATELIMIT_DROP = 13903 ERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING = 13900 ERROR_IPSEC_IKE_RPC_DELETE = 13877 ERROR_IPSEC_IKE_SA_DELETED = 13807 ERROR_IPSEC_IKE_SA_REAPED = 13808 ERROR_IPSEC_IKE_SECLOADFAIL = 13852 ERROR_IPSEC_IKE_SHUTTING_DOWN = 13891 ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN = 13845 ERROR_IPSEC_IKE_SRVACQFAIL = 13855 ERROR_IPSEC_IKE_SRVQUERYCRED = 13856 ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE = 13908 ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE = 13906 ERROR_IPSEC_IKE_TIMED_OUT = 13805 ERROR_IPSEC_IKE_TOO_MANY_FILTERS = 13896 ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID = 13888 ERROR_IPSEC_IKE_UNKNOWN_DOI = 13862 ERROR_IPSEC_IKE_UNSUPPORTED_ID = 13869 ERROR_IPSEC_INTEGRITY_CHECK_FAILED = 13915 ERROR_IPSEC_INVALID_PACKET = 13914 ERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING = 13901 ERROR_IPSEC_MM_AUTH_EXISTS = 13010 ERROR_IPSEC_MM_AUTH_IN_USE = 13012 ERROR_IPSEC_MM_AUTH_NOT_FOUND = 13011 ERROR_IPSEC_MM_AUTH_PENDING_DELETION = 13022 ERROR_IPSEC_MM_FILTER_EXISTS = 13006 ERROR_IPSEC_MM_FILTER_NOT_FOUND = 13007 ERROR_IPSEC_MM_FILTER_PENDING_DELETION = 13018 ERROR_IPSEC_MM_POLICY_EXISTS = 13003 ERROR_IPSEC_MM_POLICY_IN_USE = 13005 ERROR_IPSEC_MM_POLICY_NOT_FOUND = 13004 ERROR_IPSEC_MM_POLICY_PENDING_DELETION = 13021 ERROR_IPSEC_QM_POLICY_EXISTS = 13000 ERROR_IPSEC_QM_POLICY_IN_USE = 13002 ERROR_IPSEC_QM_POLICY_NOT_FOUND = 13001 ERROR_IPSEC_QM_POLICY_PENDING_DELETION = 13023 ERROR_IPSEC_REPLAY_CHECK_FAILED = 13913 ERROR_IPSEC_SA_LIFETIME_EXPIRED = 13911 ERROR_IPSEC_THROTTLE_DROP = 13918 ERROR_IPSEC_TRANSPORT_FILTER_EXISTS = 13008 ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND = 13009 ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION = 13019 ERROR_IPSEC_TUNNEL_FILTER_EXISTS = 13016 ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND = 13017 ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION = 13020 ERROR_IPSEC_WRONG_SA = 13912 ERROR_IRQ_BUSY = 1119 ERROR_IS_JOINED = 134 ERROR_IS_JOIN_PATH = 147 ERROR_IS_JOIN_TARGET = 133 ERROR_IS_SUBSTED = 135 ERROR_IS_SUBST_PATH = 146 ERROR_IS_SUBST_TARGET = 149 ERROR_ITERATED_DATA_EXCEEDS_64k = 194 ERROR_JOIN_TO_JOIN = 138 ERROR_JOIN_TO_SUBST = 140 ERROR_JOURNAL_DELETE_IN_PROGRESS = 1178 ERROR_JOURNAL_ENTRY_DELETED = 1181 ERROR_JOURNAL_HOOK_SET = 1430 ERROR_JOURNAL_NOT_ACTIVE = 1179 ERROR_KERNEL_APC = 738 ERROR_KEY_DELETED = 1018 ERROR_KEY_HAS_CHILDREN = 1020 ERROR_KM_DRIVER_BLOCKED = 1930 ERROR_LABEL_QUESTIONABLE = 0x00000002 ERROR_LABEL_TOO_LONG = 154 ERROR_LABEL_UNREADABLE = 0x00000001 ERROR_LAST_ADMIN = 1322 ERROR_LB_WITHOUT_TABSTOPS = 1434 ERROR_LIBRARY_FULL = 4322 ERROR_LIBRARY_OFFLINE = 4305 ERROR_LICENSE_QUOTA_EXCEEDED = 1395 ERROR_LISTBOX_ID_NOT_FOUND = 1416 ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390 ERROR_LOCAL_USER_SESSION_KEY = 1303 ERROR_LOCKED = 212 ERROR_LOCK_FAILED = 167 ERROR_LOCK_VIOLATION = 33 ERROR_LOGIN_TIME_RESTRICTION = 1239 ERROR_LOGIN_WKSTA_RESTRICTION = 1240 ERROR_LOGON_FAILURE = 1326 ERROR_LOGON_NOT_GRANTED = 1380 ERROR_LOGON_SESSION_COLLISION = 1366 ERROR_LOGON_SESSION_EXISTS = 1363 ERROR_LOGON_TYPE_NOT_GRANTED = 1385 ERROR_LOG_FILE_FULL = 1502 ERROR_LUIDS_EXHAUSTED = 1334 ERROR_MACHINE_LOCKED = 1271 ERROR_MAGAZINE_NOT_PRESENT = 1163 ERROR_MALFORMED_SUBSTITUTION_STRING = 14094 ERROR_MAPPED_ALIGNMENT = 1132 ERROR_MAX_THRDS_REACHED = 164 ERROR_MCA_INTERNAL_ERROR = 15205 ERROR_MCA_INVALID_CAPABILITIES_STRING = 15200 ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED = 15206 ERROR_MCA_INVALID_VCP_VERSION = 15201 ERROR_MCA_MCCS_VERSION_MISMATCH = 15203 ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION = 15202 ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE = 15207 ERROR_MCA_UNSUPPORTED_MCCS_VERSION = 15204 ERROR_MEDIA_CHANGED = 1110 ERROR_MEDIA_INCOMPATIBLE = 4315 ERROR_MEDIA_NOT_AVAILABLE = 4318 ERROR_MEDIA_OFFLINE = 4304 ERROR_MEDIA_UNAVAILABLE = 4308 ERROR_MEDIUM_NOT_ACCESSIBLE = 4323 ERROR_MEMBERS_PRIMARY_GROUP = 1374 ERROR_MEMBER_IN_ALIAS = 1378 ERROR_MEMBER_IN_GROUP = 1320 ERROR_MEMBER_NOT_IN_ALIAS = 1377 ERROR_MEMBER_NOT_IN_GROUP = 1321 ERROR_MENU_ITEM_NOT_FOUND = 1456 ERROR_MESSAGE_EXCEEDS_MAX_SIZE = 4336 ERROR_MESSAGE_SYNC_ONLY = 1159 ERROR_METAFILE_NOT_SUPPORTED = 2003 ERROR_META_EXPANSION_TOO_LONG = 208 ERROR_MOD_NOT_FOUND = 126 ERROR_MORE_DATA = 234 ERROR_MORE_WRITES = 1120 ERROR_MRM_AUTOMERGE_ENABLED = 15139 ERROR_MRM_DUPLICATE_ENTRY = 15119 ERROR_MRM_DUPLICATE_MAP_NAME = 15118 ERROR_MRM_FILEPATH_TOO_LONG = 15121 ERROR_MRM_INDETERMINATE_QUALIFIER_VALUE = 15138 ERROR_MRM_INVALID_FILE_TYPE = 15112 ERROR_MRM_INVALID_PRICONFIG = 15111 ERROR_MRM_INVALID_PRI_FILE = 15126 ERROR_MRM_INVALID_QUALIFIER_OPERATOR = 15137 ERROR_MRM_INVALID_QUALIFIER_VALUE = 15114 ERROR_MRM_INVALID_RESOURCE_IDENTIFIER = 15120 ERROR_MRM_MAP_NOT_FOUND = 15135 ERROR_MRM_NAMED_RESOURCE_NOT_FOUND = 15127 ERROR_MRM_NO_CANDIDATE = 15115 ERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE = 15116 ERROR_MRM_RESOURCE_TYPE_MISMATCH = 15117 ERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE = 15110 ERROR_MRM_TOO_MANY_RESOURCES = 15140 ERROR_MRM_UNKNOWN_QUALIFIER = 15113 ERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE = 15122 ERROR_MRM_UNSUPPORTED_PROFILE_TYPE = 15136 ERROR_MR_MID_NOT_FOUND = 317 ERROR_MUI_FILE_NOT_FOUND = 15100 ERROR_MUI_FILE_NOT_LOADED = 15105 ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME = 15108 ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED = 15107 ERROR_MUI_INVALID_FILE = 15101 ERROR_MUI_INVALID_LOCALE_NAME = 15103 ERROR_MUI_INVALID_RC_CONFIG = 15102 ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME = 15104 ERROR_MUTUAL_AUTH_FAILED = 1397 ERROR_NEEDS_REMEDIATION = 15612 ERROR_NEGATIVE_SEEK = 131 ERROR_NESTING_NOT_ALLOWED = 215 ERROR_NETLOGON_NOT_STARTED = 1792 ERROR_NETNAME_DELETED = 64 ERROR_NETWORK_ACCESS_DENIED = 65 ERROR_NETWORK_BUSY = 54 ERROR_NETWORK_NOT_AVAILABLE = 5035 ERROR_NETWORK_UNREACHABLE = 1231 ERROR_NET_WRITE_FAULT = 88 ERROR_NOACCESS = 998 ERROR_NODE_CANNOT_BE_CLUSTERED = 5898 ERROR_NODE_CANT_HOST_RESOURCE = 5071 ERROR_NODE_NOT_AVAILABLE = 5036 ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807 ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809 ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808 ERROR_NONE_MAPPED = 1332 ERROR_NONPAGED_SYSTEM_RESOURCES = 1451 ERROR_NON_ACCOUNT_SID = 1257 ERROR_NON_DOMAIN_SID = 1258 ERROR_NON_MDICHILD_WINDOW = 1445 ERROR_NOTIFY_ENUM_DIR = 1022 ERROR_NOT_ALL_ASSIGNED = 1300 ERROR_NOT_AUTHENTICATED = 1244 ERROR_NOT_A_REPARSE_POINT = 4390 ERROR_NOT_CHILD_WINDOW = 1442 ERROR_NOT_CONNECTED = 2250 ERROR_NOT_CONTAINER = 1207 ERROR_NOT_DOS_DISK = 26 ERROR_NOT_EMPTY = 4307 ERROR_NOT_ENOUGH_MEMORY = 8 ERROR_NOT_ENOUGH_QUOTA = 1816 ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130 ERROR_NOT_EXPORT_FORMAT = 6008 ERROR_NOT_FOUND = 1168 ERROR_NOT_GUI_PROCESS = 1471 ERROR_NOT_JOINED = 136 ERROR_NOT_LOCKED = 158 ERROR_NOT_LOGGED_ON = 1245 ERROR_NOT_LOGON_PROCESS = 1362 ERROR_NOT_OWNER = 288 ERROR_NOT_QUORUM_CAPABLE = 5021 ERROR_NOT_QUORUM_CLASS = 5025 ERROR_NOT_READY = 21 ERROR_NOT_REGISTRY_FILE = 1017 ERROR_NOT_SAFEBOOT_SERVICE = 1084 ERROR_NOT_SAME_DEVICE = 17 ERROR_NOT_SUBSTED = 137 ERROR_NOT_SUPPORTED = 50 ERROR_NOT_SUPPORTED_ON_SBS = 1254 ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = 8584 ERROR_NO_ASSOCIATION = 1155 ERROR_NO_BROWSER_SERVERS_FOUND = 6118 ERROR_NO_DATA = 232 ERROR_NO_DATA_DETECTED = 1104 ERROR_NO_EFS = 6004 ERROR_NO_IMPERSONATION_TOKEN = 1309 ERROR_NO_INHERITANCE = 1391 ERROR_NO_LOGON_SERVERS = 1311 ERROR_NO_LOG_SPACE = 1019 ERROR_NO_MATCH = 1169 ERROR_NO_MEDIA_IN_DRIVE = 1112 ERROR_NO_MORE_DEVICES = 1248 ERROR_NO_MORE_FILES = 18 ERROR_NO_MORE_ITEMS = 259 ERROR_NO_MORE_SEARCH_HANDLES = 113 ERROR_NO_MORE_USER_HANDLES = 1158 ERROR_NO_NETWORK = 1222 ERROR_NO_NET_OR_BAD_PATH = 1203 ERROR_NO_NVRAM_RESOURCES = 1470 ERROR_NO_PROC_SLOTS = 89 ERROR_NO_PROMOTION_ACTIVE = 8222 ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302 ERROR_NO_RECOVERY_POLICY = 6003 ERROR_NO_RECOVERY_PROGRAM = 1082 ERROR_NO_SCROLLBARS = 1447 ERROR_NO_SECURITY_ON_OBJECT = 1350 ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116 ERROR_NO_SIGNAL_SENT = 205 ERROR_NO_SITENAME = 1919 ERROR_NO_SPOOL_SPACE = 62 ERROR_NO_SUCH_ALIAS = 1376 ERROR_NO_SUCH_DOMAIN = 1355 ERROR_NO_SUCH_GROUP = 1319 ERROR_NO_SUCH_LOGON_SESSION = 1312 ERROR_NO_SUCH_MEMBER = 1387 ERROR_NO_SUCH_PACKAGE = 1364 ERROR_NO_SUCH_PRIVILEGE = 1313 ERROR_NO_SUCH_SITE = 1249 ERROR_NO_SUCH_USER = 1317 ERROR_NO_SUPPORTING_DRIVES = 4339 ERROR_NO_SYSTEM_MENU = 1437 ERROR_NO_SYSTEM_RESOURCES = 1450 ERROR_NO_TOKEN = 1008 ERROR_NO_TRACKING_SERVICE = 1172 ERROR_NO_TRUST_LSA_SECRET = 1786 ERROR_NO_TRUST_SAM_ACCOUNT = 1787 ERROR_NO_UNICODE_TRANSLATION = 1113 ERROR_NO_USER_KEYS = 6006 ERROR_NO_USER_SESSION_KEY = 1394 ERROR_NO_VOLUME_ID = 1173 ERROR_NO_VOLUME_LABEL = 125 ERROR_NO_WILDCARD_CHARACTERS = 1417 ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386 ERROR_NULL_LM_PASSWORD = 1304 ERROR_OBJECT_ALREADY_EXISTS = 5010 ERROR_OBJECT_IN_LIST = 5011 ERROR_OBJECT_NOT_FOUND = 4312 ERROR_OLD_WIN_VERSION = 1150 ERROR_ONLY_IF_CONNECTED = 1251 ERROR_OPEN_FAILED = 110 ERROR_OPEN_FILES = 2401 ERROR_OPERATION_ABORTED = 995 ERROR_OPLOCK_NOT_GRANTED = 300 ERROR_OUTOFMEMORY = 14 ERROR_OUT_OF_PAPER = 28 ERROR_OUT_OF_STRUCTURES = 84 ERROR_OVERRIDE_NOCHANGES = 1252 ERROR_PACKAGES_IN_USE = 15618 ERROR_PACKAGE_ALREADY_EXISTS = 15611 ERROR_PACKAGE_REPOSITORY_CORRUPTED = 15614 ERROR_PACKAGE_UPDATING = 15616 ERROR_PAGED_SYSTEM_RESOURCES = 1452 ERROR_PAGEFILE_QUOTA = 1454 ERROR_PARAMETER_QUOTA_EXCEEDED = 1283 ERROR_PARTIAL_COPY = 299 ERROR_PARTITION_FAILURE = 1105 ERROR_PASSWORD_EXPIRED = 1330 ERROR_PASSWORD_MUST_CHANGE = 1907 ERROR_PASSWORD_RESTRICTION = 1325 ERROR_PATCH_PACKAGE_INVALID = 1636 ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635 ERROR_PATCH_PACKAGE_REJECTED = 1643 ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637 ERROR_PATCH_TARGET_NOT_FOUND = 1642 ERROR_PATH_BUSY = 148 ERROR_PATH_NOT_FOUND = 3 ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = 1932 ERROR_PIPE_BUSY = 231 ERROR_PIPE_CONNECTED = 535 ERROR_PIPE_LISTENING = 536 ERROR_PIPE_LOCAL = 229 ERROR_PIPE_NOT_CONNECTED = 233 ERROR_PKINIT_FAILURE = 1263 ERROR_POINT_NOT_FOUND = 1171 ERROR_POLICY_OBJECT_NOT_FOUND = 8219 ERROR_POLICY_ONLY_IN_DS = 8220 ERROR_POPUP_ALREADY_ACTIVE = 1446 ERROR_PORT_UNREACHABLE = 1234 ERROR_POSSIBLE_DEADLOCK = 1131 ERROR_POTENTIAL_FILE_FOUND = 1180 ERROR_PRINTER_ALREADY_EXISTS = 1802 ERROR_PRINTER_DELETED = 1905 ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795 ERROR_PRINTER_DRIVER_BLOCKED = 3014 ERROR_PRINTER_DRIVER_IN_USE = 3001 ERROR_PRINTER_DRIVER_WARNED = 3013 ERROR_PRINTER_HAS_JOBS_QUEUED = 3009 ERROR_PRINTER_NOT_FOUND = 3012 ERROR_PRINTQ_FULL = 61 ERROR_PRINT_CANCELLED = 63 ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006 ERROR_PRINT_MONITOR_IN_USE = 3008 ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005 ERROR_PRIVATE_DIALOG_INDEX = 1415 ERROR_PRIVILEGE_NOT_HELD = 1314 ERROR_PROCESS_ABORTED = 1067 ERROR_PROC_NOT_FOUND = 127 ERROR_PRODUCT_UNINSTALLED = 1614 ERROR_PRODUCT_VERSION = 1638 ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015 ERROR_PROFILE_NOT_FOUND = 2016 ERROR_PROMOTION_ACTIVE = 8221 ERROR_PROTOCOL_UNREACHABLE = 1233 ERROR_QUORUMLOG_OPEN_FAILED = 5028 ERROR_QUORUM_DISK_NOT_FOUND = 5086 ERROR_QUORUM_OWNER_ALIVE = 5034 ERROR_QUORUM_RESOURCE = 5020 ERROR_QUORUM_RESOURCE_ONLINE_FAILED = 5027 ERROR_READ_FAULT = 30 ERROR_RECOVERY_FAILURE = 1279 ERROR_RECOVERY_FILE_CORRUPT = 15619 ERROR_REC_NON_EXISTENT = 4005 ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794 ERROR_REDIR_PAUSED = 72 ERROR_REGISTRY_CORRUPT = 1015 ERROR_REGISTRY_IO_FAILED = 1016 ERROR_REGISTRY_RECOVERED = 1014 ERROR_REG_NAT_CONSUMPTION = 1261 ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201 ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED = 1936 ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220 ERROR_REMOTE_STORAGE_MEDIA_ERROR = 4352 ERROR_REMOTE_STORAGE_NOT_ACTIVE = 4351 ERROR_REMOVE_FAILED = 15610 ERROR_REM_NOT_LIST = 51 ERROR_REPARSE_ATTRIBUTE_CONFLICT = 4391 ERROR_REPARSE_TAG_INVALID = 4393 ERROR_REPARSE_TAG_MISMATCH = 4394 ERROR_REQUEST_ABORTED = 1235 ERROR_REQUEST_REFUSED = 4320 ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = 1459 ERROR_REQ_NOT_ACCEP = 71 ERROR_RESILIENCY_FILE_CORRUPT = 15625 ERROR_RESMON_CREATE_FAILED = 5017 ERROR_RESMON_INVALID_STATE = 5084 ERROR_RESMON_ONLINE_FAILED = 5018 ERROR_RESOURCE_DATA_NOT_FOUND = 1812 ERROR_RESOURCE_DISABLED = 4309 ERROR_RESOURCE_ENUM_USER_STOP = 15106 ERROR_RESOURCE_FAILED = 5038 ERROR_RESOURCE_LANG_NOT_FOUND = 1815 ERROR_RESOURCE_NAME_NOT_FOUND = 1814 ERROR_RESOURCE_NOT_AVAILABLE = 5006 ERROR_RESOURCE_NOT_FOUND = 5007 ERROR_RESOURCE_NOT_ONLINE = 5004 ERROR_RESOURCE_NOT_PRESENT = 4316 ERROR_RESOURCE_ONLINE = 5019 ERROR_RESOURCE_PROPERTIES_STORED = 5024 ERROR_RESOURCE_PROPERTY_UNCHANGEABLE = 5089 ERROR_RESOURCE_TYPE_NOT_FOUND = 1813 ERROR_RESTART_APPLICATION = 1467 ERROR_RETRY = 1237 ERROR_REVISION_MISMATCH = 1306 ERROR_RING2SEG_MUST_BE_MOVABLE = 200 ERROR_RING2_STACK_IN_USE = 207 ERROR_RMODE_APP = 1153 ERROR_RPL_NOT_ALLOWED = 4006 ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT = 15403 ERROR_RUNLEVEL_SWITCH_IN_PROGRESS = 15404 ERROR_RUNLEVEL_SWITCH_TIMEOUT = 15402 ERROR_RXACT_COMMIT_FAILURE = 1370 ERROR_RXACT_INVALID_STATE = 1369 ERROR_SAME_DRIVE = 143 ERROR_SAM_INIT_FAILURE = 8541 ERROR_SCOPE_NOT_FOUND = 318 ERROR_SCREEN_ALREADY_LOCKED = 1440 ERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED = 15321 ERROR_SECRET_TOO_LONG = 1382 ERROR_SECTOR_NOT_FOUND = 27 ERROR_SEEK = 25 ERROR_SEEK_ON_DEVICE = 132 ERROR_SEM_IS_SET = 102 ERROR_SEM_NOT_FOUND = 187 ERROR_SEM_OWNER_DIED = 105 ERROR_SEM_TIMEOUT = 121 ERROR_SEM_USER_LIMIT = 106 ERROR_SERIAL_NO_DEVICE = 1118 ERROR_SERVER_DISABLED = 1341 ERROR_SERVER_HAS_OPEN_HANDLES = 1811 ERROR_SERVER_NOT_DISABLED = 1342 ERROR_SERVER_SHUTDOWN_IN_PROGRESS = 1255 ERROR_SERVICES_FAILED_AUTOSTART = 15405 ERROR_SERVICE_ALREADY_RUNNING = 1056 ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061 ERROR_SERVICE_DATABASE_LOCKED = 1055 ERROR_SERVICE_DEPENDENCY_DELETED = 1075 ERROR_SERVICE_DEPENDENCY_FAIL = 1068 ERROR_SERVICE_DISABLED = 1058 ERROR_SERVICE_DOES_NOT_EXIST = 1060 ERROR_SERVICE_EXISTS = 1073 ERROR_SERVICE_LOGON_FAILED = 1069 ERROR_SERVICE_MARKED_FOR_DELETE = 1072 ERROR_SERVICE_NEVER_STARTED = 1077 ERROR_SERVICE_NOT_ACTIVE = 1062 ERROR_SERVICE_NOT_FOUND = 1243 ERROR_SERVICE_NOT_IN_EXE = 1083 ERROR_SERVICE_NO_THREAD = 1054 ERROR_SERVICE_REQUEST_TIMEOUT = 1053 ERROR_SERVICE_SPECIFIC_ERROR = 1066 ERROR_SERVICE_START_HANG = 1070 ERROR_SESSION_CREDENTIAL_CONFLICT = 1219 ERROR_SETCOUNT_ON_BAD_LB = 1433 ERROR_SETMARK_DETECTED = 1103 ERROR_SET_NOT_FOUND = 1170 ERROR_SET_POWER_STATE_FAILED = 1141 ERROR_SET_POWER_STATE_VETOED = 1140 ERROR_SEVERITY_ERROR = 0xC0000000 ERROR_SEVERITY_INFORMATIONAL = 0x40000000 ERROR_SEVERITY_SUCCESS = 0x00000000 ERROR_SEVERITY_WARNING = 0x80000000 ERROR_SHARED_POLICY = 8218 ERROR_SHARING_BUFFER_EXCEEDED = 36 ERROR_SHARING_PAUSED = 70 ERROR_SHARING_VIOLATION = 32 ERROR_SHUTDOWN_CLUSTER = 5008 ERROR_SHUTDOWN_IN_PROGRESS = 1115 ERROR_SIGNAL_PENDING = 162 ERROR_SIGNAL_REFUSED = 156 ERROR_SINGLE_INSTANCE_APP = 1152 ERROR_SLOT_NOT_PRESENT = 0x00000004 ERROR_SMARTCARD_SUBSYSTEM_FAILURE = 1264 ERROR_SMI_PRIMITIVE_INSTALLER_FAILED = 14108 ERROR_SOME_NOT_MAPPED = 1301 ERROR_SOURCE_ELEMENT_EMPTY = 1160 ERROR_SPECIAL_ACCOUNT = 1371 ERROR_SPECIAL_GROUP = 1372 ERROR_SPECIAL_USER = 1373 ERROR_SPL_NO_ADDJOB = 3004 ERROR_SPL_NO_STARTDOC = 3003 ERROR_SPOOL_FILE_NOT_FOUND = 3002 ERROR_STACK_BUFFER_OVERRUN = 1282 ERROR_STACK_OVERFLOW = 1001 ERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED = 15815 ERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED = 15818 ERROR_STATE_CREATE_CONTAINER_FAILED = 15805 ERROR_STATE_DELETE_CONTAINER_FAILED = 15806 ERROR_STATE_DELETE_SETTING_FAILED = 15809 ERROR_STATE_ENUMERATE_CONTAINER_FAILED = 15813 ERROR_STATE_ENUMERATE_SETTINGS_FAILED = 15814 ERROR_STATE_GET_VERSION_FAILED = 15801 ERROR_STATE_LOAD_STORE_FAILED = 15800 ERROR_STATE_OPEN_CONTAINER_FAILED = 15804 ERROR_STATE_QUERY_SETTING_FAILED = 15810 ERROR_STATE_READ_COMPOSITE_SETTING_FAILED = 15811 ERROR_STATE_READ_SETTING_FAILED = 15807 ERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED = 15817 ERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED = 15816 ERROR_STATE_SET_VERSION_FAILED = 15802 ERROR_STATE_STRUCTURED_RESET_FAILED = 15803 ERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED = 15812 ERROR_STATE_WRITE_SETTING_FAILED = 15808 ERROR_STATIC_INIT = 4002 ERROR_SUBST_TO_JOIN = 141 ERROR_SUBST_TO_SUBST = 139 ERROR_SUCCESS = 0 ERROR_SUCCESS_REBOOT_INITIATED = 1641 ERROR_SUCCESS_REBOOT_REQUIRED = 3010 ERROR_SUCCESS_RESTART_REQUIRED = 3011 ERROR_SWAPERROR = 999 ERROR_SXS_ACTIVATION_CONTEXT_DISABLED = 14006 ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 14103 ERROR_SXS_ASSEMBLY_MISSING = 14081 ERROR_SXS_ASSEMBLY_NOT_FOUND = 14003 ERROR_SXS_ASSEMBLY_NOT_LOCKED = 14097 ERROR_SXS_CANT_GEN_ACTCTX = 14001 ERROR_SXS_COMPONENT_STORE_CORRUPT = 14098 ERROR_SXS_CORRUPTION = 14083 ERROR_SXS_CORRUPT_ACTIVATION_STACK = 14082 ERROR_SXS_DUPLICATE_ASSEMBLY_NAME = 14027 ERROR_SXS_DUPLICATE_CLSID = 14023 ERROR_SXS_DUPLICATE_DLL_NAME = 14021 ERROR_SXS_DUPLICATE_IID = 14024 ERROR_SXS_DUPLICATE_PROGID = 14026 ERROR_SXS_DUPLICATE_TLBID = 14025 ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME = 14022 ERROR_SXS_EARLY_DEACTIVATION = 14084 ERROR_SXS_FILE_HASH_MISMATCH = 14028 ERROR_SXS_FILE_HASH_MISSING = 14110 ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY = 14104 ERROR_SXS_IDENTITIES_DIFFERENT = 14102 ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 14092 ERROR_SXS_IDENTITY_PARSE_ERROR = 14093 ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN = 14095 ERROR_SXS_INVALID_ACTCTXDATA_FORMAT = 14002 ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE = 14017 ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME = 14080 ERROR_SXS_INVALID_DEACTIVATION = 14085 ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 14091 ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 14090 ERROR_SXS_INVALID_XML_NAMESPACE_URI = 14014 ERROR_SXS_KEY_NOT_FOUND = 14007 ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14016 ERROR_SXS_MANIFEST_FORMAT_ERROR = 14004 ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 14101 ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE = 14019 ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE = 14018 ERROR_SXS_MANIFEST_PARSE_ERROR = 14005 ERROR_SXS_MANIFEST_TOO_BIG = 14105 ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE = 14079 ERROR_SXS_MULTIPLE_DEACTIVATION = 14086 ERROR_SXS_POLICY_PARSE_ERROR = 14029 ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT = 14020 ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET = 14011 ERROR_SXS_PROCESS_TERMINATION_REQUESTED = 14087 ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING = 14078 ERROR_SXS_PROTECTION_CATALOG_NOT_VALID = 14076 ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT = 14075 ERROR_SXS_PROTECTION_RECOVERY_FAILED = 14074 ERROR_SXS_RELEASE_ACTIVATION_CONTEXT = 14088 ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14015 ERROR_SXS_SECTION_NOT_FOUND = 14000 ERROR_SXS_SETTING_NOT_REGISTERED = 14106 ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 14089 ERROR_SXS_THREAD_QUERIES_DISABLED = 14010 ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE = 14107 ERROR_SXS_UNKNOWN_ENCODING = 14013 ERROR_SXS_UNKNOWN_ENCODING_GROUP = 14012 ERROR_SXS_UNTRANSLATABLE_HRESULT = 14077 ERROR_SXS_VERSION_CONFLICT = 14008 ERROR_SXS_WRONG_SECTION_TYPE = 14009 ERROR_SXS_XML_E_BADCHARDATA = 14036 ERROR_SXS_XML_E_BADCHARINSTRING = 14034 ERROR_SXS_XML_E_BADNAMECHAR = 14033 ERROR_SXS_XML_E_BADPEREFINSUBSET = 14059 ERROR_SXS_XML_E_BADSTARTNAMECHAR = 14032 ERROR_SXS_XML_E_BADXMLCASE = 14069 ERROR_SXS_XML_E_BADXMLDECL = 14056 ERROR_SXS_XML_E_COMMENTSYNTAX = 14031 ERROR_SXS_XML_E_DUPLICATEATTRIBUTE = 14053 ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = 14045 ERROR_SXS_XML_E_EXPECTINGTAGEND = 14038 ERROR_SXS_XML_E_INCOMPLETE_ENCODING = 14043 ERROR_SXS_XML_E_INTERNALERROR = 14041 ERROR_SXS_XML_E_INVALIDATROOTLEVEL = 14055 ERROR_SXS_XML_E_INVALIDENCODING = 14067 ERROR_SXS_XML_E_INVALIDSWITCH = 14068 ERROR_SXS_XML_E_INVALID_DECIMAL = 14047 ERROR_SXS_XML_E_INVALID_HEXIDECIMAL = 14048 ERROR_SXS_XML_E_INVALID_STANDALONE = 14070 ERROR_SXS_XML_E_INVALID_UNICODE = 14049 ERROR_SXS_XML_E_INVALID_VERSION = 14072 ERROR_SXS_XML_E_MISSINGEQUALS = 14073 ERROR_SXS_XML_E_MISSINGQUOTE = 14030 ERROR_SXS_XML_E_MISSINGROOT = 14057 ERROR_SXS_XML_E_MISSINGSEMICOLON = 14039 ERROR_SXS_XML_E_MISSINGWHITESPACE = 14037 ERROR_SXS_XML_E_MISSING_PAREN = 14044 ERROR_SXS_XML_E_MULTIPLEROOTS = 14054 ERROR_SXS_XML_E_MULTIPLE_COLONS = 14046 ERROR_SXS_XML_E_RESERVEDNAMESPACE = 14066 ERROR_SXS_XML_E_UNBALANCEDPAREN = 14040 ERROR_SXS_XML_E_UNCLOSEDCDATA = 14065 ERROR_SXS_XML_E_UNCLOSEDCOMMENT = 14063 ERROR_SXS_XML_E_UNCLOSEDDECL = 14064 ERROR_SXS_XML_E_UNCLOSEDENDTAG = 14061 ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = 14060 ERROR_SXS_XML_E_UNCLOSEDSTRING = 14062 ERROR_SXS_XML_E_UNCLOSEDTAG = 14052 ERROR_SXS_XML_E_UNEXPECTEDENDTAG = 14051 ERROR_SXS_XML_E_UNEXPECTEDEOF = 14058 ERROR_SXS_XML_E_UNEXPECTED_STANDALONE = 14071 ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE = 14042 ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK = 14050 ERROR_SXS_XML_E_XMLDECLSYNTAX = 14035 ERROR_SYMLINK_CLASS_DISABLED = 1463 ERROR_SYMLINK_NOT_SUPPORTED = 1464 ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED = 1274 ERROR_SYSTEM_DEVICE_NOT_FOUND = 15299 ERROR_SYSTEM_NEEDS_REMEDIATION = 15623 ERROR_SYSTEM_TRACE = 150 ERROR_TAG_NOT_FOUND = 2012 ERROR_TAG_NOT_PRESENT = 2013 ERROR_THREAD_1_INACTIVE = 210 ERROR_TIMEOUT = 1460 ERROR_TIME_SKEW = 1398 ERROR_TLW_WITH_WSCHILD = 1406 ERROR_TOKEN_ALREADY_IN_USE = 1375 ERROR_TOO_MANY_CMDS = 56 ERROR_TOO_MANY_CONTEXT_IDS = 1384 ERROR_TOO_MANY_LINKS = 1142 ERROR_TOO_MANY_LUIDS_REQUESTED = 1333 ERROR_TOO_MANY_MODULES = 214 ERROR_TOO_MANY_MUXWAITERS = 152 ERROR_TOO_MANY_NAMES = 68 ERROR_TOO_MANY_OPEN_FILES = 4 ERROR_TOO_MANY_POSTS = 298 ERROR_TOO_MANY_SECRETS = 1381 ERROR_TOO_MANY_SEMAPHORES = 100 ERROR_TOO_MANY_SEM_REQUESTS = 103 ERROR_TOO_MANY_SESS = 69 ERROR_TOO_MANY_SIDS = 1389 ERROR_TOO_MANY_TCBS = 155 ERROR_TRANSFORM_NOT_SUPPORTED = 2004 ERROR_TRANSPORT_FULL = 4328 ERROR_TRAY_MALFUNCTION = 0x00000010 ERROR_TRUSTED_DOMAIN_FAILURE = 1788 ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789 ERROR_TRUST_FAILURE = 1790 ERROR_UNABLE_TO_CLEAN = 4311 ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA = 4330 ERROR_UNABLE_TO_INVENTORY_DRIVE = 4325 ERROR_UNABLE_TO_INVENTORY_SLOT = 4326 ERROR_UNABLE_TO_INVENTORY_TRANSPORT = 4327 ERROR_UNABLE_TO_LOAD_MEDIUM = 4324 ERROR_UNABLE_TO_LOCK_MEDIA = 1108 ERROR_UNABLE_TO_MOVE_REPLACEMENT = 1176 ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = 1177 ERROR_UNABLE_TO_REMOVE_REPLACED = 1175 ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109 ERROR_UNEXPECTED_OMID = 4334 ERROR_UNEXP_NET_ERR = 59 ERROR_UNHANDLED_ERROR = 0xFFFFFFFF ERROR_UNIDENTIFIED_ERROR = 1287 ERROR_UNKNOWN_COMPONENT = 1607 ERROR_UNKNOWN_FEATURE = 1606 ERROR_UNKNOWN_PORT = 1796 ERROR_UNKNOWN_PRINTER_DRIVER = 1797 ERROR_UNKNOWN_PRINTPROCESSOR = 1798 ERROR_UNKNOWN_PRINT_MONITOR = 3000 ERROR_UNKNOWN_PRODUCT = 1605 ERROR_UNKNOWN_PROPERTY = 1608 ERROR_UNKNOWN_REVISION = 1305 ERROR_UNMAPPED_SUBSTITUTION_STRING = 14096 ERROR_UNRECOGNIZED_MEDIA = 1785 ERROR_UNRECOGNIZED_VOLUME = 1005 ERROR_UNSUPPORTED_TYPE = 1630 ERROR_USER_APC = 737 ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED = 1934 ERROR_USER_EXISTS = 1316 ERROR_USER_MAPPED_FILE = 1224 ERROR_VC_DISCONNECTED = 240 ERROR_VDM_DISALLOWED = 1286 ERROR_VOLUME_CONTAINS_SYS_FILES = 4337 ERROR_VOLUME_NOT_SIS_ENABLED = 4500 ERROR_VOLUME_NOT_SUPPORT_EFS = 6014 ERROR_WAIT_1 = 731 ERROR_WAIT_2 = 732 ERROR_WAIT_3 = 733 ERROR_WAIT_63 = 734 ERROR_WAIT_NO_CHILDREN = 128 ERROR_WAKE_SYSTEM = 730 ERROR_WINDOW_NOT_COMBOBOX = 1423 ERROR_WINDOW_NOT_DIALOG = 1420 ERROR_WINDOW_OF_OTHER_THREAD = 1408 ERROR_WINS_INTERNAL = 4000 ERROR_WMI_ALREADY_DISABLED = 4212 ERROR_WMI_ALREADY_ENABLED = 4206 ERROR_WMI_DP_FAILED = 4209 ERROR_WMI_DP_NOT_FOUND = 4204 ERROR_WMI_GUID_DISCONNECTED = 4207 ERROR_WMI_GUID_NOT_FOUND = 4200 ERROR_WMI_INSTANCE_NOT_FOUND = 4201 ERROR_WMI_INVALID_MOF = 4210 ERROR_WMI_INVALID_REGINFO = 4211 ERROR_WMI_ITEMID_NOT_FOUND = 4202 ERROR_WMI_READ_ONLY = 4213 ERROR_WMI_SERVER_UNAVAILABLE = 4208 ERROR_WMI_SET_FAILURE = 4214 ERROR_WMI_TRY_AGAIN = 4203 ERROR_WMI_UNRESOLVED_INSTANCE_REF = 4205 ERROR_WORKING_SET_QUOTA = 1453 ERROR_WRITE_FAULT = 29 ERROR_WRITE_PROTECT = 19 ERROR_WRONG_COMPARTMENT = 1468 ERROR_WRONG_DISK = 34 ERROR_WRONG_EFS = 6005 ERROR_WRONG_PASSWORD = 1323 ERROR_WRONG_TARGET_NAME = 1396 ERROR_XMLDSIG_ERROR = 1466 ERROR_XML_ENCODING_MISMATCH = 14100 ERROR_XML_PARSE_ERROR = 1465 ESB_DISABLE_BOTH = 0x0003 ESB_DISABLE_DOWN = 0x0002 ESB_DISABLE_LEFT = 0x0001 ESB_DISABLE_LTUP = 1 ESB_DISABLE_RIGHT = 0x0002 ESB_DISABLE_RTDN = 2 ESB_DISABLE_UP = 0x0001 ESB_ENABLE_BOTH = 0x0000 ESPIPE = 29 ESRCH = 3 ES_AUTOHSCROLL = 128 ES_AUTOVSCROLL = 64 ES_CENTER = 1 ES_LEFT = 0 ES_LOWERCASE = 16 ES_MULTILINE = 4 ES_NOHIDESEL = 256 ES_NUMBER = 8192 ES_OEMCONVERT = 1024 ES_PASSWORD = 32 ES_READONLY = 2048 ES_RIGHT = 2 ES_UPPERCASE = 8 ES_WANTRETURN = 4096 ETIME = 137 ETIMEDOUT = 138 ETO_CLIPPED = 0x0004 ETO_GLYPH_INDEX = 0x0010 ETO_IGNORELANGUAGE = 0x1000 ETO_NUMERICSLATIN = 0x0800 ETO_NUMERICSLOCAL = 0x0400 ETO_OPAQUE = 0x0002 ETO_PDY = 0x2000 ETO_RTLREADING = 0x0080 ETXTBSY = 139 EVENPARITY = 2 EVENTLOG_AUDIT_FAILURE = 0x0010 EVENTLOG_AUDIT_SUCCESS = 0x0008 EVENTLOG_BACKWARDS_READ = 0x0008 EVENTLOG_END_ALL_PAIRED_EVENTS = 0x0004 EVENTLOG_END_PAIRED_EVENT = 0x0002 EVENTLOG_ERROR_TYPE = 0x0001 EVENTLOG_FORWARDS_READ = 0x0004 EVENTLOG_FULL_INFO = 0 EVENTLOG_INFORMATION_TYPE = 0x0004 EVENTLOG_PAIRED_EVENT_ACTIVE = 0x0008 EVENTLOG_PAIRED_EVENT_INACTIVE = 0x0010 EVENTLOG_SEEK_READ = 0x0002 EVENTLOG_SEQUENTIAL_READ = 0x0001 EVENTLOG_START_PAIRED_EVENT = 0x0001 EVENTLOG_SUCCESS = 0x0000 EVENTLOG_WARNING_TYPE = 0x0002 EVENT_ALL_ACCESS = 2031619 EVENT_CONSOLE_CARET = 0x4001 EVENT_CONSOLE_END_APPLICATION = 0x4007 EVENT_CONSOLE_LAYOUT = 0x4005 EVENT_CONSOLE_START_APPLICATION = 0x4006 EVENT_CONSOLE_UPDATE_REGION = 0x4002 EVENT_CONSOLE_UPDATE_SCROLL = 0x4004 EVENT_CONSOLE_UPDATE_SIMPLE = 0x4003 EVENT_E_FIRST = 2147746304 EVENT_E_LAST = 2147746335 EVENT_MAX = 0x7FFFFFFF EVENT_MIN = 0x00000001 EVENT_MODIFY_STATE = 0x0002 EVENT_OBJECT_ACCELERATORCHANGE = 0x8012 EVENT_OBJECT_CREATE = 0x8000 EVENT_OBJECT_DEFACTIONCHANGE = 0x8011 EVENT_OBJECT_DESCRIPTIONCHANGE = 0x800D EVENT_OBJECT_DESTROY = 0x8001 EVENT_OBJECT_FOCUS = 0x8005 EVENT_OBJECT_HELPCHANGE = 0x8010 EVENT_OBJECT_HIDE = 0x8003 EVENT_OBJECT_LOCATIONCHANGE = 0x800B EVENT_OBJECT_NAMECHANGE = 0x800C EVENT_OBJECT_PARENTCHANGE = 0x800F EVENT_OBJECT_REORDER = 0x8004 EVENT_OBJECT_SELECTION = 0x8006 EVENT_OBJECT_SELECTIONADD = 0x8007 EVENT_OBJECT_SELECTIONREMOVE = 0x8008 EVENT_OBJECT_SELECTIONWITHIN = 0x8009 EVENT_OBJECT_SHOW = 0x8002 EVENT_OBJECT_STATECHANGE = 0x800A EVENT_OBJECT_VALUECHANGE = 0x800E EVENT_SYSTEM_ALERT = 0x0002 EVENT_SYSTEM_CAPTUREEND = 0x0009 EVENT_SYSTEM_CAPTURESTART = 0x0008 EVENT_SYSTEM_CONTEXTHELPEND = 0x000D EVENT_SYSTEM_CONTEXTHELPSTART = 0x000C EVENT_SYSTEM_DIALOGEND = 0x0011 EVENT_SYSTEM_DIALOGSTART = 0x0010 EVENT_SYSTEM_DRAGDROPEND = 0x000F EVENT_SYSTEM_DRAGDROPSTART = 0x000E EVENT_SYSTEM_FOREGROUND = 0x0003 EVENT_SYSTEM_MENUEND = 0x0005 EVENT_SYSTEM_MENUPOPUPEND = 0x0007 EVENT_SYSTEM_MENUPOPUPSTART = 0x0006 EVENT_SYSTEM_MENUSTART = 0x0004 EVENT_SYSTEM_MINIMIZEEND = 0x0017 EVENT_SYSTEM_MINIMIZESTART = 0x0016 EVENT_SYSTEM_MOVESIZEEND = 0x000B EVENT_SYSTEM_MOVESIZESTART = 0x000A EVENT_SYSTEM_SCROLLINGEND = 0x0013 EVENT_SYSTEM_SCROLLINGSTART = 0x0012 EVENT_SYSTEM_SOUND = 0x0001 EVENT_SYSTEM_SWITCHEND = 0x0015 EVENT_SYSTEM_SWITCHSTART = 0x0014 EVENT_S_FIRST = 262656 EVENT_S_LAST = 262687 EV_BREAK = 0x40 EV_CTS = 0x8 EV_DSR = 0x10 EV_ERR = 0x80 EV_EVENT1 = 0x800 EV_EVENT2 = 0x1000 EV_PERR = 0x200 EV_RING = 0x100 EV_RLSD = 0x20 EV_RX80FULL = 0x400 EV_RXCHAR = 0x1 EV_RXFLAG = 0x2 EV_TXEMPTY = 0x4 EWOULDBLOCK = 140 EWX_BOOTOPTIONS = 0x01000000 EWX_FORCE = 0x00000004 EWX_FORCEIFHUNG = 0x00000010 EWX_HYBRID_SHUTDOWN = 0x00400000 EWX_LOGOFF = 0x00000000 EWX_POWEROFF = 0x00000008 EWX_QUICKRESOLVE = 0x00000020 EWX_REBOOT = 0x00000002 EWX_SHUTDOWN = 0x00000001 EXCEPTION_COLLIDED_UNWIND = 0x40 EXCEPTION_CONTINUE_EXECUTION = -1 EXCEPTION_CONTINUE_SEARCH = 0 EXCEPTION_DEBUG_EVENT = 1 EXCEPTION_EXECUTE_FAULT = 8 EXCEPTION_EXECUTE_HANDLER = 1 EXCEPTION_EXIT_UNWIND = 0x4 EXCEPTION_MAXIMUM_PARAMETERS = 15 EXCEPTION_NESTED_CALL = 0x10 EXCEPTION_NONCONTINUABLE = 0x1 EXCEPTION_READ_FAULT = 0 EXCEPTION_STACK_INVALID = 0x8 EXCEPTION_TARGET_UNWIND = 0x20 EXCEPTION_UNWIND = 0x66 EXCEPTION_UNWINDING = 0x2 EXCEPTION_WRITE_FAULT = 1 EXDEV = 18 EXECUTE_OFFLINE_DIAGS = 0xD4 EXIT_PROCESS_DEBUG_EVENT = 5 EXIT_THREAD_DEBUG_EVENT = 4 EXPAND_LOCAL_DRIVES = 0 EXPENTRY = 0 EXPORT_PRIVATE_KEYS = 0x4 EXPO_OFFLOAD_FUNC_NAME = "OffloadModExpo" EXPO_OFFLOAD_REG_VALUE = "ExpoOffload" EXTENDED_STARTUPINFO_PRESENT = 0x80000 EXTEND_IEPORT = 2 EXTTEXTOUT = 512 EXT_DEVICE_CAPS = 4099 ExceptionCollidedUnwind = 3 ExceptionContinueExecution = 0 ExceptionContinueSearch = 1 ExceptionExecuteHandler = 4 ExceptionNestedException = 2 FACILITY_AAF = 18 FACILITY_ACS = 20 FACILITY_AUDCLNT = 2185 FACILITY_BACKGROUNDCOPY = 32 FACILITY_CERT = 11 FACILITY_COMPLUS = 17 FACILITY_CONFIGURATION = 33 FACILITY_CONTROL = 10 FACILITY_DIRECTORYSERVICE = 37 FACILITY_DISPATCH = 2 FACILITY_DPLAY = 21 FACILITY_HTTP = 25 FACILITY_INTERNET = 12 FACILITY_ITF = 4 FACILITY_MEDIASERVER = 13 FACILITY_METADIRECTORY = 35 FACILITY_MSMQ = 14 FACILITY_NT_BIT = 0x10000000 FACILITY_NULL = 0 FACILITY_RPC = 1 FACILITY_SCARD = 16 FACILITY_SECURITY = 9 FACILITY_SETUPAPI = 15 FACILITY_SSPI = 9 FACILITY_STATE_MANAGEMENT = 34 FACILITY_STORAGE = 3 FACILITY_SXS = 23 FACILITY_UMI = 22 FACILITY_URT = 19 FACILITY_USERMODE_FILTER_MANAGER = 0x1f FACILITY_WIN32 = 7 FACILITY_WINDOWS = 8 FACILITY_WINDOWSUPDATE = 36 FACILITY_WINDOWS_CE = 24 FADF_AUTO = 1 FADF_BSTR = 256 FADF_DISPATCH = 1024 FADF_EMBEDDED = 4 FADF_FIXEDSIZE = 16 FADF_HAVEIID = 64 FADF_HAVEVARTYPE = 128 FADF_RECORD = 32 FADF_RESERVED = 61448 FADF_STATIC = 2 FADF_UNKNOWN = 512 FADF_VARIANT = 2048 FAILED_ACCESS_ACE_FLAG = 128 FAIL_FAST_GENERATE_EXCEPTION_ADDRESS = 0x1 FAIL_FAST_NO_HARD_ERROR_DLG = 0x2 FALSE = 0 FALT = 0x10 FAPPCOMMAND_KEY = 0 FAPPCOMMAND_MASK = 0xF000 FAPPCOMMAND_MOUSE = 0x8000 FAPPCOMMAND_OEM = 0x1000 FAR = 0 FARSTRUCT = 0 FASTCALL = 0 FAST_FAIL_CORRUPT_LIST_ENTRY = 3 FAST_FAIL_FATAL_APP_EXIT = 7 FAST_FAIL_GS_COOKIE_INIT = 6 FAST_FAIL_INCORRECT_STACK = 4 FAST_FAIL_INVALID_ARG = 5 FAST_FAIL_INVALID_FAST_FAIL_CODE = 0xffffffff FAST_FAIL_LEGACY_GS_VIOLATION = 0 FAST_FAIL_RANGE_CHECK_FAILURE = 8 FAST_FAIL_STACK_COOKIE_CHECK_FAILURE = 2 FAST_FAIL_UNSAFE_REGISTRY_ACCESS = 9 FAST_FAIL_VTGUARD_CHECK_FAILURE = 1 FCONTROL = 0x08 FD_ACCEPT = 0x08 FD_CLOSE = 0x20 FD_CONNECT = 0x10 FD_OOB = 0x04 FD_READ = 0x01 FD_SETSIZE = 64 FD_WRITE = 0x02 FEATURESETTING_CUSTPAPER = 3 FEATURESETTING_MIRROR = 4 FEATURESETTING_NEGATIVE = 5 FEATURESETTING_NUP = 0 FEATURESETTING_OUTPUT = 1 FEATURESETTING_PRIVATE_BEGIN = 0x1000 FEATURESETTING_PRIVATE_END = 0x1FFF FEATURESETTING_PROTOCOL = 6 FEATURESETTING_PSLEVEL = 2 FE_FONTSMOOTHINGCLEARTYPE = 0x0002 FE_FONTSMOOTHINGDOCKING = 0x8000 FE_FONTSMOOTHINGORIENTATIONBGR = 0x0000 FE_FONTSMOOTHINGORIENTATIONRGB = 0x0001 FE_FONTSMOOTHINGSTANDARD = 0x0001 FF_DECORATIVE = 80 FF_DONTCARE = 0 FF_MODERN = 48 FF_ROMAN = 16 FF_SCRIPT = 64 FF_SWISS = 32 FIBER_FLAG_FLOAT_SWITCH = 0x1 FIEF_FLAG_FORCE_JITUI = 0x1 FIEF_FLAG_PEEK = 0x2 FIEF_FLAG_SKIP_INSTALLED_VERSION_CHECK = 0x4 FILEOKSTRINGA = "commdlg_FileNameOK" FILEOPENORD = 1536 FILESYSTEM_STATISTICS_TYPE_FAT = 2 FILESYSTEM_STATISTICS_TYPE_NTFS = 1 FILE_ACTION_ADDED = 0x00000001 FILE_ACTION_MODIFIED = 0x00000003 FILE_ACTION_REMOVED = 0x00000002 FILE_ACTION_RENAMED_NEW_NAME = 0x00000005 FILE_ACTION_RENAMED_OLD_NAME = 0x00000004 FILE_ADD_FILE = 2 FILE_ADD_SUBDIRECTORY = 4 FILE_ALL_ACCESS = 2032127 FILE_ANY_ACCESS = 0 FILE_APPEND_DATA = 4 FILE_ATTRIBUTE_ARCHIVE = 0x00000020 FILE_ATTRIBUTE_COMPRESSED = 0x00000800 FILE_ATTRIBUTE_DEVICE = 0x00000040 FILE_ATTRIBUTE_DIRECTORY = 0x00000010 FILE_ATTRIBUTE_ENCRYPTED = 0x00004000 FILE_ATTRIBUTE_HIDDEN = 0x00000002 FILE_ATTRIBUTE_NORMAL = 0x00000080 FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000 FILE_ATTRIBUTE_OFFLINE = 0x00001000 FILE_ATTRIBUTE_READONLY = 0x00000001 FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400 FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200 FILE_ATTRIBUTE_SYSTEM = 0x00000004 FILE_ATTRIBUTE_TEMPORARY = 0x00000100 FILE_ATTRIBUTE_VIRTUAL = 0x00010000 FILE_BEGIN = 0 FILE_CACHE_FLAGS_DEFINED = 0 FILE_CACHE_MAX_HARD_DISABLE = 0x00000002 FILE_CACHE_MAX_HARD_ENABLE = 0x00000001 FILE_CACHE_MIN_HARD_DISABLE = 0x00000008 FILE_CACHE_MIN_HARD_ENABLE = 0x00000004 FILE_CASE_PRESERVED_NAMES = 0x00000002 FILE_CASE_SENSITIVE_SEARCH = 0x00000001 FILE_CLEAR_ENCRYPTION = 0x00000002 FILE_COMPLETE_IF_OPLOCKED = 0x00000100 FILE_CREATE = 0x00000002 FILE_CREATE_PIPE_INSTANCE = 4 FILE_CREATE_TREE_CONNECTION = 0x00000080 FILE_CURRENT = 1 FILE_DELETE_CHILD = 64 FILE_DELETE_ON_CLOSE = 0x00001000 FILE_DEVICE_8042_PORT = 0x00000027 FILE_DEVICE_ACPI = 0x00000032 FILE_DEVICE_BATTERY = 0x00000029 FILE_DEVICE_BEEP = 0x00000001 FILE_DEVICE_BUS_EXTENDER = 0x0000002a FILE_DEVICE_CD_ROM = 0x00000002 FILE_DEVICE_CD_ROM_FILE_SYSTEM = 0x00000003 FILE_DEVICE_CHANGER = 0x00000030 FILE_DEVICE_CONTROLLER = 0x00000004 FILE_DEVICE_DATALINK = 0x00000005 FILE_DEVICE_DFS = 0x00000006 FILE_DEVICE_DFS_FILE_SYSTEM = 0x00000035 FILE_DEVICE_DFS_VOLUME = 0x00000036 FILE_DEVICE_DISK = 0x00000007 FILE_DEVICE_DISK_FILE_SYSTEM = 0x00000008 FILE_DEVICE_DVD = 0x00000033 FILE_DEVICE_FILE_SYSTEM = 0x00000009 FILE_DEVICE_FIPS = 0x0000003A FILE_DEVICE_FULLSCREEN_VIDEO = 0x00000034 FILE_DEVICE_INFINIBAND = 0x0000003B FILE_DEVICE_INPORT_PORT = 0x0000000a FILE_DEVICE_KEYBOARD = 0x0000000b FILE_DEVICE_KS = 0x0000002f FILE_DEVICE_KSEC = 0x00000039 FILE_DEVICE_MAILSLOT = 0x0000000c FILE_DEVICE_MASS_STORAGE = 0x0000002d FILE_DEVICE_MIDI_IN = 0x0000000d FILE_DEVICE_MIDI_OUT = 0x0000000e FILE_DEVICE_MODEM = 0x0000002b FILE_DEVICE_MOUSE = 0x0000000f FILE_DEVICE_MULTI_UNC_PROVIDER = 0x00000010 FILE_DEVICE_NAMED_PIPE = 0x00000011 FILE_DEVICE_NETWORK = 0x00000012 FILE_DEVICE_NETWORK_BROWSER = 0x00000013 FILE_DEVICE_NETWORK_FILE_SYSTEM = 0x00000014 FILE_DEVICE_NETWORK_REDIRECTOR = 0x00000028 FILE_DEVICE_NULL = 0x00000015 FILE_DEVICE_PARALLEL_PORT = 0x00000016 FILE_DEVICE_PHYSICAL_NETCARD = 0x00000017 FILE_DEVICE_PRINTER = 0x00000018 FILE_DEVICE_SCANNER = 0x00000019 FILE_DEVICE_SCREEN = 0x0000001c FILE_DEVICE_SERENUM = 0x00000037 FILE_DEVICE_SERIAL_MOUSE_PORT = 0x0000001a FILE_DEVICE_SERIAL_PORT = 0x0000001b FILE_DEVICE_SMARTCARD = 0x00000031 FILE_DEVICE_SMB = 0x0000002e FILE_DEVICE_SOUND = 0x0000001d FILE_DEVICE_STREAMS = 0x0000001e FILE_DEVICE_TAPE = 0x0000001f FILE_DEVICE_TAPE_FILE_SYSTEM = 0x00000020 FILE_DEVICE_TERMSRV = 0x00000038 FILE_DEVICE_TRANSPORT = 0x00000021 FILE_DEVICE_UNKNOWN = 0x00000022 FILE_DEVICE_VDM = 0x0000002c FILE_DEVICE_VIDEO = 0x00000023 FILE_DEVICE_VIRTUAL_DISK = 0x00000024 FILE_DEVICE_WAVE_IN = 0x00000025 FILE_DEVICE_WAVE_OUT = 0x00000026 FILE_DIRECTORY_FILE = 0x00000001 FILE_DIR_DISALLOWED = 9 FILE_ENCRYPTABLE = 0 FILE_END = 2 FILE_EXECUTE = 32 FILE_FILE_COMPRESSION = 0x00000010 FILE_FLAG_BACKUP_SEMANTICS = 0x2000000 FILE_FLAG_DELETE_ON_CLOSE = 0x4000000 FILE_FLAG_FIRST_PIPE_INSTANCE = 0x80000 FILE_FLAG_NO_BUFFERING = 0x20000000 FILE_FLAG_OPEN_NO_RECALL = 0x100000 FILE_FLAG_OPEN_REPARSE_POINT = 0x200000 FILE_FLAG_OVERLAPPED = 0x40000000 FILE_FLAG_POSIX_SEMANTICS = 0x1000000 FILE_FLAG_RANDOM_ACCESS = 0x10000000 FILE_FLAG_SEQUENTIAL_SCAN = 0x8000000 FILE_FLAG_SESSION_AWARE = 0x800000 FILE_FLAG_WRITE_THROUGH = 0x80000000 FILE_GENERIC_EXECUTE = 1179808 FILE_GENERIC_READ = 1179785 FILE_GENERIC_WRITE = 1179926 FILE_IS_ENCRYPTED = 1 FILE_LIST_DIRECTORY = 1 FILE_MAP_ALL_ACCESS = 983071 FILE_MAP_COPY = 0x1 FILE_MAP_EXECUTE = 32 FILE_MAP_READ = 4 FILE_MAP_RESERVE = 0x80000000 FILE_MAP_WRITE = 2 FILE_MAXIMUM_DISPOSITION = 0x00000005 FILE_NAMED_STREAMS = 0x00040000 FILE_NAME_NORMALIZED = 0x0 FILE_NAME_OPENED = 0x8 FILE_NON_DIRECTORY_FILE = 0x00000040 FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x00000004 FILE_NOTIFY_CHANGE_CREATION = 0x00000040 FILE_NOTIFY_CHANGE_DIR_NAME = 0x00000002 FILE_NOTIFY_CHANGE_FILE_NAME = 0x00000001 FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020 FILE_NOTIFY_CHANGE_LAST_WRITE = 0x00000010 FILE_NOTIFY_CHANGE_SECURITY = 0x00000100 FILE_NOTIFY_CHANGE_SIZE = 0x00000008 FILE_NO_COMPRESSION = 0x00008000 FILE_NO_EA_KNOWLEDGE = 0x00000200 FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008 FILE_OPEN = 0x00000001 FILE_OPEN_BY_FILE_ID = 0x00002000 FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000 FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000 FILE_OPEN_IF = 0x00000003 FILE_OPEN_NO_RECALL = 0x00400000 FILE_OPEN_REMOTE_INSTANCE = 0x00000400 FILE_OPEN_REPARSE_POINT = 0x00200000 FILE_OVERWRITE = 0x00000004 FILE_OVERWRITE_IF = 0x00000005 FILE_PERSISTENT_ACLS = 0x00000008 FILE_PREFETCH_TYPE_FOR_CREATE = 0x1 FILE_RANDOM_ACCESS = 0x00000800 FILE_READ_ACCESS = 1 FILE_READ_ATTRIBUTES = 128 FILE_READ_DATA = 1 FILE_READ_EA = 8 FILE_READ_ONLY = 8 FILE_READ_ONLY_VOLUME = 0x00080000 FILE_RESERVE_OPFILTER = 0x00100000 FILE_ROOT_DIR = 3 FILE_SEQUENTIAL_ONLY = 0x00000004 FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000 FILE_SET_ENCRYPTION = 0x00000001 FILE_SHARE_DELETE = 0x00000004 FILE_SHARE_READ = 0x00000001 FILE_SHARE_VALID_FLAGS = 0x00000007 FILE_SHARE_WRITE = 0x00000002 FILE_SPECIAL_ACCESS = 0 FILE_SUPERSEDE = 0x00000000 FILE_SUPPORTS_ENCRYPTION = 0x00020000 FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000 FILE_SUPPORTS_HARD_LINKS = 0x00400000 FILE_SUPPORTS_INTEGRITY_STREAMS = 0x04000000 FILE_SUPPORTS_OBJECT_IDS = 0x00010000 FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000 FILE_SUPPORTS_REMOTE_STORAGE = 0x00000100 FILE_SUPPORTS_REPARSE_POINTS = 0x00000080 FILE_SUPPORTS_SPARSE_FILES = 0x00000040 FILE_SUPPORTS_TRANSACTIONS = 0x00200000 FILE_SUPPORTS_USN_JOURNAL = 0x02000000 FILE_SYNCHRONOUS_IO_ALERT = 0x00000010 FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020 FILE_SYSTEM_ATTR = 2 FILE_SYSTEM_DIR = 4 FILE_SYSTEM_NOT_SUPPORT = 6 FILE_TRAVERSE = 32 FILE_TYPE_CHAR = 0x2 FILE_TYPE_DISK = 0x1 FILE_TYPE_PIPE = 0x3 FILE_TYPE_REMOTE = 0x8000 FILE_TYPE_UNKNOWN = 0x0 FILE_UNICODE_ON_DISK = 0x00000004 FILE_UNKNOWN = 5 FILE_USER_DISALLOWED = 7 FILE_VOLUME_IS_COMPRESSED = 0x00008000 FILE_VOLUME_QUOTAS = 0x00000020 FILE_WRITE_ACCESS = 2 FILE_WRITE_ATTRIBUTES = 256 FILE_WRITE_DATA = 2 FILE_WRITE_EA = 16 FILE_WRITE_THROUGH = 0x00000002 FINDDLGORD = 1540 FINDMSGSTRINGA = "commdlg_FindReplace" FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA = 4 FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS = 2 FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX = 1 FIND_ENDSWITH = 0x00200000 FIND_FIRST_EX_CASE_SENSITIVE = 0x00000001 FIND_FIRST_EX_LARGE_FETCH = 0x00000002 FIND_FROMEND = 0x00800000 FIND_FROMSTART = 0x00400000 FIND_RESOURCE_DIRECTORY_LANGUAGES = 1024 FIND_RESOURCE_DIRECTORY_NAMES = 512 FIND_RESOURCE_DIRECTORY_TYPES = 256 FIND_STARTSWITH = 0x00100000 FIRMWARE_PTR = 0 FIXED_PITCH = 1 FKF_AVAILABLE = 0x00000002 FKF_CLICKON = 0x00000040 FKF_CONFIRMHOTKEY = 0x00000008 FKF_FILTERKEYSON = 0x00000001 FKF_HOTKEYACTIVE = 0x00000004 FKF_HOTKEYSOUND = 0x00000010 FKF_INDICATOR = 0x00000020 FLASHW_ALL = 3 FLASHW_CAPTION = 0x00000001 FLASHW_STOP = 0 FLASHW_TIMER = 0x00000004 FLASHW_TIMERNOFG = 0x0000000c FLASHW_TRAY = 0x00000002 FLI_GLYPHS = 262144 FLI_MASK = 0x103B FLOODFILLBORDER = 0 FLOODFILLSURFACE = 1 FLS_MAXIMUM_AVAILABLE = 128 FLUSHOUTPUT = 6 FMFD_DEFAULT = 0x0 FMFD_RESPECTTEXTPLAIN = 0x10 FMFD_RETURNUPDATEDIMGMIMES = 0x20 FMFD_SERVERMIME = 0x8 FMFD_URLASFILENAME = 0x1 FNERR_BUFFERTOOSMALL = 0x3003 FNERR_FILENAMECODES = 0x3000 FNERR_INVALIDFILENAME = 0x3002 FNERR_SUBCLASSFAILURE = 0x3001 FNOINVERT = 0x02 FOCUS_EVENT = 0x10 FOF_ALLOWUNDO = 0x40 FOF_CONFIRMMOUSE = 0x2 FOF_FILESONLY = 0x80 FOF_MULTIDESTFILES = 0x1 FOF_NOCONFIRMATION = 0x10 FOF_NOCONFIRMMKDIR = 0x200 FOF_NOCOPYSECURITYATTRIBS = 0x800 FOF_NOERRORUI = 0x400 FOF_NORECURSEREPARSE = 0x8000 FOF_NORECURSION = 0x1000 FOF_NO_CONNECTED_ELEMENTS = 0x2000 FOF_NO_UI = 1556 FOF_RENAMEONCOLLISION = 0x8 FOF_SILENT = 0x4 FOF_SIMPLEPROGRESS = 0x100 FOF_WANTMAPPINGHANDLE = 0x20 FOF_WANTNUKEWARNING = 0x4000 FONTDLGORD = 1542 FONTMAPPER_MAX = 10 FOREGROUND_BLUE = 0x1 FOREGROUND_GREEN = 0x2 FOREGROUND_INTENSITY = 0x8 FOREGROUND_RED = 0x4 FOREST_USER_RID_MAX = 499 FORMATDLGORD30 = 1544 FORMATDLGORD31 = 1543 FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100 FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000 FORMAT_MESSAGE_FROM_HMODULE = 0x00000800 FORMAT_MESSAGE_FROM_STRING = 0x00000400 FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000 FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200 FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000ff FORM_BUILTIN = 0x00000001 FORM_PRINTER = 0x00000002 FORM_USER = 0x00000000 FO_COPY = 0x2 FO_DELETE = 0x3 FO_MOVE = 0x1 FO_RENAME = 0x4 FRAME_FPO = 0 FRAME_NONFPO = 3 FRAME_TRAP = 1 FRAME_TSS = 2 FRERR_BUFFERLENGTHZERO = 0x4001 FRERR_FINDREPLACECODES = 0x4000 FROM_LEFT_1ST_BUTTON_PRESSED = 0x1 FROM_LEFT_2ND_BUTTON_PRESSED = 0x4 FROM_LEFT_3RD_BUTTON_PRESSED = 0x8 FROM_LEFT_4TH_BUTTON_PRESSED = 0x10 FRS_ERR_AUTHENTICATION = 8008 FRS_ERR_CHILD_TO_PARENT_COMM = 8011 FRS_ERR_INSUFFICIENT_PRIV = 8007 FRS_ERR_INTERNAL = 8005 FRS_ERR_INTERNAL_API = 8004 FRS_ERR_INVALID_API_SEQUENCE = 8001 FRS_ERR_INVALID_SERVICE_PARAMETER = 8017 FRS_ERR_PARENT_AUTHENTICATION = 8010 FRS_ERR_PARENT_INSUFFICIENT_PRIV = 8009 FRS_ERR_PARENT_TO_CHILD_COMM = 8012 FRS_ERR_SERVICE_COMM = 8006 FRS_ERR_STARTING_SERVICE = 8002 FRS_ERR_STOPPING_SERVICE = 8003 FRS_ERR_SYSVOL_DEMOTE = 8016 FRS_ERR_SYSVOL_IS_BUSY = 8015 FRS_ERR_SYSVOL_POPULATE = 8013 FRS_ERR_SYSVOL_POPULATE_TIMEOUT = 8014 FR_DIALOGTERM = 0x40 FR_DOWN = 0x1 FR_ENABLEHOOK = 0x100 FR_ENABLETEMPLATE = 0x200 FR_ENABLETEMPLATEHANDLE = 0x2000 FR_FINDNEXT = 0x8 FR_HIDEMATCHCASE = 0x8000 FR_HIDEUPDOWN = 0x4000 FR_HIDEWHOLEWORD = 0x10000 FR_MATCHALEFHAMZA = 0x80000000 FR_MATCHCASE = 0x4 FR_MATCHDIAC = 0x20000000 FR_MATCHKASHIDA = 0x40000000 FR_NOMATCHCASE = 0x800 FR_NOT_ENUM = 0x20 FR_NOUPDOWN = 0x400 FR_NOWHOLEWORD = 0x1000 FR_PRIVATE = 0x10 FR_RAW = 0x20000 FR_REPLACE = 0x10 FR_REPLACEALL = 0x20 FR_SHOWHELP = 0x80 FR_WHOLEWORD = 0x2 FSCTL_ALLOW_EXTENDED_DASD_IO = 589955 FSCTL_CREATE_OR_GET_OBJECT_ID = 590016 FSCTL_CREATE_USN_JOURNAL = 590055 FSCTL_DELETE_OBJECT_ID = 589984 FSCTL_DELETE_REPARSE_POINT = 589996 FSCTL_DELETE_USN_JOURNAL = 590072 FSCTL_DISMOUNT_VOLUME = 589856 FSCTL_ENCRYPTION_FSCTL_IO = 590043 FSCTL_ENUM_USN_DATA = 590003 FSCTL_EXTEND_VOLUME = 590064 FSCTL_FILESYSTEM_GET_STATISTICS = 589920 FSCTL_FILE_PREFETCH = 590112 FSCTL_FIND_FILES_BY_SID = 589967 FSCTL_GET_COMPRESSION = 589884 FSCTL_GET_NTFS_FILE_RECORD = 589928 FSCTL_GET_NTFS_VOLUME_DATA = 589924 FSCTL_GET_OBJECT_ID = 589980 FSCTL_GET_REPARSE_POINT = 589992 FSCTL_GET_RETRIEVAL_POINTERS = 589939 FSCTL_GET_VOLUME_BITMAP = 589935 FSCTL_HSM_DATA = 639251 FSCTL_HSM_MSG = 639240 FSCTL_INVALIDATE_VOLUMES = 589908 FSCTL_IS_PATHNAME_VALID = 589868 FSCTL_IS_VOLUME_DIRTY = 589944 FSCTL_IS_VOLUME_MOUNTED = 589864 FSCTL_LOCK_VOLUME = 589848 FSCTL_MARK_AS_SYSTEM_HIVE = 589903 FSCTL_MARK_HANDLE = 590076 FSCTL_MARK_VOLUME_DIRTY = 589872 FSCTL_MOVE_FILE = 589940 FSCTL_OPBATCH_ACK_CLOSE_PENDING = 589840 FSCTL_OPLOCK_BREAK_ACKNOWLEDGE = 589836 FSCTL_OPLOCK_BREAK_ACK_NO_2 = 589904 FSCTL_OPLOCK_BREAK_NOTIFY = 589844 FSCTL_QUERY_ALLOCATED_RANGES = 606415 FSCTL_QUERY_FAT_BPB = 589912 FSCTL_QUERY_RETRIEVAL_POINTERS = 589883 FSCTL_QUERY_USN_JOURNAL = 590068 FSCTL_READ_FILE_USN_DATA = 590059 FSCTL_READ_FROM_PLEX = 606494 FSCTL_READ_RAW_ENCRYPTED = 590051 FSCTL_READ_USN_JOURNAL = 590011 FSCTL_RECALL_FILE = 590103 FSCTL_REQUEST_BATCH_OPLOCK = 589832 FSCTL_REQUEST_FILTER_OPLOCK = 589916 FSCTL_REQUEST_OPLOCK_LEVEL_1 = 589824 FSCTL_REQUEST_OPLOCK_LEVEL_2 = 589828 FSCTL_SECURITY_ID_CHECK = 606391 FSCTL_SET_COMPRESSION = 639040 FSCTL_SET_ENCRYPTION = 590039 FSCTL_SET_OBJECT_ID = 589976 FSCTL_SET_OBJECT_ID_EXTENDED = 590012 FSCTL_SET_REPARSE_POINT = 589988 FSCTL_SET_SPARSE = 590020 FSCTL_SET_ZERO_DATA = 622792 FSCTL_SIS_COPYFILE = 590080 FSCTL_SIS_LINK_FILES = 639236 FSCTL_UNLOCK_VOLUME = 589852 FSCTL_WRITE_RAW_ENCRYPTED = 590047 FSCTL_WRITE_USN_CLOSE_RECORD = 590063 FSDIR_COLUMN_DATA = 3 FSDIR_COLUMN_DIR = 5 FSDIR_COLUMN_MODE = 1 FSDIR_COLUMN_MTIME = 2 FSDIR_COLUMN_NAME = 0 FSDIR_COLUMN_PATH = 4 FSDIR_SCHEMA = "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)" FSHIFT = 0x04 FS_ARABIC = 64 FS_BALTIC = 128 FS_CASE_IS_PRESERVED = 2 FS_CASE_SENSITIVE = 1 FS_CHINESESIMP = 262144 FS_CHINESETRAD = 1048576 FS_CYRILLIC = 4 FS_FILE_COMPRESSION = 16 FS_FILE_ENCRYPTION = 131072 FS_GREEK = 8 FS_HEBREW = 32 FS_JISJAPAN = 131072 FS_JOHAB = 2097152 FS_LATIN1 = 1 FS_LATIN2 = 2 FS_PERSISTENT_ACLS = 8 FS_SYMBOL = 2147483648 FS_THAI = 65536 FS_TURKISH = 16 FS_UNICODE_STORED_ON_DISK = 4 FS_VIETNAMESE = 256 FS_VOL_IS_COMPRESSED = 32768 FS_WANSUNG = 524288 FVIRTKEY = 1 FW_BLACK = 900 FW_BOLD = 700 FW_DEMIBOLD = 600 FW_DONTCARE = 0 FW_EXTRABOLD = 800 FW_EXTRALIGHT = 200 FW_HEAVY = 900 FW_LIGHT = 300 FW_MEDIUM = 500 FW_NORMAL = 400 FW_REGULAR = 400 FW_SEMIBOLD = 600 FW_THIN = 100 FW_ULTRABOLD = 800 FW_ULTRALIGHT = 200 F_OK = 0 GA_PARENT = 1 GA_ROOT = 2 GA_ROOTOWNER = 3 GB2312_CHARSET = 134 GCLP_HBRBACKGROUND = -10 GCLP_HCURSOR = -12 GCLP_HICON = -14 GCLP_HICONSM = -34 GCLP_HMODULE = -16 GCLP_MENUNAME = -8 GCLP_WNDPROC = -24 GCL_CBCLSEXTRA = -20 GCL_CBWNDEXTRA = -18 GCL_CONVERSION = 0x0001 GCL_REVERSECONVERSION = 0x0002 GCL_REVERSE_LENGTH = 0x0003 GCL_STYLE = -26 GCPCLASS_ARABIC = 2 GCPCLASS_HEBREW = 2 GCPCLASS_LATIN = 1 GCPCLASS_LATINNUMBER = 5 GCPCLASS_LATINNUMERICSEPARATOR = 7 GCPCLASS_LATINNUMERICTERMINATOR = 6 GCPCLASS_LOCALNUMBER = 4 GCPCLASS_NEUTRAL = 3 GCPCLASS_NUMERICSEPARATOR = 8 GCPCLASS_POSTBOUNDLTR = 0x20 GCPCLASS_POSTBOUNDRTL = 0x10 GCPCLASS_PREBOUNDLTR = 0x80 GCPCLASS_PREBOUNDRTL = 0x40 GCPGLYPH_LINKAFTER = 0x4000 GCPGLYPH_LINKBEFORE = 0x8000 GCP_CLASSIN = 524288 GCP_DBCS = 0x0001 GCP_DIACRITIC = 0x0100 GCP_DISPLAYZWG = 4194304 GCP_ERROR = 0x8000 GCP_GLYPHSHAPE = 0x0010 GCP_JUSTIFY = 65536 GCP_JUSTIFYIN = 2097152 GCP_KASHIDA = 0x0400 GCP_LIGATE = 0x0020 GCP_MAXEXTENT = 1048576 GCP_NEUTRALOVERRIDE = 33554432 GCP_NUMERICOVERRIDE = 16777216 GCP_NUMERICSLATIN = 67108864 GCP_NUMERICSLOCAL = 134217728 GCP_REORDER = 0x0002 GCP_SYMSWAPOFF = 8388608 GCP_USEKERNING = 0x0008 GCS_COMPATTR = 0x0010 GCS_COMPCLAUSE = 0x0020 GCS_COMPREADATTR = 0x0002 GCS_COMPREADCLAUSE = 0x0004 GCS_COMPREADSTR = 0x0001 GCS_COMPSTR = 0x0008 GCS_CURSORPOS = 0x0080 GCS_DELTASTART = 0x0100 GCS_RESULTCLAUSE = 0x1000 GCS_RESULTREADCLAUSE = 0x0400 GCS_RESULTREADSTR = 0x0200 GCS_RESULTSTR = 0x0800 GCW_ATOM = -32 GDICOMMENT_BEGINGROUP = 0x00000002 GDICOMMENT_ENDGROUP = 0x00000003 GDICOMMENT_IDENTIFIER = 0x43494447 GDICOMMENT_MULTIFORMATS = 0x40000004 GDICOMMENT_UNICODE_END = 0x00000080 GDICOMMENT_UNICODE_STRING = 0x00000040 GDICOMMENT_WINDOWS_METAFILE = 0x80000001 GDIPLUS_TS_QUERYVER = 4122 GDIPLUS_TS_RECORD = 4123 GDI_ERROR = 4294967295 GDI_OBJ_LAST = 14 GENERIC_ALL = 268435456 GENERIC_EXECUTE = 536870912 GENERIC_READ = 2147483648 GENERIC_WRITE = 1073741824 GEOID_NOT_AVAILABLE = -1 GETCOLORTABLE = 5 GETDEVICEUNITS = 42 GETEXTENDEDTEXTMETRICS = 256 GETEXTENTTABLE = 257 GETFACENAME = 513 GETPAIRKERNTABLE = 258 GETPENWIDTH = 16 GETPHYSPAGESIZE = 12 GETPRINTINGOFFSET = 13 GETSCALINGFACTOR = 14 GETSETPAPERBINS = 29 GETSETPAPERMETRICS = 35 GETSETPRINTORIENT = 30 GETSETSCREENPARAMS = 3072 GETTECHNOLGY = 20 GETTECHNOLOGY = 20 GETTRACKKERNTABLE = 259 GETVECTORBRUSHSIZE = 27 GETVECTORPENSIZE = 26 GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 4 GET_MODULE_HANDLE_EX_FLAG_PIN = 1 GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 2 GET_PS_FEATURESETTING = 4121 GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A = "GetSystemWow64DirectoryA" GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A = "GetSystemWow64DirectoryW" GET_TAPE_DRIVE_INFORMATION = 1 GET_TAPE_MEDIA_INFORMATION = 0 GGI_MARK_NONEXISTING_GLYPHS = 0x0001 GGL_INDEX = 0x00000002 GGL_LEVEL = 0x00000001 GGL_PRIVATE = 0x00000004 GGL_STRING = 0x00000003 GGO_BEZIER = 3 GGO_BITMAP = 1 GGO_GLYPH_INDEX = 0x0080 GGO_GRAY2_BITMAP = 4 GGO_GRAY4_BITMAP = 5 GGO_GRAY8_BITMAP = 6 GGO_METRICS = 0 GGO_NATIVE = 2 GGO_UNHINTED = 0x0100 GHND = 66 GIDC_ARRIVAL = 1 GIDC_REMOVAL = 2 GL_ID_CANNOTSAVE = 0x00000011 GL_ID_CHOOSECANDIDATE = 0x00000028 GL_ID_INPUTCODE = 0x00000026 GL_ID_INPUTRADICAL = 0x00000025 GL_ID_INPUTREADING = 0x00000024 GL_ID_INPUTSYMBOL = 0x00000027 GL_ID_NOCONVERT = 0x00000020 GL_ID_NODICTIONARY = 0x00000010 GL_ID_NOMODULE = 0x00000001 GL_ID_PRIVATE_FIRST = 0x00008000 GL_ID_PRIVATE_LAST = 0x0000FFFF GL_ID_READINGCONFLICT = 0x00000023 GL_ID_REVERSECONVERSION = 0x00000029 GL_ID_TOOMANYSTROKE = 0x00000022 GL_ID_TYPINGERROR = 0x00000021 GL_ID_UNKNOWN = 0x00000000 GL_LEVEL_ERROR = 0x00000002 GL_LEVEL_FATAL = 0x00000001 GL_LEVEL_INFORMATION = 0x00000004 GL_LEVEL_NOGUIDELINE = 0x00000000 GL_LEVEL_WARNING = 0x00000003 GMDI_GOINTOPOPUPS = 2 GMDI_USEDISABLED = 1 GMEM_DDESHARE = 0x2000 GMEM_DISCARDABLE = 0x100 GMEM_DISCARDED = 0x4000 GMEM_FIXED = 0x0 GMEM_INVALID_HANDLE = 0x8000 GMEM_LOCKCOUNT = 0x00ff GMEM_LOWER = 4096 GMEM_MODIFY = 0x80 GMEM_MOVEABLE = 0x2 GMEM_NOCOMPACT = 0x10 GMEM_NODISCARD = 0x20 GMEM_NOTIFY = 0x4000 GMEM_NOT_BANKED = 0x1000 GMEM_SHARE = 0x2000 GMEM_VALID_FLAGS = 0x7f72 GMEM_ZEROINIT = 0x40 GMMP_USE_DISPLAY_POINTS = 1 GMMP_USE_HIGH_RESOLUTION_POINTS = 2 GM_ADVANCED = 2 GM_COMPATIBLE = 1 GM_LAST = 2 GPTR = 64 GPT_ATTRIBUTE_PLATFORM_REQUIRED = 1 GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = 4611686018427387904 GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = 9223372036854775808 GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = 1152921504606846976 GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY = 2305843009213693952 GRADIENT_FILL_OP_FLAG = 0x000000ff GRADIENT_FILL_RECT_H = 0x00000000 GRADIENT_FILL_RECT_V = 0x00000001 GRADIENT_FILL_TRIANGLE = 0x00000002 GRAY_BRUSH = 2 GREEK_CHARSET = 161 GROUP_NAME = 0x80 GROUP_SECURITY_INFORMATION = 2 GR_GDIOBJECTS = 0 GR_USEROBJECTS = 1 GS_8BIT_INDICES = 0x00000001 GUID_DEFINED = 0 GUI_16BITTASK = 0x00000000 GUI_CARETBLINKING = 0x00000001 GUI_INMENUMODE = 0x00000004 GUI_INMOVESIZE = 0x00000002 GUI_POPUPMENUMODE = 0x00000010 GUI_SYSTEMMENUMODE = 0x00000008 GWLP_HINSTANCE = -6 GWLP_HWNDPARENT = -8 GWLP_ID = -12 GWLP_USERDATA = -21 GWLP_WNDPROC = -4 GWL_EXSTYLE = -20 GWL_ID = -12 GWL_STYLE = -16 GW_CHILD = 5 GW_ENABLEDPOPUP = 6 GW_HWNDFIRST = 0 GW_HWNDLAST = 1 GW_HWNDNEXT = 2 GW_HWNDPREV = 3 GW_MAX = 6 GW_OWNER = 4 HALFTONE = 4 HANDLE_FLAG_INHERIT = 0x1 HANDLE_FLAG_PROTECT_FROM_CLOSE = 0x2 HANGEUL_CHARSET = 129 HANGUL_CHARSET = 129 HANGUP_COMPLETE = 0x05 HANGUP_PENDING = 0x04 HCBT_ACTIVATE = 5 HCBT_CLICKSKIPPED = 6 HCBT_CREATEWND = 3 HCBT_DESTROYWND = 4 HCBT_KEYSKIPPED = 7 HCBT_MINMAX = 1 HCBT_MOVESIZE = 0 HCBT_QS = 2 HCBT_SETFOCUS = 9 HCBT_SYSCOMMAND = 8 HCF_AVAILABLE = 0x00000002 HCF_CONFIRMHOTKEY = 0x00000008 HCF_DEFAULTDESKTOP = 0x00000200 HCF_HIGHCONTRASTON = 0x00000001 HCF_HOTKEYACTIVE = 0x00000004 HCF_HOTKEYAVAILABLE = 0x00000040 HCF_HOTKEYSOUND = 0x00000010 HCF_INDICATOR = 0x00000020 HCF_LOGONDESKTOP = 0x00000100 HCRYPTPROV_DEFINED = 0 HC_ACTION = 0 HC_GETNEXT = 1 HC_NOREM = 3 HC_NOREMOVE = 3 HC_SKIP = 2 HC_SYSMODALOFF = 5 HC_SYSMODALON = 4 HDATA_APPOWNED = 0x0001 HEAP_CREATE_ALIGN_16 = 0x00010000 HEAP_CREATE_ENABLE_EXECUTE = 0x00040000 HEAP_CREATE_ENABLE_TRACING = 0x00020000 HEAP_DISABLE_COALESCE_ON_FREE = 0x00000080 HEAP_FREE_CHECKING_ENABLED = 0x00000040 HEAP_GENERATE_EXCEPTIONS = 0x00000004 HEAP_GROWABLE = 0x00000002 HEAP_MAXIMUM_TAG = 0x0FFF HEAP_NO_SERIALIZE = 0x00000001 HEAP_PSEUDO_TAG_FLAG = 0x8000 HEAP_REALLOC_IN_PLACE_ONLY = 0x00000010 HEAP_TAG_SHIFT = 18 HEAP_TAIL_CHECKING_ENABLED = 0x00000020 HEAP_ZERO_MEMORY = 0x00000008 HEBREW_CHARSET = 177 HELPINFO_MENUITEM = 0x0002 HELPINFO_WINDOW = 0x0001 HELPMSGSTRINGA = "commdlg_help" HELP_COMMAND = 0x0102 HELP_CONTENTS = 0x0003 HELP_CONTEXT = 0x0001 HELP_CONTEXTMENU = 0x000a HELP_CONTEXTPOPUP = 0x0008 HELP_FINDER = 0x000b HELP_FORCEFILE = 0x0009 HELP_HELPONHELP = 0x0004 HELP_INDEX = 0x0003 HELP_KEY = 0x0101 HELP_MULTIKEY = 0x0201 HELP_PARTIALKEY = 0x0105 HELP_QUIT = 0x0002 HELP_SETCONTENTS = 0x0005 HELP_SETINDEX = 0x0005 HELP_SETPOPUP_POS = 0x000d HELP_SETWINPOS = 0x0203 HELP_TCARD = 0x8000 HELP_TCARD_DATA = 0x0010 HELP_TCARD_OTHER_CALLER = 0x0011 HELP_WM_HELP = 0x000c HIDE_WINDOW = 0 HIGH_PRIORITY_CLASS = 0x80 HIGH_SURROGATE_END = 0xdbff HIGH_SURROGATE_START = 0xd800 HINSTANCE_ERROR = 32 HIST_NO_OF_BUCKETS = 24 HKL_NEXT = 1 HKL_PREV = 0 HMONITOR_DECLARED = 1 HOLLOW_BRUSH = 5 HORZRES = 8 HORZSIZE = 4 HOST_NOT_FOUND = 11001 HOVER_DEFAULT = 0xFFFFFFFF HP_ALGID = 0x1 HP_HASHSIZE = 0x4 HP_HASHVAL = 0x2 HP_HMAC_INFO = 0x5 HP_TLS1PRF_LABEL = 0x6 HP_TLS1PRF_SEED = 0x7 HSHELL_ACCESSIBILITYSTATE = 11 HSHELL_ACTIVATESHELLWINDOW = 3 HSHELL_APPCOMMAND = 12 HSHELL_ENDTASK = 10 HSHELL_FLASH = 32774 HSHELL_GETMINRECT = 5 HSHELL_HIGHBIT = 0x8000 HSHELL_LANGUAGE = 8 HSHELL_REDRAW = 6 HSHELL_RUDEAPPACTIVATED = 32772 HSHELL_SYSMENU = 9 HSHELL_TASKMAN = 7 HSHELL_WINDOWACTIVATED = 4 HSHELL_WINDOWCREATED = 1 HSHELL_WINDOWDESTROYED = 2 HSHELL_WINDOWREPLACED = 13 HSHELL_WINDOWREPLACING = 14 HS_API_MAX = 12 HS_BDIAGONAL = 3 HS_CROSS = 4 HS_DIAGCROSS = 5 HS_FDIAGONAL = 2 HS_HORIZONTAL = 0 HS_VERTICAL = 1 HTBORDER = 18 HTBOTTOM = 15 HTBOTTOMLEFT = 16 HTBOTTOMRIGHT = 17 HTCAPTION = 2 HTCLIENT = 1 HTCLOSE = 20 HTERROR = -2 HTGROWBOX = 4 HTHELP = 21 HTHSCROLL = 6 HTLEFT = 10 HTMAXBUTTON = 9 HTMENU = 5 HTMINBUTTON = 8 HTNOWHERE = 0 HTOBJECT = 19 HTREDUCE = 8 HTRIGHT = 11 HTSIZE = 4 HTSIZEFIRST = 10 HTSIZELAST = 17 HTSYSMENU = 3 HTTOP = 12 HTTOPLEFT = 13 HTTOPRIGHT = 14 HTTRANSPARENT = -1 HTVSCROLL = 7 HTZOOM = 9 HUGEP = 0 HW_PROFILE_GUIDLEN = 39 IACE_CHILDREN = 0x0001 IACE_DEFAULT = 0x0010 IACE_IGNORENOCONTEXT = 0x0020 ICM_ADDPROFILE = 1 ICM_DELETEPROFILE = 2 ICM_DONE_OUTSIDEDC = 4 ICM_OFF = 1 ICM_ON = 2 ICM_QUERY = 3 ICM_QUERYMATCH = 7 ICM_QUERYPROFILE = 3 ICM_REGISTERICMATCHER = 5 ICM_SETDEFAULTPROFILE = 4 ICM_UNREGISTERICMATCHER = 6 ICON_BIG = 1 ICON_SMALL = 0 ICON_SMALL2 = 2 IDABORT = 3 IDANI_CAPTION = 3 IDANI_OPEN = 1 IDCANCEL = 2 IDCLOSE = 8 IDCONTINUE = 11 IDENTIFY_BUFFER_SIZE = 512 IDHELP = 9 IDHOT_SNAPDESKTOP = -2 IDHOT_SNAPWINDOW = -1 IDH_CANCEL = 28444 IDH_GENERIC_HELP_BUTTON = 28442 IDH_HELP = 28445 IDH_MISSING_CONTEXT = 28441 IDH_NO_HELP = 28440 IDH_OK = 28443 IDIGNORE = 5 IDLE_PRIORITY_CLASS = 0x40 IDLFLAG_FIN = 1 IDLFLAG_FLCID = 4 IDLFLAG_FOUT = 2 IDLFLAG_FRETVAL = 8 IDLFLAG_NONE = 0 IDNO = 7 IDOK = 1 IDRETRY = 4 IDTIMEOUT = 32000 IDTRYAGAIN = 10 IDYES = 6 ID_CMD = 0xEC ID_DEFAULTINST = -2 ID_PSREBOOTSYSTEM = 3 ID_PSRESTARTWINDOWS = 0x2 IE_BADID = -1 IE_BAUDRATE = -12 IE_BYTESIZE = -11 IE_DEFAULT = -5 IE_HARDWARE = -10 IE_MEMORY = -4 IE_NOPEN = -3 IE_OPEN = -2 IFID_DEFINED = 0 IGIMIF_RIGHTMENU = 0x0001 IGIMII_CMODE = 0x0001 IGIMII_CONFIGURE = 0x0004 IGIMII_HELP = 0x0010 IGIMII_INPUTTOOLS = 0x0040 IGIMII_OTHER = 0x0020 IGIMII_SMODE = 0x0002 IGIMII_TOOLS = 0x0008 IGNORE = 0 IGP_CONVERSION = 0x00000008 IGP_PROPERTY = 0x00000004 IGP_SELECT = 0x00000018 IGP_SENTENCE = 0x0000000c IGP_SETCOMPSTR = 0x00000014 IGP_UI = 0x00000010 ILLUMINANT_A = 1 ILLUMINANT_B = 2 ILLUMINANT_C = 3 ILLUMINANT_D50 = 4 ILLUMINANT_D55 = 5 ILLUMINANT_D65 = 6 ILLUMINANT_D75 = 7 ILLUMINANT_DAYLIGHT = 3 ILLUMINANT_DEVICE_DEFAULT = 0 ILLUMINANT_F2 = 8 ILLUMINANT_FLUORESCENT = 8 ILLUMINANT_MAX_INDEX = 8 ILLUMINANT_NTSC = 3 ILLUMINANT_TUNGSTEN = 1 IMAGE_ARCHIVE_END = "`\n" IMAGE_ARCHIVE_LINKER_MEMBER = "/ " IMAGE_ARCHIVE_LONGNAMES_MEMBER = "// " IMAGE_ARCHIVE_PAD = "\n" IMAGE_ARCHIVE_START = "!\n" IMAGE_ARCHIVE_START_SIZE = 8 IMAGE_BITMAP = 0 IMAGE_COMDAT_SELECT_ANY = 2 IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5 IMAGE_COMDAT_SELECT_EXACT_MATCH = 4 IMAGE_COMDAT_SELECT_LARGEST = 6 IMAGE_COMDAT_SELECT_NEWEST = 7 IMAGE_COMDAT_SELECT_NODUPLICATES = 1 IMAGE_COMDAT_SELECT_SAME_SIZE = 3 IMAGE_CURSOR = 2 IMAGE_DEBUG_MISC_EXENAME = 1 IMAGE_DEBUG_TYPE_BORLAND = 9 IMAGE_DEBUG_TYPE_CLSID = 11 IMAGE_DEBUG_TYPE_CODEVIEW = 2 IMAGE_DEBUG_TYPE_COFF = 1 IMAGE_DEBUG_TYPE_EXCEPTION = 5 IMAGE_DEBUG_TYPE_FIXUP = 6 IMAGE_DEBUG_TYPE_FPO = 3 IMAGE_DEBUG_TYPE_MISC = 4 IMAGE_DEBUG_TYPE_OMAP_FROM_SRC = 8 IMAGE_DEBUG_TYPE_OMAP_TO_SRC = 7 IMAGE_DEBUG_TYPE_RESERVED10 = 10 IMAGE_DEBUG_TYPE_UNKNOWN = 0 IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7 IMAGE_DIRECTORY_ENTRY_BASERELOC = 5 IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11 IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14 IMAGE_DIRECTORY_ENTRY_DEBUG = 6 IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13 IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3 IMAGE_DIRECTORY_ENTRY_EXPORT = 0 IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8 IMAGE_DIRECTORY_ENTRY_IAT = 12 IMAGE_DIRECTORY_ENTRY_IMPORT = 1 IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10 IMAGE_DIRECTORY_ENTRY_RESOURCE = 2 IMAGE_DIRECTORY_ENTRY_SECURITY = 4 IMAGE_DIRECTORY_ENTRY_TLS = 9 IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000 IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040 IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0x0080 IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000 IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020 IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800 IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200 IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400 IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0x0100 IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000 IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000 IMAGE_DOS_SIGNATURE = 0x5A4D IMAGE_ENHMETAFILE = 3 IMAGE_FILE_32BIT_MACHINE = 0x0100 IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010 IMAGE_FILE_BYTES_REVERSED_HI = 0x8000 IMAGE_FILE_BYTES_REVERSED_LO = 0x0080 IMAGE_FILE_DEBUG_STRIPPED = 0x0200 IMAGE_FILE_DLL = 0x2000 IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002 IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020 IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004 IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008 IMAGE_FILE_MACHINE_ALPHA = 0x0184 IMAGE_FILE_MACHINE_ALPHA64 = 0x0284 IMAGE_FILE_MACHINE_AM33 = 0x01d3 IMAGE_FILE_MACHINE_AMD64 = 0x8664 IMAGE_FILE_MACHINE_ARM = 0x01c0 IMAGE_FILE_MACHINE_ARM64 = 0xaa64 IMAGE_FILE_MACHINE_ARMNT = 0x01c4 IMAGE_FILE_MACHINE_ARMV7 = 0x01c4 IMAGE_FILE_MACHINE_AXP64 = 644 IMAGE_FILE_MACHINE_CEE = 0xc0ee IMAGE_FILE_MACHINE_CEF = 0x0CEF IMAGE_FILE_MACHINE_EBC = 0x0EBC IMAGE_FILE_MACHINE_I386 = 0x014c IMAGE_FILE_MACHINE_IA64 = 0x0200 IMAGE_FILE_MACHINE_M32R = 0x9041 IMAGE_FILE_MACHINE_MIPS16 = 0x0266 IMAGE_FILE_MACHINE_MIPSFPU = 0x0366 IMAGE_FILE_MACHINE_MIPSFPU16 = 0x0466 IMAGE_FILE_MACHINE_POWERPC = 0x01F0 IMAGE_FILE_MACHINE_POWERPCFP = 0x01f1 IMAGE_FILE_MACHINE_R10000 = 0x0168 IMAGE_FILE_MACHINE_R3000 = 0x0162 IMAGE_FILE_MACHINE_R4000 = 0x0166 IMAGE_FILE_MACHINE_SH3 = 0x01a2 IMAGE_FILE_MACHINE_SH3DSP = 0x01a3 IMAGE_FILE_MACHINE_SH3E = 0x01a4 IMAGE_FILE_MACHINE_SH4 = 0x01a6 IMAGE_FILE_MACHINE_SH5 = 0x01a8 IMAGE_FILE_MACHINE_THUMB = 0x01c2 IMAGE_FILE_MACHINE_TRICORE = 0x0520 IMAGE_FILE_MACHINE_UNKNOWN = 0 IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x0169 IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800 IMAGE_FILE_RELOCS_STRIPPED = 0x0001 IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400 IMAGE_FILE_SYSTEM = 0x1000 IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000 IMAGE_ICON = 1 IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b IMAGE_NT_OPTIONAL_HDR_MAGIC = 523 IMAGE_NT_SIGNATURE = 0x00004550 IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16 IMAGE_ORDINAL_FLAG = 9223372036854775808 IMAGE_ORDINAL_FLAG32 = 0x80000000 IMAGE_ORDINAL_FLAG64 = 0x8000000000000000 IMAGE_OS2_SIGNATURE = 0x454E IMAGE_OS2_SIGNATURE_LE = 0x454C IMAGE_REL_ALPHA_ABSOLUTE = 0x0000 IMAGE_REL_ALPHA_BRADDR = 0x0007 IMAGE_REL_ALPHA_GPDISP = 0x0006 IMAGE_REL_ALPHA_GPREL32 = 0x0003 IMAGE_REL_ALPHA_GPRELHI = 0x0017 IMAGE_REL_ALPHA_GPRELLO = 0x0016 IMAGE_REL_ALPHA_HINT = 0x0008 IMAGE_REL_ALPHA_INLINE_REFLONG = 0x0009 IMAGE_REL_ALPHA_LITERAL = 0x0004 IMAGE_REL_ALPHA_LITUSE = 0x0005 IMAGE_REL_ALPHA_MATCH = 0x000D IMAGE_REL_ALPHA_PAIR = 0x000C IMAGE_REL_ALPHA_REFHI = 0x000A IMAGE_REL_ALPHA_REFLO = 0x000B IMAGE_REL_ALPHA_REFLONG = 0x0001 IMAGE_REL_ALPHA_REFLONGNB = 0x0010 IMAGE_REL_ALPHA_REFQ1 = 0x0015 IMAGE_REL_ALPHA_REFQ2 = 0x0014 IMAGE_REL_ALPHA_REFQ3 = 0x0013 IMAGE_REL_ALPHA_REFQUAD = 0x0002 IMAGE_REL_ALPHA_SECREL = 0x000F IMAGE_REL_ALPHA_SECRELHI = 0x0012 IMAGE_REL_ALPHA_SECRELLO = 0x0011 IMAGE_REL_ALPHA_SECTION = 0x000E IMAGE_REL_AMD64_ABSOLUTE = 0x0000 IMAGE_REL_AMD64_ADDR32 = 0x0002 IMAGE_REL_AMD64_ADDR32NB = 0x0003 IMAGE_REL_AMD64_ADDR64 = 0x0001 IMAGE_REL_AMD64_PAIR = 0x000F IMAGE_REL_AMD64_REL32 = 0x0004 IMAGE_REL_AMD64_REL32_1 = 0x0005 IMAGE_REL_AMD64_REL32_2 = 0x0006 IMAGE_REL_AMD64_REL32_3 = 0x0007 IMAGE_REL_AMD64_REL32_4 = 0x0008 IMAGE_REL_AMD64_REL32_5 = 0x0009 IMAGE_REL_AMD64_SECREL = 0x000B IMAGE_REL_AMD64_SECREL7 = 0x000C IMAGE_REL_AMD64_SECTION = 0x000A IMAGE_REL_AMD64_SREL32 = 0x000E IMAGE_REL_AMD64_SSPAN32 = 0x0010 IMAGE_REL_AMD64_TOKEN = 0x000D IMAGE_REL_AM_ABSOLUTE = 0x0000 IMAGE_REL_AM_ADDR32 = 0x0001 IMAGE_REL_AM_ADDR32NB = 0x0002 IMAGE_REL_AM_CALL32 = 0x0003 IMAGE_REL_AM_FUNCINFO = 0x0004 IMAGE_REL_AM_REL32_1 = 0x0005 IMAGE_REL_AM_REL32_2 = 0x0006 IMAGE_REL_AM_SECREL = 0x0007 IMAGE_REL_AM_SECTION = 0x0008 IMAGE_REL_AM_TOKEN = 0x0009 IMAGE_REL_ARM_ABSOLUTE = 0x0000 IMAGE_REL_ARM_ADDR32 = 0x0001 IMAGE_REL_ARM_ADDR32NB = 0x0002 IMAGE_REL_ARM_BLX11 = 0x0009 IMAGE_REL_ARM_BLX23T = 0x0015 IMAGE_REL_ARM_BLX24 = 0x0008 IMAGE_REL_ARM_BRANCH11 = 0x0004 IMAGE_REL_ARM_BRANCH20T = 0x0012 IMAGE_REL_ARM_BRANCH24 = 0x0003 IMAGE_REL_ARM_BRANCH24T = 0x0014 IMAGE_REL_ARM_GPREL12 = 0x0006 IMAGE_REL_ARM_GPREL7 = 0x0007 IMAGE_REL_ARM_MOV32 = 0x0010 IMAGE_REL_ARM_MOV32A = 0x0010 IMAGE_REL_ARM_MOV32T = 0x0011 IMAGE_REL_ARM_SECREL = 0x000F IMAGE_REL_ARM_SECTION = 0x000E IMAGE_REL_ARM_TOKEN = 0x0005 IMAGE_REL_BASED_ABSOLUTE = 0 IMAGE_REL_BASED_ARM_MOV32 = 5 IMAGE_REL_BASED_DIR64 = 10 IMAGE_REL_BASED_HIGH = 1 IMAGE_REL_BASED_HIGHADJ = 4 IMAGE_REL_BASED_HIGHLOW = 3 IMAGE_REL_BASED_IA64_IMM64 = 9 IMAGE_REL_BASED_LOW = 2 IMAGE_REL_BASED_MIPS_JMPADDR = 5 IMAGE_REL_BASED_MIPS_JMPADDR16 = 9 IMAGE_REL_BASED_THUMB_MOV32 = 7 IMAGE_REL_CEE_ABSOLUTE = 0x0000 IMAGE_REL_CEE_ADDR32 = 0x0001 IMAGE_REL_CEE_ADDR32NB = 0x0003 IMAGE_REL_CEE_ADDR64 = 0x0002 IMAGE_REL_CEE_SECREL = 0x0005 IMAGE_REL_CEE_SECTION = 0x0004 IMAGE_REL_CEE_TOKEN = 0x0006 IMAGE_REL_CEF_ABSOLUTE = 0x0000 IMAGE_REL_CEF_ADDR32 = 0x0001 IMAGE_REL_CEF_ADDR32NB = 0x0003 IMAGE_REL_CEF_ADDR64 = 0x0002 IMAGE_REL_CEF_SECREL = 0x0005 IMAGE_REL_CEF_SECTION = 0x0004 IMAGE_REL_CEF_TOKEN = 0x0006 IMAGE_REL_EBC_ABSOLUTE = 0x0000 IMAGE_REL_EBC_ADDR32NB = 0x0001 IMAGE_REL_EBC_REL32 = 0x0002 IMAGE_REL_EBC_SECREL = 0x0004 IMAGE_REL_EBC_SECTION = 0x0003 IMAGE_REL_I386_ABSOLUTE = 0x0000 IMAGE_REL_I386_DIR16 = 0x0001 IMAGE_REL_I386_DIR32 = 0x0006 IMAGE_REL_I386_DIR32NB = 0x0007 IMAGE_REL_I386_REL16 = 0x0002 IMAGE_REL_I386_REL32 = 0x0014 IMAGE_REL_I386_SECREL = 0x000B IMAGE_REL_I386_SECREL7 = 0x000D IMAGE_REL_I386_SECTION = 0x000A IMAGE_REL_I386_SEG12 = 0x0009 IMAGE_REL_I386_TOKEN = 0x000C IMAGE_REL_IA64_ABSOLUTE = 0x0000 IMAGE_REL_IA64_ADDEND = 0x001F IMAGE_REL_IA64_DIR32 = 0x0004 IMAGE_REL_IA64_DIR32NB = 0x0010 IMAGE_REL_IA64_DIR64 = 0x0005 IMAGE_REL_IA64_GPREL22 = 0x0009 IMAGE_REL_IA64_GPREL32 = 0x001C IMAGE_REL_IA64_IMM14 = 0x0001 IMAGE_REL_IA64_IMM22 = 0x0002 IMAGE_REL_IA64_IMM64 = 0x0003 IMAGE_REL_IA64_IMMGPREL64 = 0x001A IMAGE_REL_IA64_LTOFF22 = 0x000A IMAGE_REL_IA64_PCREL21B = 0x0006 IMAGE_REL_IA64_PCREL21F = 0x0008 IMAGE_REL_IA64_PCREL21M = 0x0007 IMAGE_REL_IA64_PCREL60B = 0x0016 IMAGE_REL_IA64_PCREL60F = 0x0017 IMAGE_REL_IA64_PCREL60I = 0x0018 IMAGE_REL_IA64_PCREL60M = 0x0019 IMAGE_REL_IA64_PCREL60X = 0x0015 IMAGE_REL_IA64_SECREL22 = 0x000C IMAGE_REL_IA64_SECREL32 = 0x000E IMAGE_REL_IA64_SECREL64I = 0x000D IMAGE_REL_IA64_SECTION = 0x000B IMAGE_REL_IA64_SREL14 = 0x0011 IMAGE_REL_IA64_SREL22 = 0x0012 IMAGE_REL_IA64_SREL32 = 0x0013 IMAGE_REL_IA64_TOKEN = 0x001B IMAGE_REL_IA64_UREL32 = 0x0014 IMAGE_REL_M32R_ABSOLUTE = 0x0000 IMAGE_REL_M32R_ADDR24 = 0x0003 IMAGE_REL_M32R_ADDR32 = 0x0001 IMAGE_REL_M32R_ADDR32NB = 0x0002 IMAGE_REL_M32R_GPREL16 = 0x0004 IMAGE_REL_M32R_PAIR = 0x000B IMAGE_REL_M32R_PCREL16 = 0x0006 IMAGE_REL_M32R_PCREL24 = 0x0005 IMAGE_REL_M32R_PCREL8 = 0x0007 IMAGE_REL_M32R_REFHALF = 0x0008 IMAGE_REL_M32R_REFHI = 0x0009 IMAGE_REL_M32R_REFLO = 0x000A IMAGE_REL_M32R_SECREL32 = 0x000D IMAGE_REL_M32R_SECTION = 0x000C IMAGE_REL_M32R_TOKEN = 0x000E IMAGE_REL_MIPS_ABSOLUTE = 0x0000 IMAGE_REL_MIPS_GPREL = 0x0006 IMAGE_REL_MIPS_JMPADDR = 0x0003 IMAGE_REL_MIPS_JMPADDR16 = 0x0010 IMAGE_REL_MIPS_LITERAL = 0x0007 IMAGE_REL_MIPS_PAIR = 0x0025 IMAGE_REL_MIPS_REFHALF = 0x0001 IMAGE_REL_MIPS_REFHI = 0x0004 IMAGE_REL_MIPS_REFLO = 0x0005 IMAGE_REL_MIPS_REFWORD = 0x0002 IMAGE_REL_MIPS_REFWORDNB = 0x0022 IMAGE_REL_MIPS_SECREL = 0x000B IMAGE_REL_MIPS_SECRELHI = 0x000D IMAGE_REL_MIPS_SECRELLO = 0x000C IMAGE_REL_MIPS_SECTION = 0x000A IMAGE_REL_MIPS_TOKEN = 0x000E IMAGE_REL_PPC_ABSOLUTE = 0x0000 IMAGE_REL_PPC_ADDR14 = 0x0005 IMAGE_REL_PPC_ADDR16 = 0x0004 IMAGE_REL_PPC_ADDR24 = 0x0003 IMAGE_REL_PPC_ADDR32 = 0x0002 IMAGE_REL_PPC_ADDR32NB = 0x000A IMAGE_REL_PPC_ADDR64 = 0x0001 IMAGE_REL_PPC_BRNTAKEN = 0x0400 IMAGE_REL_PPC_BRTAKEN = 0x0200 IMAGE_REL_PPC_GPREL = 0x0015 IMAGE_REL_PPC_IFGLUE = 0x000D IMAGE_REL_PPC_IMGLUE = 0x000E IMAGE_REL_PPC_NEG = 0x0100 IMAGE_REL_PPC_PAIR = 0x0012 IMAGE_REL_PPC_REFHI = 0x0010 IMAGE_REL_PPC_REFLO = 0x0011 IMAGE_REL_PPC_REL14 = 0x0007 IMAGE_REL_PPC_REL24 = 0x0006 IMAGE_REL_PPC_SECREL = 0x000B IMAGE_REL_PPC_SECREL16 = 0x000F IMAGE_REL_PPC_SECRELHI = 0x0014 IMAGE_REL_PPC_SECRELLO = 0x0013 IMAGE_REL_PPC_SECTION = 0x000C IMAGE_REL_PPC_TOCDEFN = 0x0800 IMAGE_REL_PPC_TOCREL14 = 0x0009 IMAGE_REL_PPC_TOCREL16 = 0x0008 IMAGE_REL_PPC_TOKEN = 0x0016 IMAGE_REL_PPC_TYPEMASK = 0x00FF IMAGE_REL_SH3_ABSOLUTE = 0x0000 IMAGE_REL_SH3_DIRECT16 = 0x0001 IMAGE_REL_SH3_DIRECT32 = 0x0002 IMAGE_REL_SH3_DIRECT32_NB = 0x0010 IMAGE_REL_SH3_DIRECT4 = 0x0006 IMAGE_REL_SH3_DIRECT4_LONG = 0x0008 IMAGE_REL_SH3_DIRECT4_WORD = 0x0007 IMAGE_REL_SH3_DIRECT8 = 0x0003 IMAGE_REL_SH3_DIRECT8_LONG = 0x0005 IMAGE_REL_SH3_DIRECT8_WORD = 0x0004 IMAGE_REL_SH3_GPREL4_LONG = 0x0011 IMAGE_REL_SH3_PCREL12_WORD = 0x000B IMAGE_REL_SH3_PCREL8_LONG = 0x000A IMAGE_REL_SH3_PCREL8_WORD = 0x0009 IMAGE_REL_SH3_SECREL = 0x000F IMAGE_REL_SH3_SECTION = 0x000E IMAGE_REL_SH3_SIZEOF_SECTION = 0x000D IMAGE_REL_SH3_STARTOF_SECTION = 0x000C IMAGE_REL_SH3_TOKEN = 0x0012 IMAGE_REL_SHM_PAIR = 0x0018 IMAGE_REL_SHM_PCRELPT = 0x0013 IMAGE_REL_SHM_REFHALF = 0x0015 IMAGE_REL_SHM_REFLO = 0x0014 IMAGE_REL_SHM_RELHALF = 0x0017 IMAGE_REL_SHM_RELLO = 0x0016 IMAGE_REL_SH_NOMODE = 0x8000 IMAGE_REL_THUMB_BLX23 = 0x0015 IMAGE_REL_THUMB_BRANCH20 = 0x0012 IMAGE_REL_THUMB_BRANCH24 = 0x0014 IMAGE_REL_THUMB_MOV32 = 0x0011 IMAGE_RESOURCE_DATA_IS_DIRECTORY = 0x80000000 IMAGE_RESOURCE_NAME_IS_STRING = 0x80000000 IMAGE_ROM_OPTIONAL_HDR_MAGIC = 0x107 IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000 IMAGE_SCN_ALIGN_128BYTES = 0x00800000 IMAGE_SCN_ALIGN_16BYTES = 0x00500000 IMAGE_SCN_ALIGN_1BYTES = 0x00100000 IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000 IMAGE_SCN_ALIGN_256BYTES = 0x00900000 IMAGE_SCN_ALIGN_2BYTES = 0x00200000 IMAGE_SCN_ALIGN_32BYTES = 0x00600000 IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000 IMAGE_SCN_ALIGN_4BYTES = 0x00300000 IMAGE_SCN_ALIGN_512BYTES = 0x00A00000 IMAGE_SCN_ALIGN_64BYTES = 0x00700000 IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000 IMAGE_SCN_ALIGN_8BYTES = 0x00400000 IMAGE_SCN_ALIGN_MASK = 0x00F00000 IMAGE_SCN_CNT_CODE = 0x00000020 IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040 IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080 IMAGE_SCN_GPREL = 0x00008000 IMAGE_SCN_LNK_COMDAT = 0x00001000 IMAGE_SCN_LNK_INFO = 0x00000200 IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000 IMAGE_SCN_LNK_OTHER = 0x00000100 IMAGE_SCN_LNK_REMOVE = 0x00000800 IMAGE_SCN_MEM_16BIT = 0x00020000 IMAGE_SCN_MEM_DISCARDABLE = 0x02000000 IMAGE_SCN_MEM_EXECUTE = 0x20000000 IMAGE_SCN_MEM_FARDATA = 0x00008000 IMAGE_SCN_MEM_LOCKED = 0x00040000 IMAGE_SCN_MEM_NOT_CACHED = 0x04000000 IMAGE_SCN_MEM_NOT_PAGED = 0x08000000 IMAGE_SCN_MEM_PRELOAD = 0x00080000 IMAGE_SCN_MEM_PURGEABLE = 0x00020000 IMAGE_SCN_MEM_READ = 0x40000000 IMAGE_SCN_MEM_SHARED = 0x10000000 IMAGE_SCN_MEM_WRITE = 0x80000000 IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000 IMAGE_SCN_SCALE_INDEX = 0x00000001 IMAGE_SCN_TYPE_NO_PAD = 0x00000008 IMAGE_SEPARATE_DEBUG_FLAGS_MASK = 0x8000 IMAGE_SEPARATE_DEBUG_MISMATCH = 0x8000 IMAGE_SEPARATE_DEBUG_SIGNATURE = 0x4944 IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60 IMAGE_SIZEOF_AUX_SYMBOL = 18 IMAGE_SIZEOF_BASE_RELOCATION = 8 IMAGE_SIZEOF_FILE_HEADER = 20 IMAGE_SIZEOF_LINENUMBER = 6 IMAGE_SIZEOF_NT_OPTIONAL32_HEADER = 224 IMAGE_SIZEOF_NT_OPTIONAL64_HEADER = 240 IMAGE_SIZEOF_NT_OPTIONAL_HEADER = 240 IMAGE_SIZEOF_RELOCATION = 10 IMAGE_SIZEOF_ROM_OPTIONAL_HEADER = 56 IMAGE_SIZEOF_SECTION_HEADER = 40 IMAGE_SIZEOF_SHORT_NAME = 8 IMAGE_SIZEOF_STD_OPTIONAL_HEADER = 28 IMAGE_SIZEOF_SYMBOL = 18 IMAGE_SUBSYSTEM_EFI_APPLICATION = 10 IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11 IMAGE_SUBSYSTEM_EFI_ROM = 13 IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12 IMAGE_SUBSYSTEM_NATIVE = 1 IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8 IMAGE_SUBSYSTEM_OS2_CUI = 5 IMAGE_SUBSYSTEM_POSIX_CUI = 7 IMAGE_SUBSYSTEM_UNKNOWN = 0 IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16 IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9 IMAGE_SUBSYSTEM_WINDOWS_CUI = 3 IMAGE_SUBSYSTEM_WINDOWS_GUI = 2 IMAGE_SUBSYSTEM_XBOX = 14 IMAGE_SYM_CLASS_ARGUMENT = 0x0009 IMAGE_SYM_CLASS_AUTOMATIC = 0x0001 IMAGE_SYM_CLASS_BIT_FIELD = 0x0012 IMAGE_SYM_CLASS_BLOCK = 0x0064 IMAGE_SYM_CLASS_CLR_TOKEN = 0x006B IMAGE_SYM_CLASS_END_OF_STRUCT = 0x0066 IMAGE_SYM_CLASS_ENUM_TAG = 0x000F IMAGE_SYM_CLASS_EXTERNAL = 0x0002 IMAGE_SYM_CLASS_EXTERNAL_DEF = 0x0005 IMAGE_SYM_CLASS_FAR_EXTERNAL = 0x0044 IMAGE_SYM_CLASS_FILE = 0x0067 IMAGE_SYM_CLASS_FUNCTION = 0x0065 IMAGE_SYM_CLASS_LABEL = 0x0006 IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 0x0010 IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 0x0008 IMAGE_SYM_CLASS_MEMBER_OF_UNION = 0x000B IMAGE_SYM_CLASS_NULL = 0x0000 IMAGE_SYM_CLASS_REGISTER = 0x0004 IMAGE_SYM_CLASS_REGISTER_PARAM = 0x0011 IMAGE_SYM_CLASS_SECTION = 0x0068 IMAGE_SYM_CLASS_STATIC = 0x0003 IMAGE_SYM_CLASS_STRUCT_TAG = 0x000A IMAGE_SYM_CLASS_TYPE_DEFINITION = 0x000D IMAGE_SYM_CLASS_UNDEFINED_LABEL = 0x0007 IMAGE_SYM_CLASS_UNDEFINED_STATIC = 0x000E IMAGE_SYM_CLASS_UNION_TAG = 0x000C IMAGE_SYM_CLASS_WEAK_EXTERNAL = 0x0069 IMAGE_SYM_DTYPE_ARRAY = 3 IMAGE_SYM_DTYPE_FUNCTION = 2 IMAGE_SYM_DTYPE_NULL = 0 IMAGE_SYM_DTYPE_POINTER = 1 IMAGE_SYM_SECTION_MAX = 0xFEFF IMAGE_SYM_SECTION_MAX_EX = 2147483647 IMAGE_SYM_TYPE_BYTE = 0x000C IMAGE_SYM_TYPE_CHAR = 0x0002 IMAGE_SYM_TYPE_DOUBLE = 0x0007 IMAGE_SYM_TYPE_DWORD = 0x000F IMAGE_SYM_TYPE_ENUM = 0x000A IMAGE_SYM_TYPE_FLOAT = 0x0006 IMAGE_SYM_TYPE_INT = 0x0004 IMAGE_SYM_TYPE_LONG = 0x0005 IMAGE_SYM_TYPE_MOE = 0x000B IMAGE_SYM_TYPE_NULL = 0x0000 IMAGE_SYM_TYPE_PCODE = 0x8000 IMAGE_SYM_TYPE_SHORT = 0x0003 IMAGE_SYM_TYPE_STRUCT = 0x0008 IMAGE_SYM_TYPE_UINT = 0x000E IMAGE_SYM_TYPE_UNION = 0x0009 IMAGE_SYM_TYPE_VOID = 0x0001 IMAGE_SYM_TYPE_WORD = 0x000D IMAGE_VXD_SIGNATURE = 0x454C IMAGE_WEAK_EXTERN_SEARCH_ALIAS = 3 IMAGE_WEAK_EXTERN_SEARCH_LIBRARY = 2 IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY = 1 IMC_CLOSESTATUSWINDOW = 0x0021 IMC_GETCANDIDATEPOS = 0x0007 IMC_GETCOMPOSITIONFONT = 0x0009 IMC_GETCOMPOSITIONWINDOW = 0x000B IMC_GETSTATUSWINDOWPOS = 0x000F IMC_OPENSTATUSWINDOW = 0x0022 IMC_SETCANDIDATEPOS = 0x0008 IMC_SETCOMPOSITIONFONT = 0x000A IMC_SETCOMPOSITIONWINDOW = 0x000C IMC_SETSTATUSWINDOWPOS = 0x0010 IMEMENUITEM_STRING_SIZE = 80 IMEVER_0310 = 0x0003000A IMEVER_0400 = 0x00040000 IME_CAND_CODE = 0x0002 IME_CAND_MEANING = 0x0003 IME_CAND_RADICAL = 0x0004 IME_CAND_READ = 0x0001 IME_CAND_STROKE = 0x0005 IME_CAND_UNKNOWN = 0x0000 IME_CHOTKEY_IME_NONIME_TOGGLE = 0x10 IME_CHOTKEY_SHAPE_TOGGLE = 0x11 IME_CHOTKEY_SYMBOL_TOGGLE = 0x12 IME_CMODE_ALPHANUMERIC = 0x0000 IME_CMODE_CHARCODE = 0x0020 IME_CMODE_CHINESE = 1 IME_CMODE_EUDC = 0x0200 IME_CMODE_FIXED = 0x0800 IME_CMODE_FULLSHAPE = 0x0008 IME_CMODE_HANGEUL = 1 IME_CMODE_HANGUL = 1 IME_CMODE_HANJACONVERT = 0x0040 IME_CMODE_JAPANESE = 1 IME_CMODE_KATAKANA = 0x0002 IME_CMODE_LANGUAGE = 0x0003 IME_CMODE_NATIVE = 0x0001 IME_CMODE_NOCONVERSION = 0x0100 IME_CMODE_RESERVED = 0xF0000000 IME_CMODE_ROMAN = 0x0010 IME_CMODE_SOFTKBD = 0x0080 IME_CMODE_SYMBOL = 0x0400 IME_CONFIG_GENERAL = 1 IME_CONFIG_REGISTERWORD = 2 IME_CONFIG_SELECTDICTIONARY = 3 IME_ESC_AUTOMATA = 0x1009 IME_ESC_GETHELPFILENAME = 0x100b IME_ESC_GET_EUDC_DICTIONARY = 0x1003 IME_ESC_HANJA_MODE = 0x1008 IME_ESC_IME_NAME = 0x1006 IME_ESC_MAX_KEY = 0x1005 IME_ESC_PRIVATE_FIRST = 0x0800 IME_ESC_PRIVATE_HOTKEY = 0x100a IME_ESC_PRIVATE_LAST = 0x0FFF IME_ESC_QUERY_SUPPORT = 0x0003 IME_ESC_RESERVED_FIRST = 0x0004 IME_ESC_RESERVED_LAST = 0x07FF IME_ESC_SEQUENCE_TO_INTERNAL = 0x1001 IME_ESC_SET_EUDC_DICTIONARY = 0x1004 IME_ESC_SYNC_HOTKEY = 0x1007 IME_HOTKEY_DSWITCH_FIRST = 0x100 IME_HOTKEY_DSWITCH_LAST = 0x11F IME_HOTKEY_PRIVATE_FIRST = 0x200 IME_HOTKEY_PRIVATE_LAST = 0x21F IME_ITHOTKEY_PREVIOUS_COMPOSITION = 0x201 IME_ITHOTKEY_RECONVERTSTRING = 0x203 IME_ITHOTKEY_RESEND_RESULTSTR = 0x200 IME_ITHOTKEY_UISTYLE_TOGGLE = 0x202 IME_JHOTKEY_CLOSE_OPEN = 0x30 IME_KHOTKEY_ENGLISH = 0x52 IME_KHOTKEY_HANJACONVERT = 0x51 IME_KHOTKEY_SHAPE_TOGGLE = 0x50 IME_PROP_AT_CARET = 0x00010000 IME_PROP_CANDLIST_START_FROM_1 = 0x00040000 IME_PROP_COMPLETE_ON_UNSELECT = 0x00100000 IME_PROP_SPECIAL_UI = 0x00020000 IME_PROP_UNICODE = 0x00080000 IME_REGWORD_STYLE_EUDC = 0x00000001 IME_REGWORD_STYLE_USER_FIRST = 0x80000000 IME_REGWORD_STYLE_USER_LAST = 0xFFFFFFFF IME_SMODE_AUTOMATIC = 0x0004 IME_SMODE_CONVERSATION = 0x0010 IME_SMODE_NONE = 0x0000 IME_SMODE_PHRASEPREDICT = 0x0008 IME_SMODE_PLAURALCLAUSE = 0x0001 IME_SMODE_RESERVED = 0x0000F000 IME_SMODE_SINGLECONVERT = 0x0002 IME_THOTKEY_IME_NONIME_TOGGLE = 0x70 IME_THOTKEY_SHAPE_TOGGLE = 0x71 IME_THOTKEY_SYMBOL_TOGGLE = 0x72 IMFS_CHECKED = 8 IMFS_DEFAULT = 4096 IMFS_DISABLED = 3 IMFS_ENABLED = 0 IMFS_GRAYED = 3 IMFS_HILITE = 128 IMFS_UNCHECKED = 0 IMFS_UNHILITE = 0 IMFT_RADIOCHECK = 0x00001 IMFT_SEPARATOR = 0x00002 IMFT_SUBMENU = 0x00004 IMM_ERROR_GENERAL = -2 IMM_ERROR_NODATA = -1 IMN_CHANGECANDIDATE = 0x0003 IMN_CLOSECANDIDATE = 0x0004 IMN_CLOSESTATUSWINDOW = 0x0001 IMN_GUIDELINE = 0x000D IMN_OPENCANDIDATE = 0x0005 IMN_OPENSTATUSWINDOW = 0x0002 IMN_PRIVATE = 0x000E IMN_SETCANDIDATEPOS = 0x0009 IMN_SETCOMPOSITIONFONT = 0x000A IMN_SETCOMPOSITIONWINDOW = 0x000B IMN_SETCONVERSIONMODE = 0x0006 IMN_SETOPENSTATUS = 0x0008 IMN_SETSENTENCEMODE = 0x0007 IMN_SETSTATUSWINDOWPOS = 0x000C IMPLINK_HIGHEXPER = 158 IMPLINK_IP = 155 IMPLINK_LOWEXPER = 156 IMPLTYPEFLAG_FDEFAULT = 1 IMPLTYPEFLAG_FDEFAULTVTABLE = 8 IMPLTYPEFLAG_FRESTRICTED = 4 IMPLTYPEFLAG_FSOURCE = 2 IMPORT_OBJECT_HDR_SIG2 = 0xffff IMR_CANDIDATEWINDOW = 0x0002 IMR_COMPOSITIONFONT = 0x0003 IMR_COMPOSITIONWINDOW = 0x0001 IMR_CONFIRMRECONVERTSTRING = 0x0005 IMR_DOCUMENTFEED = 0x0007 IMR_QUERYCHARPOSITION = 0x0006 IMR_RECONVERTSTRING = 0x0004 IN = 0 INADDR_LOOPBACK = 0x7f000001 INADDR_NONE = 0xffffffff INDEXID_CONTAINER = 0 INDEXID_OBJECT = 0 INFINITE = 0xffffffff INHERITED_ACE = 16 INHERIT_CALLER_PRIORITY = 0x20000 INHERIT_ONLY_ACE = 8 INHERIT_PARENT_AFFINITY = 0x10000 INITIAL_FPCSR = 0x027f INITIAL_MXCSR = 0x1f80 INIT_ONCE_ASYNC = 2 INIT_ONCE_CHECK_ONLY = 1 INIT_ONCE_CTX_RESERVED_BITS = 2 INIT_ONCE_INIT_FAILED = 4 INO_T_DEFINED = 0 INPLACE_E_FIRST = 2147746208 INPLACE_E_LAST = 2147746223 INPLACE_S_FIRST = 262560 INPLACE_S_LAST = 262575 INPUTLANGCHANGE_BACKWARD = 0x0004 INPUTLANGCHANGE_FORWARD = 0x0002 INPUTLANGCHANGE_SYSCHARSET = 0x0001 INPUT_HARDWARE = 2 INPUT_KEYBOARD = 1 INPUT_MOUSE = 0 INTERNATIONAL_USAGE = 0x1 INVALID_OS_COUNT = 65535 IN_CLASSA_HOST = 0x00ffffff IN_CLASSA_MAX = 128 IN_CLASSA_NET = 0xff000000 IN_CLASSA_NSHIFT = 24 IN_CLASSB_HOST = 0x0000ffff IN_CLASSB_MAX = 65536 IN_CLASSB_NET = 0xffff0000 IN_CLASSB_NSHIFT = 16 IN_CLASSC_HOST = 0x000000ff IN_CLASSC_NET = 0xffffff00 IN_CLASSC_NSHIFT = 8 IOCPARM_MASK = 0x7f IOCTL_CHANGER_BASE = 48 IOCTL_CHANGER_EXCHANGE_MEDIUM = 3162144 IOCTL_CHANGER_GET_ELEMENT_STATUS = 3194900 IOCTL_CHANGER_GET_PARAMETERS = 3162112 IOCTL_CHANGER_GET_PRODUCT_DATA = 3162120 IOCTL_CHANGER_GET_STATUS = 3162116 IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS = 3162136 IOCTL_CHANGER_MOVE_MEDIUM = 3162148 IOCTL_CHANGER_QUERY_VOLUME_TAGS = 3194924 IOCTL_CHANGER_REINITIALIZE_TRANSPORT = 3162152 IOCTL_CHANGER_SET_ACCESS = 3194896 IOCTL_CHANGER_SET_POSITION = 3162140 IOCTL_DISK_BASE = 7 IOCTL_DISK_CHECK_VERIFY = 477184 IOCTL_DISK_CONTROLLER_NUMBER = 458820 IOCTL_DISK_CREATE_DISK = 507992 IOCTL_DISK_DELETE_DRIVE_LAYOUT = 508160 IOCTL_DISK_EJECT_MEDIA = 477192 IOCTL_DISK_FIND_NEW_DEVICES = 477208 IOCTL_DISK_FORMAT_DRIVE = 508876 IOCTL_DISK_FORMAT_TRACKS = 507928 IOCTL_DISK_FORMAT_TRACKS_EX = 507948 IOCTL_DISK_GET_CACHE_INFORMATION = 475348 IOCTL_DISK_GET_DRIVE_GEOMETRY = 458752 IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = 458912 IOCTL_DISK_GET_DRIVE_LAYOUT = 475148 IOCTL_DISK_GET_DRIVE_LAYOUT_EX = 458832 IOCTL_DISK_GET_LENGTH_INFO = 475228 IOCTL_DISK_GET_MEDIA_TYPES = 461824 IOCTL_DISK_GET_PARTITION_INFO = 475140 IOCTL_DISK_GET_PARTITION_INFO_EX = 458824 IOCTL_DISK_GROW_PARTITION = 508112 IOCTL_DISK_HISTOGRAM_DATA = 458804 IOCTL_DISK_HISTOGRAM_RESET = 458808 IOCTL_DISK_HISTOGRAM_STRUCTURE = 458800 IOCTL_DISK_IS_WRITABLE = 458788 IOCTL_DISK_LOAD_MEDIA = 477196 IOCTL_DISK_LOGGING = 458792 IOCTL_DISK_MEDIA_REMOVAL = 477188 IOCTL_DISK_PERFORMANCE = 458784 IOCTL_DISK_PERFORMANCE_OFF = 458848 IOCTL_DISK_REASSIGN_BLOCKS = 507932 IOCTL_DISK_REASSIGN_BLOCKS_EX = 508068 IOCTL_DISK_RELEASE = 477204 IOCTL_DISK_REQUEST_DATA = 458816 IOCTL_DISK_REQUEST_STRUCTURE = 458812 IOCTL_DISK_RESERVE = 477200 IOCTL_DISK_RESET_SNAPSHOT_INFO = 508432 IOCTL_DISK_SENSE_DEVICE = 459744 IOCTL_DISK_SET_CACHE_INFORMATION = 508120 IOCTL_DISK_SET_DRIVE_LAYOUT = 507920 IOCTL_DISK_SET_DRIVE_LAYOUT_EX = 507988 IOCTL_DISK_SET_PARTITION_INFO = 507912 IOCTL_DISK_SET_PARTITION_INFO_EX = 507980 IOCTL_DISK_UPDATE_DRIVE_SIZE = 508104 IOCTL_DISK_UPDATE_PROPERTIES = 459072 IOCTL_DISK_VERIFY = 458772 IOCTL_SERENUM_EXPOSE_HARDWARE = 3604992 IOCTL_SERENUM_GET_PORT_NAME = 3605004 IOCTL_SERENUM_PORT_DESC = 3605000 IOCTL_SERENUM_REMOVE_HARDWARE = 3604996 IOCTL_SERIAL_LSRMST_INSERT = 1769596 IOCTL_SMARTCARD_CONFISCATE = 3211280 IOCTL_SMARTCARD_EJECT = 3211288 IOCTL_SMARTCARD_GET_ATTRIBUTE = 3211272 IOCTL_SMARTCARD_GET_LAST_ERROR = 3211324 IOCTL_SMARTCARD_GET_PERF_CNTR = 3211328 IOCTL_SMARTCARD_GET_STATE = 3211320 IOCTL_SMARTCARD_IS_ABSENT = 3211308 IOCTL_SMARTCARD_IS_PRESENT = 3211304 IOCTL_SMARTCARD_POWER = 3211268 IOCTL_SMARTCARD_SET_ATTRIBUTE = 3211276 IOCTL_SMARTCARD_SET_PROTOCOL = 3211312 IOCTL_SMARTCARD_SWALLOW = 3211292 IOCTL_SMARTCARD_TRANSMIT = 3211284 IOCTL_STORAGE_BASE = 45 IOCTL_STORAGE_BREAK_RESERVATION = 2969620 IOCTL_STORAGE_CHECK_VERIFY = 2967552 IOCTL_STORAGE_CHECK_VERIFY2 = 2951168 IOCTL_STORAGE_EJECTION_CONTROL = 2951488 IOCTL_STORAGE_EJECT_MEDIA = 2967560 IOCTL_STORAGE_FIND_NEW_DEVICES = 2967576 IOCTL_STORAGE_GET_DEVICE_NUMBER = 2953344 IOCTL_STORAGE_GET_HOTPLUG_INFO = 2952212 IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER = 2952208 IOCTL_STORAGE_GET_MEDIA_TYPES = 2952192 IOCTL_STORAGE_GET_MEDIA_TYPES_EX = 2952196 IOCTL_STORAGE_LOAD_MEDIA = 2967564 IOCTL_STORAGE_LOAD_MEDIA2 = 2951180 IOCTL_STORAGE_MCN_CONTROL = 2951492 IOCTL_STORAGE_MEDIA_REMOVAL = 2967556 IOCTL_STORAGE_PREDICT_FAILURE = 2953472 IOCTL_STORAGE_QUERY_PROPERTY = 2954240 IOCTL_STORAGE_READ_CAPACITY = 2969920 IOCTL_STORAGE_RELEASE = 2967572 IOCTL_STORAGE_RESERVE = 2967568 IOCTL_STORAGE_RESET_BUS = 2969600 IOCTL_STORAGE_RESET_DEVICE = 2969604 IOCTL_STORAGE_SET_HOTPLUG_INFO = 3001368 IOC_IN = 0x80000000 IOC_INOUT = 3221225472 IOC_OUT = 0x40000000 IOC_VOID = 0x20000000 IO_COMPLETION_ALL_ACCESS = 2031619 IO_COMPLETION_MODIFY_STATE = 0x0002 IO_REPARSE_TAG_CSV = 2147483657 IO_REPARSE_TAG_DEDUP = 2147483667 IO_REPARSE_TAG_DFS = 2147483658 IO_REPARSE_TAG_DFSR = 2147483666 IO_REPARSE_TAG_DRIVE_EXTENDER = 2147483653 IO_REPARSE_TAG_FILTER_MANAGER = 2147483659 IO_REPARSE_TAG_HSM = 3221225476 IO_REPARSE_TAG_HSM2 = 2147483654 IO_REPARSE_TAG_IIS_CACHE = 2684354576 IO_REPARSE_TAG_MOUNT_POINT = 2684354563 IO_REPARSE_TAG_NFS = 2147483668 IO_REPARSE_TAG_RESERVED_ONE = 1 IO_REPARSE_TAG_RESERVED_RANGE = 1 IO_REPARSE_TAG_RESERVED_ZERO = 0 IO_REPARSE_TAG_SIS = 2147483655 IO_REPARSE_TAG_SYMLINK = 2684354572 IO_REPARSE_TAG_WIM = 2147483656 IPPORT_BIFFUDP = 512 IPPORT_CMDSERVER = 514 IPPORT_DAYTIME = 13 IPPORT_DISCARD = 9 IPPORT_ECHO = 7 IPPORT_EFSSERVER = 520 IPPORT_EXECSERVER = 512 IPPORT_FINGER = 79 IPPORT_FTP = 21 IPPORT_LOGINSERVER = 513 IPPORT_MTP = 57 IPPORT_NAMESERVER = 42 IPPORT_NETSTAT = 15 IPPORT_RESERVED = 1024 IPPORT_RJE = 77 IPPORT_ROUTESERVER = 520 IPPORT_SMTP = 25 IPPORT_SUPDUP = 95 IPPORT_SYSTAT = 11 IPPORT_TELNET = 23 IPPORT_TFTP = 69 IPPORT_TIMESERVER = 37 IPPORT_TTYLINK = 87 IPPORT_WHOIS = 43 IPPORT_WHOSERVER = 513 IPPROTO_GGP = 3 IPPROTO_ICMP = 1 IPPROTO_IDP = 22 IPPROTO_IGMP = 2 IPPROTO_IP = 0 IPPROTO_MAX = 256 IPPROTO_ND = 77 IPPROTO_PUP = 12 IPPROTO_RAW = 255 IPPROTO_TCP = 6 IPPROTO_UDP = 17 IP_ADD_MEMBERSHIP = 5 IP_DEFAULT_MULTICAST_LOOP = 1 IP_DEFAULT_MULTICAST_TTL = 1 IP_DONTFRAGMENT = 9 IP_DROP_MEMBERSHIP = 6 IP_MAX_MEMBERSHIPS = 20 IP_MULTICAST_IF = 2 IP_MULTICAST_LOOP = 4 IP_MULTICAST_TTL = 3 IP_OPTIONS = 1 IP_TOS = 8 IP_TTL = 7 ISC_SHOWUIALL = 0xC000000F ISC_SHOWUIALLCANDIDATEWINDOW = 0x0000000F ISC_SHOWUICANDIDATEWINDOW = 0x00000001 ISC_SHOWUICOMPOSITIONWINDOW = 0x80000000 ISC_SHOWUIGUIDELINE = 0x40000000 ISMEX_CALLBACK = 0x00000004 ISMEX_NOSEND = 0x00000000 ISMEX_NOTIFY = 0x00000002 ISMEX_REPLIED = 0x00000008 ISMEX_SEND = 0x00000001 IS_TEXT_UNICODE_ASCII16 = 0x0001 IS_TEXT_UNICODE_CONTROLS = 0x0004 IS_TEXT_UNICODE_DBCS_LEADBYTE = 0x0400 IS_TEXT_UNICODE_ILLEGAL_CHARS = 0x0100 IS_TEXT_UNICODE_NOT_ASCII_MASK = 0xF000 IS_TEXT_UNICODE_NOT_UNICODE_MASK = 0x0F00 IS_TEXT_UNICODE_NULL_BYTES = 0x1000 IS_TEXT_UNICODE_ODD_LENGTH = 0x0200 IS_TEXT_UNICODE_REVERSE_ASCII16 = 0x0010 IS_TEXT_UNICODE_REVERSE_CONTROLS = 0x0040 IS_TEXT_UNICODE_REVERSE_MASK = 0x00F0 IS_TEXT_UNICODE_REVERSE_SIGNATURE = 0x0080 IS_TEXT_UNICODE_REVERSE_STATISTICS = 0x0020 IS_TEXT_UNICODE_SIGNATURE = 0x0008 IS_TEXT_UNICODE_STATISTICS = 0x0002 IS_TEXT_UNICODE_UNICODE_MASK = 0x000F ITALIC_FONTTYPE = 0x200 JOB_ACCESS_ADMINISTER = 0x00000010 JOB_ACCESS_READ = 0x00000020 JOB_ALL_ACCESS = 983088 JOB_CONTROL_CANCEL = 3 JOB_CONTROL_DELETE = 5 JOB_CONTROL_LAST_PAGE_EJECTED = 7 JOB_CONTROL_PAUSE = 1 JOB_CONTROL_RESTART = 4 JOB_CONTROL_RESUME = 2 JOB_CONTROL_SENT_TO_PRINTER = 6 JOB_EXECUTE = 131088 JOB_NOTIFY_FIELD_BYTES_PRINTED = 0x17 JOB_NOTIFY_FIELD_DATATYPE = 0x05 JOB_NOTIFY_FIELD_DEVMODE = 0x09 JOB_NOTIFY_FIELD_DOCUMENT = 0x0D JOB_NOTIFY_FIELD_DRIVER_NAME = 0x08 JOB_NOTIFY_FIELD_MACHINE_NAME = 0x01 JOB_NOTIFY_FIELD_NOTIFY_NAME = 0x04 JOB_NOTIFY_FIELD_PAGES_PRINTED = 0x15 JOB_NOTIFY_FIELD_PARAMETERS = 0x07 JOB_NOTIFY_FIELD_PORT_NAME = 0x02 JOB_NOTIFY_FIELD_POSITION = 0x0F JOB_NOTIFY_FIELD_PRINTER_NAME = 0x00 JOB_NOTIFY_FIELD_PRINT_PROCESSOR = 0x06 JOB_NOTIFY_FIELD_PRIORITY = 0x0E JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0C JOB_NOTIFY_FIELD_START_TIME = 0x11 JOB_NOTIFY_FIELD_STATUS = 0x0A JOB_NOTIFY_FIELD_STATUS_STRING = 0x0B JOB_NOTIFY_FIELD_SUBMITTED = 0x10 JOB_NOTIFY_FIELD_TIME = 0x13 JOB_NOTIFY_FIELD_TOTAL_BYTES = 0x16 JOB_NOTIFY_FIELD_TOTAL_PAGES = 0x14 JOB_NOTIFY_FIELD_UNTIL_TIME = 0x12 JOB_NOTIFY_FIELD_USER_NAME = 0x03 JOB_NOTIFY_TYPE = 0x01 JOB_OBJECT_ALL_ACCESS = 2031647 JOB_OBJECT_ASSIGN_PROCESS = 1 JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS = 0x000000ff JOB_OBJECT_CPU_RATE_CONTROL_ENABLE = 0x1 JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP = 0x4 JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY = 0x8 JOB_OBJECT_CPU_RATE_CONTROL_VALID_FLAGS = 0xf JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED = 0x2 JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS = 0x00007fff JOB_OBJECT_LIMIT_ACTIVE_PROCESS = 0x00000008 JOB_OBJECT_LIMIT_AFFINITY = 0x00000010 JOB_OBJECT_LIMIT_BREAKAWAY_OK = 0x00000800 JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = 0x00000400 JOB_OBJECT_LIMIT_JOB_MEMORY = 0x00000200 JOB_OBJECT_LIMIT_JOB_READ_BYTES = 0x00010000 JOB_OBJECT_LIMIT_JOB_TIME = 0x00000004 JOB_OBJECT_LIMIT_JOB_WRITE_BYTES = 0x00020000 JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000 JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME = 0x00000040 JOB_OBJECT_LIMIT_PRIORITY_CLASS = 0x00000020 JOB_OBJECT_LIMIT_PROCESS_MEMORY = 0x00000100 JOB_OBJECT_LIMIT_PROCESS_TIME = 0x00000002 JOB_OBJECT_LIMIT_RATE_CONTROL = 0x00040000 JOB_OBJECT_LIMIT_RESERVED3 = 0x00008000 JOB_OBJECT_LIMIT_RESERVED4 = 0x00010000 JOB_OBJECT_LIMIT_RESERVED5 = 0x00020000 JOB_OBJECT_LIMIT_RESERVED6 = 0x00040000 JOB_OBJECT_LIMIT_SCHEDULING_CLASS = 0x00000080 JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK = 0x00001000 JOB_OBJECT_LIMIT_SUBSET_AFFINITY = 0x00004000 JOB_OBJECT_LIMIT_VALID_FLAGS = 0x0007ffff JOB_OBJECT_LIMIT_WORKINGSET = 0x00000001 JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS = 8 JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT = 3 JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO = 4 JOB_OBJECT_MSG_END_OF_JOB_TIME = 1 JOB_OBJECT_MSG_END_OF_PROCESS_TIME = 2 JOB_OBJECT_MSG_EXIT_PROCESS = 7 JOB_OBJECT_MSG_JOB_CYCLE_TIME_LIMIT = 12 JOB_OBJECT_MSG_JOB_MEMORY_LIMIT = 10 JOB_OBJECT_MSG_MAXIMUM = 12 JOB_OBJECT_MSG_MINIMUM = 1 JOB_OBJECT_MSG_NEW_PROCESS = 6 JOB_OBJECT_MSG_NOTIFICATION_LIMIT = 11 JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT = 9 JOB_OBJECT_NOTIFICATION_LIMIT_VALID_FLAGS = 0x00070204 JOB_OBJECT_POST_AT_END_OF_JOB = 1 JOB_OBJECT_QUERY = 4 JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS = 0x0007ffff JOB_OBJECT_SECURITY_FILTER_TOKENS = 0x00000008 JOB_OBJECT_SECURITY_NO_ADMIN = 0x00000001 JOB_OBJECT_SECURITY_ONLY_TOKEN = 0x00000004 JOB_OBJECT_SECURITY_RESTRICTED_TOKEN = 0x00000002 JOB_OBJECT_SECURITY_VALID_FLAGS = 0x0000000f JOB_OBJECT_SET_ATTRIBUTES = 2 JOB_OBJECT_SET_SECURITY_ATTRIBUTES = 16 JOB_OBJECT_TERMINATE = 8 JOB_OBJECT_TERMINATE_AT_END_OF_JOB = 0 JOB_OBJECT_UILIMIT_ALL = 0x000000FF JOB_OBJECT_UILIMIT_DESKTOP = 0x00000040 JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = 0x00000010 JOB_OBJECT_UILIMIT_EXITWINDOWS = 0x00000080 JOB_OBJECT_UILIMIT_GLOBALATOMS = 0x00000020 JOB_OBJECT_UILIMIT_HANDLES = 0x00000001 JOB_OBJECT_UILIMIT_NONE = 0x00000000 JOB_OBJECT_UILIMIT_READCLIPBOARD = 0x00000002 JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = 0x00000008 JOB_OBJECT_UILIMIT_WRITECLIPBOARD = 0x00000004 JOB_OBJECT_UI_VALID_FLAGS = 0x000000FF JOB_POSITION_UNSPECIFIED = 0 JOB_READ = 131104 JOB_STATUS_BLOCKED_DEVQ = 0x00000200 JOB_STATUS_COMPLETE = 0x00001000 JOB_STATUS_DELETED = 0x00000100 JOB_STATUS_DELETING = 0x00000004 JOB_STATUS_ERROR = 0x00000002 JOB_STATUS_OFFLINE = 0x00000020 JOB_STATUS_PAPEROUT = 0x00000040 JOB_STATUS_PAUSED = 0x00000001 JOB_STATUS_PRINTED = 0x00000080 JOB_STATUS_PRINTING = 0x00000010 JOB_STATUS_RESTART = 0x00000800 JOB_STATUS_SPOOLING = 0x00000008 JOB_STATUS_USER_INTERVENTION = 0x00000400 JOB_WRITE = 131088 JOHAB_CHARSET = 130 JOYCAPS_HASPOV = 0x0010 JOYCAPS_HASR = 0x0002 JOYCAPS_HASU = 0x0004 JOYCAPS_HASV = 0x0008 JOYCAPS_HASZ = 0x0001 JOYCAPS_POV4DIR = 0x0020 JOYCAPS_POVCTS = 0x0040 JOYERR_BASE = 160 JOYERR_NOCANDO = 166 JOYERR_NOERROR = 0 JOYERR_PARMS = 165 JOYERR_UNPLUGGED = 167 JOYSTICKID1 = 0 JOYSTICKID2 = 1 JOY_BUTTON1 = 0x0001 JOY_BUTTON10 = 512 JOY_BUTTON11 = 1024 JOY_BUTTON12 = 2048 JOY_BUTTON13 = 4096 JOY_BUTTON14 = 8192 JOY_BUTTON15 = 16384 JOY_BUTTON16 = 32768 JOY_BUTTON17 = 65536 JOY_BUTTON18 = 131072 JOY_BUTTON19 = 262144 JOY_BUTTON1CHG = 0x0100 JOY_BUTTON2 = 0x0002 JOY_BUTTON20 = 524288 JOY_BUTTON21 = 1048576 JOY_BUTTON22 = 2097152 JOY_BUTTON23 = 4194304 JOY_BUTTON24 = 8388608 JOY_BUTTON25 = 16777216 JOY_BUTTON26 = 33554432 JOY_BUTTON27 = 67108864 JOY_BUTTON28 = 134217728 JOY_BUTTON29 = 268435456 JOY_BUTTON2CHG = 0x0200 JOY_BUTTON3 = 0x0004 JOY_BUTTON30 = 536870912 JOY_BUTTON31 = 1073741824 JOY_BUTTON32 = 2147483648 JOY_BUTTON3CHG = 0x0400 JOY_BUTTON4 = 0x0008 JOY_BUTTON4CHG = 0x0800 JOY_BUTTON5 = 16 JOY_BUTTON6 = 32 JOY_BUTTON7 = 64 JOY_BUTTON8 = 128 JOY_BUTTON9 = 256 JOY_CAL_READ3 = 262144 JOY_CAL_READ4 = 524288 JOY_CAL_READ5 = 4194304 JOY_CAL_READ6 = 8388608 JOY_CAL_READALWAYS = 65536 JOY_CAL_READRONLY = 33554432 JOY_CAL_READUONLY = 67108864 JOY_CAL_READVONLY = 134217728 JOY_CAL_READXONLY = 1048576 JOY_CAL_READXYONLY = 131072 JOY_CAL_READYONLY = 2097152 JOY_CAL_READZONLY = 16777216 JOY_POVBACKWARD = 18000 JOY_POVFORWARD = 0 JOY_POVLEFT = 27000 JOY_POVRIGHT = 9000 JOY_RETURNALL = 255 JOY_RETURNBUTTONS = 128 JOY_RETURNCENTERED = 1024 JOY_RETURNPOV = 64 JOY_RETURNPOVCTS = 512 JOY_RETURNR = 8 JOY_RETURNRAWDATA = 256 JOY_RETURNU = 16 JOY_RETURNV = 32 JOY_RETURNX = 1 JOY_RETURNY = 2 JOY_RETURNZ = 4 JOY_USEDEADZONE = 2048 KDF_ALGORITHMID = 0x8 KDF_CONTEXT = 0xe KDF_GENERIC_PARAMETER = 0x11 KDF_HASH_ALGORITHM = 0x0 KDF_HMAC_KEY = 0x3 KDF_ITERATION_COUNT = 0x10 KDF_KEYBITLENGTH = 0x12 KDF_LABEL = 0xd KDF_PARTYUINFO = 0x9 KDF_PARTYVINFO = 0xa KDF_SALT = 0xf KDF_SECRET_APPEND = 0x2 KDF_SECRET_HANDLE = 0x6 KDF_SECRET_PREPEND = 0x1 KDF_SUPPPRIVINFO = 0xc KDF_SUPPPUBINFO = 0xb KDF_TLS_PRF_LABEL = 0x4 KDF_TLS_PRF_PROTOCOL = 0x7 KDF_TLS_PRF_SEED = 0x5 KDF_USE_SECRET_AS_HMAC_KEY_FLAG = 1 KEYBOARD_OVERRUN_MAKE_CODE = 0xFF KEYEVENTF_EXTENDEDKEY = 0x0001 KEYEVENTF_KEYUP = 0x0002 KEYEVENTF_SCANCODE = 0x0008 KEYEVENTF_UNICODE = 0x0004 KEYSTATEBLOB = 0xc KEY_ALL_ACCESS = 983103 KEY_CREATE_LINK = 32 KEY_CREATE_SUB_KEY = 4 KEY_ENUMERATE_SUB_KEYS = 8 KEY_EVENT = 0x1 KEY_EXECUTE = 131097 KEY_LENGTH_MASK = 0xffff0000 KEY_NOTIFY = 16 KEY_QUERY_VALUE = 1 KEY_READ = 131097 KEY_SET_VALUE = 2 KEY_WOW64_32KEY = 512 KEY_WOW64_64KEY = 256 KEY_WOW64_RES = 768 KEY_WRITE = 131078 KF_ALTDOWN = 0x2000 KF_DLGMODE = 0x0800 KF_EXTENDED = 0x0100 KF_MENUMODE = 0x1000 KF_REPEAT = 0x4000 KF_UP = 0x8000 KLF_ACTIVATE = 0x00000001 KLF_NOTELLSHELL = 0x00000080 KLF_REORDER = 0x00000008 KLF_REPLACELANG = 0x00000010 KLF_RESET = 0x40000000 KLF_SETFORPROCESS = 0x00000100 KLF_SHIFTLOCK = 0x00010000 KLF_SUBSTITUTE_OK = 0x00000002 KL_NAMELENGTH = 9 KP_ADMIN_PIN = 31 KP_ALGID = 7 KP_BLOCKLEN = 8 KP_CERTIFICATE = 26 KP_CLEAR_KEY = 27 KP_CLIENT_RANDOM = 21 KP_CMS_DH_KEY_INFO = 38 KP_CMS_KEY_INFO = 37 KP_EFFECTIVE_KEYLEN = 19 KP_G = 12 KP_GET_USE_COUNT = 42 KP_HIGHEST_VERSION = 41 KP_INFO = 18 KP_IV = 1 KP_KEYEXCHANGE_PIN = 32 KP_KEYLEN = 9 KP_KEYVAL = 30 KP_MODE = 4 KP_MODE_BITS = 5 KP_OAEP_PARAMS = 36 KP_P = 11 KP_PADDING = 3 KP_PERMISSIONS = 6 KP_PIN_ID = 43 KP_PIN_INFO = 44 KP_PRECOMP_MD5 = 24 KP_PRECOMP_SHA = 25 KP_PREHASH = 34 KP_PUB_EX_LEN = 28 KP_PUB_EX_VAL = 29 KP_PUB_PARAMS = 39 KP_Q = 13 KP_RA = 16 KP_RB = 17 KP_ROUNDS = 35 KP_RP = 23 KP_SALT = 2 KP_SALT_EX = 10 KP_SCHANNEL_ALG = 20 KP_SERVER_RANDOM = 22 KP_SIGNATURE_PIN = 33 KP_VERIFY_PARAMS = 40 KP_X = 14 KP_Y = 15 KTM_MARSHAL_BLOB_VERSION_MAJOR = 1 KTM_MARSHAL_BLOB_VERSION_MINOR = 1 LABEL_SECURITY_INFORMATION = 16 LANG_AFRIKAANS = 0x36 LANG_ALBANIAN = 0x1c LANG_ALSATIAN = 0x84 LANG_AMHARIC = 0x5e LANG_ARABIC = 0x01 LANG_ARMENIAN = 0x2b LANG_ASSAMESE = 0x4d LANG_AZERBAIJANI = 0x2c LANG_AZERI = 0x2c LANG_BANGLA = 0x45 LANG_BASHKIR = 0x6d LANG_BASQUE = 0x2d LANG_BELARUSIAN = 0x23 LANG_BENGALI = 0x45 LANG_BOSNIAN = 0x1a LANG_BOSNIAN_NEUTRAL = 0x781a LANG_BRETON = 0x7e LANG_BULGARIAN = 0x02 LANG_CATALAN = 0x03 LANG_CENTRAL_KURDISH = 0x92 LANG_CHEROKEE = 0x5c LANG_CHINESE = 0x04 LANG_CHINESE_SIMPLIFIED = 0x04 LANG_CHINESE_TRADITIONAL = 0x7c04 LANG_CORSICAN = 0x83 LANG_CROATIAN = 0x1a LANG_CZECH = 0x05 LANG_DANISH = 0x06 LANG_DARI = 0x8c LANG_DIVEHI = 0x65 LANG_DUTCH = 0x13 LANG_ENGLISH = 0x09 LANG_ESTONIAN = 0x25 LANG_FAEROESE = 0x38 LANG_FARSI = 0x29 LANG_FILIPINO = 0x64 LANG_FINNISH = 0x0b LANG_FRENCH = 0x0c LANG_FRISIAN = 0x62 LANG_FULAH = 0x67 LANG_GALICIAN = 0x56 LANG_GEORGIAN = 0x37 LANG_GERMAN = 0x07 LANG_GREEK = 0x08 LANG_GREENLANDIC = 0x6f LANG_GUJARATI = 0x47 LANG_HAUSA = 0x68 LANG_HEBREW = 0x0d LANG_HINDI = 0x39 LANG_HUNGARIAN = 0x0e LANG_ICELANDIC = 0x0f LANG_IGBO = 0x70 LANG_INDONESIAN = 0x21 LANG_INUKTITUT = 0x5d LANG_INVARIANT = 0x7f LANG_IRISH = 0x3c LANG_ITALIAN = 0x10 LANG_JAPANESE = 0x11 LANG_KANNADA = 0x4b LANG_KASHMIRI = 0x60 LANG_KAZAK = 0x3f LANG_KHMER = 0x53 LANG_KICHE = 0x86 LANG_KINYARWANDA = 0x87 LANG_KONKANI = 0x57 LANG_KOREAN = 0x12 LANG_KYRGYZ = 0x40 LANG_LAO = 0x54 LANG_LATVIAN = 0x26 LANG_LITHUANIAN = 0x27 LANG_LOWER_SORBIAN = 0x2e LANG_LUXEMBOURGISH = 0x6e LANG_MACEDONIAN = 0x2f LANG_MALAY = 0x3e LANG_MALAYALAM = 0x4c LANG_MALTESE = 0x3a LANG_MANIPURI = 0x58 LANG_MAORI = 0x81 LANG_MAPUDUNGUN = 0x7a LANG_MARATHI = 0x4e LANG_MOHAWK = 0x7c LANG_MONGOLIAN = 0x50 LANG_NEPALI = 0x61 LANG_NEUTRAL = 0x00 LANG_NORWEGIAN = 0x14 LANG_OCCITAN = 0x82 LANG_ODIA = 0x48 LANG_ORIYA = 0x48 LANG_PASHTO = 0x63 LANG_PERSIAN = 0x29 LANG_POLISH = 0x15 LANG_PORTUGUESE = 0x16 LANG_PULAR = 0x67 LANG_PUNJABI = 0x46 LANG_QUECHUA = 0x6b LANG_ROMANIAN = 0x18 LANG_ROMANSH = 0x17 LANG_RUSSIAN = 0x19 LANG_SAKHA = 0x85 LANG_SAMI = 0x3b LANG_SANSKRIT = 0x4f LANG_SCOTTISH_GAELIC = 0x91 LANG_SERBIAN = 0x1a LANG_SERBIAN_NEUTRAL = 0x7c1a LANG_SINDHI = 0x59 LANG_SINHALESE = 0x5b LANG_SLOVAK = 0x1b LANG_SLOVENIAN = 0x24 LANG_SOTHO = 0x6c LANG_SPANISH = 0x0a LANG_SWAHILI = 0x41 LANG_SWEDISH = 0x1d LANG_SYRIAC = 0x5a LANG_TAJIK = 0x28 LANG_TAMAZIGHT = 0x5f LANG_TAMIL = 0x49 LANG_TATAR = 0x44 LANG_TELUGU = 0x4a LANG_THAI = 0x1e LANG_TIBETAN = 0x51 LANG_TIGRIGNA = 0x73 LANG_TIGRINYA = 0x73 LANG_TSWANA = 0x32 LANG_TURKISH = 0x1f LANG_TURKMEN = 0x42 LANG_UIGHUR = 0x80 LANG_UKRAINIAN = 0x22 LANG_UPPER_SORBIAN = 0x2e LANG_URDU = 0x20 LANG_UZBEK = 0x43 LANG_VALENCIAN = 0x03 LANG_VIETNAMESE = 0x2a LANG_WELSH = 0x52 LANG_WOLOF = 0x88 LANG_XHOSA = 0x34 LANG_YAKUT = 0x85 LANG_YI = 0x78 LANG_YORUBA = 0x6a LANG_ZULU = 0x35 LAYOUT_BITMAPORIENTATIONPRESERVED = 0x00000008 LAYOUT_BTT = 0x00000002 LAYOUT_ORIENTATIONMASK = 7 LAYOUT_RTL = 0x00000001 LAYOUT_VBH = 0x00000004 LBN_DBLCLK = 2 LBN_ERRSPACE = -2 LBN_KILLFOCUS = 5 LBN_SELCANCEL = 3 LBN_SELCHANGE = 1 LBN_SETFOCUS = 4 LBSELCHSTRINGA = "commdlg_LBSelChangedNotify" LBS_COMBOBOX = 32768 LBS_DISABLENOSCROLL = 4096 LBS_EXTENDEDSEL = 2048 LBS_HASSTRINGS = 64 LBS_MULTICOLUMN = 512 LBS_MULTIPLESEL = 8 LBS_NODATA = 8192 LBS_NOINTEGRALHEIGHT = 256 LBS_NOREDRAW = 4 LBS_NOSEL = 16384 LBS_NOTIFY = 1 LBS_OWNERDRAWFIXED = 16 LBS_OWNERDRAWVARIABLE = 32 LBS_SORT = 2 LBS_STANDARD = 10485763 LBS_USETABSTOPS = 128 LBS_WANTKEYBOARDINPUT = 1024 LB_ADDFILE = 0x0196 LB_ADDSTRING = 0x0180 LB_CTLCODE = 0 LB_DELETESTRING = 0x0182 LB_DIR = 0x018D LB_ERR = -1 LB_ERRSPACE = -2 LB_FINDSTRING = 0x018F LB_FINDSTRINGEXACT = 0x01A2 LB_GETANCHORINDEX = 0x019D LB_GETCARETINDEX = 0x019F LB_GETCOUNT = 0x018B LB_GETCURSEL = 0x0188 LB_GETHORIZONTALEXTENT = 0x0193 LB_GETITEMDATA = 0x0199 LB_GETITEMHEIGHT = 0x01A1 LB_GETITEMRECT = 0x0198 LB_GETLISTBOXINFO = 0x01B2 LB_GETLOCALE = 0x01A6 LB_GETSEL = 0x0187 LB_GETSELCOUNT = 0x0190 LB_GETSELITEMS = 0x0191 LB_GETTEXT = 0x0189 LB_GETTEXTLEN = 0x018A LB_GETTOPINDEX = 0x018E LB_INITSTORAGE = 0x01A8 LB_INSERTSTRING = 0x0181 LB_ITEMFROMPOINT = 0x01A9 LB_MSGMAX = 0x01B3 LB_OKAY = 0 LB_RESETCONTENT = 0x0184 LB_SELECTSTRING = 0x018C LB_SELITEMRANGE = 0x019B LB_SELITEMRANGEEX = 0x0183 LB_SETANCHORINDEX = 0x019C LB_SETCARETINDEX = 0x019E LB_SETCOLUMNWIDTH = 0x0195 LB_SETCOUNT = 0x01A7 LB_SETCURSEL = 0x0186 LB_SETHORIZONTALEXTENT = 0x0194 LB_SETITEMDATA = 0x019A LB_SETITEMHEIGHT = 0x01A0 LB_SETLOCALE = 0x01A5 LB_SETSEL = 0x0185 LB_SETTABSTOPS = 0x0192 LB_SETTOPINDEX = 0x0197 LCID_ALTERNATE_SORTS = 0x00000004 LCID_INSTALLED = 0x00000001 LCID_SUPPORTED = 0x00000002 LCMAP_BYTEREV = 0x00000800 LCMAP_FULLWIDTH = 0x00800000 LCMAP_HALFWIDTH = 0x00400000 LCMAP_HIRAGANA = 0x00100000 LCMAP_KATAKANA = 0x00200000 LCMAP_LINGUISTIC_CASING = 0x01000000 LCMAP_LOWERCASE = 0x00000100 LCMAP_SIMPLIFIED_CHINESE = 0x02000000 LCMAP_SORTKEY = 0x00000400 LCMAP_TRADITIONAL_CHINESE = 0x04000000 LCMAP_UPPERCASE = 0x00000200 LCS_CALIBRATED_RGB = 0 LCS_GM_ABS_COLORIMETRIC = 8 LCS_GM_BUSINESS = 1 LCS_GM_GRAPHICS = 2 LCS_GM_IMAGES = 4 LCS_SIGNATURE = 80 LCS_WINDOWS_COLOR_SPACE = 87 LCS_sRGB = 115 LC_INTERIORS = 128 LC_MARKER = 4 LC_NONE = 0 LC_POLYLINE = 2 LC_POLYMARKER = 8 LC_STYLED = 32 LC_WIDE = 16 LC_WIDESTYLED = 64 LEFT_ALT_PRESSED = 0x2 LEFT_CTRL_PRESSED = 0x8 LF_FACESIZE = 32 LF_FULLFACESIZE = 64 LGRPID_ARABIC = 0x000d LGRPID_ARMENIAN = 0x0011 LGRPID_BALTIC = 0x0003 LGRPID_CENTRAL_EUROPE = 0x0002 LGRPID_CYRILLIC = 0x0005 LGRPID_GEORGIAN = 0x0010 LGRPID_GREEK = 0x0004 LGRPID_HEBREW = 0x000c LGRPID_INDIC = 0x000f LGRPID_INSTALLED = 0x00000001 LGRPID_JAPANESE = 0x0007 LGRPID_KOREAN = 0x0008 LGRPID_SIMPLIFIED_CHINESE = 0x000a LGRPID_SUPPORTED = 0x00000002 LGRPID_THAI = 0x000b LGRPID_TRADITIONAL_CHINESE = 0x0009 LGRPID_TURKIC = 0x0006 LGRPID_TURKISH = 0x0006 LGRPID_VIETNAMESE = 0x000e LGRPID_WESTERN_EUROPE = 0x0001 LHND = 66 LINECAPS = 30 LINGUISTIC_IGNORECASE = 0x00000010 LINGUISTIC_IGNOREDIACRITIC = 0x00000020 LISTEN_OUTSTANDING = 0x01 LLKHF_ALTDOWN = 32 LLKHF_EXTENDED = 1 LLKHF_INJECTED = 0x00000010 LLKHF_UP = 128 LLMHF_INJECTED = 0x00000001 LMEM_DISCARDABLE = 0xf00 LMEM_DISCARDED = 0x4000 LMEM_FIXED = 0x0 LMEM_INVALID_HANDLE = 0x8000 LMEM_LOCKCOUNT = 0xff LMEM_MODIFY = 0x80 LMEM_MOVEABLE = 0x2 LMEM_NOCOMPACT = 0x10 LMEM_NODISCARD = 0x20 LMEM_VALID_FLAGS = 0xf72 LMEM_ZEROINIT = 0x40 LOAD_DLL_DEBUG_EVENT = 6 LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10 LOAD_LIBRARY_AS_DATAFILE = 0x2 LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40 LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20 LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80 LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200 LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000 LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100 LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800 LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400 LOAD_TLB_AS_32BIT = 0x20 LOAD_TLB_AS_64BIT = 0x40 LOAD_WITH_ALTERED_SEARCH_PATH = 0x8 LOCALE_FONTSIGNATURE = 0x00000058 LOCALE_ICALENDARTYPE = 0x00001009 LOCALE_ICENTURY = 0x00000024 LOCALE_ICOUNTRY = 0x00000005 LOCALE_ICURRDIGITS = 0x00000019 LOCALE_ICURRENCY = 0x0000001b LOCALE_IDATE = 0x00000021 LOCALE_IDAYLZERO = 0x00000026 LOCALE_IDEFAULTANSICODEPAGE = 0x00001004 LOCALE_IDEFAULTCODEPAGE = 0x0000000b LOCALE_IDEFAULTCOUNTRY = 0x0000000a LOCALE_IDEFAULTEBCDICCODEPAGE = 0x00001012 LOCALE_IDEFAULTLANGUAGE = 0x00000009 LOCALE_IDEFAULTMACCODEPAGE = 0x00001011 LOCALE_IDIGITS = 0x00000011 LOCALE_IDIGITSUBSTITUTION = 0x00001014 LOCALE_IFIRSTDAYOFWEEK = 0x0000100c LOCALE_IFIRSTWEEKOFYEAR = 0x0000100d LOCALE_IGEOID = 0x0000005b LOCALE_IINTLCURRDIGITS = 0x0000001a LOCALE_ILANGUAGE = 0x00000001 LOCALE_ILDATE = 0x00000022 LOCALE_ILZERO = 0x00000012 LOCALE_IMEASURE = 0x0000000d LOCALE_IMONLZERO = 0x00000027 LOCALE_INEGCURR = 0x0000001c LOCALE_INEGNUMBER = 0x00001010 LOCALE_INEGSEPBYSPACE = 0x00000057 LOCALE_INEGSIGNPOSN = 0x00000053 LOCALE_INEGSYMPRECEDES = 0x00000056 LOCALE_IOPTIONALCALENDAR = 0x0000100b LOCALE_IPAPERSIZE = 0x0000100a LOCALE_IPOSSEPBYSPACE = 0x00000055 LOCALE_IPOSSIGNPOSN = 0x00000052 LOCALE_IPOSSYMPRECEDES = 0x00000054 LOCALE_ITIME = 0x00000023 LOCALE_ITIMEMARKPOSN = 0x00001005 LOCALE_ITLZERO = 0x00000025 LOCALE_NAME_MAX_LENGTH = 85 LOCALE_NOUSEROVERRIDE = 0x80000000 LOCALE_RETURN_NUMBER = 0x20000000 LOCALE_S1159 = 0x00000028 LOCALE_S2359 = 0x00000029 LOCALE_SABBREVCTRYNAME = 0x00000007 LOCALE_SABBREVDAYNAME1 = 0x00000031 LOCALE_SABBREVDAYNAME2 = 0x00000032 LOCALE_SABBREVDAYNAME3 = 0x00000033 LOCALE_SABBREVDAYNAME4 = 0x00000034 LOCALE_SABBREVDAYNAME5 = 0x00000035 LOCALE_SABBREVDAYNAME6 = 0x00000036 LOCALE_SABBREVDAYNAME7 = 0x00000037 LOCALE_SABBREVLANGNAME = 0x00000003 LOCALE_SABBREVMONTHNAME1 = 0x00000044 LOCALE_SABBREVMONTHNAME10 = 0x0000004d LOCALE_SABBREVMONTHNAME11 = 0x0000004e LOCALE_SABBREVMONTHNAME12 = 0x0000004f LOCALE_SABBREVMONTHNAME13 = 0x0000100f LOCALE_SABBREVMONTHNAME2 = 0x00000045 LOCALE_SABBREVMONTHNAME3 = 0x00000046 LOCALE_SABBREVMONTHNAME4 = 0x00000047 LOCALE_SABBREVMONTHNAME5 = 0x00000048 LOCALE_SABBREVMONTHNAME6 = 0x00000049 LOCALE_SABBREVMONTHNAME7 = 0x0000004a LOCALE_SABBREVMONTHNAME8 = 0x0000004b LOCALE_SABBREVMONTHNAME9 = 0x0000004c LOCALE_SCOUNTRY = 0x00000006 LOCALE_SCURRENCY = 0x00000014 LOCALE_SDATE = 0x0000001d LOCALE_SDAYNAME1 = 0x0000002a LOCALE_SDAYNAME2 = 0x0000002b LOCALE_SDAYNAME3 = 0x0000002c LOCALE_SDAYNAME4 = 0x0000002d LOCALE_SDAYNAME5 = 0x0000002e LOCALE_SDAYNAME6 = 0x0000002f LOCALE_SDAYNAME7 = 0x00000030 LOCALE_SDECIMAL = 0x0000000e LOCALE_SENGCOUNTRY = 0x00001002 LOCALE_SENGCURRNAME = 0x00001007 LOCALE_SENGLANGUAGE = 0x00001001 LOCALE_SENGLISHCOUNTRYNAME = 0x00001002 LOCALE_SENGLISHLANGUAGENAME = 0x00001001 LOCALE_SGROUPING = 0x00000010 LOCALE_SINTLSYMBOL = 0x00000015 LOCALE_SISO3166CTRYNAME = 0x0000005a LOCALE_SISO639LANGNAME = 0x00000059 LOCALE_SLANGUAGE = 0x00000002 LOCALE_SLIST = 0x0000000c LOCALE_SLOCALIZEDCOUNTRYNAME = 0x00000006 LOCALE_SLOCALIZEDDISPLAYNAME = 0x00000002 LOCALE_SLONGDATE = 0x00000020 LOCALE_SMONDECIMALSEP = 0x00000016 LOCALE_SMONGROUPING = 0x00000018 LOCALE_SMONTHNAME1 = 0x00000038 LOCALE_SMONTHNAME10 = 0x00000041 LOCALE_SMONTHNAME11 = 0x00000042 LOCALE_SMONTHNAME12 = 0x00000043 LOCALE_SMONTHNAME13 = 0x0000100e LOCALE_SMONTHNAME2 = 0x00000039 LOCALE_SMONTHNAME3 = 0x0000003a LOCALE_SMONTHNAME4 = 0x0000003b LOCALE_SMONTHNAME5 = 0x0000003c LOCALE_SMONTHNAME6 = 0x0000003d LOCALE_SMONTHNAME7 = 0x0000003e LOCALE_SMONTHNAME8 = 0x0000003f LOCALE_SMONTHNAME9 = 0x00000040 LOCALE_SMONTHOUSANDSEP = 0x00000017 LOCALE_SNATIVECOUNTRYNAME = 0x00000008 LOCALE_SNATIVECTRYNAME = 0x00000008 LOCALE_SNATIVECURRNAME = 0x00001008 LOCALE_SNATIVEDIGITS = 0x00000013 LOCALE_SNATIVELANGNAME = 0x00000004 LOCALE_SNATIVELANGUAGENAME = 0x00000004 LOCALE_SNEGATIVESIGN = 0x00000051 LOCALE_SPOSITIVESIGN = 0x00000050 LOCALE_SSHORTDATE = 0x0000001f LOCALE_SSORTNAME = 0x00001013 LOCALE_STHOUSAND = 0x0000000f LOCALE_STIME = 0x0000001e LOCALE_STIMEFORMAT = 0x00001003 LOCALE_SYEARMONTH = 0x00001006 LOCALE_USE_CP_ACP = 0x40000000 LOCALE_USE_NLS = 0x10000000 LOCKFILE_EXCLUSIVE_LOCK = 0x2 LOCKFILE_FAIL_IMMEDIATELY = 0x1 LOCK_ELEMENT = 0 LOCK_UNLOCK_DOOR = 0x02 LOCK_UNLOCK_IEPORT = 0x01 LOCK_UNLOCK_KEYPAD = 0x04 LOGON32_LOGON_BATCH = 4 LOGON32_LOGON_INTERACTIVE = 2 LOGON32_LOGON_NETWORK = 3 LOGON32_LOGON_NETWORK_CLEARTEXT = 8 LOGON32_LOGON_NEW_CREDENTIALS = 9 LOGON32_LOGON_SERVICE = 5 LOGON32_LOGON_UNLOCK = 7 LOGON32_PROVIDER_DEFAULT = 0 LOGON32_PROVIDER_WINNT35 = 1 LOGON32_PROVIDER_WINNT40 = 2 LOGON32_PROVIDER_WINNT50 = 3 LOGON_NETCREDENTIALS_ONLY = 0x00000002 LOGON_WITH_PROFILE = 0x00000001 LOGON_ZERO_PASSWORD_BUFFER = 0x80000000 LOGPIXELSX = 88 LOGPIXELSY = 90 LOW_SURROGATE_END = 0xdfff LOW_SURROGATE_START = 0xdc00 LPD_DOUBLEBUFFER = 0x00000001 LPD_SHARE_ACCUM = 0x00000100 LPD_SHARE_DEPTH = 0x00000040 LPD_SHARE_STENCIL = 0x00000080 LPD_STEREO = 0x00000002 LPD_SUPPORT_GDI = 0x00000010 LPD_SUPPORT_OPENGL = 0x00000020 LPD_SWAP_COPY = 0x00000400 LPD_SWAP_EXCHANGE = 0x00000200 LPD_TRANSPARENT = 0x00001000 LPD_TYPE_COLORINDEX = 1 LPD_TYPE_RGBA = 0 LPTR = 64 LPTx = 0x80 LR_COLOR = 0x0002 LR_COPYDELETEORG = 0x0008 LR_COPYFROMRESOURCE = 0x4000 LR_COPYRETURNORG = 0x0004 LR_CREATEDIBSECTION = 0x2000 LR_DEFAULTCOLOR = 0x0000 LR_DEFAULTSIZE = 0x0040 LR_LOADFROMFILE = 0x0010 LR_LOADMAP3DCOLORS = 0x1000 LR_LOADTRANSPARENT = 0x0020 LR_MONOCHROME = 0x0001 LR_SHARED = 0x8000 LR_VGACOLOR = 0x0080 LSFW_LOCK = 1 LSFW_UNLOCK = 2 LTGRAY_BRUSH = 1 LTP_PC_SMT = 0x1 LUA_TOKEN = 0x4 LWA_ALPHA = 0x00000002 LWA_COLORKEY = 0x00000001 LZERROR_BADINHANDLE = -1 LZERROR_BADOUTHANDLE = -2 LZERROR_BADVALUE = -7 LZERROR_GLOBALLOC = -5 LZERROR_GLOBLOCK = -6 LZERROR_READ = -3 LZERROR_UNKNOWNALG = -8 LZERROR_WRITE = -4 MAC_CHARSET = 77 MAPVK_VK_TO_CHAR = 2 MAPVK_VK_TO_VSC = 0 MAPVK_VSC_TO_VK = 1 MAPVK_VSC_TO_VK_EX = 3 MAP_COMPOSITE = 0x00000040 MAP_EXPAND_LIGATURES = 0x00002000 MAP_FOLDCZONE = 0x00000010 MAP_FOLDDIGITS = 0x00000080 MAP_PRECOMPOSED = 0x00000020 MARKPARITY = 3 MARK_HANDLE_NOT_REALTIME = 64 MARK_HANDLE_NOT_TXF_SYSTEM_LOG = 8 MARK_HANDLE_PROTECT_CLUSTERS = 1 MARK_HANDLE_REALTIME = 32 MARK_HANDLE_TXF_SYSTEM_LOG = 4 MARSHALINTERFACE_MIN = 500 MARSHAL_E_FIRST = 2147746080 MARSHAL_E_LAST = 2147746095 MARSHAL_S_FIRST = 262432 MARSHAL_S_LAST = 262447 MASK_TO_RESET_TLB_BITS = -97 MAXBYTE = 0xff MAXCHAR = 0x7f MAXDWORD = 0xffffffff MAXERRORLENGTH = 256 MAXGETHOSTSTRUCT = 1024 MAXIMUM_ALLOWED = 33554432 MAXIMUM_ATTR_STRING_LENGTH = 32 MAXIMUM_ENCRYPTION_VALUE = 0x00000004 MAXIMUM_PROCESSORS = 64 MAXIMUM_PROC_PER_GROUP = 64 MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16384 MAXIMUM_SMARTCARD_READERS = 10 MAXIMUM_SUSPEND_COUNT = 127 MAXIMUM_WAIT_OBJECTS = 64 MAXIMUM_XSTATE_FEATURES = 64 MAXINTATOM = 0xc000 MAXLOGICALLOGNAMESIZE = 256 MAXLONG = 0x7fffffff MAXLONGLONG = 9223372036854775807 MAXPNAMELEN = 32 MAXPROPPAGES = 100 MAXSHORT = 0x7fff MAXSTRETCHBLTMODE = 4 MAXUIDLEN = 64 MAXWORD = 0xffff MAX_ACL_REVISION = 4 MAX_COMPUTERNAME_LENGTH = 15 MAX_DEFAULTCHAR = 2 MAX_HW_COUNTERS = 16 MAX_JOYSTICKOEMVXDNAME = 260 MAX_LANA = 254 MAX_LEADBYTES = 12 MAX_MONITORS = 4 MAX_NUM_REASONS = 256 MAX_PATH = 260 MAX_PERF_OBJECTS_IN_QUERY_FUNCTION = 64 MAX_PRIORITY = 99 MAX_PROFILE_LEN = 80 MAX_REASON_BUGID_LEN = 32 MAX_REASON_COMMENT_LEN = 512 MAX_REASON_DESC_LEN = 256 MAX_REASON_NAME_LEN = 64 MAX_RESOURCEMANAGER_DESCRIPTION_LENGTH = 64 MAX_SHUTDOWN_TIMEOUT = 315360000 MAX_SID_SIZE = 256 MAX_SIZE_SECURITY_ID = 512 MAX_STR_BLOCKREASON = 256 MAX_SUPPORTED_OS_NUM = 4 MAX_TRANSACTION_DESCRIPTION_LENGTH = 64 MAX_VOLUME_ID_SIZE = 36 MAX_VOLUME_TEMPLATE_SIZE = 40 MA_ACTIVATE = 1 MA_ACTIVATEANDEAT = 2 MA_NOACTIVATE = 3 MA_NOACTIVATEANDEAT = 4 MB_ABORTRETRYIGNORE = 2 MB_APPLMODAL = 0 MB_CANCELTRYCONTINUE = 6 MB_COMPOSITE = 0x00000002 MB_DEFAULT_DESKTOP_ONLY = 131072 MB_DEFBUTTON1 = 0 MB_DEFBUTTON2 = 256 MB_DEFBUTTON3 = 512 MB_DEFBUTTON4 = 768 MB_DEFMASK = 3840 MB_ERR_INVALID_CHARS = 0x00000008 MB_HELP = 16384 MB_ICONASTERISK = 64 MB_ICONERROR = 16 MB_ICONEXCLAMATION = 48 MB_ICONHAND = 16 MB_ICONINFORMATION = 64 MB_ICONMASK = 240 MB_ICONQUESTION = 32 MB_ICONSTOP = 16 MB_ICONWARNING = 48 MB_MISCMASK = 49152 MB_MODEMASK = 12288 MB_NOFOCUS = 32768 MB_OK = 0 MB_OKCANCEL = 1 MB_PRECOMPOSED = 0x00000001 MB_RETRYCANCEL = 5 MB_RIGHT = 524288 MB_RTLREADING = 1048576 MB_SERVICE_NOTIFICATION = 2097152 MB_SERVICE_NOTIFICATION_NT3X = 262144 MB_SETFOREGROUND = 65536 MB_SYSTEMMODAL = 4096 MB_TASKMODAL = 8192 MB_TOPMOST = 262144 MB_TYPEMASK = 15 MB_USEGLYPHCHARS = 0x00000004 MB_USERICON = 128 MB_YESNO = 4 MB_YESNOCANCEL = 3 MCIERR_BAD_CONSTANT = 290 MCIERR_BAD_INTEGER = 270 MCIERR_BAD_TIME_FORMAT = 293 MCIERR_BASE = 256 MCIERR_CANNOT_LOAD_DRIVER = 266 MCIERR_CANNOT_USE_ALL = 279 MCIERR_CREATEWINDOW = 347 MCIERR_CUSTOM_DRIVER_BASE = 512 MCIERR_DEVICE_LENGTH = 310 MCIERR_DEVICE_LOCKED = 288 MCIERR_DEVICE_NOT_INSTALLED = 306 MCIERR_DEVICE_NOT_READY = 276 MCIERR_DEVICE_OPEN = 265 MCIERR_DEVICE_ORD_LENGTH = 311 MCIERR_DEVICE_TYPE_REQUIRED = 287 MCIERR_DRIVER = 278 MCIERR_DRIVER_INTERNAL = 272 MCIERR_DUPLICATE_ALIAS = 289 MCIERR_DUPLICATE_FLAGS = 295 MCIERR_EXTENSION_NOT_FOUND = 281 MCIERR_EXTRA_CHARACTERS = 305 MCIERR_FILENAME_REQUIRED = 304 MCIERR_FILE_NOT_FOUND = 275 MCIERR_FILE_NOT_SAVED = 286 MCIERR_FILE_READ = 348 MCIERR_FILE_WRITE = 349 MCIERR_FLAGS_NOT_COMPATIBLE = 284 MCIERR_GET_CD = 307 MCIERR_HARDWARE = 262 MCIERR_ILLEGAL_FOR_AUTO_OPEN = 303 MCIERR_INTERNAL = 277 MCIERR_INVALID_DEVICE_ID = 257 MCIERR_INVALID_DEVICE_NAME = 263 MCIERR_INVALID_FILE = 296 MCIERR_MISSING_COMMAND_STRING = 267 MCIERR_MISSING_DEVICE_NAME = 292 MCIERR_MISSING_PARAMETER = 273 MCIERR_MISSING_STRING_ARGUMENT = 269 MCIERR_MULTIPLE = 280 MCIERR_MUST_USE_SHAREABLE = 291 MCIERR_NEW_REQUIRES_ALIAS = 299 MCIERR_NONAPPLICABLE_FUNCTION = 302 MCIERR_NOTIFY_ON_AUTO_OPEN = 300 MCIERR_NO_CLOSING_QUOTE = 294 MCIERR_NO_ELEMENT_ALLOWED = 301 MCIERR_NO_IDENTITY = 350 MCIERR_NO_INTEGER = 312 MCIERR_NO_WINDOW = 346 MCIERR_NULL_PARAMETER_BLOCK = 297 MCIERR_OUTOFRANGE = 282 MCIERR_OUT_OF_MEMORY = 264 MCIERR_PARAM_OVERFLOW = 268 MCIERR_PARSER_INTERNAL = 271 MCIERR_SEQ_DIV_INCOMPATIBLE = 336 MCIERR_SEQ_NOMIDIPRESENT = 343 MCIERR_SEQ_PORTUNSPECIFIED = 342 MCIERR_SEQ_PORT_INUSE = 337 MCIERR_SEQ_PORT_MAPNODEVICE = 339 MCIERR_SEQ_PORT_MISCERROR = 340 MCIERR_SEQ_PORT_NONEXISTENT = 338 MCIERR_SEQ_TIMER = 341 MCIERR_SET_CD = 308 MCIERR_SET_DRIVE = 309 MCIERR_UNNAMED_RESOURCE = 298 MCIERR_UNRECOGNIZED_COMMAND = 261 MCIERR_UNRECOGNIZED_KEYWORD = 259 MCIERR_UNSUPPORTED_FUNCTION = 274 MCIERR_WAVE_INPUTSINUSE = 322 MCIERR_WAVE_INPUTSUNSUITABLE = 328 MCIERR_WAVE_INPUTUNSPECIFIED = 325 MCIERR_WAVE_OUTPUTSINUSE = 320 MCIERR_WAVE_OUTPUTSUNSUITABLE = 326 MCIERR_WAVE_OUTPUTUNSPECIFIED = 324 MCIERR_WAVE_SETINPUTINUSE = 323 MCIERR_WAVE_SETINPUTUNSUITABLE = 329 MCIERR_WAVE_SETOUTPUTINUSE = 321 MCIERR_WAVE_SETOUTPUTUNSUITABLE = 327 MCI_ANIM_GETDEVCAPS_CAN_REVERSE = 16385 MCI_ANIM_GETDEVCAPS_CAN_STRETCH = 16391 MCI_ANIM_GETDEVCAPS_FAST_RATE = 16386 MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = 16392 MCI_ANIM_GETDEVCAPS_NORMAL_RATE = 16388 MCI_ANIM_GETDEVCAPS_PALETTES = 16390 MCI_ANIM_GETDEVCAPS_SLOW_RATE = 16387 MCI_ANIM_INFO_TEXT = 65536 MCI_ANIM_OPEN_NOSTATIC = 262144 MCI_ANIM_OPEN_PARENT = 131072 MCI_ANIM_OPEN_WS = 65536 MCI_ANIM_PLAY_FAST = 262144 MCI_ANIM_PLAY_REVERSE = 131072 MCI_ANIM_PLAY_SCAN = 1048576 MCI_ANIM_PLAY_SLOW = 524288 MCI_ANIM_PLAY_SPEED = 65536 MCI_ANIM_PUT_DESTINATION = 262144 MCI_ANIM_PUT_SOURCE = 131072 MCI_ANIM_REALIZE_BKGD = 131072 MCI_ANIM_REALIZE_NORM = 65536 MCI_ANIM_RECT = 65536 MCI_ANIM_STATUS_FORWARD = 16386 MCI_ANIM_STATUS_HPAL = 16388 MCI_ANIM_STATUS_HWND = 16387 MCI_ANIM_STATUS_SPEED = 16385 MCI_ANIM_STATUS_STRETCH = 16389 MCI_ANIM_STEP_FRAMES = 131072 MCI_ANIM_STEP_REVERSE = 65536 MCI_ANIM_UPDATE_HDC = 131072 MCI_ANIM_WHERE_DESTINATION = 262144 MCI_ANIM_WHERE_SOURCE = 131072 MCI_ANIM_WINDOW_DEFAULT = 0 MCI_ANIM_WINDOW_DISABLE_STRETCH = 2097152 MCI_ANIM_WINDOW_ENABLE_STRETCH = 1048576 MCI_ANIM_WINDOW_HWND = 65536 MCI_ANIM_WINDOW_STATE = 262144 MCI_ANIM_WINDOW_TEXT = 524288 MCI_BREAK = 0x0811 MCI_BREAK_HWND = 512 MCI_BREAK_KEY = 256 MCI_BREAK_OFF = 1024 MCI_CDA_STATUS_TYPE_TRACK = 16385 MCI_CDA_TRACK_AUDIO = 1088 MCI_CDA_TRACK_OTHER = 1089 MCI_CD_OFFSET = 1088 MCI_CLOSE = 0x0804 MCI_COPY = 0x0852 MCI_CUE = 0x0830 MCI_CUT = 0x0851 MCI_DELETE = 0x0856 MCI_DEVTYPE_ANIMATION = 519 MCI_DEVTYPE_CD_AUDIO = 516 MCI_DEVTYPE_DAT = 517 MCI_DEVTYPE_DIGITAL_VIDEO = 520 MCI_DEVTYPE_FIRST = 513 MCI_DEVTYPE_FIRST_USER = 0x1000 MCI_DEVTYPE_LAST = 523 MCI_DEVTYPE_OTHER = 521 MCI_DEVTYPE_OVERLAY = 515 MCI_DEVTYPE_SCANNER = 518 MCI_DEVTYPE_SEQUENCER = 523 MCI_DEVTYPE_VCR = 513 MCI_DEVTYPE_VIDEODISC = 514 MCI_DEVTYPE_WAVEFORM_AUDIO = 522 MCI_ESCAPE = 0x0805 MCI_FIRST = 2048 MCI_FORMAT_BYTES = 8 MCI_FORMAT_FRAMES = 3 MCI_FORMAT_HMS = 1 MCI_FORMAT_MILLISECONDS = 0 MCI_FORMAT_MSF = 2 MCI_FORMAT_SAMPLES = 9 MCI_FORMAT_SMPTE_24 = 4 MCI_FORMAT_SMPTE_25 = 5 MCI_FORMAT_SMPTE_30 = 6 MCI_FORMAT_SMPTE_30DROP = 7 MCI_FORMAT_TMSF = 10 MCI_FREEZE = 0x0844 MCI_FROM = 4 MCI_GETDEVCAPS = 0x080B MCI_GETDEVCAPS_CAN_EJECT = 7 MCI_GETDEVCAPS_CAN_PLAY = 8 MCI_GETDEVCAPS_CAN_RECORD = 1 MCI_GETDEVCAPS_CAN_SAVE = 9 MCI_GETDEVCAPS_COMPOUND_DEVICE = 6 MCI_GETDEVCAPS_DEVICE_TYPE = 4 MCI_GETDEVCAPS_HAS_AUDIO = 2 MCI_GETDEVCAPS_HAS_VIDEO = 3 MCI_GETDEVCAPS_ITEM = 256 MCI_GETDEVCAPS_USES_FILES = 5 MCI_INFO = 0x080A MCI_INFO_COPYRIGHT = 8192 MCI_INFO_FILE = 512 MCI_INFO_MEDIA_IDENTITY = 2048 MCI_INFO_MEDIA_UPC = 1024 MCI_INFO_NAME = 4096 MCI_INFO_PRODUCT = 256 MCI_LAST = 0x0FFF MCI_LOAD = 0x0850 MCI_LOAD_FILE = 256 MCI_MODE_NOT_READY = 524 MCI_MODE_OPEN = 530 MCI_MODE_PAUSE = 529 MCI_MODE_PLAY = 526 MCI_MODE_RECORD = 527 MCI_MODE_SEEK = 528 MCI_MODE_STOP = 525 MCI_NOTIFY = 1 MCI_NOTIFY_ABORTED = 0x0004 MCI_NOTIFY_FAILURE = 0x0008 MCI_NOTIFY_SUCCESSFUL = 0x0001 MCI_NOTIFY_SUPERSEDED = 0x0002 MCI_OPEN = 0x0803 MCI_OPEN_ALIAS = 1024 MCI_OPEN_ELEMENT = 512 MCI_OPEN_ELEMENT_ID = 2048 MCI_OPEN_SHAREABLE = 256 MCI_OPEN_TYPE = 8192 MCI_OPEN_TYPE_ID = 4096 MCI_OVLY_GETDEVCAPS_CAN_FREEZE = 16386 MCI_OVLY_GETDEVCAPS_CAN_STRETCH = 16385 MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = 16387 MCI_OVLY_INFO_TEXT = 65536 MCI_OVLY_OPEN_PARENT = 131072 MCI_OVLY_OPEN_WS = 65536 MCI_OVLY_PUT_DESTINATION = 262144 MCI_OVLY_PUT_FRAME = 524288 MCI_OVLY_PUT_SOURCE = 131072 MCI_OVLY_PUT_VIDEO = 1048576 MCI_OVLY_RECT = 65536 MCI_OVLY_STATUS_HWND = 16385 MCI_OVLY_STATUS_STRETCH = 16386 MCI_OVLY_WHERE_DESTINATION = 262144 MCI_OVLY_WHERE_FRAME = 524288 MCI_OVLY_WHERE_SOURCE = 131072 MCI_OVLY_WHERE_VIDEO = 1048576 MCI_OVLY_WINDOW_DEFAULT = 0 MCI_OVLY_WINDOW_DISABLE_STRETCH = 2097152 MCI_OVLY_WINDOW_ENABLE_STRETCH = 1048576 MCI_OVLY_WINDOW_HWND = 65536 MCI_OVLY_WINDOW_STATE = 262144 MCI_OVLY_WINDOW_TEXT = 524288 MCI_PASTE = 0x0853 MCI_PAUSE = 0x0809 MCI_PLAY = 0x0806 MCI_PUT = 0x0842 MCI_REALIZE = 0x0840 MCI_RECORD = 0x080F MCI_RECORD_INSERT = 256 MCI_RECORD_OVERWRITE = 512 MCI_RESUME = 0x0855 MCI_SAVE = 0x0813 MCI_SAVE_FILE = 256 MCI_SEEK = 0x0807 MCI_SEEK_TO_END = 512 MCI_SEEK_TO_START = 256 MCI_SEQ_DIV_PPQN = 1216 MCI_SEQ_DIV_SMPTE_24 = 1217 MCI_SEQ_DIV_SMPTE_25 = 1218 MCI_SEQ_DIV_SMPTE_30 = 1220 MCI_SEQ_DIV_SMPTE_30DROP = 1219 MCI_SEQ_FILE = 0x4002 MCI_SEQ_FORMAT_SONGPTR = 0x4001 MCI_SEQ_MAPPER = 65535 MCI_SEQ_MIDI = 0x4003 MCI_SEQ_NONE = 65533 MCI_SEQ_OFFSET = 1216 MCI_SEQ_SET_MASTER = 524288 MCI_SEQ_SET_OFFSET = 16777216 MCI_SEQ_SET_PORT = 131072 MCI_SEQ_SET_SLAVE = 262144 MCI_SEQ_SET_TEMPO = 65536 MCI_SEQ_SMPTE = 0x4004 MCI_SEQ_STATUS_COPYRIGHT = 16396 MCI_SEQ_STATUS_DIVTYPE = 16394 MCI_SEQ_STATUS_MASTER = 16392 MCI_SEQ_STATUS_NAME = 16395 MCI_SEQ_STATUS_OFFSET = 16393 MCI_SEQ_STATUS_PORT = 16387 MCI_SEQ_STATUS_SLAVE = 16391 MCI_SEQ_STATUS_TEMPO = 16386 MCI_SET = 0x080D MCI_SET_AUDIO = 2048 MCI_SET_AUDIO_ALL = 0 MCI_SET_AUDIO_LEFT = 1 MCI_SET_AUDIO_RIGHT = 2 MCI_SET_DOOR_CLOSED = 512 MCI_SET_DOOR_OPEN = 256 MCI_SET_OFF = 16384 MCI_SET_ON = 8192 MCI_SET_TIME_FORMAT = 1024 MCI_SET_VIDEO = 4096 MCI_SPIN = 0x080C MCI_STATUS = 0x0814 MCI_STATUS_CURRENT_TRACK = 8 MCI_STATUS_ITEM = 256 MCI_STATUS_LENGTH = 1 MCI_STATUS_MEDIA_PRESENT = 5 MCI_STATUS_MODE = 4 MCI_STATUS_NUMBER_OF_TRACKS = 3 MCI_STATUS_POSITION = 2 MCI_STATUS_READY = 7 MCI_STATUS_START = 512 MCI_STATUS_TIME_FORMAT = 6 MCI_STEP = 0x080E MCI_STOP = 0x0808 MCI_STRING_OFFSET = 512 MCI_SYSINFO = 0x0810 MCI_SYSINFO_INSTALLNAME = 2048 MCI_SYSINFO_NAME = 1024 MCI_SYSINFO_OPEN = 512 MCI_SYSINFO_QUANTITY = 256 MCI_TO = 8 MCI_TRACK = 16 MCI_UNFREEZE = 0x0845 MCI_UPDATE = 0x0854 MCI_USER_MESSAGES = 3072 MCI_VD_ESCAPE_STRING = 256 MCI_VD_FORMAT_TRACK = 0x4001 MCI_VD_GETDEVCAPS_CAN_REVERSE = 16386 MCI_VD_GETDEVCAPS_CAV = 131072 MCI_VD_GETDEVCAPS_CLV = 65536 MCI_VD_GETDEVCAPS_FAST_RATE = 16387 MCI_VD_GETDEVCAPS_NORMAL_RATE = 16389 MCI_VD_GETDEVCAPS_SLOW_RATE = 16388 MCI_VD_MEDIA_CAV = 1027 MCI_VD_MEDIA_CLV = 1026 MCI_VD_MEDIA_OTHER = 1028 MCI_VD_MODE_PARK = 1025 MCI_VD_OFFSET = 1024 MCI_VD_PLAY_FAST = 131072 MCI_VD_PLAY_REVERSE = 65536 MCI_VD_PLAY_SCAN = 524288 MCI_VD_PLAY_SLOW = 1048576 MCI_VD_PLAY_SPEED = 262144 MCI_VD_SEEK_REVERSE = 65536 MCI_VD_SPIN_DOWN = 131072 MCI_VD_SPIN_UP = 65536 MCI_VD_STATUS_DISC_SIZE = 16390 MCI_VD_STATUS_FORWARD = 16387 MCI_VD_STATUS_MEDIA_TYPE = 16388 MCI_VD_STATUS_SIDE = 16389 MCI_VD_STATUS_SPEED = 16386 MCI_VD_STEP_FRAMES = 65536 MCI_VD_STEP_REVERSE = 131072 MCI_WAIT = 2 MCI_WAVE_GETDEVCAPS_INPUTS = 16385 MCI_WAVE_GETDEVCAPS_OUTPUTS = 16386 MCI_WAVE_INPUT = 4194304 MCI_WAVE_MAPPER = 1153 MCI_WAVE_OFFSET = 1152 MCI_WAVE_OPEN_BUFFER = 65536 MCI_WAVE_OUTPUT = 8388608 MCI_WAVE_PCM = 1152 MCI_WAVE_SET_ANYINPUT = 67108864 MCI_WAVE_SET_ANYOUTPUT = 134217728 MCI_WAVE_SET_AVGBYTESPERSEC = 524288 MCI_WAVE_SET_BITSPERSAMPLE = 2097152 MCI_WAVE_SET_BLOCKALIGN = 1048576 MCI_WAVE_SET_CHANNELS = 131072 MCI_WAVE_SET_FORMATTAG = 65536 MCI_WAVE_SET_SAMPLESPERSEC = 262144 MCI_WAVE_STATUS_AVGBYTESPERSEC = 16388 MCI_WAVE_STATUS_BITSPERSAMPLE = 16390 MCI_WAVE_STATUS_BLOCKALIGN = 16389 MCI_WAVE_STATUS_CHANNELS = 16386 MCI_WAVE_STATUS_FORMATTAG = 16385 MCI_WAVE_STATUS_LEVEL = 16391 MCI_WAVE_STATUS_SAMPLESPERSEC = 16387 MCI_WHERE = 0x0843 MCI_WINDOW = 0x0841 MDIS_ALLCHILDSTYLES = 0x0001 MDITILE_HORIZONTAL = 0x0001 MDITILE_SKIPDISABLED = 0x0002 MDITILE_VERTICAL = 0x0000 MDITILE_ZORDER = 0x0004 MDMSPKRFLAG_CALLSETUP = 0x00000008 MDMSPKRFLAG_DIAL = 0x00000002 MDMSPKRFLAG_OFF = 0x00000001 MDMSPKRFLAG_ON = 0x00000004 MDMSPKR_CALLSETUP = 0x00000003 MDMSPKR_DIAL = 0x00000001 MDMSPKR_OFF = 0x00000000 MDMSPKR_ON = 0x00000002 MDMVOLFLAG_HIGH = 0x00000004 MDMVOLFLAG_LOW = 0x00000001 MDMVOLFLAG_MEDIUM = 0x00000002 MDMVOL_HIGH = 0x00000002 MDMVOL_LOW = 0x00000000 MDMVOL_MEDIUM = 0x00000001 MDM_ANALOG_RLP_OFF = 0x1 MDM_ANALOG_RLP_ON = 0x0 MDM_ANALOG_V34 = 0x2 MDM_AUTO_ML_2 = 0x2 MDM_AUTO_ML_DEFAULT = 0x0 MDM_AUTO_ML_NONE = 0x1 MDM_AUTO_SPEED_DEFAULT = 0x0 MDM_BEARERMODE_ANALOG = 0x0 MDM_BEARERMODE_GSM = 0x2 MDM_BEARERMODE_ISDN = 0x1 MDM_BLIND_DIAL = 0x00000200 MDM_CCITT_OVERRIDE = 0x00000040 MDM_CELLULAR = 0x00000008 MDM_COMPRESSION = 0x00000001 MDM_DIAGNOSTICS = 0x00000800 MDM_ERROR_CONTROL = 0x00000002 MDM_FLOWCONTROL_HARD = 0x00000010 MDM_FLOWCONTROL_SOFT = 0x00000020 MDM_FORCED_EC = 0x00000004 MDM_HDLCPPP_AUTH_CHAP = 0x3 MDM_HDLCPPP_AUTH_DEFAULT = 0x0 MDM_HDLCPPP_AUTH_MSCHAP = 0x4 MDM_HDLCPPP_AUTH_NONE = 0x1 MDM_HDLCPPP_AUTH_PAP = 0x2 MDM_HDLCPPP_ML_2 = 0x2 MDM_HDLCPPP_ML_DEFAULT = 0x0 MDM_HDLCPPP_ML_NONE = 0x1 MDM_HDLCPPP_SPEED_56K = 0x2 MDM_HDLCPPP_SPEED_64K = 0x1 MDM_HDLCPPP_SPEED_DEFAULT = 0x0 MDM_MASK_AUTO_ML = 192 MDM_MASK_AUTO_SPEED = 0x7 MDM_MASK_BEARERMODE = 0x0000f000 MDM_MASK_EXTENDEDINFO = 268431360 MDM_MASK_HDLCPPP_AUTH = 56 MDM_MASK_HDLCPPP_ML = 192 MDM_MASK_HDLCPPP_SPEED = 0x7 MDM_MASK_PROTOCOLDATA = 0x0ff00000 MDM_MASK_PROTOCOLID = 0x000f0000 MDM_MASK_PROTOCOLINFO = 268369920 MDM_MASK_V110_SPEED = 0xf MDM_MASK_V120_ML = 192 MDM_MASK_V120_SPEED = 0x7 MDM_MASK_X75_DATA = 0x7 MDM_PIAFS_INCOMING = 0 MDM_PIAFS_OUTGOING = 1 MDM_PROTOCOLID_ANALOG = 0x7 MDM_PROTOCOLID_AUTO = 0x6 MDM_PROTOCOLID_DEFAULT = 0x0 MDM_PROTOCOLID_GPRS = 0x8 MDM_PROTOCOLID_HDLCPPP = 0x1 MDM_PROTOCOLID_PIAFS = 0x9 MDM_PROTOCOLID_V110 = 0x4 MDM_PROTOCOLID_V120 = 0x5 MDM_PROTOCOLID_V128 = 0x2 MDM_PROTOCOLID_X75 = 0x3 MDM_PROTOCOL_ANALOG_NRLP = 1507328 MDM_PROTOCOL_ANALOG_RLP = 458752 MDM_PROTOCOL_ANALOG_V34 = 2555904 MDM_PROTOCOL_AUTO_1CH = 67502080 MDM_PROTOCOL_AUTO_2CH = 134610944 MDM_PROTOCOL_GPRS = 524288 MDM_PROTOCOL_HDLCPPP_112K = 136380416 MDM_PROTOCOL_HDLCPPP_112K_CHAP = 161546240 MDM_PROTOCOL_HDLCPPP_112K_MSCHAP = 169934848 MDM_PROTOCOL_HDLCPPP_112K_PAP = 153157632 MDM_PROTOCOL_HDLCPPP_128K = 135331840 MDM_PROTOCOL_HDLCPPP_128K_CHAP = 160497664 MDM_PROTOCOL_HDLCPPP_128K_MSCHAP = 168886272 MDM_PROTOCOL_HDLCPPP_128K_PAP = 152109056 MDM_PROTOCOL_HDLCPPP_56K = 2162688 MDM_PROTOCOL_HDLCPPP_64K = 1114112 MDM_PROTOCOL_PIAFS_INCOMING = 589824 MDM_PROTOCOL_PIAFS_OUTGOING = 1638400 MDM_PROTOCOL_V110_12DOT0K = 5505024 MDM_PROTOCOL_V110_14DOT4K = 6553600 MDM_PROTOCOL_V110_19DOT2K = 7602176 MDM_PROTOCOL_V110_1DOT2K = 1310720 MDM_PROTOCOL_V110_28DOT8K = 8650752 MDM_PROTOCOL_V110_2DOT4K = 2359296 MDM_PROTOCOL_V110_38DOT4K = 9699328 MDM_PROTOCOL_V110_4DOT8K = 3407872 MDM_PROTOCOL_V110_57DOT6K = 10747904 MDM_PROTOCOL_V110_9DOT6K = 4456448 MDM_PROTOCOL_V120_112K = 136642560 MDM_PROTOCOL_V120_128K = 135593984 MDM_PROTOCOL_V120_56K = 69533696 MDM_PROTOCOL_V120_64K = 68485120 MDM_PROTOCOL_X75_128K = 2293760 MDM_PROTOCOL_X75_64K = 1245184 MDM_PROTOCOL_X75_BTX = 4390912 MDM_PROTOCOL_X75_T_70 = 3342336 MDM_SHIFT_AUTO_ML = 0x6 MDM_SHIFT_AUTO_SPEED = 0x0 MDM_SHIFT_BEARERMODE = 12 MDM_SHIFT_EXTENDEDINFO = 12 MDM_SHIFT_HDLCPPP_AUTH = 0x3 MDM_SHIFT_HDLCPPP_ML = 0x6 MDM_SHIFT_HDLCPPP_SPEED = 0x0 MDM_SHIFT_PROTOCOLDATA = 20 MDM_SHIFT_PROTOCOLID = 16 MDM_SHIFT_PROTOCOLINFO = 16 MDM_SHIFT_V110_SPEED = 0x0 MDM_SHIFT_V120_ML = 0x6 MDM_SHIFT_V120_SPEED = 0x0 MDM_SHIFT_X75_DATA = 0x0 MDM_SPEED_ADJUST = 0x00000080 MDM_TONE_DIAL = 0x00000100 MDM_V110_SPEED_12DOT0K = 0x5 MDM_V110_SPEED_14DOT4K = 0x6 MDM_V110_SPEED_19DOT2K = 0x7 MDM_V110_SPEED_1DOT2K = 0x1 MDM_V110_SPEED_28DOT8K = 0x8 MDM_V110_SPEED_2DOT4K = 0x2 MDM_V110_SPEED_38DOT4K = 0x9 MDM_V110_SPEED_4DOT8K = 0x3 MDM_V110_SPEED_57DOT6K = 0xA MDM_V110_SPEED_9DOT6K = 0x4 MDM_V110_SPEED_DEFAULT = 0x0 MDM_V120_ML_2 = 0x2 MDM_V120_ML_DEFAULT = 0x0 MDM_V120_ML_NONE = 0x1 MDM_V120_SPEED_56K = 0x2 MDM_V120_SPEED_64K = 0x1 MDM_V120_SPEED_DEFAULT = 0x0 MDM_V23_OVERRIDE = 0x00000400 MDM_X75_DATA_128K = 0x2 MDM_X75_DATA_64K = 0x1 MDM_X75_DATA_BTX = 0x4 MDM_X75_DATA_DEFAULT = 0x0 MDM_X75_DATA_T_70 = 0x3 MEDIA_CURRENTLY_MOUNTED = 0x80000000 MEDIA_ERASEABLE = 0x00000001 MEDIA_READ_ONLY = 0x00000004 MEDIA_READ_WRITE = 0x00000008 MEDIA_WRITE_ONCE = 0x00000002 MEDIA_WRITE_PROTECTED = 0x00000100 MEMBERID_NIL = -1 MEMORY_ALLOCATION_ALIGNMENT = 16 MEM_4MB_PAGES = 0x80000000 MEM_COMMIT = 0x1000 MEM_DECOMMIT = 0x4000 MEM_FREE = 0x10000 MEM_IMAGE = 16777216 MEM_LARGE_PAGES = 0x20000000 MEM_MAPPED = 0x40000 MEM_PHYSICAL = 0x400000 MEM_PRIVATE = 0x20000 MEM_RELEASE = 0x8000 MEM_RESERVE = 0x2000 MEM_RESET = 0x80000 MEM_ROTATE = 0x800000 MEM_TOP_DOWN = 0x100000 MEM_UNMAP_WITH_TRANSIENT_BOOST = 0x01 MEM_WRITE_WATCH = 0x200000 MENU_EVENT = 0x8 MESSAGE_RESOURCE_UNICODE = 0x0001 METAFILE_DRIVER = 2049 META_ANIMATEPALETTE = 0x0436 META_ARC = 0x0817 META_BITBLT = 0x0922 META_CHORD = 0x0830 META_CREATEBRUSHINDIRECT = 0x02FC META_CREATEFONTINDIRECT = 0x02FB META_CREATEPALETTE = 0x00f7 META_CREATEPATTERNBRUSH = 0x01F9 META_CREATEPENINDIRECT = 0x02FA META_CREATEREGION = 0x06FF META_DELETEOBJECT = 0x01f0 META_DIBBITBLT = 0x0940 META_DIBCREATEPATTERNBRUSH = 0x0142 META_DIBSTRETCHBLT = 0x0b41 META_ELLIPSE = 0x0418 META_ESCAPE = 0x0626 META_EXCLUDECLIPRECT = 0x0415 META_EXTFLOODFILL = 0x0548 META_EXTTEXTOUT = 0x0a32 META_FILLREGION = 0x0228 META_FLOODFILL = 0x0419 META_FRAMEREGION = 0x0429 META_INTERSECTCLIPRECT = 0x0416 META_INVERTREGION = 0x012A META_LINETO = 0x0213 META_MOVETO = 0x0214 META_OFFSETCLIPRGN = 0x0220 META_OFFSETVIEWPORTORG = 0x0211 META_OFFSETWINDOWORG = 0x020F META_PAINTREGION = 0x012B META_PATBLT = 0x061D META_PIE = 0x081A META_POLYGON = 0x0324 META_POLYLINE = 0x0325 META_POLYPOLYGON = 0x0538 META_REALIZEPALETTE = 0x0035 META_RECTANGLE = 0x041B META_RESIZEPALETTE = 0x0139 META_RESTOREDC = 0x0127 META_ROUNDRECT = 0x061C META_SAVEDC = 0x001E META_SCALEVIEWPORTEXT = 0x0412 META_SCALEWINDOWEXT = 0x0410 META_SELECTCLIPREGION = 0x012C META_SELECTOBJECT = 0x012D META_SELECTPALETTE = 0x0234 META_SETBKCOLOR = 0x0201 META_SETBKMODE = 0x0102 META_SETDIBTODEV = 0x0d33 META_SETLAYOUT = 0x0149 META_SETMAPMODE = 0x0103 META_SETMAPPERFLAGS = 0x0231 META_SETPALENTRIES = 0x0037 META_SETPIXEL = 0x041F META_SETPOLYFILLMODE = 0x0106 META_SETRELABS = 0x0105 META_SETROP2 = 0x0104 META_SETSTRETCHBLTMODE = 0x0107 META_SETTEXTALIGN = 0x012E META_SETTEXTCHAREXTRA = 0x0108 META_SETTEXTCOLOR = 0x0209 META_SETTEXTJUSTIFICATION = 0x020A META_SETVIEWPORTEXT = 0x020E META_SETVIEWPORTORG = 0x020D META_SETWINDOWEXT = 0x020C META_SETWINDOWORG = 0x020B META_STRETCHBLT = 0x0B23 META_STRETCHDIB = 0x0f43 META_TEXTOUT = 0x0521 METHOD_BUFFERED = 0 METHOD_DIRECT_FROM_HARDWARE = 2 METHOD_DIRECT_TO_HARDWARE = 1 METHOD_IN_DIRECT = 1 METHOD_NEITHER = 3 METHOD_OUT_DIRECT = 2 METRICS_USEDEFAULT = -1 MEVT_F_CALLBACK = 1073741824 MEVT_F_LONG = 2147483648 MEVT_F_SHORT = 0 MFCOMMENT = 15 MFS_CHECKED = 8 MFS_DEFAULT = 4096 MFS_DISABLED = 3 MFS_ENABLED = 0 MFS_GRAYED = 3 MFS_HILITE = 128 MFS_UNCHECKED = 0 MFS_UNHILITE = 0 MFT_BITMAP = 4 MFT_MENUBARBREAK = 32 MFT_MENUBREAK = 64 MFT_OWNERDRAW = 256 MFT_RADIOCHECK = 512 MFT_RIGHTJUSTIFY = 16384 MFT_RIGHTORDER = 8192 MFT_SEPARATOR = 2048 MFT_STRING = 0 MF_APPEND = 256 MF_BITMAP = 4 MF_BYCOMMAND = 0 MF_BYPOSITION = 1024 MF_CALLBACKS = 0x08000000 MF_CHANGE = 128 MF_CHECKED = 8 MF_CONV = 0x40000000 MF_DEFAULT = 4096 MF_DELETE = 512 MF_DISABLED = 2 MF_ENABLED = 0 MF_END = 128 MF_ERRORS = 0x10000000 MF_GRAYED = 1 MF_HELP = 16384 MF_HILITE = 128 MF_HSZ_INFO = 0x01000000 MF_INSERT = 0 MF_LINKS = 0x20000000 MF_MASK = 0xFF000000 MF_MENUBARBREAK = 32 MF_MENUBREAK = 64 MF_MOUSESELECT = 32768 MF_OWNERDRAW = 256 MF_POPUP = 16 MF_POSTMSGS = 0x04000000 MF_REMOVE = 4096 MF_RIGHTJUSTIFY = 16384 MF_SENDMSGS = 0x02000000 MF_SEPARATOR = 2048 MF_STRING = 0 MF_SYSMENU = 8192 MF_UNCHECKED = 0 MF_UNHILITE = 0 MF_USECHECKBITMAPS = 512 MHDR_DONE = 0x00000001 MHDR_INQUEUE = 0x00000004 MHDR_ISSTRM = 0x00000008 MHDR_PREPARED = 0x00000002 MH_CLEANUP = 4 MH_CREATE = 1 MH_DELETE = 3 MH_KEEP = 2 MICROSOFT_ROOT_CERT_CHAIN_POLICY_CHECK_APPLICATION_ROOT_FLAG = 0x20000 MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG = 0x10000 MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS = 0 MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS = 1 MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED = 0 MIDICAPS_CACHE = 0x0004 MIDICAPS_LRVOLUME = 0x0002 MIDICAPS_STREAM = 0x0008 MIDICAPS_VOLUME = 0x0001 MIDIERR_BADOPENMODE = 70 MIDIERR_BASE = 64 MIDIERR_DONT_CONTINUE = 71 MIDIERR_INVALIDSETUP = 69 MIDIERR_LASTERROR = 71 MIDIERR_NODEVICE = 68 MIDIERR_NOMAP = 66 MIDIERR_NOTREADY = 67 MIDIERR_STILLPLAYING = 65 MIDIERR_UNPREPARED = 64 MIDIPATCHSIZE = 128 MIDIPROP_GET = 1073741824 MIDIPROP_SET = 2147483648 MIDIPROP_TEMPO = 2 MIDIPROP_TIMEDIV = 1 MIDISTRM_ERROR = -2 MIDI_CACHE_ALL = 1 MIDI_CACHE_BESTFIT = 2 MIDI_CACHE_QUERY = 3 MIDI_IO_STATUS = 32 MIDI_UNCACHE = 4 MIIM_BITMAP = 0x00000080 MIIM_CHECKMARKS = 0x00000008 MIIM_DATA = 0x00000020 MIIM_FTYPE = 0x00000100 MIIM_ID = 0x00000002 MIIM_STATE = 0x00000001 MIIM_STRING = 0x00000040 MIIM_SUBMENU = 0x00000004 MIIM_TYPE = 0x00000010 MIM_APPLYTOSUBMENUS = 0x80000000 MIM_BACKGROUND = 0x00000002 MIM_CLOSE = 962 MIM_DATA = 963 MIM_ERROR = 965 MIM_HELPID = 0x00000004 MIM_LONGDATA = 964 MIM_LONGERROR = 966 MIM_MAXHEIGHT = 0x00000001 MIM_MENUDATA = 0x00000008 MIM_MOREDATA = 972 MIM_OPEN = 961 MIM_STYLE = 0x00000010 MINCHAR = 0x80 MINLONG = 0x80000000 MINSHORT = 0x8000 MIN_ACL_REVISION = 2 MIN_PRIORITY = 1 MIXERCONTROL_CONTROLF_DISABLED = 2147483648 MIXERCONTROL_CONTROLF_MULTIPLE = 2 MIXERCONTROL_CONTROLF_UNIFORM = 1 MIXERCONTROL_CONTROLTYPE_BASS = 1342373890 MIXERCONTROL_CONTROLTYPE_BASS_BOOST = 536945271 MIXERCONTROL_CONTROLTYPE_BOOLEAN = 536936448 MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = 268500992 MIXERCONTROL_CONTROLTYPE_BUTTON = 553713664 MIXERCONTROL_CONTROLTYPE_CUSTOM = 0 MIXERCONTROL_CONTROLTYPE_DECIBELS = 805568512 MIXERCONTROL_CONTROLTYPE_EQUALIZER = 1342373892 MIXERCONTROL_CONTROLTYPE_FADER = 1342373888 MIXERCONTROL_CONTROLTYPE_LOUDNESS = 536936452 MIXERCONTROL_CONTROLTYPE_MICROTIME = 1610809344 MIXERCONTROL_CONTROLTYPE_MILLITIME = 1627586560 MIXERCONTROL_CONTROLTYPE_MIXER = 1895890945 MIXERCONTROL_CONTROLTYPE_MONO = 536936451 MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = 1895890944 MIXERCONTROL_CONTROLTYPE_MUTE = 536936450 MIXERCONTROL_CONTROLTYPE_MUX = 1879113729 MIXERCONTROL_CONTROLTYPE_ONOFF = 536936449 MIXERCONTROL_CONTROLTYPE_PAN = 1073872897 MIXERCONTROL_CONTROLTYPE_PEAKMETER = 268566529 MIXERCONTROL_CONTROLTYPE_PERCENT = 805634048 MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = 1073872898 MIXERCONTROL_CONTROLTYPE_SIGNED = 805437440 MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = 268566528 MIXERCONTROL_CONTROLTYPE_SINGLESELECT = 1879113728 MIXERCONTROL_CONTROLTYPE_SLIDER = 1073872896 MIXERCONTROL_CONTROLTYPE_STEREOENH = 536936453 MIXERCONTROL_CONTROLTYPE_TREBLE = 1342373891 MIXERCONTROL_CONTROLTYPE_UNSIGNED = 805502976 MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = 268632064 MIXERCONTROL_CONTROLTYPE_VOLUME = 1342373889 MIXERCONTROL_CT_CLASS_CUSTOM = 0 MIXERCONTROL_CT_CLASS_FADER = 1342177280 MIXERCONTROL_CT_CLASS_LIST = 1879048192 MIXERCONTROL_CT_CLASS_MASK = 4026531840 MIXERCONTROL_CT_CLASS_METER = 268435456 MIXERCONTROL_CT_CLASS_NUMBER = 805306368 MIXERCONTROL_CT_CLASS_SLIDER = 1073741824 MIXERCONTROL_CT_CLASS_SWITCH = 536870912 MIXERCONTROL_CT_CLASS_TIME = 1610612736 MIXERCONTROL_CT_SC_LIST_MULTIPLE = 16777216 MIXERCONTROL_CT_SC_LIST_SINGLE = 0 MIXERCONTROL_CT_SC_METER_POLLED = 0 MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = 0 MIXERCONTROL_CT_SC_SWITCH_BUTTON = 16777216 MIXERCONTROL_CT_SC_TIME_MICROSECS = 0 MIXERCONTROL_CT_SC_TIME_MILLISECS = 16777216 MIXERCONTROL_CT_SUBCLASS_MASK = 251658240 MIXERCONTROL_CT_UNITS_BOOLEAN = 65536 MIXERCONTROL_CT_UNITS_CUSTOM = 0 MIXERCONTROL_CT_UNITS_DECIBELS = 262144 MIXERCONTROL_CT_UNITS_MASK = 16711680 MIXERCONTROL_CT_UNITS_PERCENT = 327680 MIXERCONTROL_CT_UNITS_SIGNED = 131072 MIXERCONTROL_CT_UNITS_UNSIGNED = 196608 MIXERLINE_COMPONENTTYPE_DST_DIGITAL = 1 MIXERLINE_COMPONENTTYPE_DST_FIRST = 0 MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = 5 MIXERLINE_COMPONENTTYPE_DST_LAST = 8 MIXERLINE_COMPONENTTYPE_DST_LINE = 2 MIXERLINE_COMPONENTTYPE_DST_MONITOR = 3 MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = 4 MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = 6 MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = 0 MIXERLINE_COMPONENTTYPE_DST_VOICEIN = 8 MIXERLINE_COMPONENTTYPE_DST_WAVEIN = 7 MIXERLINE_COMPONENTTYPE_SRC_ANALOG = 4106 MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = 4105 MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = 4101 MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = 4097 MIXERLINE_COMPONENTTYPE_SRC_FIRST = 4096 MIXERLINE_COMPONENTTYPE_SRC_LAST = 4106 MIXERLINE_COMPONENTTYPE_SRC_LINE = 4098 MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = 4099 MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = 4103 MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = 4100 MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = 4102 MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = 4096 MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = 4104 MIXERLINE_LINEF_ACTIVE = 1 MIXERLINE_LINEF_DISCONNECTED = 32768 MIXERLINE_LINEF_SOURCE = 2147483648 MIXERLINE_TARGETTYPE_AUX = 5 MIXERLINE_TARGETTYPE_MIDIIN = 4 MIXERLINE_TARGETTYPE_MIDIOUT = 3 MIXERLINE_TARGETTYPE_UNDEFINED = 0 MIXERLINE_TARGETTYPE_WAVEIN = 2 MIXERLINE_TARGETTYPE_WAVEOUT = 1 MIXERR_BASE = 1024 MIXERR_INVALCONTROL = 1025 MIXERR_INVALLINE = 1024 MIXERR_INVALVALUE = 1026 MIXERR_LASTERROR = 1026 MIXER_GETCONTROLDETAILSF_LISTTEXT = 1 MIXER_GETCONTROLDETAILSF_QUERYMASK = 15 MIXER_GETCONTROLDETAILSF_VALUE = 0 MIXER_GETLINECONTROLSF_ALL = 0 MIXER_GETLINECONTROLSF_ONEBYID = 1 MIXER_GETLINECONTROLSF_ONEBYTYPE = 2 MIXER_GETLINECONTROLSF_QUERYMASK = 15 MIXER_GETLINEINFOF_COMPONENTTYPE = 3 MIXER_GETLINEINFOF_DESTINATION = 0 MIXER_GETLINEINFOF_LINEID = 2 MIXER_GETLINEINFOF_QUERYMASK = 15 MIXER_GETLINEINFOF_SOURCE = 1 MIXER_GETLINEINFOF_TARGETTYPE = 4 MIXER_LONG_NAME_CHARS = 64 MIXER_OBJECTF_AUX = 1342177280 MIXER_OBJECTF_HANDLE = 2147483648 MIXER_OBJECTF_HMIDIIN = 3221225472 MIXER_OBJECTF_HMIDIOUT = 2952790016 MIXER_OBJECTF_HMIXER = 2147483648 MIXER_OBJECTF_HWAVEIN = 2684354560 MIXER_OBJECTF_HWAVEOUT = 2415919104 MIXER_OBJECTF_MIDIIN = 1073741824 MIXER_OBJECTF_MIDIOUT = 805306368 MIXER_OBJECTF_MIXER = 0 MIXER_OBJECTF_WAVEIN = 536870912 MIXER_OBJECTF_WAVEOUT = 268435456 MIXER_SETCONTROLDETAILSF_CUSTOM = 1 MIXER_SETCONTROLDETAILSF_QUERYMASK = 15 MIXER_SETCONTROLDETAILSF_VALUE = 0 MIXER_SHORT_NAME_CHARS = 16 MKF_AVAILABLE = 0x00000002 MKF_CONFIRMHOTKEY = 0x00000008 MKF_HOTKEYACTIVE = 0x00000004 MKF_HOTKEYSOUND = 0x00000010 MKF_INDICATOR = 0x00000020 MKF_LEFTBUTTONDOWN = 0x01000000 MKF_LEFTBUTTONSEL = 0x10000000 MKF_MODIFIERS = 0x00000040 MKF_MOUSEKEYSON = 0x00000001 MKF_MOUSEMODE = 0x80000000 MKF_REPLACENUMBERS = 0x00000080 MKF_RIGHTBUTTONDOWN = 0x02000000 MKF_RIGHTBUTTONSEL = 0x20000000 MKSYS_URLMONIKER = 6 MK_ALT = 32 MK_CONTROL = 0x0008 MK_E_FIRST = 2147746272 MK_E_LAST = 2147746287 MK_LBUTTON = 0x0001 MK_MBUTTON = 0x0010 MK_RBUTTON = 0x0002 MK_SHIFT = 0x0004 MK_S_FIRST = 262624 MK_S_LAST = 262639 MK_XBUTTON1 = 0x0020 MK_XBUTTON2 = 0x0040 MMIOERR_ACCESSDENIED = 268 MMIOERR_BASE = 256 MMIOERR_CANNOTCLOSE = 260 MMIOERR_CANNOTEXPAND = 264 MMIOERR_CANNOTOPEN = 259 MMIOERR_CANNOTREAD = 261 MMIOERR_CANNOTSEEK = 263 MMIOERR_CANNOTWRITE = 262 MMIOERR_CHUNKNOTFOUND = 265 MMIOERR_FILENOTFOUND = 257 MMIOERR_INVALIDFILE = 272 MMIOERR_NETWORKERROR = 270 MMIOERR_OUTOFMEMORY = 258 MMIOERR_PATHNOTFOUND = 267 MMIOERR_SHARINGVIOLATION = 269 MMIOERR_TOOMANYOPENFILES = 271 MMIOERR_UNBUFFERED = 266 MMIOM_CLOSE = 4 MMIOM_OPEN = 3 MMIOM_READ = 0 MMIOM_RENAME = 6 MMIOM_SEEK = 2 MMIOM_USER = 0x8000 MMIOM_WRITE = 1 MMIOM_WRITEFLUSH = 5 MMIO_ALLOCBUF = 0x00010000 MMIO_COMPAT = 0x00000000 MMIO_CREATE = 0x00001000 MMIO_CREATELIST = 0x0040 MMIO_CREATERIFF = 0x0020 MMIO_DEFAULTBUFFER = 8192 MMIO_DELETE = 0x00000200 MMIO_DENYNONE = 0x00000040 MMIO_DENYREAD = 0x00000030 MMIO_DENYWRITE = 0x00000020 MMIO_DIRTY = 0x10000000 MMIO_EMPTYBUF = 0x0010 MMIO_EXCLUSIVE = 0x00000010 MMIO_EXIST = 0x00004000 MMIO_FHOPEN = 0x0010 MMIO_FINDCHUNK = 0x0010 MMIO_FINDLIST = 0x0040 MMIO_FINDPROC = 0x00040000 MMIO_FINDRIFF = 0x0020 MMIO_GETTEMP = 0x00020000 MMIO_GLOBALPROC = 0x10000000 MMIO_INSTALLPROC = 0x00010000 MMIO_PARSE = 0x00000100 MMIO_READ = 0x00000000 MMIO_READWRITE = 0x00000002 MMIO_REMOVEPROC = 0x00020000 MMIO_RWMODE = 0x00000003 MMIO_SHAREMODE = 0x00000070 MMIO_TOUPPER = 0x0010 MMIO_UNICODEPROC = 0x01000000 MMIO_WRITE = 0x00000001 MMSYSERR_ALLOCATED = 4 MMSYSERR_BADDB = 14 MMSYSERR_BADDEVICEID = 2 MMSYSERR_BADERRNUM = 9 MMSYSERR_BASE = 0 MMSYSERR_DELETEERROR = 18 MMSYSERR_ERROR = 1 MMSYSERR_HANDLEBUSY = 12 MMSYSERR_INVALFLAG = 10 MMSYSERR_INVALHANDLE = 5 MMSYSERR_INVALIDALIAS = 13 MMSYSERR_INVALPARAM = 11 MMSYSERR_KEYNOTFOUND = 15 MMSYSERR_LASTERROR = 21 MMSYSERR_MOREDATA = 21 MMSYSERR_NODRIVER = 6 MMSYSERR_NODRIVERCB = 20 MMSYSERR_NOERROR = 0 MMSYSERR_NOMEM = 7 MMSYSERR_NOTENABLED = 3 MMSYSERR_NOTSUPPORTED = 8 MMSYSERR_READERROR = 16 MMSYSERR_VALNOTFOUND = 19 MMSYSERR_WRITEERROR = 17 MM_ANISOTROPIC = 8 MM_DRVM_CLOSE = 0x3D1 MM_DRVM_DATA = 0x3D2 MM_DRVM_ERROR = 0x3D3 MM_DRVM_OPEN = 0x3D0 MM_HIENGLISH = 5 MM_HIMETRIC = 3 MM_ISOTROPIC = 7 MM_JOY1BUTTONDOWN = 0x3B5 MM_JOY1BUTTONUP = 0x3B7 MM_JOY1MOVE = 0x3A0 MM_JOY1ZMOVE = 0x3A2 MM_JOY2BUTTONDOWN = 0x3B6 MM_JOY2BUTTONUP = 0x3B8 MM_JOY2MOVE = 0x3A1 MM_JOY2ZMOVE = 0x3A3 MM_LOENGLISH = 4 MM_LOMETRIC = 2 MM_MAX = 8 MM_MAX_AXES_NAMELEN = 16 MM_MAX_FIXEDSCALE = 6 MM_MAX_NUMAXES = 16 MM_MCINOTIFY = 0x3B9 MM_MCISIGNAL = 0x3CB MM_MIM_CLOSE = 0x3C2 MM_MIM_DATA = 0x3C3 MM_MIM_ERROR = 0x3C5 MM_MIM_LONGDATA = 0x3C4 MM_MIM_LONGERROR = 0x3C6 MM_MIM_MOREDATA = 0x3CC MM_MIM_OPEN = 0x3C1 MM_MIN = 1 MM_MIXM_CONTROL_CHANGE = 0x3D1 MM_MIXM_LINE_CHANGE = 0x3D0 MM_MOM_CLOSE = 0x3C8 MM_MOM_DONE = 0x3C9 MM_MOM_OPEN = 0x3C7 MM_MOM_POSITIONCB = 0x3CA MM_STREAM_CLOSE = 0x3D5 MM_STREAM_DONE = 0x3D6 MM_STREAM_ERROR = 0x3D7 MM_STREAM_OPEN = 0x3D4 MM_TEXT = 1 MM_TWIPS = 6 MM_WIM_CLOSE = 0x3BF MM_WIM_DATA = 0x3C0 MM_WIM_OPEN = 0x3BE MM_WOM_CLOSE = 0x3BC MM_WOM_DONE = 0x3BD MM_WOM_OPEN = 0x3BB MNC_CLOSE = 1 MNC_EXECUTE = 2 MNC_IGNORE = 0 MNC_SELECT = 3 MND_CONTINUE = 0 MND_ENDMENU = 1 MNGOF_BOTTOMGAP = 0x00000002 MNGOF_TOPGAP = 0x00000001 MNGO_NOERROR = 0x00000001 MNGO_NOINTERFACE = 0x00000000 MNS_AUTODISMISS = 0x10000000 MNS_CHECKORBMP = 0x04000000 MNS_DRAGDROP = 0x20000000 MNS_MODELESS = 0x40000000 MNS_NOCHECK = 0x80000000 MNS_NOTIFYBYPOS = 0x08000000 MN_GETHMENU = 0x01E1 MODE_T_DEFINED = 0 MOD_ALT = 0x0001 MOD_CONTROL = 0x0002 MOD_FMSYNTH = 4 MOD_IGNORE_ALL_MODIFIER = 0x0400 MOD_LEFT = 0x8000 MOD_MAPPER = 5 MOD_MIDIPORT = 1 MOD_ON_KEYUP = 0x0800 MOD_RIGHT = 0x4000 MOD_SHIFT = 0x0004 MOD_SQSYNTH = 3 MOD_SWSYNTH = 7 MOD_SYNTH = 2 MOD_WAVETABLE = 6 MOD_WIN = 0x0008 MOM_CLOSE = 968 MOM_DONE = 969 MOM_OPEN = 967 MOM_POSITIONCB = 970 MONITORINFOF_PRIMARY = 0x00000001 MONITOR_DEFAULTTONEAREST = 0x00000002 MONITOR_DEFAULTTONULL = 0x00000000 MONITOR_DEFAULTTOPRIMARY = 0x00000001 MONO_FONT = 8 MOUSEEVENTF_ABSOLUTE = 0x8000 MOUSEEVENTF_LEFTDOWN = 0x0002 MOUSEEVENTF_LEFTUP = 0x0004 MOUSEEVENTF_MIDDLEDOWN = 0x0020 MOUSEEVENTF_MIDDLEUP = 0x0040 MOUSEEVENTF_MOVE = 0x0001 MOUSEEVENTF_RIGHTDOWN = 0x0008 MOUSEEVENTF_RIGHTUP = 0x0010 MOUSEEVENTF_VIRTUALDESK = 0x4000 MOUSEEVENTF_WHEEL = 0x0800 MOUSEEVENTF_XDOWN = 0x0080 MOUSEEVENTF_XUP = 0x0100 MOUSETRAILS = 39 MOUSE_ATTRIBUTES_CHANGED = 0x04 MOUSE_EVENT = 0x2 MOUSE_MOVED = 0x1 MOUSE_MOVE_ABSOLUTE = 1 MOUSE_MOVE_RELATIVE = 0 MOUSE_VIRTUAL_DESKTOP = 0x02 MOUSE_WHEELED = 0x4 MOVEFILE_COPY_ALLOWED = 0x00000002 MOVEFILE_CREATE_HARDLINK = 0x00000010 MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004 MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x00000020 MOVEFILE_REPLACE_EXISTING = 0x00000001 MOVEFILE_WRITE_THROUGH = 0x00000008 MSGF_DDEMGR = 0x8001 MSGF_DIALOGBOX = 0 MSGF_MAX = 8 MSGF_MENU = 2 MSGF_MESSAGEBOX = 1 MSGF_NEXTWINDOW = 6 MSGF_SCROLLBAR = 5 MSGF_USER = 4096 MSG_DONTROUTE = 0x4 MSG_MAXIOVLEN = 16 MSG_OOB = 0x1 MSG_PARTIAL = 0x8000 MSG_PEEK = 0x2 MS_DEF_DH_SCHANNEL_PROV_A = "Microsoft DH SChannel Cryptographic Provider" MS_DEF_DSS_DH_PROV_A = "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider" MS_DEF_DSS_PROV_A = "Microsoft Base DSS Cryptographic Provider" MS_DEF_PROV_A = "Microsoft Base Cryptographic Provider v1.0" MS_DEF_RSA_SCHANNEL_PROV_A = "Microsoft RSA SChannel Cryptographic Provider" MS_DEF_RSA_SIG_PROV_A = "Microsoft RSA Signature Cryptographic Provider" MS_ENHANCED_PROV_A = "Microsoft Enhanced Cryptographic Provider v1.0" MS_ENH_DSS_DH_PROV_A = "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider" MS_ENH_RSA_AES_PROV_A = "Microsoft Enhanced RSA and AES Cryptographic Provider" MS_ENH_RSA_AES_PROV_XP_A = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" MS_NBF = "MNBF" MS_PPM_SOFTWARE_ALL = 0x1 MS_SCARD_PROV_A = "Microsoft Base Smart Card Crypto Provider" MS_STRONG_PROV_A = "Microsoft Strong Cryptographic Provider" MULTIFILEOPENORD = 1537 MUTANT_ALL_ACCESS = 2031617 MUTANT_QUERY_STATE = 0x0001 MUTEX_ALL_ACCESS = 2031617 MUTEX_MODIFY_STATE = 1 MUTZ_ACCEPT_WILDCARD_SCHEME = 0x80 MUTZ_DONT_UNESCAPE = 0x800 MUTZ_DONT_USE_CACHE = 0x1000 MUTZ_ENFORCERESTRICTED = 0x100 MUTZ_FORCE_INTRANET_FLAGS = 0x2000 MUTZ_IGNORE_ZONE_MAPPINGS = 0x4000 MUTZ_ISFILE = 0x2 MUTZ_NOSAVEDFILECHECK = 0x1 MUTZ_REQUIRESAVEDFILECHECK = 0x400 MUTZ_RESERVED = 0x200 MWMO_ALERTABLE = 0x0002 MWMO_INPUTAVAILABLE = 0x0004 MWMO_WAITALL = 0x0001 MWT_IDENTITY = 1 MWT_LEFTMULTIPLY = 2 MWT_MAX = 3 MWT_MIN = 1 MWT_RIGHTMULTIPLY = 3 MaxNumberOfEEInfoParams = 4 NAME_FLAGS_MASK = 0x87 NAME_MAX = 260 NCBACTION = 0x77 NCBADDGRNAME = 0x36 NCBADDNAME = 0x30 NCBASTAT = 0x33 NCBCALL = 0x10 NCBCANCEL = 0x35 NCBCHAINSEND = 0x17 NCBCHAINSENDNA = 0x72 NCBDELNAME = 0x31 NCBDGRECV = 0x21 NCBDGRECVBC = 0x23 NCBDGSEND = 0x20 NCBDGSENDBC = 0x22 NCBENUM = 0x37 NCBFINDNAME = 0x78 NCBHANGUP = 0x12 NCBLANSTALERT = 0x73 NCBLISTEN = 0x11 NCBNAMSZ = 16 NCBRECV = 0x15 NCBRECVANY = 0x16 NCBRESET = 0x32 NCBSEND = 0x14 NCBSENDNA = 0x71 NCBSSTAT = 0x34 NCBTRACE = 0x79 NCBUNLINK = 0x70 NCB_INCLUDED = 0 NCRYPTBUFFER_CERT_BLOB = 47 NCRYPTBUFFER_DATA = 1 NCRYPTBUFFER_EMPTY = 0 NCRYPTBUFFER_PKCS_ALG_ID = 43 NCRYPTBUFFER_PKCS_ALG_OID = 41 NCRYPTBUFFER_PKCS_ALG_PARAM = 42 NCRYPTBUFFER_PKCS_ATTRS = 44 NCRYPTBUFFER_PKCS_KEY_NAME = 45 NCRYPTBUFFER_PKCS_OID = 40 NCRYPTBUFFER_PKCS_SECRET = 46 NCRYPTBUFFER_PROTECTION_DESCRIPTOR_STRING = 3 NCRYPTBUFFER_PROTECTION_FLAGS = 4 NCRYPTBUFFER_SSL_CLEAR_KEY = 23 NCRYPTBUFFER_SSL_CLIENT_RANDOM = 20 NCRYPTBUFFER_SSL_HIGHEST_VERSION = 22 NCRYPTBUFFER_SSL_KEY_ARG_DATA = 24 NCRYPTBUFFER_SSL_SERVER_RANDOM = 21 NCRYPTBUFFER_VERSION = 0 NCRYPT_ALLOW_ALL_USAGES = 0x00ffffff NCRYPT_ALLOW_ARCHIVING_FLAG = 0x00000004 NCRYPT_ALLOW_DECRYPT_FLAG = 0x1 NCRYPT_ALLOW_EXPORT_FLAG = 0x1 NCRYPT_ALLOW_KEY_AGREEMENT_FLAG = 0x00000004 NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG = 0x00000008 NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG = 0x2 NCRYPT_ALLOW_SIGNING_FLAG = 0x2 NCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE = 3 NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 4 NCRYPT_CIPHER_INTERFACE = 1 NCRYPT_CIPHER_OPERATION = 1 NCRYPT_DO_NOT_FINALIZE_FLAG = 0x400 NCRYPT_EXPORT_LEGACY_FLAG = 0x00000800 NCRYPT_HASH_INTERFACE = 2 NCRYPT_HASH_OPERATION = 2 NCRYPT_IMPL_HARDWARE_FLAG = 0x1 NCRYPT_IMPL_HARDWARE_RNG_FLAG = 0x00000010 NCRYPT_IMPL_REMOVABLE_FLAG = 0x00000008 NCRYPT_IMPL_SOFTWARE_FLAG = 0x2 NCRYPT_KEY_STORAGE_INTERFACE = 0x00010001 NCRYPT_MACHINE_KEY_FLAG = 0x20 NCRYPT_MAX_ALG_ID_LENGTH = 512 NCRYPT_MAX_KEY_NAME_LENGTH = 512 NCRYPT_MAX_PROPERTY_DATA = 0x100000 NCRYPT_MAX_PROPERTY_NAME = 64 NCRYPT_NO_KEY_VALIDATION = 8 NCRYPT_NO_PADDING_FLAG = 0x1 NCRYPT_OVERWRITE_KEY_FLAG = 0x80 NCRYPT_PAD_OAEP_FLAG = 0x4 NCRYPT_PAD_PKCS1_FLAG = 0x2 NCRYPT_PAD_PSS_FLAG = 0x8 NCRYPT_PERSIST_FLAG = 0x80000000 NCRYPT_PERSIST_ONLY_FLAG = 0x40000000 NCRYPT_REGISTER_NOTIFY_FLAG = 0x1 NCRYPT_RNG_OPERATION = 32 NCRYPT_SCHANNEL_INTERFACE = 0x00010002 NCRYPT_SCHANNEL_SIGNATURE_INTERFACE = 0x00010003 NCRYPT_SECRET_AGREEMENT_INTERFACE = 4 NCRYPT_SECRET_AGREEMENT_OPERATION = 8 NCRYPT_SIGNATURE_INTERFACE = 5 NCRYPT_SIGNATURE_OPERATION = 16 NCRYPT_SILENT_FLAG = 0x40 NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG = 0x2 NCRYPT_UI_PROTECT_KEY_FLAG = 0x1 NCRYPT_UNREGISTER_NOTIFY_FLAG = 0x2 NCRYPT_WRITE_KEY_TO_LEGACY_STORE_FLAG = 0x200 NDR_ASCII_CHAR = 0 NDR_BIG_ENDIAN = 0 NDR_CHAR_REP_MASK = 15 NDR_EBCDIC_CHAR = 1 NDR_FLOAT_REP_MASK = 65280 NDR_IBM_FLOAT = 768 NDR_IEEE_FLOAT = 0 NDR_INT_REP_MASK = 240 NDR_LITTLE_ENDIAN = 16 NDR_LOCAL_DATA_REPRESENTATION = 16 NDR_LOCAL_ENDIAN = 16 NDR_VAX_FLOAT = 256 NEAR = 0 NETINFO_DISKRED = 0x00000004 NETINFO_DLL16 = 0x00000001 NETINFO_PRINTERRED = 0x00000008 NETPROPERTY_PERSISTENT = 1 NETSCAPE_SIGN_CA_CERT_TYPE = 0x01 NETSCAPE_SIGN_CERT_TYPE = 0x10 NETSCAPE_SMIME_CA_CERT_TYPE = 0x02 NETSCAPE_SMIME_CERT_TYPE = 0x20 NETSCAPE_SSL_CA_CERT_TYPE = 0x04 NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE = 0x80 NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE = 0x40 NEWFILEOPENORD = 1547 NEWFILEOPENV2ORD = 1552 NEWFRAME = 1 NEWTRANSPARENT = 3 NEXTBAND = 3 NFR_ANSI = 1 NFR_UNICODE = 2 NF_QUERY = 3 NF_REQUERY = 4 NIF_GUID = 0x00000020 NIF_ICON = 0x00000002 NIF_INFO = 0x00000010 NIF_MESSAGE = 0x00000001 NIF_STATE = 0x00000008 NIF_TIP = 0x00000004 NIIF_ERROR = 0x00000003 NIIF_ICON_MASK = 0x0000000f NIIF_INFO = 0x00000001 NIIF_NONE = 0x00000000 NIIF_NOSOUND = 0x00000010 NIIF_USER = 0x00000004 NIIF_WARNING = 0x00000002 NIM_ADD = 0x00000000 NIM_DELETE = 0x00000002 NIM_MODIFY = 0x00000001 NIM_SETFOCUS = 0x00000003 NIM_SETVERSION = 0x00000004 NINF_KEY = 0x1 NIN_BALLOONHIDE = 1027 NIN_BALLOONSHOW = 1026 NIN_BALLOONTIMEOUT = 1028 NIN_BALLOONUSERCLICK = 1029 NIN_KEYSELECT = 1025 NIN_SELECT = 1024 NIS_HIDDEN = 0x00000001 NIS_SHAREDICON = 0x00000002 NI_CHANGECANDIDATELIST = 0x0013 NI_CLOSECANDIDATE = 0x0011 NI_COMPOSITIONSTR = 0x0015 NI_FINALIZECONVERSIONRESULT = 0x0014 NI_IMEMENUSELECTED = 0x0018 NI_OPENCANDIDATE = 0x0010 NI_SELECTCANDIDATESTR = 0x0012 NI_SETCANDIDATE_PAGESIZE = 0x0017 NI_SETCANDIDATE_PAGESTART = 0x0016 NLS_ALPHANUMERIC = 0x0 NLS_DBCSCHAR = 0x10000 NLS_HIRAGANA = 0x40000 NLS_IME_CONVERSION = 0x800000 NLS_IME_DISABLE = 0x20000000 NLS_KATAKANA = 0x20000 NLS_ROMAN = 0x400000 NLS_VALID_LOCALE_MASK = 0x000fffff NMPWAIT_NOWAIT = 0x1 NMPWAIT_USE_DEFAULT_WAIT = 0x0 NMPWAIT_WAIT_FOREVER = 0xffffffff NOERROR = 0 NONANTIALIASED_QUALITY = 3 NONZEROLHND = 2 NONZEROLPTR = 0 NON_PAGED_DEBUG_SIGNATURE = 0x494E NOPARITY = 0 NORMAL_PRINT = 0x00000000 NORMAL_PRIORITY_CLASS = 0x20 NORM_IGNORECASE = 0x00000001 NORM_IGNOREKANATYPE = 0x00010000 NORM_IGNORENONSPACE = 0x00000002 NORM_IGNORESYMBOLS = 0x00000004 NORM_IGNOREWIDTH = 0x00020000 NORM_LINGUISTIC_CASING = 0x08000000 NOTIFYICON_VERSION = 3 NO_ADDRESS = 11004 NO_DATA = 11004 NO_ERROR = 0 NO_PRIORITY = 0 NO_PROPAGATE_INHERIT_ACE = 4 NO_RECOVERY = 11003 NRC_ACTSES = 0x0f NRC_BADDR = 0x07 NRC_BRIDGE = 0x23 NRC_BUFLEN = 0x01 NRC_CANCEL = 0x26 NRC_CANOCCR = 0x24 NRC_CMDCAN = 0x0b NRC_CMDTMO = 0x05 NRC_DUPENV = 0x30 NRC_DUPNAME = 0x0d NRC_ENVNOTDEF = 0x34 NRC_GOODRET = 0x00 NRC_IFBUSY = 0x21 NRC_ILLCMD = 0x03 NRC_ILLNN = 0x13 NRC_INCOMP = 0x06 NRC_INUSE = 0x16 NRC_INVADDRESS = 0x39 NRC_INVDDID = 0x3B NRC_LOCKFAIL = 0x3C NRC_LOCTFUL = 0x11 NRC_MAXAPPS = 0x36 NRC_NAMCONF = 0x19 NRC_NAMERR = 0x17 NRC_NAMTFUL = 0x0e NRC_NOCALL = 0x14 NRC_NORES = 0x09 NRC_NORESOURCES = 0x38 NRC_NOSAPS = 0x37 NRC_NOWILD = 0x15 NRC_OPENERR = 0x3f NRC_OSRESNOTAV = 0x35 NRC_PENDING = 0xff NRC_REMTFUL = 0x12 NRC_SABORT = 0x18 NRC_SCLOSED = 0x0a NRC_SNUMOUT = 0x08 NRC_SYSTEM = 0x40 NRC_TOOMANY = 0x22 NT351_INTERFACE_SIZE = 0x40 NTAPI = 0 NTAPI_INLINE = 0 NTDDI_LONGHORN = 100663296 NTDDI_VERSION = 84017152 NTDDI_VISTA = 100663296 NTDDI_VISTASP1 = 100663552 NTDDI_VISTASP2 = 100663808 NTDDI_VISTASP3 = 100664064 NTDDI_VISTASP4 = 100664320 NTDDI_WIN10 = 0x0A000000 NTDDI_WIN10_RS1 = 0x0A000002 NTDDI_WIN10_RS2 = 0x0A000003 NTDDI_WIN10_RS3 = 0x0A000004 NTDDI_WIN10_TH2 = 0x0A000001 NTDDI_WIN2K = 0x05000000 NTDDI_WIN2KSP1 = 0x05000100 NTDDI_WIN2KSP2 = 0x05000200 NTDDI_WIN2KSP3 = 0x05000300 NTDDI_WIN2KSP4 = 0x05000400 NTDDI_WIN6 = 0x06000000 NTDDI_WIN6SP1 = 0x06000100 NTDDI_WIN6SP2 = 0x06000200 NTDDI_WIN6SP3 = 0x06000300 NTDDI_WIN6SP4 = 0x06000400 NTDDI_WIN7 = 0x06010000 NTDDI_WIN8 = 0x06020000 NTDDI_WINBLUE = 0x06030000 NTDDI_WINTHRESHOLD = 0x0A000000 NTDDI_WINXP = 0x05010000 NTDDI_WINXPSP1 = 0x05010100 NTDDI_WINXPSP2 = 0x05010200 NTDDI_WINXPSP3 = 0x05010300 NTDDI_WINXPSP4 = 0x05010400 NTDDI_WS03 = 0x05020000 NTDDI_WS03SP1 = 0x05020100 NTDDI_WS03SP2 = 0x05020200 NTDDI_WS03SP3 = 0x05020300 NTDDI_WS03SP4 = 0x05020400 NTDDI_WS08 = 100663552 NTDDI_WS08SP2 = 100663808 NTDDI_WS08SP3 = 100664064 NTDDI_WS08SP4 = 100664320 NTE_OP_OK = 0 NTM_BOLD = 32 NTM_DSIG = 0x00200000 NTM_ITALIC = 1 NTM_MULTIPLEMASTER = 0x00080000 NTM_NONNEGATIVE_AC = 0x00010000 NTM_PS_OPENTYPE = 0x00020000 NTM_REGULAR = 64 NTM_TT_OPENTYPE = 0x00040000 NTM_TYPE1 = 0x00100000 NULLREGION = 1 NULL_BRUSH = 5 NULL_PEN = 8 NUMBRUSHES = 16 NUMCOLORS = 24 NUMFONTS = 22 NUMLOCK_ON = 0x20 NUMMARKERS = 20 NUMPENS = 18 NUMPRS_CURRENCY = 0x0400 NUMPRS_DECIMAL = 0x0100 NUMPRS_EXPONENT = 0x0800 NUMPRS_HEX_OCT = 0x0040 NUMPRS_INEXACT = 0x20000 NUMPRS_LEADING_MINUS = 0x0010 NUMPRS_LEADING_PLUS = 0x0004 NUMPRS_LEADING_WHITE = 0x0001 NUMPRS_NEG = 0x10000 NUMPRS_PARENS = 0x0080 NUMPRS_STD = 0x1FFF NUMPRS_THOUSANDS = 0x0200 NUMPRS_TRAILING_MINUS = 0x0020 NUMPRS_TRAILING_PLUS = 0x0008 NUMPRS_TRAILING_WHITE = 0x0002 NUMPRS_USE_ALL = 0x1000 NUMRESERVED = 106 NUM_DISCHARGE_POLICIES = 4 N_BTMASK = 0x000F N_BTSHFT = 4 N_TMASK = 0x0030 N_TMASK1 = 0x00C0 N_TMASK2 = 0x00F0 N_TSHIFT = 2 OBJECT_INHERIT_ACE = 1 OBJ_BITMAP = 7 OBJ_BRUSH = 2 OBJ_COLORSPACE = 14 OBJ_DC = 3 OBJ_ENHMETADC = 12 OBJ_ENHMETAFILE = 13 OBJ_EXTPEN = 11 OBJ_FONT = 6 OBJ_MEMDC = 10 OBJ_METADC = 4 OBJ_METAFILE = 9 OBJ_PAL = 5 OBJ_PEN = 1 OBJ_REGION = 8 OBSOLETE_DISK_GET_WRITE_CACHE_STATE = 475356 OBSOLETE_IOCTL_STORAGE_RESET_BUS = 3002368 OBSOLETE_IOCTL_STORAGE_RESET_DEVICE = 3002372 OCSP_BASIC_BY_KEY_RESPONDER_ID = 2 OCSP_BASIC_BY_NAME_RESPONDER_ID = 1 OCSP_BASIC_GOOD_CERT_STATUS = 0 OCSP_BASIC_RESPONSE_V1 = 0 OCSP_BASIC_REVOKED_CERT_STATUS = 1 OCSP_BASIC_UNKNOWN_CERT_STATUS = 2 OCSP_INTERNAL_ERROR_RESPONSE = 2 OCSP_MALFORMED_REQUEST_RESPONSE = 1 OCSP_REQUEST_V1 = 0 OCSP_SIG_REQUIRED_RESPONSE = 5 OCSP_SUCCESSFUL_RESPONSE = 0 OCSP_TRY_LATER_RESPONSE = 3 OCSP_UNAUTHORIZED_RESPONSE = 6 ODA_DRAWENTIRE = 0x0001 ODA_FOCUS = 0x0004 ODA_SELECT = 0x0002 ODDPARITY = 1 ODS_CHECKED = 0x0008 ODS_COMBOBOXEDIT = 0x1000 ODS_DEFAULT = 0x0020 ODS_DISABLED = 0x0004 ODS_FOCUS = 0x0010 ODS_GRAYED = 0x0002 ODS_HOTLIGHT = 0x0040 ODS_INACTIVE = 0x0080 ODS_NOACCEL = 0x0100 ODS_NOFOCUSRECT = 0x0200 ODS_SELECTED = 0x0001 ODT_BUTTON = 4 ODT_COMBOBOX = 3 ODT_LISTBOX = 2 ODT_MENU = 1 ODT_STATIC = 5 OEM_CHARSET = 255 OEM_FIXED_FONT = 10 OFFLINE_STATUS_INCOMPLETE = 0x0004 OFFLINE_STATUS_LOCAL = 0x0001 OFFLINE_STATUS_REMOTE = 0x0002 OFN_ALLOWMULTISELECT = 0x200 OFN_CREATEPROMPT = 0x2000 OFN_DONTADDTORECENT = 0x2000000 OFN_ENABLEHOOK = 0x20 OFN_ENABLEINCLUDENOTIFY = 0x400000 OFN_ENABLESIZING = 0x800000 OFN_ENABLETEMPLATE = 0x40 OFN_ENABLETEMPLATEHANDLE = 0x80 OFN_EXPLORER = 0x80000 OFN_EXTENSIONDIFFERENT = 0x400 OFN_EX_NOPLACESBAR = 0x1 OFN_FILEMUSTEXIST = 0x1000 OFN_FORCESHOWHIDDEN = 0x10000000 OFN_HIDEREADONLY = 0x4 OFN_LONGNAMES = 0x200000 OFN_NOCHANGEDIR = 0x8 OFN_NODEREFERENCELINKS = 0x100000 OFN_NOLONGNAMES = 0x40000 OFN_NONETWORKBUTTON = 0x20000 OFN_NOREADONLYRETURN = 0x8000 OFN_NOTESTFILECREATE = 0x10000 OFN_NOVALIDATE = 0x100 OFN_OVERWRITEPROMPT = 0x2 OFN_PATHMUSTEXIST = 0x800 OFN_READONLY = 0x1 OFN_SHAREAWARE = 0x4000 OFN_SHAREFALLTHROUGH = 2 OFN_SHARENOWARN = 1 OFN_SHAREWARN = 0 OFN_SHOWHELP = 0x10 OFS_MAXPATHNAME = 128 OF_CANCEL = 0x800 OF_CREATE = 0x1000 OF_DELETE = 0x200 OF_EXIST = 0x4000 OF_PARSE = 0x100 OF_PROMPT = 0x2000 OF_READ = 0x0 OF_READWRITE = 0x2 OF_REOPEN = 0x8000 OF_SHARE_COMPAT = 0x0 OF_SHARE_DENY_NONE = 0x40 OF_SHARE_DENY_READ = 0x30 OF_SHARE_DENY_WRITE = 0x20 OF_SHARE_EXCLUSIVE = 0x10 OF_VERIFY = 0x400 OF_WRITE = 0x1 OLECREATE_LEAVERUNNING = 0x1 OLEIVERB_DISCARDUNDOSTATE = -6 OLEIVERB_HIDE = -3 OLEIVERB_INPLACEACTIVATE = -5 OLEIVERB_OPEN = -2 OLEIVERB_PRIMARY = 0 OLEIVERB_SHOW = -1 OLEIVERB_UIACTIVATE = -4 OLEOBJ_E_FIRST = 2147746176 OLEOBJ_E_LAST = 2147746191 OLEOBJ_S_FIRST = 262528 OLEOBJ_S_LAST = 262543 ONE5STOPBITS = 1 ONESTOPBIT = 0 OPAQUE = 2 OPAQUEKEYBLOB = 0x9 OPENCHANNEL = 4110 OPEN_ALWAYS = 4 OPEN_EXISTING = 3 OPTIONAL = 0 ORD_LANGDRIVER = 1 OR_INVALID_OID = 1911 OR_INVALID_OXID = 1910 OR_INVALID_SET = 1912 OSVERSION_MASK = 0xFFFF0000 OUT = 0 OUTPUT_DEBUG_STRING_EVENT = 8 OUT_CHARACTER_PRECIS = 2 OUT_DEFAULT_PRECIS = 0 OUT_DEVICE_PRECIS = 5 OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME = "OutOfProcessFunctionTableCallback" OUT_OUTLINE_PRECIS = 8 OUT_PS_ONLY_PRECIS = 10 OUT_RASTER_PRECIS = 6 OUT_SCREEN_OUTLINE_PRECIS = 9 OUT_STRING_PRECIS = 1 OUT_STROKE_PRECIS = 3 OUT_TT_ONLY_PRECIS = 7 OUT_TT_PRECIS = 4 OVERWRITE_HIDDEN = 4 OWNER_SECURITY_INFORMATION = 1 O_ACCMODE = 3 O_APPEND = 8 O_BINARY = 32768 O_CREAT = 256 O_EXCL = 1024 O_NOINHERIT = 128 O_RANDOM = 16 O_RAW = 32768 O_RDONLY = 0 O_RDWR = 2 O_SEQUENTIAL = 32 O_TEMPORARY = 64 O_TEXT = 16384 O_TRUNC = 512 O_WRONLY = 1 PAGESETUPDLGORD = 1546 PAGESETUPDLGORDMOTIF = 1550 PAGE_EXECUTE = 0x10 PAGE_EXECUTE_READ = 0x20 PAGE_EXECUTE_READWRITE = 0x40 PAGE_EXECUTE_WRITECOPY = 0x80 PAGE_GUARD = 0x100 PAGE_NOACCESS = 0x01 PAGE_NOCACHE = 0x200 PAGE_READONLY = 0x02 PAGE_READWRITE = 0x04 PAGE_WRITECOMBINE = 0x400 PAGE_WRITECOPY = 0x08 PANOSE_COUNT = 10 PAN_ANY = 0 PAN_ARMSTYLE_INDEX = 6 PAN_BENT_ARMS_DOUBLE_SERIF = 11 PAN_BENT_ARMS_HORZ = 7 PAN_BENT_ARMS_SINGLE_SERIF = 10 PAN_BENT_ARMS_VERT = 9 PAN_BENT_ARMS_WEDGE = 8 PAN_CONTRAST_HIGH = 8 PAN_CONTRAST_INDEX = 4 PAN_CONTRAST_LOW = 4 PAN_CONTRAST_MEDIUM = 6 PAN_CONTRAST_MEDIUM_HIGH = 7 PAN_CONTRAST_MEDIUM_LOW = 5 PAN_CONTRAST_NONE = 2 PAN_CONTRAST_VERY_HIGH = 9 PAN_CONTRAST_VERY_LOW = 3 PAN_CULTURE_LATIN = 0 PAN_FAMILYTYPE_INDEX = 0 PAN_FAMILY_DECORATIVE = 4 PAN_FAMILY_PICTORIAL = 5 PAN_FAMILY_SCRIPT = 3 PAN_FAMILY_TEXT_DISPLAY = 2 PAN_LETTERFORM_INDEX = 7 PAN_LETT_NORMAL_BOXED = 4 PAN_LETT_NORMAL_CONTACT = 2 PAN_LETT_NORMAL_FLATTENED = 5 PAN_LETT_NORMAL_OFF_CENTER = 7 PAN_LETT_NORMAL_ROUNDED = 6 PAN_LETT_NORMAL_SQUARE = 8 PAN_LETT_NORMAL_WEIGHTED = 3 PAN_LETT_OBLIQUE_BOXED = 11 PAN_LETT_OBLIQUE_CONTACT = 9 PAN_LETT_OBLIQUE_FLATTENED = 12 PAN_LETT_OBLIQUE_OFF_CENTER = 14 PAN_LETT_OBLIQUE_ROUNDED = 13 PAN_LETT_OBLIQUE_SQUARE = 15 PAN_LETT_OBLIQUE_WEIGHTED = 10 PAN_MIDLINE_CONSTANT_POINTED = 9 PAN_MIDLINE_CONSTANT_SERIFED = 10 PAN_MIDLINE_CONSTANT_TRIMMED = 8 PAN_MIDLINE_HIGH_POINTED = 6 PAN_MIDLINE_HIGH_SERIFED = 7 PAN_MIDLINE_HIGH_TRIMMED = 5 PAN_MIDLINE_INDEX = 8 PAN_MIDLINE_LOW_POINTED = 12 PAN_MIDLINE_LOW_SERIFED = 13 PAN_MIDLINE_LOW_TRIMMED = 11 PAN_MIDLINE_STANDARD_POINTED = 3 PAN_MIDLINE_STANDARD_SERIFED = 4 PAN_MIDLINE_STANDARD_TRIMMED = 2 PAN_NO_FIT = 1 PAN_PROPORTION_INDEX = 3 PAN_PROP_CONDENSED = 6 PAN_PROP_EVEN_WIDTH = 4 PAN_PROP_EXPANDED = 5 PAN_PROP_MODERN = 3 PAN_PROP_MONOSPACED = 9 PAN_PROP_OLD_STYLE = 2 PAN_PROP_VERY_CONDENSED = 8 PAN_PROP_VERY_EXPANDED = 7 PAN_SERIFSTYLE_INDEX = 1 PAN_SERIF_BONE = 8 PAN_SERIF_COVE = 2 PAN_SERIF_EXAGGERATED = 9 PAN_SERIF_FLARED = 14 PAN_SERIF_NORMAL_SANS = 11 PAN_SERIF_OBTUSE_COVE = 3 PAN_SERIF_OBTUSE_SANS = 12 PAN_SERIF_OBTUSE_SQUARE_COVE = 5 PAN_SERIF_PERP_SANS = 13 PAN_SERIF_ROUNDED = 15 PAN_SERIF_SQUARE = 6 PAN_SERIF_SQUARE_COVE = 4 PAN_SERIF_THIN = 7 PAN_SERIF_TRIANGLE = 10 PAN_STRAIGHT_ARMS_DOUBLE_SERIF = 6 PAN_STRAIGHT_ARMS_HORZ = 2 PAN_STRAIGHT_ARMS_SINGLE_SERIF = 5 PAN_STRAIGHT_ARMS_VERT = 4 PAN_STRAIGHT_ARMS_WEDGE = 3 PAN_STROKEVARIATION_INDEX = 5 PAN_STROKE_GRADUAL_DIAG = 2 PAN_STROKE_GRADUAL_HORZ = 5 PAN_STROKE_GRADUAL_TRAN = 3 PAN_STROKE_GRADUAL_VERT = 4 PAN_STROKE_INSTANT_VERT = 8 PAN_STROKE_RAPID_HORZ = 7 PAN_STROKE_RAPID_VERT = 6 PAN_WEIGHT_BLACK = 10 PAN_WEIGHT_BOLD = 8 PAN_WEIGHT_BOOK = 5 PAN_WEIGHT_DEMI = 7 PAN_WEIGHT_HEAVY = 9 PAN_WEIGHT_INDEX = 2 PAN_WEIGHT_LIGHT = 3 PAN_WEIGHT_MEDIUM = 6 PAN_WEIGHT_NORD = 11 PAN_WEIGHT_THIN = 4 PAN_WEIGHT_VERY_LIGHT = 2 PAN_XHEIGHT_CONSTANT_LARGE = 4 PAN_XHEIGHT_CONSTANT_SMALL = 2 PAN_XHEIGHT_CONSTANT_STD = 3 PAN_XHEIGHT_DUCKING_LARGE = 7 PAN_XHEIGHT_DUCKING_SMALL = 5 PAN_XHEIGHT_DUCKING_STD = 6 PAN_XHEIGHT_INDEX = 9 PARAMFLAG_FHASCUSTDATA = 64 PARAMFLAG_FHASDEFAULT = 32 PARAMFLAG_FIN = 1 PARAMFLAG_FLCID = 4 PARAMFLAG_FOPT = 16 PARAMFLAG_FOUT = 2 PARAMFLAG_FRETVAL = 8 PARAMFLAG_NONE = 0 PARTITION_ENTRY_UNUSED = 0x00 PARTITION_EXTENDED = 0x05 PARTITION_FAT32 = 0x0B PARTITION_FAT32_XINT13 = 0x0C PARTITION_FAT_12 = 0x01 PARTITION_FAT_16 = 0x04 PARTITION_HUGE = 0x06 PARTITION_IFS = 0x07 PARTITION_LDM = 0x42 PARTITION_NTFT = 0x80 PARTITION_OS2BOOTMGR = 0x0A PARTITION_PREP = 0x41 PARTITION_UNIX = 0x63 PARTITION_XENIX_1 = 0x02 PARTITION_XENIX_2 = 0x03 PARTITION_XINT13 = 0x0E PARTITION_XINT13_EXTENDED = 0x0F PASCAL = 0 PASSTHROUGH = 19 PBTF_APMRESUMEFROMFAILURE = 0x00000001 PBT_APMBATTERYLOW = 0x0009 PBT_APMOEMEVENT = 0x000B PBT_APMPOWERSTATUSCHANGE = 0x000A PBT_APMQUERYSTANDBY = 0x0001 PBT_APMQUERYSTANDBYFAILED = 0x0003 PBT_APMQUERYSUSPEND = 0x0000 PBT_APMQUERYSUSPENDFAILED = 0x0002 PBT_APMRESUMEAUTOMATIC = 0x0012 PBT_APMRESUMECRITICAL = 0x0006 PBT_APMRESUMESTANDBY = 0x0008 PBT_APMRESUMESUSPEND = 0x0007 PBT_APMSTANDBY = 0x0005 PBT_APMSUSPEND = 0x0004 PBT_POWERSETTINGCHANGE = 32787 PCLEANUI = 2214592512 PC_EXPLICIT = 0x02 PC_INTERIORS = 128 PC_NOCOLLAPSE = 0x04 PC_NONE = 0 PC_PATHS = 512 PC_POLYGON = 1 PC_POLYPOLYGON = 256 PC_RECTANGLE = 2 PC_RESERVED = 0x01 PC_SCANLINE = 8 PC_STYLED = 32 PC_TRAPEZOID = 4 PC_WIDE = 16 PC_WIDESTYLED = 64 PC_WINDPOLYGON = 4 PDCAP_D0_SUPPORTED = 0x00000001 PDCAP_D1_SUPPORTED = 0x00000002 PDCAP_D2_SUPPORTED = 0x00000004 PDCAP_D3_SUPPORTED = 0x00000008 PDCAP_WAKE_FROM_D0_SUPPORTED = 0x00000010 PDCAP_WAKE_FROM_D1_SUPPORTED = 0x00000020 PDCAP_WAKE_FROM_D2_SUPPORTED = 0x00000040 PDCAP_WAKE_FROM_D3_SUPPORTED = 0x00000080 PDCAP_WARM_EJECT_SUPPORTED = 0x00000100 PDERR_CREATEICFAILURE = 0x100A PDERR_DEFAULTDIFFERENT = 0x100C PDERR_DNDMMISMATCH = 0x1009 PDERR_GETDEVMODEFAIL = 0x1005 PDERR_INITFAILURE = 0x1006 PDERR_LOADDRVFAILURE = 0x1004 PDERR_NODEFAULTPRN = 0x1008 PDERR_NODEVICES = 0x1007 PDERR_PARSEFAILURE = 0x1002 PDERR_PRINTERCODES = 0x1000 PDERR_PRINTERNOTFOUND = 0x100B PDERR_RETDEFFAILURE = 0x1003 PDERR_SETUPFAILURE = 0x1001 PDEVICESIZE = 26 PDIRTYUI = 2281701376 PD_ALLPAGES = 0x0 PD_COLLATE = 0x10 PD_CURRENTPAGE = 0x400000 PD_DISABLEPRINTTOFILE = 0x80000 PD_ENABLEPRINTHOOK = 0x1000 PD_ENABLEPRINTTEMPLATE = 0x4000 PD_ENABLEPRINTTEMPLATEHANDLE = 0x10000 PD_ENABLESETUPHOOK = 0x2000 PD_ENABLESETUPTEMPLATE = 0x8000 PD_ENABLESETUPTEMPLATEHANDLE = 0x20000 PD_EXCLUSIONFLAGS = 0x1000000 PD_EXCL_COPIESANDCOLLATE = 33024 PD_HIDEPRINTTOFILE = 0x100000 PD_NOCURRENTPAGE = 0x800000 PD_NONETWORKBUTTON = 0x200000 PD_NOPAGENUMS = 0x8 PD_NOSELECTION = 0x4 PD_NOWARNING = 0x80 PD_PAGENUMS = 0x2 PD_PRINTSETUP = 0x40 PD_PRINTTOFILE = 0x20 PD_RESULT_APPLY = 2 PD_RESULT_CANCEL = 0 PD_RESULT_PRINT = 1 PD_RETURNDC = 0x100 PD_RETURNDEFAULT = 0x400 PD_RETURNIC = 0x200 PD_SELECTION = 0x1 PD_SHOWHELP = 0x800 PD_USEDEVMODECOPIES = 0x40000 PD_USEDEVMODECOPIESANDCOLLATE = 0x40000 PD_USELARGETEMPLATE = 0x10000000 PERFORMANCE_DATA_VERSION = 1 PERFSTATE_POLICY_CHANGE_IDEAL = 0 PERFSTATE_POLICY_CHANGE_MAX = 2 PERFSTATE_POLICY_CHANGE_ROCKET = 2 PERFSTATE_POLICY_CHANGE_SINGLE = 1 PERF_100NSEC_MULTI_TIMER = 575735040 PERF_100NSEC_MULTI_TIMER_INV = 592512256 PERF_100NSEC_TIMER = 542180608 PERF_100NSEC_TIMER_INV = 558957824 PERF_AVERAGE_BASE = 1073939458 PERF_AVERAGE_BULK = 1073874176 PERF_AVERAGE_TIMER = 805438464 PERF_COUNTER_100NS_QUEUELEN_TYPE = 5571840 PERF_COUNTER_BASE = 0x00030000 PERF_COUNTER_BULK_COUNT = 272696576 PERF_COUNTER_COUNTER = 272696320 PERF_COUNTER_DELTA = 4195328 PERF_COUNTER_ELAPSED = 0x00040000 PERF_COUNTER_FRACTION = 0x00020000 PERF_COUNTER_HISTOGRAM = 0x00060000 PERF_COUNTER_HISTOGRAM_TYPE = 0x80000000 PERF_COUNTER_LARGE_DELTA = 4195584 PERF_COUNTER_LARGE_QUEUELEN_TYPE = 4523264 PERF_COUNTER_LARGE_RAWCOUNT = 65792 PERF_COUNTER_LARGE_RAWCOUNT_HEX = 256 PERF_COUNTER_MULTI_BASE = 1107494144 PERF_COUNTER_MULTI_TIMER = 574686464 PERF_COUNTER_MULTI_TIMER_INV = 591463680 PERF_COUNTER_NODATA = 1073742336 PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE = 6620416 PERF_COUNTER_PRECISION = 0x00070000 PERF_COUNTER_QUEUELEN = 0x00050000 PERF_COUNTER_QUEUELEN_TYPE = 4523008 PERF_COUNTER_RATE = 0x00010000 PERF_COUNTER_RAWCOUNT = 65536 PERF_COUNTER_RAWCOUNT_HEX = 0 PERF_COUNTER_TEXT = 2816 PERF_COUNTER_TIMER = 541132032 PERF_COUNTER_TIMER_INV = 557909248 PERF_COUNTER_VALUE = 0x00000000 PERF_DATA_REVISION = 1 PERF_DATA_VERSION = 1 PERF_DELTA_BASE = 0x00800000 PERF_DELTA_COUNTER = 0x00400000 PERF_DETAIL_ADVANCED = 200 PERF_DETAIL_EXPERT = 300 PERF_DETAIL_NOVICE = 100 PERF_DETAIL_WIZARD = 400 PERF_DISPLAY_NOSHOW = 0x40000000 PERF_DISPLAY_NO_SUFFIX = 0x00000000 PERF_DISPLAY_PERCENT = 0x20000000 PERF_DISPLAY_PER_SEC = 0x10000000 PERF_DISPLAY_SECONDS = 0x30000000 PERF_ELAPSED_TIME = 807666944 PERF_INVERSE_COUNTER = 0x01000000 PERF_LARGE_RAW_BASE = 1073939712 PERF_LARGE_RAW_FRACTION = 537003264 PERF_MULTI_COUNTER = 0x02000000 PERF_NO_INSTANCES = -1 PERF_NO_UNIQUE_ID = -1 PERF_NUMBER_DECIMAL = 0x00010000 PERF_NUMBER_DEC_1000 = 0x00020000 PERF_NUMBER_HEX = 0x00000000 PERF_OBJECT_TIMER = 0x00200000 PERF_OBJ_TIME_TIMER = 543229184 PERF_PRECISION_100NS_TIMER = 542573824 PERF_PRECISION_OBJECT_TIMER = 543622400 PERF_PRECISION_SYSTEM_TIMER = 541525248 PERF_PRECISION_TIMESTAMP = 1073939712 PERF_RAW_BASE = 1073939459 PERF_RAW_FRACTION = 537003008 PERF_SAMPLE_BASE = 1073939457 PERF_SAMPLE_COUNTER = 4260864 PERF_SAMPLE_FRACTION = 549585920 PERF_SIZE_DWORD = 0x00000000 PERF_SIZE_LARGE = 0x00000100 PERF_SIZE_VARIABLE_LEN = 0x00000300 PERF_SIZE_ZERO = 0x00000200 PERF_TEXT_ASCII = 0x00010000 PERF_TEXT_UNICODE = 0x00000000 PERF_TIMER_100NS = 0x00100000 PERF_TIMER_TICK = 0x00000000 PERF_TYPE_COUNTER = 0x00000400 PERF_TYPE_NUMBER = 0x00000000 PERF_TYPE_TEXT = 0x00000800 PERF_TYPE_ZERO = 0x00000C00 PFD_DEPTH_DONTCARE = 0x20000000 PFD_DIRECT3D_ACCELERATED = 0x00004000 PFD_DOUBLEBUFFER = 0x00000001 PFD_DOUBLEBUFFER_DONTCARE = 0x40000000 PFD_DRAW_TO_BITMAP = 0x00000008 PFD_DRAW_TO_WINDOW = 0x00000004 PFD_GENERIC_ACCELERATED = 0x00001000 PFD_GENERIC_FORMAT = 0x00000040 PFD_MAIN_PLANE = 0 PFD_NEED_PALETTE = 0x00000080 PFD_NEED_SYSTEM_PALETTE = 0x00000100 PFD_OVERLAY_PLANE = 1 PFD_STEREO = 0x00000002 PFD_STEREO_DONTCARE = 0x80000000 PFD_SUPPORT_COMPOSITION = 0x00008000 PFD_SUPPORT_DIRECTDRAW = 0x00002000 PFD_SUPPORT_GDI = 0x00000010 PFD_SUPPORT_OPENGL = 0x00000020 PFD_SWAP_COPY = 0x00000400 PFD_SWAP_EXCHANGE = 0x00000200 PFD_SWAP_LAYER_BUFFERS = 0x00000800 PFD_TYPE_COLORINDEX = 1 PFD_TYPE_RGBA = 0 PFD_UNDERLAY_PLANE = -1 PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7 PF_ALPHA_BYTE_INSTRUCTIONS = 5 PF_APPLETALK = 16 PF_ARM_64BIT_LOADSTORE_ATOMIC = 25 PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE = 24 PF_ARM_EXTERNAL_CACHE_AVAILABLE = 26 PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE = 27 PF_ARM_NEON_INSTRUCTIONS_AVAILABLE = 19 PF_ARM_VFP_32_REGISTERS_AVAILABLE = 18 PF_BAN = 21 PF_CCITT = 10 PF_CHANNELS_ENABLED = 16 PF_CHAOS = 5 PF_COMPARE64_EXCHANGE128 = 15 PF_COMPARE_EXCHANGE128 = 14 PF_COMPARE_EXCHANGE_DOUBLE = 2 PF_DATAKIT = 9 PF_DECnet = 12 PF_DLI = 13 PF_ECMA = 8 PF_FASTFAIL_AVAILABLE = 23 PF_FIREFOX = 19 PF_FLOATING_POINT_EMULATED = 1 PF_FLOATING_POINT_PRECISION_ERRATA = 0 PF_HYLINK = 15 PF_IMPLINK = 3 PF_INET = 2 PF_IPX = 6 PF_ISO = 7 PF_LAT = 14 PF_MAX = 22 PF_MMX_INSTRUCTIONS_AVAILABLE = 3 PF_NS = 6 PF_NX_ENABLED = 12 PF_OSI = 7 PF_PAE_ENABLED = 9 PF_PPC_MOVEMEM_64BIT_OK = 4 PF_PUP = 4 PF_RDTSC_INSTRUCTION_AVAILABLE = 8 PF_RDWRFSGSBASE_AVAILABLE = 22 PF_SECOND_LEVEL_ADDRESS_TRANSLATION = 20 PF_SNA = 11 PF_SSE3_INSTRUCTIONS_AVAILABLE = 13 PF_SSE_DAZ_MODE_AVAILABLE = 11 PF_UNIX = 1 PF_UNKNOWN1 = 20 PF_UNSPEC = 0 PF_VIRT_FIRMWARE_ENABLED = 21 PF_VOICEVIEW = 18 PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10 PF_XMMI_INSTRUCTIONS_AVAILABLE = 6 PF_XSAVE_ENABLED = 17 PHYSICALHEIGHT = 111 PHYSICALOFFSETX = 112 PHYSICALOFFSETY = 113 PHYSICALWIDTH = 110 PIDDI_THUMBNAIL = 2 PIDDSI_BYTECOUNT = 0x00000004 PIDDSI_CATEGORY = 0x00000002 PIDDSI_COMPANY = 0x0000000F PIDDSI_DOCPARTS = 0x0000000D PIDDSI_HEADINGPAIR = 0x0000000C PIDDSI_HIDDENCOUNT = 0x00000009 PIDDSI_LINECOUNT = 0x00000005 PIDDSI_LINKSDIRTY = 0x00000010 PIDDSI_MANAGER = 0x0000000E PIDDSI_MMCLIPCOUNT = 0x0000000A PIDDSI_NOTECOUNT = 0x00000008 PIDDSI_PARCOUNT = 0x00000006 PIDDSI_PRESFORMAT = 0x00000003 PIDDSI_SCALE = 0x0000000B PIDDSI_SLIDECOUNT = 0x00000007 PIDMSI_COPYRIGHT = 11 PIDMSI_EDITOR = 2 PIDMSI_OWNER = 8 PIDMSI_PRODUCTION = 10 PIDMSI_PROJECT = 6 PIDMSI_RATING = 9 PIDMSI_SEQUENCE_NO = 5 PIDMSI_SOURCE = 4 PIDMSI_STATUS = 7 PIDMSI_SUPPLIER = 3 PIDSI_APPNAME = 18 PIDSI_AUTHOR = 4 PIDSI_CHARCOUNT = 16 PIDSI_COMMENTS = 6 PIDSI_CREATE_DTM = 12 PIDSI_DOC_SECURITY = 19 PIDSI_EDITTIME = 10 PIDSI_KEYWORDS = 5 PIDSI_LASTAUTHOR = 8 PIDSI_LASTPRINTED = 11 PIDSI_LASTSAVE_DTM = 13 PIDSI_PAGECOUNT = 14 PIDSI_REVNUMBER = 9 PIDSI_SUBJECT = 3 PIDSI_TEMPLATE = 7 PIDSI_THUMBNAIL = 17 PIDSI_TITLE = 2 PIDSI_WORDCOUNT = 15 PID_BEHAVIOR = 2147483651 PID_CODEPAGE = 1 PID_DICTIONARY = 0 PID_FIRST_NAME_DEFAULT = 4095 PID_FIRST_USABLE = 2 PID_ILLEGAL = 4294967295 PID_LOCALE = 2147483648 PID_MAX_READONLY = 3221225471 PID_MIN_READONLY = 2147483648 PID_MODIFY_TIME = 2147483649 PID_SECURITY = 2147483650 PIPE_ACCEPT_REMOTE_CLIENTS = 0x0 PIPE_ACCESS_DUPLEX = 0x3 PIPE_ACCESS_INBOUND = 0x1 PIPE_ACCESS_OUTBOUND = 0x2 PIPE_CLIENT_END = 0x0 PIPE_NOWAIT = 0x1 PIPE_READMODE_BYTE = 0x0 PIPE_READMODE_MESSAGE = 0x2 PIPE_REJECT_REMOTE_CLIENTS = 0x8 PIPE_SERVER_END = 0x1 PIPE_TYPE_BYTE = 0x0 PIPE_TYPE_MESSAGE = 0x4 PIPE_UNLIMITED_INSTANCES = 255 PIPE_WAIT = 0x0 PKCS12_ALLOW_OVERWRITE_KEY = 0x4000 PKCS12_ALWAYS_CNG_KSP = 0x200 PKCS12_EXPORT_RESERVED_MASK = 0xffff0000 PKCS12_EXPORT_SILENT = 0x40 PKCS12_IMPORT_RESERVED_MASK = 0xffff0000 PKCS12_IMPORT_SILENT = 0x40 PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x10 PKCS12_NO_PERSIST_KEY = 0x8000 PKCS12_OBJECT_LOCATOR_ALL_IMPORT_FLAGS = 33360 PKCS12_PREFER_CNG_KSP = 0x100 PKCS12_PROTECT_TO_DOMAIN_SIDS = 0x20 PKCS5_PADDING = 1 PKCS_7_ASN_ENCODING = 0x10000 PKCS_7_NDR_ENCODING = 0x20000 PKCS_RSA_SSA_PSS_TRAILER_FIELD_BC = 1 PLAINTEXTKEYBLOB = 0x8 PLANES = 14 PMB_ACTIVE = 0x00000001 PM_NOREMOVE = 0x0000 PM_NOYIELD = 0x0002 PM_QS_INPUT = 67567616 PM_QS_PAINT = 2097152 PM_QS_POSTMESSAGE = 9961472 PM_QS_SENDMESSAGE = 4194304 PM_REMOVE = 0x0001 POINTER_32 = 0 POINTER_64 = 0 POINTER_SIGNED = 0 POINTER_UNSIGNED = 0 POLICY_AUDIT_SUBCATEGORY_COUNT = 56 POLICY_SHOWREASONUI_ALWAYS = 1 POLICY_SHOWREASONUI_NEVER = 0 POLICY_SHOWREASONUI_SERVERONLY = 3 POLICY_SHOWREASONUI_WORKSTATIONONLY = 2 POLYFILL_LAST = 2 POLYGONALCAPS = 32 PORT_STATUS_DOOR_OPEN = 7 PORT_STATUS_NO_TONER = 6 PORT_STATUS_OFFLINE = 1 PORT_STATUS_OUTPUT_BIN_FULL = 4 PORT_STATUS_OUT_OF_MEMORY = 9 PORT_STATUS_PAPER_JAM = 2 PORT_STATUS_PAPER_OUT = 3 PORT_STATUS_PAPER_PROBLEM = 5 PORT_STATUS_POWER_SAVE = 12 PORT_STATUS_TONER_LOW = 10 PORT_STATUS_TYPE_ERROR = 1 PORT_STATUS_TYPE_INFO = 3 PORT_STATUS_TYPE_WARNING = 2 PORT_STATUS_USER_INTERVENTION = 8 PORT_STATUS_WARMING_UP = 11 PORT_TYPE_NET_ATTACHED = 0x0008 PORT_TYPE_READ = 0x0002 PORT_TYPE_REDIRECTED = 0x0004 PORT_TYPE_WRITE = 0x0001 POSTSCRIPT_DATA = 37 POSTSCRIPT_IDENTIFY = 4117 POSTSCRIPT_IGNORE = 38 POSTSCRIPT_INJECTION = 4118 POSTSCRIPT_PASSTHROUGH = 4115 POWERBUTTON_ACTION_INDEX_HIBERNATE = 2 POWERBUTTON_ACTION_INDEX_NOTHING = 0 POWERBUTTON_ACTION_INDEX_SHUTDOWN = 3 POWERBUTTON_ACTION_INDEX_SLEEP = 1 POWERBUTTON_ACTION_VALUE_HIBERNATE = 3 POWERBUTTON_ACTION_VALUE_NOTHING = 0 POWERBUTTON_ACTION_VALUE_SHUTDOWN = 6 POWERBUTTON_ACTION_VALUE_SLEEP = 2 POWER_ACTION_CRITICAL = 0x80000000 POWER_ACTION_DISABLE_WAKES = 0x40000000 POWER_ACTION_HIBERBOOT = 0x00000008 POWER_ACTION_LIGHTEST_FIRST = 0x10000000 POWER_ACTION_LOCK_CONSOLE = 0x20000000 POWER_ACTION_OVERRIDE_APPS = 0x00000004 POWER_ACTION_PSEUDO_TRANSITION = 0x08000000 POWER_ACTION_QUERY_ALLOWED = 0x00000001 POWER_ACTION_UI_ALLOWED = 0x00000002 POWER_DEVICE_IDLE_POLICY_CONSERVATIVE = 1 POWER_DEVICE_IDLE_POLICY_PERFORMANCE = 0 POWER_FORCE_TRIGGER_RESET = 0x80000000 POWER_LEVEL_USER_NOTIFY_EXEC = 0x00000004 POWER_LEVEL_USER_NOTIFY_SOUND = 0x00000002 POWER_LEVEL_USER_NOTIFY_TEXT = 0x00000001 POWER_PLATFORM_ROLE_V1 = 1 POWER_PLATFORM_ROLE_V2 = 2 POWER_PLATFORM_ROLE_VERSION = 1 POWER_REQUEST_CONTEXT_DETAILED_STRING = 0x00000002 POWER_REQUEST_CONTEXT_SIMPLE_STRING = 0x00000001 POWER_REQUEST_CONTEXT_VERSION = 0 POWER_SETTING_VALUE_VERSION = 1 POWER_SYSTEM_MAXIMUM = 7 POWER_USER_NOTIFY_BUTTON = 0x00000008 POWER_USER_NOTIFY_FORCED_SHUTDOWN = 0x00000020 POWER_USER_NOTIFY_SHUTDOWN = 0x00000010 PO_DELETE = 0x0013 PO_PORTCHANGE = 0x0020 PO_RENAME = 0x0014 PO_REN_PORT = 0x0034 PO_THROTTLE_ADAPTIVE = 3 PO_THROTTLE_CONSTANT = 1 PO_THROTTLE_DEGRADE = 2 PO_THROTTLE_MAXIMUM = 4 PO_THROTTLE_NONE = 0 PPM_FIRMWARE_ACPI1C2 = 0x1 PPM_FIRMWARE_ACPI1C3 = 0x2 PPM_FIRMWARE_ACPI1TSTATES = 0x4 PPM_FIRMWARE_CPC = 0x40000 PPM_FIRMWARE_CSD = 0x10 PPM_FIRMWARE_CST = 0x8 PPM_FIRMWARE_OSC = 0x10000 PPM_FIRMWARE_PCCH = 0x4000 PPM_FIRMWARE_PCCP = 0x8000 PPM_FIRMWARE_PCT = 0x20 PPM_FIRMWARE_PDC = 0x20000 PPM_FIRMWARE_PPC = 0x100 PPM_FIRMWARE_PSD = 0x200 PPM_FIRMWARE_PSS = 0x40 PPM_FIRMWARE_PTC = 0x400 PPM_FIRMWARE_TPC = 0x1000 PPM_FIRMWARE_TSD = 0x2000 PPM_FIRMWARE_TSS = 0x800 PPM_FIRMWARE_XPSS = 0x80 PPM_IDLE_IMPLEMENTATION_CSTATES = 0x1 PPM_IDLE_IMPLEMENTATION_NONE = 0x0 PPM_IDLE_IMPLEMENTATION_PEP = 0x2 PPM_PERFORMANCE_IMPLEMENTATION_CPPC = 3 PPM_PERFORMANCE_IMPLEMENTATION_NONE = 0 PPM_PERFORMANCE_IMPLEMENTATION_PCCV1 = 2 PPM_PERFORMANCE_IMPLEMENTATION_PEP = 4 PPM_PERFORMANCE_IMPLEMENTATION_PSTATES = 1 PP_ADMIN_PIN = 31 PP_APPLI_CERT = 18 PP_CERTCHAIN = 9 PP_CHANGE_PASSWORD = 7 PP_CLIENT_HWND = 1 PP_CONTAINER = 6 PP_CONTEXT_INFO = 11 PP_CRYPT_COUNT_KEY_USE = 41 PP_DELETEKEY = 24 PP_DISPLAYERRORS = 0x01 PP_ENUMALGS = 1 PP_ENUMALGS_EX = 22 PP_ENUMCONTAINERS = 2 PP_ENUMELECTROOTS = 26 PP_ENUMEX_SIGNING_PROT = 40 PP_ENUMMANDROOTS = 25 PP_IMPTYPE = 3 PP_KEYEXCHANGE_ALG = 14 PP_KEYEXCHANGE_KEYSIZE = 12 PP_KEYEXCHANGE_PIN = 32 PP_KEYSET_SEC_DESCR = 8 PP_KEYSET_TYPE = 27 PP_KEYSPEC = 39 PP_KEYSTORAGE = 17 PP_KEYX_KEYSIZE_INC = 35 PP_KEY_TYPE_SUBTYPE = 10 PP_NAME = 4 PP_PROVTYPE = 16 PP_SESSION_KEYSIZE = 20 PP_SGC_INFO = 37 PP_SIGNATURE_ALG = 15 PP_SIGNATURE_KEYSIZE = 13 PP_SIGNATURE_PIN = 33 PP_SIG_KEYSIZE_INC = 34 PP_SYM_KEYSIZE = 19 PP_UI_PROMPT = 21 PP_UNIQUE_CONTAINER = 36 PP_USE_HARDWARE_RNG = 38 PP_VERSION = 5 PRAGMA_DEPRECATED_DDK = 0 PRF_CHECKVISIBLE = 1 PRF_CHILDREN = 16 PRF_CLIENT = 4 PRF_ERASEBKGND = 8 PRF_NONCLIENT = 2 PRF_OWNED = 32 PRINTACTION_DOCUMENTDEFAULTS = 6 PRINTACTION_NETINSTALL = 2 PRINTACTION_NETINSTALLLINK = 3 PRINTACTION_OPEN = 0 PRINTACTION_OPENNETPRN = 5 PRINTACTION_PROPERTIES = 1 PRINTACTION_SERVERPROPERTIES = 7 PRINTACTION_TESTPAGE = 4 PRINTDLGEXORD = 1549 PRINTDLGORD = 1538 PRINTER_ACCESS_ADMINISTER = 0x00000004 PRINTER_ACCESS_USE = 0x00000008 PRINTER_ALL_ACCESS = 983052 PRINTER_ATTRIBUTE_DEFAULT = 0x00000004 PRINTER_ATTRIBUTE_DIRECT = 0x00000002 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200 PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800 PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080 PRINTER_ATTRIBUTE_FAX = 0x00004000 PRINTER_ATTRIBUTE_HIDDEN = 0x00000020 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100 PRINTER_ATTRIBUTE_LOCAL = 0x00000040 PRINTER_ATTRIBUTE_NETWORK = 0x00000010 PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000 PRINTER_ATTRIBUTE_QUEUED = 0x00000001 PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000 PRINTER_ATTRIBUTE_SHARED = 0x00000008 PRINTER_ATTRIBUTE_TS = 0x00008000 PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400 PRINTER_CHANGE_ADD_FORM = 0x00010000 PRINTER_CHANGE_ADD_JOB = 0x00000100 PRINTER_CHANGE_ADD_PORT = 0x00100000 PRINTER_CHANGE_ADD_PRINTER = 0x00000001 PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000 PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000 PRINTER_CHANGE_ALL = 0x7777FFFF PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000 PRINTER_CHANGE_DELETE_FORM = 0x00040000 PRINTER_CHANGE_DELETE_JOB = 0x00000400 PRINTER_CHANGE_DELETE_PORT = 0x00400000 PRINTER_CHANGE_DELETE_PRINTER = 0x00000004 PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008 PRINTER_CHANGE_FORM = 0x00070000 PRINTER_CHANGE_JOB = 0x0000FF00 PRINTER_CHANGE_PORT = 0x00700000 PRINTER_CHANGE_PRINTER = 0x000000FF PRINTER_CHANGE_PRINTER_DRIVER = 0x70000000 PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000 PRINTER_CHANGE_SET_FORM = 0x00020000 PRINTER_CHANGE_SET_JOB = 0x00000200 PRINTER_CHANGE_SET_PRINTER = 0x00000002 PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000 PRINTER_CHANGE_TIMEOUT = 0x80000000 PRINTER_CHANGE_WRITE_JOB = 0x00000800 PRINTER_CONTROL_PAUSE = 1 PRINTER_CONTROL_PURGE = 3 PRINTER_CONTROL_RESUME = 2 PRINTER_CONTROL_SET_STATUS = 4 PRINTER_ENUM_CONNECTIONS = 0x00000004 PRINTER_ENUM_CONTAINER = 0x00008000 PRINTER_ENUM_DEFAULT = 0x00000001 PRINTER_ENUM_EXPAND = 0x00004000 PRINTER_ENUM_FAVORITE = 0x00000004 PRINTER_ENUM_HIDE = 0x01000000 PRINTER_ENUM_ICON1 = 0x00010000 PRINTER_ENUM_ICON2 = 0x00020000 PRINTER_ENUM_ICON3 = 0x00040000 PRINTER_ENUM_ICON4 = 0x00080000 PRINTER_ENUM_ICON5 = 0x00100000 PRINTER_ENUM_ICON6 = 0x00200000 PRINTER_ENUM_ICON7 = 0x00400000 PRINTER_ENUM_ICON8 = 0x00800000 PRINTER_ENUM_ICONMASK = 0x00ff0000 PRINTER_ENUM_LOCAL = 0x00000002 PRINTER_ENUM_NAME = 0x00000008 PRINTER_ENUM_NETWORK = 0x00000040 PRINTER_ENUM_REMOTE = 0x00000010 PRINTER_ENUM_SHARED = 0x00000020 PRINTER_ERROR_INFORMATION = 0x80000000 PRINTER_ERROR_JAM = 0x00000002 PRINTER_ERROR_OUTOFPAPER = 0x00000001 PRINTER_ERROR_OUTOFTONER = 0x00000004 PRINTER_ERROR_SEVERE = 0x20000000 PRINTER_ERROR_WARNING = 0x40000000 PRINTER_EXECUTE = 131080 PRINTER_FONTTYPE = 0x4000 PRINTER_NOTIFY_FIELD_ATTRIBUTES = 0x0D PRINTER_NOTIFY_FIELD_AVERAGE_PPM = 0x15 PRINTER_NOTIFY_FIELD_BYTES_PRINTED = 0x19 PRINTER_NOTIFY_FIELD_CJOBS = 0x14 PRINTER_NOTIFY_FIELD_COMMENT = 0x05 PRINTER_NOTIFY_FIELD_DATATYPE = 0x0B PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = 0x0F PRINTER_NOTIFY_FIELD_DEVMODE = 0x07 PRINTER_NOTIFY_FIELD_DRIVER_NAME = 0x04 PRINTER_NOTIFY_FIELD_LOCATION = 0x06 PRINTER_NOTIFY_FIELD_OBJECT_GUID = 0x1A PRINTER_NOTIFY_FIELD_PAGES_PRINTED = 0x17 PRINTER_NOTIFY_FIELD_PARAMETERS = 0x0A PRINTER_NOTIFY_FIELD_PORT_NAME = 0x03 PRINTER_NOTIFY_FIELD_PRINTER_NAME = 0x01 PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = 0x09 PRINTER_NOTIFY_FIELD_PRIORITY = 0x0E PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0C PRINTER_NOTIFY_FIELD_SEPFILE = 0x08 PRINTER_NOTIFY_FIELD_SERVER_NAME = 0x00 PRINTER_NOTIFY_FIELD_SHARE_NAME = 0x02 PRINTER_NOTIFY_FIELD_START_TIME = 0x10 PRINTER_NOTIFY_FIELD_STATUS = 0x12 PRINTER_NOTIFY_FIELD_STATUS_STRING = 0x13 PRINTER_NOTIFY_FIELD_TOTAL_BYTES = 0x18 PRINTER_NOTIFY_FIELD_TOTAL_PAGES = 0x16 PRINTER_NOTIFY_FIELD_UNTIL_TIME = 0x11 PRINTER_NOTIFY_INFO_DISCARDED = 0x01 PRINTER_NOTIFY_OPTIONS_REFRESH = 0x01 PRINTER_NOTIFY_TYPE = 0x00 PRINTER_READ = 131080 PRINTER_STATUS_BUSY = 0x00000200 PRINTER_STATUS_DOOR_OPEN = 0x00400000 PRINTER_STATUS_ERROR = 0x00000002 PRINTER_STATUS_INITIALIZING = 0x00008000 PRINTER_STATUS_IO_ACTIVE = 0x00000100 PRINTER_STATUS_MANUAL_FEED = 0x00000020 PRINTER_STATUS_NOT_AVAILABLE = 0x00001000 PRINTER_STATUS_NO_TONER = 0x00040000 PRINTER_STATUS_OFFLINE = 0x00000080 PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800 PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000 PRINTER_STATUS_PAGE_PUNT = 0x00080000 PRINTER_STATUS_PAPER_JAM = 0x00000008 PRINTER_STATUS_PAPER_OUT = 0x00000010 PRINTER_STATUS_PAPER_PROBLEM = 0x00000040 PRINTER_STATUS_PAUSED = 0x00000001 PRINTER_STATUS_PENDING_DELETION = 0x00000004 PRINTER_STATUS_POWER_SAVE = 0x01000000 PRINTER_STATUS_PRINTING = 0x00000400 PRINTER_STATUS_PROCESSING = 0x00004000 PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000 PRINTER_STATUS_TONER_LOW = 0x00020000 PRINTER_STATUS_USER_INTERVENTION = 0x00100000 PRINTER_STATUS_WAITING = 0x00002000 PRINTER_STATUS_WARMING_UP = 0x00010000 PRINTER_WRITE = 131080 PRINTRATEUNIT_CPS = 2 PRINTRATEUNIT_IPM = 4 PRINTRATEUNIT_LPM = 3 PRINTRATEUNIT_PPM = 1 PRIVATEKEYBLOB = 0x7 PRIVATE_NAMESPACE_FLAG_DESTROY = 0x1 PRIVILEGE_SET_ALL_NECESSARY = 1 PRNSETUPDLGORD = 1539 PROCESSOR_ALPHA_21064 = 21064 PROCESSOR_AMD_X8664 = 8664 PROCESSOR_ARCHITECTURE_ALPHA = 2 PROCESSOR_ARCHITECTURE_ALPHA64 = 7 PROCESSOR_ARCHITECTURE_AMD64 = 9 PROCESSOR_ARCHITECTURE_ARM = 5 PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10 PROCESSOR_ARCHITECTURE_IA64 = 6 PROCESSOR_ARCHITECTURE_INTEL = 0 PROCESSOR_ARCHITECTURE_MIPS = 1 PROCESSOR_ARCHITECTURE_MSIL = 8 PROCESSOR_ARCHITECTURE_NEUTRAL = 11 PROCESSOR_ARCHITECTURE_PPC = 3 PROCESSOR_ARCHITECTURE_SHX = 4 PROCESSOR_ARCHITECTURE_UNKNOWN = 0xffff PROCESSOR_ARM720 = 1824 PROCESSOR_ARM820 = 2080 PROCESSOR_ARM920 = 2336 PROCESSOR_ARM_7TDMI = 70001 PROCESSOR_HITACHI_SH3 = 10003 PROCESSOR_HITACHI_SH3E = 10004 PROCESSOR_HITACHI_SH4 = 10005 PROCESSOR_IDLESTATE_POLICY_COUNT = 0x3 PROCESSOR_INTEL_386 = 386 PROCESSOR_INTEL_486 = 486 PROCESSOR_INTEL_IA64 = 2200 PROCESSOR_INTEL_PENTIUM = 586 PROCESSOR_MIPS_R4000 = 4000 PROCESSOR_MOTOROLA_821 = 821 PROCESSOR_OPTIL = 0x494f PROCESSOR_PERF_BOOST_MODE_AGGRESSIVE = 2 PROCESSOR_PERF_BOOST_MODE_DISABLED = 0 PROCESSOR_PERF_BOOST_MODE_EFFICIENT_AGGRESSIVE = 4 PROCESSOR_PERF_BOOST_MODE_EFFICIENT_ENABLED = 3 PROCESSOR_PERF_BOOST_MODE_ENABLED = 1 PROCESSOR_PERF_BOOST_MODE_MAX = 4 PROCESSOR_PERF_BOOST_POLICY_DISABLED = 0 PROCESSOR_PERF_BOOST_POLICY_MAX = 100 PROCESSOR_PPC_601 = 601 PROCESSOR_PPC_603 = 603 PROCESSOR_PPC_604 = 604 PROCESSOR_PPC_620 = 620 PROCESSOR_SHx_SH3 = 103 PROCESSOR_SHx_SH4 = 104 PROCESSOR_STRONGARM = 2577 PROCESS_ALL_ACCESS = 2035711 PROCESS_CREATE_PROCESS = 128 PROCESS_CREATE_THREAD = 2 PROCESS_DUP_HANDLE = 64 PROCESS_HEAP_ENTRY_BUSY = 0x4 PROCESS_HEAP_ENTRY_DDESHARE = 0x20 PROCESS_HEAP_ENTRY_MOVEABLE = 0x10 PROCESS_HEAP_REGION = 0x1 PROCESS_HEAP_UNCOMMITTED_RANGE = 0x2 PROCESS_MODE_BACKGROUND_BEGIN = 0x100000 PROCESS_MODE_BACKGROUND_END = 0x200000 PROCESS_QUERY_INFORMATION = 1024 PROCESS_QUERY_LIMITED_INFORMATION = 4096 PROCESS_SET_INFORMATION = 512 PROCESS_SET_QUOTA = 256 PROCESS_SET_SESSIONID = 4 PROCESS_SUSPEND_RESUME = 2048 PROCESS_TERMINATE = 1 PROCESS_VM_OPERATION = 8 PROCESS_VM_READ = 16 PROCESS_VM_WRITE = 32 PROC_IDLE_BUCKET_COUNT = 6 PROC_IDLE_BUCKET_COUNT_EX = 16 PRODUCT_ARM64_SERVER = 0x78 PRODUCT_BUSINESS = 0x6 PRODUCT_BUSINESS_N = 0x10 PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER = 0x7C PRODUCT_CLOUD_STORAGE_SERVER = 0x6E PRODUCT_CLUSTER_SERVER = 0x12 PRODUCT_CLUSTER_SERVER_V = 0x40 PRODUCT_CONNECTED_CAR = 0x75 PRODUCT_CORE = 0x65 PRODUCT_CORE_ARM = 0x61 PRODUCT_CORE_CONNECTED = 0x6F PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC = 0x74 PRODUCT_CORE_CONNECTED_N = 0x71 PRODUCT_CORE_CONNECTED_SINGLELANGUAGE = 0x73 PRODUCT_CORE_COUNTRYSPECIFIC = 0x63 PRODUCT_CORE_LANGUAGESPECIFIC = 0x64 PRODUCT_CORE_N = 0x62 PRODUCT_CORE_SINGLELANGUAGE = 0x64 PRODUCT_DATACENTER_EVALUATION_SERVER = 0x50 PRODUCT_DATACENTER_SERVER = 0x8 PRODUCT_DATACENTER_SERVER_CORE = 0xc PRODUCT_DATACENTER_SERVER_CORE_V = 0x27 PRODUCT_DATACENTER_SERVER_V = 0x25 PRODUCT_EDUCATION = 0x79 PRODUCT_EDUCATION_N = 0x7a PRODUCT_EMBEDDED = 0x41 PRODUCT_EMBEDDED_A = 0x58 PRODUCT_EMBEDDED_AUTOMOTIVE = 0x55 PRODUCT_EMBEDDED_E = 0x5A PRODUCT_EMBEDDED_EVAL = 0x6B PRODUCT_EMBEDDED_E_EVAL = 0x6C PRODUCT_EMBEDDED_INDUSTRY = 0x59 PRODUCT_EMBEDDED_INDUSTRY_A = 0x56 PRODUCT_EMBEDDED_INDUSTRY_A_E = 0x5C PRODUCT_EMBEDDED_INDUSTRY_E = 0x5B PRODUCT_EMBEDDED_INDUSTRY_EVAL = 0x69 PRODUCT_EMBEDDED_INDUSTRY_E_EVAL = 0x6A PRODUCT_ENTERPRISE = 0x4 PRODUCT_ENTERPRISE_E = 0x46 PRODUCT_ENTERPRISE_EVALUATION = 0x48 PRODUCT_ENTERPRISE_N = 0x1b PRODUCT_ENTERPRISE_N_EVALUATION = 0x54 PRODUCT_ENTERPRISE_S = 0x7D PRODUCT_ENTERPRISE_SERVER = 0xa PRODUCT_ENTERPRISE_SERVER_CORE = 0xe PRODUCT_ENTERPRISE_SERVER_CORE_V = 0x29 PRODUCT_ENTERPRISE_SERVER_IA64 = 0xf PRODUCT_ENTERPRISE_SERVER_V = 0x26 PRODUCT_ENTERPRISE_S_EVALUATION = 0x81 PRODUCT_ENTERPRISE_S_N = 0x7E PRODUCT_ENTERPRISE_S_N_EVALUATION = 0x82 PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL = 0x3C PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC = 0x3E PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT = 0x3B PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC = 0x3D PRODUCT_HOME_BASIC = 0x2 PRODUCT_HOME_BASIC_E = 0x43 PRODUCT_HOME_BASIC_N = 0x5 PRODUCT_HOME_PREMIUM = 0x3 PRODUCT_HOME_PREMIUM_E = 0x44 PRODUCT_HOME_PREMIUM_N = 0x1a PRODUCT_HOME_PREMIUM_SERVER = 0x22 PRODUCT_HOME_SERVER = 0x13 PRODUCT_HYPERV = 0x2a PRODUCT_ID_LENGTH = 16 PRODUCT_INDUSTRY_HANDHELD = 0x76 PRODUCT_IOTUAP = 0x7B PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT = 0x1e PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING = 0x20 PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY = 0x1f PRODUCT_MOBILE_CORE = 0x68 PRODUCT_MOBILE_ENTERPRISE = 0x85 PRODUCT_MULTIPOINT_PREMIUM_SERVER = 0x4D PRODUCT_MULTIPOINT_STANDARD_SERVER = 0x4C PRODUCT_NANO_SERVER = 0x6D PRODUCT_PPI_PRO = 0x77 PRODUCT_PROFESSIONAL = 0x30 PRODUCT_PROFESSIONAL_E = 0x45 PRODUCT_PROFESSIONAL_EMBEDDED = 0x3A PRODUCT_PROFESSIONAL_N = 0x31 PRODUCT_PROFESSIONAL_S = 0x7F PRODUCT_PROFESSIONAL_STUDENT = 0x70 PRODUCT_PROFESSIONAL_STUDENT_N = 0x72 PRODUCT_PROFESSIONAL_S_N = 0x80 PRODUCT_PROFESSIONAL_WMC = 0x67 PRODUCT_SB_SOLUTION_SERVER = 0x32 PRODUCT_SB_SOLUTION_SERVER_EM = 0x36 PRODUCT_SERVER_FOR_SB_SOLUTIONS = 0x33 PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM = 0x37 PRODUCT_SERVER_FOR_SMALLBUSINESS = 0x18 PRODUCT_SERVER_FOR_SMALLBUSINESS_V = 0x23 PRODUCT_SERVER_FOUNDATION = 0x21 PRODUCT_SERVER_V = 0x25 PRODUCT_SMALLBUSINESS_SERVER = 0x9 PRODUCT_SMALLBUSINESS_SERVER_PREMIUM = 0x19 PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE = 0x3f PRODUCT_SOLUTION_EMBEDDEDSERVER = 0x38 PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE = 0x39 PRODUCT_STANDARD_EVALUATION_SERVER = 0x4F PRODUCT_STANDARD_SERVER = 0x7 PRODUCT_STANDARD_SERVER_CORE = 0xd PRODUCT_STANDARD_SERVER_CORE_V = 0x28 PRODUCT_STANDARD_SERVER_SOLUTIONS = 0x34 PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE = 0x35 PRODUCT_STANDARD_SERVER_V = 0x24 PRODUCT_STARTER = 0xb PRODUCT_STARTER_E = 0x42 PRODUCT_STARTER_N = 0x2f PRODUCT_STORAGE_ENTERPRISE_SERVER = 0x17 PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE = 0x2e PRODUCT_STORAGE_EXPRESS_SERVER = 0x14 PRODUCT_STORAGE_EXPRESS_SERVER_CORE = 0x2b PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER = 0x60 PRODUCT_STORAGE_STANDARD_SERVER = 0x15 PRODUCT_STORAGE_STANDARD_SERVER_CORE = 0x2c PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER = 0x5F PRODUCT_STORAGE_WORKGROUP_SERVER = 0x16 PRODUCT_STORAGE_WORKGROUP_SERVER_CORE = 0x2d PRODUCT_THINPC = 0x57 PRODUCT_ULTIMATE = 0x1 PRODUCT_ULTIMATE_E = 0x47 PRODUCT_ULTIMATE_N = 0x1c PRODUCT_UNDEFINED = 0x0 PRODUCT_UNLICENSED = 0xabcdabcd PRODUCT_WEB_SERVER = 0x11 PRODUCT_WEB_SERVER_CORE = 0x1d PROFILE_EMBEDDED = 77 PROFILE_KERNEL = 0x20000000 PROFILE_LINKED = 76 PROFILE_SERVER = 0x40000000 PROFILE_USER = 0x10000000 PROGRESS_CANCEL = 1 PROGRESS_CONTINUE = 0 PROGRESS_QUIET = 3 PROGRESS_STOP = 2 PROOF_QUALITY = 2 PROPERTYKEY_DEFINED = 0 PROPSETFLAG_ANSI = 2 PROPSETFLAG_CASE_SENSITIVE = 8 PROPSETFLAG_DEFAULT = 0 PROPSETFLAG_NONSIMPLE = 1 PROPSETFLAG_UNBUFFERED = 4 PROPSETHDR_OSVERSION_UNKNOWN = 0xffffffff PROPSET_BEHAVIOR_CASE_SENSITIVE = 1 PROP_LG_CXDLG = 252 PROP_LG_CYDLG = 218 PROP_MED_CXDLG = 227 PROP_MED_CYDLG = 215 PROP_SM_CXDLG = 212 PROP_SM_CYDLG = 188 PROTECTED_DACL_SECURITY_INFORMATION = 2147483648 PROTECTED_SACL_SECURITY_INFORMATION = 1073741824 PROTOCOLFLAG_NO_PICS_CHECK = 0x1 PROVIDER_KEEPS_VALUE_LENGTH = 0x1 PROV_DH_SCHANNEL = 18 PROV_DSS = 3 PROV_DSS_DH = 13 PROV_EC_ECDSA_FULL = 16 PROV_EC_ECDSA_SIG = 14 PROV_EC_ECNRA_FULL = 17 PROV_EC_ECNRA_SIG = 15 PROV_FORTEZZA = 4 PROV_INTEL_SEC = 22 PROV_MS_EXCHANGE = 5 PROV_REPLACE_OWF = 23 PROV_RNG = 21 PROV_RSA_AES = 24 PROV_RSA_FULL = 1 PROV_RSA_SCHANNEL = 12 PROV_RSA_SIG = 2 PROV_SPYRUS_LYNKS = 20 PROV_SSL = 6 PROV_STT_ACQ = 8 PROV_STT_BRND = 9 PROV_STT_ISS = 11 PROV_STT_MER = 7 PROV_STT_ROOT = 10 PRSPEC_INVALID = 4294967295 PRSPEC_LPWSTR = 0 PRSPEC_PROPID = 1 PR_JOBSTATUS = 0x0000 PSBTN_APPLYNOW = 4 PSBTN_BACK = 0 PSBTN_CANCEL = 5 PSBTN_FINISH = 2 PSBTN_HELP = 6 PSBTN_MAX = 6 PSBTN_NEXT = 1 PSBTN_OK = 3 PSCB_BUTTONPRESSED = 3 PSCB_INITIALIZED = 1 PSCB_PRECREATE = 2 PSD_DEFAULTMINMARGINS = 0x0 PSD_DISABLEMARGINS = 0x10 PSD_DISABLEORIENTATION = 0x100 PSD_DISABLEPAGEPAINTING = 0x80000 PSD_DISABLEPAPER = 0x200 PSD_DISABLEPRINTER = 0x20 PSD_ENABLEPAGEPAINTHOOK = 0x40000 PSD_ENABLEPAGESETUPHOOK = 0x2000 PSD_ENABLEPAGESETUPTEMPLATE = 0x8000 PSD_ENABLEPAGESETUPTEMPLATEHANDLE = 0x20000 PSD_INHUNDREDTHSOFMILLIMETERS = 0x8 PSD_INTHOUSANDTHSOFINCHES = 0x4 PSD_INWININIINTLMEASURE = 0x0 PSD_MARGINS = 0x2 PSD_MINMARGINS = 0x1 PSD_NONETWORKBUTTON = 0x200000 PSD_NOWARNING = 0x80 PSD_RETURNDEFAULT = 0x400 PSD_SHOWHELP = 0x800 PSH_DEFAULT = 0x00000000 PSH_HASHELP = 0x00000200 PSH_HEADER = 0x00080000 PSH_MODELESS = 0x00000400 PSH_NOAPPLYNOW = 0x00000080 PSH_NOCONTEXTHELP = 0x02000000 PSH_PROPSHEETPAGE = 0x00000008 PSH_PROPTITLE = 0x00000001 PSH_RTLREADING = 0x00000800 PSH_STRETCHWATERMARK = 0x00040000 PSH_USECALLBACK = 0x00000100 PSH_USEHBMHEADER = 0x00100000 PSH_USEHBMWATERMARK = 0x00010000 PSH_USEHICON = 0x00000002 PSH_USEHPLWATERMARK = 0x00020000 PSH_USEICONID = 0x00000004 PSH_USEPAGELANG = 0x00200000 PSH_USEPSTARTPAGE = 0x00000040 PSH_WATERMARK = 0x00008000 PSH_WIZARD = 0x00000020 PSH_WIZARD97 = 0x01000000 PSH_WIZARDCONTEXTHELP = 0x00001000 PSH_WIZARDHASFINISH = 0x00000010 PSH_WIZARD_LITE = 0x00400000 PSIDENT_GDICENTRIC = 0 PSIDENT_PSCENTRIC = 1 PSINJECT_BEGINDEFAULTS = 12 PSINJECT_BEGINPAGESETUP = 101 PSINJECT_BEGINPROLOG = 14 PSINJECT_BEGINSETUP = 16 PSINJECT_BEGINSTREAM = 1 PSINJECT_BOUNDINGBOX = 9 PSINJECT_COMMENTS = 11 PSINJECT_DOCNEEDEDRES = 5 PSINJECT_DOCSUPPLIEDRES = 6 PSINJECT_DOCUMENTPROCESSCOLORS = 10 PSINJECT_DOCUMENTPROCESSCOLORSATEND = 21 PSINJECT_ENDDEFAULTS = 13 PSINJECT_ENDPAGECOMMENTS = 107 PSINJECT_ENDPAGESETUP = 102 PSINJECT_ENDPROLOG = 15 PSINJECT_ENDSETUP = 17 PSINJECT_ENDSTREAM = 20 PSINJECT_EOF = 19 PSINJECT_ORIENTATION = 8 PSINJECT_PAGEBBOX = 106 PSINJECT_PAGENUMBER = 100 PSINJECT_PAGEORDER = 7 PSINJECT_PAGES = 4 PSINJECT_PAGESATEND = 3 PSINJECT_PAGETRAILER = 103 PSINJECT_PLATECOLOR = 104 PSINJECT_PSADOBE = 2 PSINJECT_SHOWPAGE = 105 PSINJECT_TRAILER = 18 PSINJECT_VMRESTORE = 201 PSINJECT_VMSAVE = 200 PSM_ADDPAGE = 1127 PSM_APPLY = 1134 PSM_CANCELTOCLOSE = 1131 PSM_CHANGED = 1128 PSM_GETCURRENTPAGEHWND = 1142 PSM_GETRESULT = 1159 PSM_GETTABCONTROL = 1140 PSM_HWNDTOINDEX = 1153 PSM_IDTOINDEX = 1157 PSM_INDEXTOHWND = 1154 PSM_INDEXTOID = 1158 PSM_INDEXTOPAGE = 1156 PSM_INSERTPAGE = 1143 PSM_ISDIALOGMESSAGE = 1141 PSM_PAGETOINDEX = 1155 PSM_PRESSBUTTON = 1137 PSM_QUERYSIBLINGS = 1132 PSM_REBOOTSYSTEM = 1130 PSM_RECALCPAGESIZES = 1160 PSM_REMOVEPAGE = 1126 PSM_RESTARTWINDOWS = 1129 PSM_SETCURSEL = 1125 PSM_SETCURSELID = 1138 PSM_SETFINISHTEXT = 1139 PSM_SETFINISHTEXTA = 1139 PSM_SETFINISHTEXTW = 1145 PSM_SETHEADERSUBTITLE = 1151 PSM_SETHEADERSUBTITLEA = 1151 PSM_SETHEADERSUBTITLEW = 1152 PSM_SETHEADERTITLE = 1149 PSM_SETHEADERTITLEA = 1149 PSM_SETHEADERTITLEW = 1150 PSM_SETTITLE = 1135 PSM_SETTITLEA = 1135 PSM_SETTITLEW = 1144 PSM_SETWIZBUTTONS = 1136 PSM_UNCHANGED = 1133 PSNRET_INVALID = 1 PSNRET_INVALID_NOCHANGEPAGE = 2 PSNRET_MESSAGEHANDLED = 3 PSNRET_NOERROR = 0 PSN_APPLY = 18446744073709551414 PSN_FIRST = 18446744073709551416 PSN_GETOBJECT = 18446744073709551406 PSN_HELP = 18446744073709551411 PSN_KILLACTIVE = 18446744073709551415 PSN_LAST = 18446744073709551317 PSN_QUERYCANCEL = 18446744073709551407 PSN_QUERYINITIALFOCUS = 18446744073709551403 PSN_RESET = 18446744073709551413 PSN_SETACTIVE = 18446744073709551416 PSN_TRANSLATEACCELERATOR = 18446744073709551404 PSN_WIZBACK = 18446744073709551410 PSN_WIZFINISH = 18446744073709551408 PSN_WIZNEXT = 18446744073709551409 PSPCB_ADDREF = 0 PSPCB_CREATE = 2 PSPCB_RELEASE = 1 PSPROTOCOL_ASCII = 0 PSPROTOCOL_BCP = 1 PSPROTOCOL_BINARY = 3 PSPROTOCOL_TBCP = 2 PSP_DEFAULT = 0x00000000 PSP_DLGINDIRECT = 0x00000001 PSP_HASHELP = 0x00000020 PSP_HIDEHEADER = 0x00000800 PSP_PREMATURE = 0x00000400 PSP_RTLREADING = 0x00000010 PSP_USECALLBACK = 0x00000080 PSP_USEFUSIONCONTEXT = 0x00004000 PSP_USEHEADERSUBTITLE = 0x00002000 PSP_USEHEADERTITLE = 0x00001000 PSP_USEHICON = 0x00000002 PSP_USEICONID = 0x00000004 PSP_USEREFPARENT = 0x00000040 PSP_USETITLE = 0x00000008 PSWIZB_BACK = 0x00000001 PSWIZB_DISABLEDFINISH = 0x00000008 PSWIZB_FINISH = 0x00000004 PSWIZB_NEXT = 0x00000002 PS_ALTERNATE = 8 PS_COSMETIC = 0x00000000 PS_DASH = 1 PS_DASHDOT = 3 PS_DASHDOTDOT = 4 PS_DOT = 2 PS_ENDCAP_FLAT = 0x00000200 PS_ENDCAP_MASK = 0x00000F00 PS_ENDCAP_ROUND = 0x00000000 PS_ENDCAP_SQUARE = 0x00000100 PS_GEOMETRIC = 0x00010000 PS_INSIDEFRAME = 6 PS_JOIN_BEVEL = 0x00001000 PS_JOIN_MASK = 0x0000F000 PS_JOIN_MITER = 0x00002000 PS_JOIN_ROUND = 0x00000000 PS_NULL = 5 PS_OPENTYPE_FONTTYPE = 0x10000 PS_SOLID = 0 PS_STYLE_MASK = 0x0000000F PS_TYPE_MASK = 0x000F0000 PS_USERSTYLE = 7 PT_BEZIERTO = 0x04 PT_CLOSEFIGURE = 0x01 PT_LINETO = 0x02 PT_MOVETO = 0x06 PUBLICKEYBLOB = 0x6 PUBLICKEYBLOBEX = 0xa PURE = 0 PURGE_RXABORT = 0x2 PURGE_RXCLEAR = 0x8 PURGE_TXABORT = 0x1 PURGE_TXCLEAR = 0x4 PWR_CRITICALRESUME = 3 PWR_FAIL = -1 PWR_OK = 1 PWR_SUSPENDREQUEST = 1 PWR_SUSPENDRESUME = 2 PW_CLIENTONLY = 0x00000001 QDI_DIBTOSCREEN = 4 QDI_GETDIBITS = 2 QDI_SETDIBITS = 1 QDI_STRETCHDIB = 8 QID_SYNC = 0xFFFFFFFF QS_ALLEVENTS = 1215 QS_ALLINPUT = 1279 QS_ALLPOSTMESSAGE = 0x0100 QS_HOTKEY = 0x0080 QS_INPUT = 1031 QS_KEY = 0x0001 QS_MOUSE = 6 QS_MOUSEBUTTON = 0x0004 QS_MOUSEMOVE = 0x0002 QS_PAINT = 0x0020 QS_POSTMESSAGE = 0x0008 QS_RAWINPUT = 0x0400 QS_SENDMESSAGE = 0x0040 QS_TIMER = 0x0010 QUERYDIBSUPPORT = 3073 QUERYESCSUPPORT = 8 QUERYROPSUPPORT = 40 QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS = 16 QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE = 8 QUERY_ACTCTX_FLAG_NO_ADDREF = 2147483648 QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX = 4 QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008 QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004 QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002 QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001 QUOTA_LIMITS_USE_DEFAULT_LIMITS = 0x00000010 R2_BLACK = 1 R2_COPYPEN = 13 R2_LAST = 16 R2_MASKNOTPEN = 3 R2_MASKPEN = 9 R2_MASKPENNOT = 5 R2_MERGENOTPEN = 12 R2_MERGEPEN = 15 R2_MERGEPENNOT = 14 R2_NOP = 11 R2_NOT = 6 R2_NOTCOPYPEN = 4 R2_NOTMASKPEN = 8 R2_NOTMERGEPEN = 2 R2_NOTXORPEN = 10 R2_WHITE = 16 R2_XORPEN = 7 RANDOM_PADDING = 2 RASTERCAPS = 38 RASTER_FONTTYPE = 0x0001 RC_BANDING = 2 RC_BIGFONT = 0x0400 RC_BITBLT = 1 RC_BITMAP64 = 8 RC_DEVBITS = 0x8000 RC_DIBTODEV = 0x0200 RC_DI_BITMAP = 0x0080 RC_FLOODFILL = 0x1000 RC_GDI20_OUTPUT = 0x0010 RC_GDI20_STATE = 0x0020 RC_NONE = 0 RC_OP_DX_OUTPUT = 0x4000 RC_PALETTE = 0x0100 RC_SAVEBITMAP = 0x0040 RC_SCALING = 4 RC_STRETCHBLT = 0x0800 RC_STRETCHDIB = 0x2000 RDH_RECTANGLES = 1 RDW_ALLCHILDREN = 0x0080 RDW_ERASE = 0x0004 RDW_ERASENOW = 0x0200 RDW_FRAME = 0x0400 RDW_INTERNALPAINT = 0x0002 RDW_INVALIDATE = 0x0001 RDW_NOCHILDREN = 0x0040 RDW_NOERASE = 0x0020 RDW_NOFRAME = 0x0800 RDW_NOINTERNALPAINT = 0x0010 RDW_UPDATENOW = 0x0100 RDW_VALIDATE = 0x0008 READ_ATTRIBUTES = 0xD0 READ_ATTRIBUTE_BUFFER_SIZE = 512 READ_COMPRESSION_INFO_VALID = 0x00000020 READ_CONTROL = 131072 READ_THREAD_PROFILING_FLAG_DISPATCHING = 0x00000001 READ_THREAD_PROFILING_FLAG_HARDWARE_COUNTERS = 0x00000002 READ_THRESHOLDS = 0xD1 READ_THRESHOLD_BUFFER_SIZE = 512 REALTIME_PRIORITY_CLASS = 0x100 REASON_HWINSTALL = 65538 REASON_LEGACY_API = 2147942400 REASON_OTHER = 0 REASON_PLANNED_FLAG = 2147483648 REASON_SERVICEHANG = 196613 REASON_SWHWRECONF = 196612 REASON_SWINSTALL = 196610 REASON_UNKNOWN = 255 REASON_UNSTABLE = 327686 RECOVERED_READS_VALID = 0x00000004 RECOVERED_WRITES_VALID = 0x00000001 RECOVERY_DEFAULT_PING_INTERVAL = 5000 RECOVERY_MAX_PING_INTERVAL = 300000 REGDB_E_FIRST = 2147746128 REGDB_E_LAST = 2147746143 REGDB_S_FIRST = 262480 REGDB_S_LAST = 262495 REGISTERED = 0x04 REGISTERING = 0x00 REGULAR_FONTTYPE = 0x400 REG_APP_HIVE = 16 REG_BINARY = 3 REG_BOOT_HIVE = 1024 REG_CREATED_NEW_KEY = 1 REG_DWORD = 4 REG_DWORD_BIG_ENDIAN = 5 REG_DWORD_LITTLE_ENDIAN = 4 REG_EXPAND_SZ = 2 REG_FORCE_RESTORE = 8 REG_FORCE_UNLOAD = 1 REG_FULL_RESOURCE_DESCRIPTOR = 9 REG_HIVE_EXACT_FILE_GROWTH = 128 REG_HIVE_NO_RM = 256 REG_HIVE_SINGLE_LOG = 512 REG_LATEST_FORMAT = 2 REG_LEGAL_CHANGE_FILTER = 268435471 REG_LEGAL_OPTION = 15 REG_LINK = 6 REG_MULTI_SZ = 7 REG_NONE = 0 REG_NOTIFY_CHANGE_ATTRIBUTES = 2 REG_NOTIFY_CHANGE_LAST_SET = 4 REG_NOTIFY_CHANGE_NAME = 1 REG_NOTIFY_CHANGE_SECURITY = 8 REG_NOTIFY_THREAD_AGNOSTIC = 268435456 REG_NO_COMPRESSION = 4 REG_NO_LAZY_FLUSH = 4 REG_OPENED_EXISTING_KEY = 2 REG_OPTION_BACKUP_RESTORE = 4 REG_OPTION_CREATE_LINK = 2 REG_OPTION_NON_VOLATILE = 0 REG_OPTION_OPEN_LINK = 8 REG_OPTION_RESERVED = 0 REG_OPTION_VOLATILE = 1 REG_PROCESS_PRIVATE = 32 REG_QWORD = 11 REG_QWORD_LITTLE_ENDIAN = 11 REG_REFRESH_HIVE = 2 REG_RESOURCE_LIST = 8 REG_RESOURCE_REQUIREMENTS_LIST = 10 REG_SECURE_CONNECTION = 1 REG_STANDARD_FORMAT = 1 REG_START_JOURNAL = 64 REG_SZ = 1 REG_WHOLE_HIVE_VOLATILE = 1 RELATIVE = 2 REMOTE_NAME_INFO_LEVEL = 0x00000002 REPLACEDLGORD = 1541 REPLACEFILE_IGNORE_MERGE_ERRORS = 0x2 REPLACEFILE_WRITE_THROUGH = 0x1 REPLACE_ALTERNATE = 0xB REPLACE_PRIMARY = 0xA REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY = 0x2 REPORT_NO_PRIVATE_KEY = 0x1 RESETDEV = 7 RESOURCEDISPLAYTYPE_DIRECTORY = 0x00000009 RESOURCEDISPLAYTYPE_DOMAIN = 0x00000001 RESOURCEDISPLAYTYPE_FILE = 0x00000004 RESOURCEDISPLAYTYPE_GENERIC = 0x00000000 RESOURCEDISPLAYTYPE_GROUP = 0x00000005 RESOURCEDISPLAYTYPE_NDSCONTAINER = 0x0000000b RESOURCEDISPLAYTYPE_NETWORK = 0x00000006 RESOURCEDISPLAYTYPE_ROOT = 0x00000007 RESOURCEDISPLAYTYPE_SERVER = 0x00000002 RESOURCEDISPLAYTYPE_SHARE = 0x00000003 RESOURCEDISPLAYTYPE_SHAREADMIN = 0x00000008 RESOURCEDISPLAYTYPE_TREE = 0x0000000a RESOURCEMANAGER_ALL_ACCESS = 2031743 RESOURCEMANAGER_COMPLETE_PROPAGATION = 64 RESOURCEMANAGER_ENLIST = 8 RESOURCEMANAGER_GENERIC_EXECUTE = 1179740 RESOURCEMANAGER_GENERIC_READ = 1179649 RESOURCEMANAGER_GENERIC_WRITE = 1179774 RESOURCEMANAGER_GET_NOTIFICATION = 16 RESOURCEMANAGER_QUERY_INFORMATION = 1 RESOURCEMANAGER_RECOVER = 4 RESOURCEMANAGER_REGISTER_PROTOCOL = 32 RESOURCEMANAGER_SET_INFORMATION = 2 RESOURCETYPE_ANY = 0x00000000 RESOURCETYPE_DISK = 0x00000001 RESOURCETYPE_PRINT = 0x00000002 RESOURCETYPE_RESERVED = 0x00000008 RESOURCETYPE_UNKNOWN = 0xFFFFFFFF RESOURCEUSAGE_ALL = 19 RESOURCEUSAGE_ATTACHED = 0x00000010 RESOURCEUSAGE_CONNECTABLE = 0x00000001 RESOURCEUSAGE_CONTAINER = 0x00000002 RESOURCEUSAGE_NOLOCALDEVICE = 0x00000004 RESOURCEUSAGE_RESERVED = 0x80000000 RESOURCEUSAGE_SIBLING = 0x00000008 RESOURCE_CONNECTED = 0x00000001 RESOURCE_CONTEXT = 0x00000005 RESOURCE_ENUM_LN = 1 RESOURCE_ENUM_MODULE_EXACT = 16 RESOURCE_ENUM_MUI = 2 RESOURCE_ENUM_MUI_SYSTEM = 4 RESOURCE_ENUM_VALIDATE = 8 RESOURCE_GLOBALNET = 0x00000002 RESOURCE_MANAGER_COMMUNICATION = 0x00000002 RESOURCE_MANAGER_MAXIMUM_OPTION = 0x00000003 RESOURCE_MANAGER_VOLATILE = 0x00000001 RESOURCE_RECENT = 0x00000004 RESOURCE_REMEMBERED = 0x00000003 RESTART_MAX_CMD_LINE = 1024 RESTART_NO_CRASH = 1 RESTART_NO_HANG = 2 RESTART_NO_PATCH = 4 RESTART_NO_REBOOT = 8 RESTORE_CTM = 4100 RESTRICTED_POINTER = 0 RES_CURSOR = 2 RES_ICON = 1 RETRACT_IEPORT = 3 RETURN_SMART_STATUS = 0xDA REVERSE_PRINT = 0x00000001 REVISION_LENGTH = 4 RGN_AND = 1 RGN_COPY = 5 RGN_DIFF = 4 RGN_ERROR = 0 RGN_MAX = 5 RGN_MIN = 1 RGN_OR = 2 RGN_XOR = 3 RIDEV_APPKEYS = 0x00000400 RIDEV_CAPTUREMOUSE = 0x00000200 RIDEV_DEVNOTIFY = 0x00002000 RIDEV_EXCLUDE = 0x00000010 RIDEV_EXINPUTSINK = 0x00001000 RIDEV_EXMODEMASK = 0x000000F0 RIDEV_INPUTSINK = 0x00000100 RIDEV_NOHOTKEYS = 0x00000200 RIDEV_NOLEGACY = 0x00000030 RIDEV_PAGEONLY = 0x00000020 RIDEV_REMOVE = 0x00000001 RIDI_DEVICEINFO = 0x2000000b RIDI_DEVICENAME = 0x20000007 RIDI_PREPARSEDDATA = 0x20000005 RID_HEADER = 0x10000005 RID_INPUT = 0x10000003 RIGHTMOST_BUTTON_PRESSED = 0x2 RIGHT_ALT_PRESSED = 0x1 RIGHT_CTRL_PRESSED = 0x4 RIM_INPUT = 0 RIM_INPUTSINK = 1 RIM_TYPEHID = 2 RIM_TYPEKEYBOARD = 1 RIM_TYPEMOUSE = 0 RIP_EVENT = 9 RI_KEY_BREAK = 1 RI_KEY_E0 = 2 RI_KEY_E1 = 4 RI_KEY_MAKE = 0 RI_KEY_TERMSRV_SET_LED = 8 RI_KEY_TERMSRV_SHADOW = 0x10 RI_MOUSE_BUTTON_1_DOWN = 1 RI_MOUSE_BUTTON_1_UP = 2 RI_MOUSE_BUTTON_2_DOWN = 4 RI_MOUSE_BUTTON_2_UP = 8 RI_MOUSE_BUTTON_3_DOWN = 16 RI_MOUSE_BUTTON_3_UP = 32 RI_MOUSE_BUTTON_4_DOWN = 0x0040 RI_MOUSE_BUTTON_4_UP = 0x0080 RI_MOUSE_BUTTON_5_DOWN = 0x0100 RI_MOUSE_BUTTON_5_UP = 0x0200 RI_MOUSE_LEFT_BUTTON_DOWN = 0x0001 RI_MOUSE_LEFT_BUTTON_UP = 0x0002 RI_MOUSE_MIDDLE_BUTTON_DOWN = 0x0010 RI_MOUSE_MIDDLE_BUTTON_UP = 0x0020 RI_MOUSE_RIGHT_BUTTON_DOWN = 0x0004 RI_MOUSE_RIGHT_BUTTON_UP = 0x0008 RI_MOUSE_WHEEL = 0x0400 ROTFLAGS_ALLOWANYCLIENT = 0x2 ROTFLAGS_REGISTRATIONKEEPSALIVE = 0x1 ROTREGFLAGS_ALLOWANYCLIENT = 0x1 ROT_COMPARE_MAX = 2048 RPCFLG_ASYNCHRONOUS = 1073741824 RPCFLG_AUTO_COMPLETE = 134217728 RPCFLG_HAS_CALLBACK = 67108864 RPCFLG_HAS_MULTI_SYNTAXES = 33554432 RPCFLG_INPUT_SYNCHRONOUS = 536870912 RPCFLG_LOCAL_CALL = 268435456 RPCFLG_MESSAGE = 16777216 RPCFLG_NON_NDR = 2147483648 RPC_BUFFER_ASYNC = 0x00008000 RPC_BUFFER_COMPLETE = 0x00001000 RPC_BUFFER_EXTRA = 0x00004000 RPC_BUFFER_NONOTIFY = 0x00010000 RPC_BUFFER_PARTIAL = 0x00002000 RPC_CALL_ATTRIBUTES_VERSION = 1 RPC_CONTEXT_HANDLE_DEFAULT_FLAGS = 0 RPC_CONTEXT_HANDLE_DONT_SERIALIZE = 536870912 RPC_CONTEXT_HANDLE_FLAGS = 805306368 RPC_CONTEXT_HANDLE_SERIALIZE = 268435456 RPC_C_AUTHN_DCE_PRIVATE = 1 RPC_C_AUTHN_DCE_PUBLIC = 2 RPC_C_AUTHN_DEC_PUBLIC = 4 RPC_C_AUTHN_DEFAULT = 4294967295 RPC_C_AUTHN_DIGEST = 21 RPC_C_AUTHN_DPA = 17 RPC_C_AUTHN_GSS_KERBEROS = 16 RPC_C_AUTHN_GSS_NEGOTIATE = 9 RPC_C_AUTHN_GSS_SCHANNEL = 14 RPC_C_AUTHN_INFO_TYPE_HTTP = 1 RPC_C_AUTHN_LEVEL_CALL = 3 RPC_C_AUTHN_LEVEL_CONNECT = 2 RPC_C_AUTHN_LEVEL_DEFAULT = 0 RPC_C_AUTHN_LEVEL_NONE = 1 RPC_C_AUTHN_LEVEL_PKT = 4 RPC_C_AUTHN_LEVEL_PKT_INTEGRITY = 5 RPC_C_AUTHN_LEVEL_PKT_PRIVACY = 6 RPC_C_AUTHN_MQ = 100 RPC_C_AUTHN_MSN = 18 RPC_C_AUTHN_NONE = 0 RPC_C_AUTHN_WINNT = 10 RPC_C_AUTHZ_DCE = 2 RPC_C_AUTHZ_DEFAULT = 0xffffffff RPC_C_AUTHZ_NAME = 1 RPC_C_AUTHZ_NONE = 0 RPC_C_BINDING_DEFAULT_TIMEOUT = 5 RPC_C_BINDING_INFINITE_TIMEOUT = 10 RPC_C_BINDING_MAX_TIMEOUT = 9 RPC_C_BINDING_MIN_TIMEOUT = 0 RPC_C_BIND_TO_ALL_NICS = 1 RPC_C_CANCEL_INFINITE_TIMEOUT = -1 RPC_C_DONT_FAIL = 0x4 RPC_C_EP_ALL_ELTS = 0 RPC_C_EP_MATCH_BY_BOTH = 3 RPC_C_EP_MATCH_BY_IF = 1 RPC_C_EP_MATCH_BY_OBJ = 2 RPC_C_FULL_CERT_CHAIN = 0x0001 RPC_C_HTTP_AUTHN_SCHEME_BASIC = 0x00000001 RPC_C_HTTP_AUTHN_SCHEME_CERT = 0x00010000 RPC_C_HTTP_AUTHN_SCHEME_DIGEST = 0x00000008 RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE = 0x00000010 RPC_C_HTTP_AUTHN_SCHEME_NTLM = 0x00000002 RPC_C_HTTP_AUTHN_SCHEME_PASSPORT = 0x00000004 RPC_C_HTTP_AUTHN_TARGET_PROXY = 2 RPC_C_HTTP_AUTHN_TARGET_SERVER = 1 RPC_C_HTTP_FLAG_IGNORE_CERT_CN_INVALID = 8 RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME = 2 RPC_C_HTTP_FLAG_USE_SSL = 1 RPC_C_IMP_LEVEL_ANONYMOUS = 1 RPC_C_IMP_LEVEL_DEFAULT = 0 RPC_C_IMP_LEVEL_DELEGATE = 4 RPC_C_IMP_LEVEL_IDENTIFY = 2 RPC_C_IMP_LEVEL_IMPERSONATE = 3 RPC_C_INFINITE_TIMEOUT = 4294967295 RPC_C_LISTEN_MAX_CALLS_DEFAULT = 1234 RPC_C_MGMT_INQ_IF_IDS = 0 RPC_C_MGMT_INQ_PRINC_NAME = 1 RPC_C_MGMT_INQ_STATS = 2 RPC_C_MGMT_IS_SERVER_LISTEN = 3 RPC_C_MGMT_STOP_SERVER_LISTEN = 4 RPC_C_MQ_AUTHN_LEVEL_NONE = 0x0000 RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY = 0x0008 RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY = 0x0010 RPC_C_MQ_CLEAR_ON_OPEN = 0x0002 RPC_C_MQ_EXPRESS = 0 RPC_C_MQ_JOURNAL_ALWAYS = 2 RPC_C_MQ_JOURNAL_DEADLETTER = 1 RPC_C_MQ_JOURNAL_NONE = 0 RPC_C_MQ_PERMANENT = 0x0001 RPC_C_MQ_RECOVERABLE = 1 RPC_C_MQ_TEMPORARY = 0x0000 RPC_C_MQ_USE_EXISTING_SECURITY = 0x0004 RPC_C_NOTIFY_ON_SEND_COMPLETE = 0x1 RPC_C_NS_DEFAULT_EXP_AGE = -1 RPC_C_NS_SYNTAX_DCE = 3 RPC_C_NS_SYNTAX_DEFAULT = 0 RPC_C_OPT_BINDING_NONCAUSAL = 9 RPC_C_OPT_CALL_TIMEOUT = 12 RPC_C_OPT_DONT_LINGER = 13 RPC_C_OPT_MAX_OPTIONS = 14 RPC_C_OPT_MQ_ACKNOWLEDGE = 4 RPC_C_OPT_MQ_AUTHN_LEVEL = 6 RPC_C_OPT_MQ_AUTHN_SERVICE = 5 RPC_C_OPT_MQ_DELIVERY = 1 RPC_C_OPT_MQ_JOURNAL = 3 RPC_C_OPT_MQ_PRIORITY = 2 RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED = 8 RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE = 7 RPC_C_OPT_SECURITY_CALLBACK = 10 RPC_C_OPT_UNIQUE_BINDING = 11 RPC_C_PARM_BUFFER_LENGTH = 2 RPC_C_PARM_MAX_PACKET_LENGTH = 1 RPC_C_PROFILE_ALL_ELT = 1 RPC_C_PROFILE_ALL_ELTS = 1 RPC_C_PROFILE_DEFAULT_ELT = 0 RPC_C_PROFILE_MATCH_BY_BOTH = 4 RPC_C_PROFILE_MATCH_BY_IF = 2 RPC_C_PROFILE_MATCH_BY_MBR = 3 RPC_C_PROTECT_LEVEL_CALL = 3 RPC_C_PROTECT_LEVEL_CONNECT = 2 RPC_C_PROTECT_LEVEL_DEFAULT = 0 RPC_C_PROTECT_LEVEL_NONE = 1 RPC_C_PROTECT_LEVEL_PKT = 4 RPC_C_PROTECT_LEVEL_PKT_INTEGRITY = 5 RPC_C_PROTECT_LEVEL_PKT_PRIVACY = 6 RPC_C_PROTSEQ_MAX_REQS_DEFAULT = 10 RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY = 0x4 RPC_C_QOS_CAPABILITIES_DEFAULT = 0x0 RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE = 0x8 RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT = 0x10 RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC = 0x2 RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH = 0x1 RPC_C_QOS_IDENTITY_DYNAMIC = 1 RPC_C_QOS_IDENTITY_STATIC = 0 RPC_C_SECURITY_QOS_VERSION = 1 RPC_C_SECURITY_QOS_VERSION_1 = 1 RPC_C_SECURITY_QOS_VERSION_2 = 2 RPC_C_SECURITY_QOS_VERSION_3 = 3 RPC_C_STATS_CALLS_IN = 0 RPC_C_STATS_CALLS_OUT = 1 RPC_C_STATS_PKTS_IN = 2 RPC_C_STATS_PKTS_OUT = 3 RPC_C_USE_INTERNET_PORT = 0x1 RPC_C_USE_INTRANET_PORT = 0x2 RPC_C_VERS_ALL = 1 RPC_C_VERS_COMPATIBLE = 2 RPC_C_VERS_EXACT = 3 RPC_C_VERS_MAJOR_ONLY = 4 RPC_C_VERS_UPTO = 5 RPC_EEINFO_VERSION = 1 RPC_ENTRY = 0 RPC_FLAGS_VALID_BIT = 0x00008000 RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH = 0x0010 RPC_IF_ALLOW_LOCAL_ONLY = 0x0020 RPC_IF_ALLOW_SECURE_ONLY = 0x0008 RPC_IF_ALLOW_UNKNOWN_AUTHORITY = 0x0004 RPC_IF_AUTOLISTEN = 0x0001 RPC_IF_OLE = 0x0002 RPC_IF_SEC_NO_CACHE = 0x0040 RPC_INTERFACE_HAS_PIPES = 0x0001 RPC_NCA_FLAGS_BROADCAST = 0x00000002 RPC_NCA_FLAGS_DEFAULT = 0x00000000 RPC_NCA_FLAGS_IDEMPOTENT = 0x00000001 RPC_NCA_FLAGS_MAYBE = 0x00000004 RPC_PROXY_CONNECTION_TYPE_IN_PROXY = 0 RPC_PROXY_CONNECTION_TYPE_OUT_PROXY = 1 RPC_P_ADDR_FORMAT_TCP_IPV4 = 1 RPC_P_ADDR_FORMAT_TCP_IPV6 = 2 RPC_QUERY_CLIENT_PRINCIPAL_NAME = 4 RPC_QUERY_SERVER_PRINCIPAL_NAME = 2 RPC_S_ACCESS_DENIED = 5 RPC_S_ADDRESS_ERROR = 1768 RPC_S_ALREADY_LISTENING = 1713 RPC_S_ALREADY_REGISTERED = 1711 RPC_S_ASYNC_CALL_PENDING = 997 RPC_S_BINDING_HAS_NO_AUTH = 1746 RPC_S_BINDING_INCOMPLETE = 1819 RPC_S_BUFFER_TOO_SMALL = 122 RPC_S_CALL_CANCELLED = 1818 RPC_S_CALL_FAILED = 1726 RPC_S_CALL_FAILED_DNE = 1727 RPC_S_CALL_IN_PROGRESS = 1791 RPC_S_CANNOT_SUPPORT = 1764 RPC_S_CANT_CREATE_ENDPOINT = 1720 RPC_S_COMM_FAILURE = 1820 RPC_S_DUPLICATE_ENDPOINT = 1740 RPC_S_ENTRY_ALREADY_EXISTS = 1760 RPC_S_ENTRY_NOT_FOUND = 1761 RPC_S_ENTRY_TYPE_MISMATCH = 1922 RPC_S_FP_DIV_ZERO = 1769 RPC_S_FP_OVERFLOW = 1771 RPC_S_FP_UNDERFLOW = 1770 RPC_S_GROUP_MEMBER_NOT_FOUND = 1898 RPC_S_GRP_ELT_NOT_ADDED = 1928 RPC_S_GRP_ELT_NOT_REMOVED = 1929 RPC_S_INCOMPLETE_NAME = 1755 RPC_S_INTERFACE_NOT_EXPORTED = 1924 RPC_S_INTERFACE_NOT_FOUND = 1759 RPC_S_INTERNAL_ERROR = 1766 RPC_S_INVALID_ARG = 87 RPC_S_INVALID_ASYNC_CALL = 1915 RPC_S_INVALID_ASYNC_HANDLE = 1914 RPC_S_INVALID_AUTH_IDENTITY = 1749 RPC_S_INVALID_BINDING = 1702 RPC_S_INVALID_BOUND = 1734 RPC_S_INVALID_ENDPOINT_FORMAT = 1706 RPC_S_INVALID_LEVEL = 87 RPC_S_INVALID_NAF_ID = 1763 RPC_S_INVALID_NAME_SYNTAX = 1736 RPC_S_INVALID_NETWORK_OPTIONS = 1724 RPC_S_INVALID_NET_ADDR = 1707 RPC_S_INVALID_OBJECT = 1900 RPC_S_INVALID_RPC_PROTSEQ = 1704 RPC_S_INVALID_SECURITY_DESC = 1338 RPC_S_INVALID_STRING_BINDING = 1700 RPC_S_INVALID_STRING_UUID = 1705 RPC_S_INVALID_TAG = 1733 RPC_S_INVALID_TIMEOUT = 1709 RPC_S_INVALID_VERS_OPTION = 1756 RPC_S_MAX_CALLS_TOO_SMALL = 1742 RPC_S_NAME_SERVICE_UNAVAILABLE = 1762 RPC_S_NOTHING_TO_EXPORT = 1754 RPC_S_NOT_ALL_OBJS_EXPORTED = 1923 RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758 RPC_S_NOT_CANCELLED = 1826 RPC_S_NOT_LISTENING = 1715 RPC_S_NOT_RPC_ERROR = 1823 RPC_S_NO_BINDINGS = 1718 RPC_S_NO_CALL_ACTIVE = 1725 RPC_S_NO_CONTEXT_AVAILABLE = 1765 RPC_S_NO_ENDPOINT_FOUND = 1708 RPC_S_NO_ENTRY_NAME = 1735 RPC_S_NO_INTERFACES = 1817 RPC_S_NO_MORE_BINDINGS = 1806 RPC_S_NO_MORE_MEMBERS = 1757 RPC_S_NO_PRINC_NAME = 1822 RPC_S_NO_PROTSEQS = 1719 RPC_S_NO_PROTSEQS_REGISTERED = 1714 RPC_S_OBJECT_NOT_FOUND = 1710 RPC_S_OK = 0 RPC_S_OUT_OF_MEMORY = 14 RPC_S_OUT_OF_RESOURCES = 1721 RPC_S_OUT_OF_THREADS = 164 RPC_S_PRF_ELT_NOT_ADDED = 1926 RPC_S_PRF_ELT_NOT_REMOVED = 1927 RPC_S_PROCNUM_OUT_OF_RANGE = 1745 RPC_S_PROFILE_NOT_ADDED = 1925 RPC_S_PROTOCOL_ERROR = 1728 RPC_S_PROTSEQ_NOT_FOUND = 1744 RPC_S_PROTSEQ_NOT_SUPPORTED = 1703 RPC_S_SEC_PKG_ERROR = 1825 RPC_S_SEND_INCOMPLETE = 1913 RPC_S_SERVER_OUT_OF_MEMORY = 1130 RPC_S_SERVER_TOO_BUSY = 1723 RPC_S_SERVER_UNAVAILABLE = 1722 RPC_S_STRING_TOO_LONG = 1743 RPC_S_TIMEOUT = 1460 RPC_S_TYPE_ALREADY_REGISTERED = 1712 RPC_S_UNKNOWN_AUTHN_LEVEL = 1748 RPC_S_UNKNOWN_AUTHN_SERVICE = 1747 RPC_S_UNKNOWN_AUTHN_TYPE = 1741 RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750 RPC_S_UNKNOWN_IF = 1717 RPC_S_UNKNOWN_MGR_TYPE = 1716 RPC_S_UNKNOWN_PRINCIPAL = 1332 RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821 RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737 RPC_S_UNSUPPORTED_TRANS_SYN = 1730 RPC_S_UNSUPPORTED_TYPE = 1732 RPC_S_UUID_LOCAL_ONLY = 1824 RPC_S_UUID_NO_ADDRESS = 1739 RPC_S_WRONG_KIND_OF_BINDING = 1701 RPC_S_ZERO_DIVIDE = 1767 RPC_UNICODE_SUPPORTED = 0 RPC_X_BAD_STUB_DATA = 1783 RPC_X_BYTE_COUNT_TOO_SMALL = 1782 RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781 RPC_X_ENUM_VALUE_TOO_LARGE = 1781 RPC_X_INVALID_BOUND = 1734 RPC_X_INVALID_BUFFER = 1784 RPC_X_INVALID_ES_ACTION = 1827 RPC_X_INVALID_PIPE_OBJECT = 1830 RPC_X_INVALID_PIPE_OPERATION = 1831 RPC_X_INVALID_TAG = 1733 RPC_X_NO_MEMORY = 14 RPC_X_NO_MORE_ENTRIES = 1772 RPC_X_NULL_REF_POINTER = 1780 RPC_X_PIPE_APP_MEMORY = 14 RPC_X_PIPE_CLOSED = 1916 RPC_X_PIPE_DISCIPLINE_ERROR = 1917 RPC_X_PIPE_EMPTY = 1918 RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779 RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773 RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774 RPC_X_SS_CONTEXT_DAMAGED = 1777 RPC_X_SS_CONTEXT_MISMATCH = 6 RPC_X_SS_HANDLES_MISMATCH = 1778 RPC_X_SS_IN_NULL_CONTEXT = 1775 RPC_X_WRONG_ES_VERSION = 1828 RPC_X_WRONG_PIPE_ORDER = 1831 RPC_X_WRONG_PIPE_VERSION = 1832 RPC_X_WRONG_STUB_VERSION = 1829 RP_INIFILE = 0x02 RP_LOGON = 0x01 RRF_NOEXPAND = 0x10000000 RRF_RT_ANY = 0x0000ffff RRF_RT_DWORD = 24 RRF_RT_QWORD = 72 RRF_RT_REG_BINARY = 0x00000008 RRF_RT_REG_DWORD = 0x00000010 RRF_RT_REG_EXPAND_SZ = 0x00000004 RRF_RT_REG_MULTI_SZ = 0x00000020 RRF_RT_REG_NONE = 0x00000001 RRF_RT_REG_QWORD = 0x00000040 RRF_RT_REG_SZ = 0x00000002 RRF_ZEROONFAILURE = 0x20000000 RSA1024BIT_KEY = 0x4000000 RTL_CONDITION_VARIABLE_LOCKMODE_SHARED = 0x1 RTL_CRITICAL_SECTION_ALL_FLAG_BITS = 0xff000000 RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT = 0x00000001 RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN = 0x02000000 RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO = 0x10000000 RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO = 0x01000000 RTL_CRITICAL_SECTION_FLAG_RESERVED = 3758096384 RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE = 0x08000000 RTL_CRITICAL_SECTION_FLAG_STATIC_INIT = 0x04000000 RTL_CRITSECT_TYPE = 0 RTL_RESOURCE_TYPE = 1 RTL_RUN_ONCE_ASYNC = 2 RTL_RUN_ONCE_CHECK_ONLY = 1 RTL_RUN_ONCE_CTX_RESERVED_BITS = 2 RTL_RUN_ONCE_INIT_FAILED = 4 RTL_UMS_VERSION = 256 RTL_VRF_FLG_APPCOMPAT_CHECKS = 0x00000010 RTL_VRF_FLG_COM_CHECKS = 0x00000100 RTL_VRF_FLG_DANGEROUS_APIS = 0x00000200 RTL_VRF_FLG_DEADLOCK_CHECKS = 0x00000800 RTL_VRF_FLG_DIRTY_STACKS = 0x00000040 RTL_VRF_FLG_ENABLED_SYSTEM_WIDE = 0x00020000 RTL_VRF_FLG_ENABLE_LOGGING = 0x00004000 RTL_VRF_FLG_FAST_FILL_HEAP = 0x00008000 RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS = 0x00001000 RTL_VRF_FLG_FULL_PAGE_HEAP = 0x00000001 RTL_VRF_FLG_HANDLE_CHECKS = 0x00000004 RTL_VRF_FLG_LOCK_CHECKS = 0x00040000 RTL_VRF_FLG_MISCELLANEOUS_CHECKS = 0x00020000 RTL_VRF_FLG_RACE_CHECKS = 0x00000400 RTL_VRF_FLG_RESERVED_DONOTUSE = 0x00000002 RTL_VRF_FLG_RPC_CHECKS = 0x00000080 RTL_VRF_FLG_STACK_CHECKS = 0x00000008 RTL_VRF_FLG_TLS_CHECKS = 0x00000020 RTL_VRF_FLG_VIRTUAL_MEM_CHECKS = 0x00002000 RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING = 0x00010000 RTS_CONTROL_DISABLE = 0x0 RTS_CONTROL_ENABLE = 0x1 RTS_CONTROL_HANDSHAKE = 0x2 RTS_CONTROL_TOGGLE = 0x3 RUNDLGORD = 1545 RUNTIME_FUNCTION_INDIRECT = 0x1 RUSSIAN_CHARSET = 204 R_OK = 4 SACL_SECURITY_INFORMATION = 8 SAL_HXX = 0 SAL__callback = 0 SAL__checkReturn = 0 SAL__deref = 0 SAL__deref_in = 0 SAL__deref_in_opt = 0 SAL__deref_inout = 0 SAL__deref_inout_nz = 0 SAL__deref_inout_nz_opt = 0 SAL__deref_inout_opt = 0 SAL__deref_inout_z = 0 SAL__deref_inout_z_opt = 0 SAL__deref_opt_in = 0 SAL__deref_opt_in_opt = 0 SAL__deref_opt_inout = 0 SAL__deref_opt_inout_nz = 0 SAL__deref_opt_inout_nz_opt = 0 SAL__deref_opt_inout_opt = 0 SAL__deref_opt_inout_z = 0 SAL__deref_opt_inout_z_opt = 0 SAL__deref_opt_out = 0 SAL__deref_opt_out_nz_opt = 0 SAL__deref_opt_out_opt = 0 SAL__deref_opt_out_z = 0 SAL__deref_opt_out_z_opt = 0 SAL__deref_out = 0 SAL__deref_out_nz = 0 SAL__deref_out_nz_opt = 0 SAL__deref_out_opt = 0 SAL__deref_out_z = 0 SAL__deref_out_z_opt = 0 SAL__exceptthat = 0 SAL__execeptthat = 0 SAL__format_string = 0 SAL__in = 0 SAL__in_nz = 0 SAL__in_nz_opt = 0 SAL__in_opt = 0 SAL__in_z = 0 SAL__in_z_opt = 0 SAL__inner_callback = 0 SAL__inner_checkReturn = 0 SAL__inner_fallthrough = 0 SAL__inner_fallthrough_dec = 0 SAL__inner_override = 0 SAL__inout = 0 SAL__inout_nz = 0 SAL__inout_nz_opt = 0 SAL__inout_opt = 0 SAL__inout_z = 0 SAL__inout_z_opt = 0 SAL__maybenull = 0 SAL__maybereadonly = 0 SAL__maybevalid = 0 SAL__notnull = 0 SAL__notreadonly = 0 SAL__notvalid = 0 SAL__null = 0 SAL__nullnullterminated = 0 SAL__nullterminated = 0 SAL__out = 0 SAL__out_nz = 0 SAL__out_nz_opt = 0 SAL__out_opt = 0 SAL__out_z = 0 SAL__out_z_opt = 0 SAL__override = 0 SAL__post = 0 SAL__pre = 0 SAL__readonly = 0 SAL__reserved = 0 SAL__valid = 0 SANDBOX_INERT = 0x2 SAVE_ATTRIBUTE_VALUES = 0xD3 SAVE_CTM = 4101 SBM_ENABLE_ARROWS = 0x00E4 SBM_GETPOS = 0x00E1 SBM_GETRANGE = 0x00E3 SBM_GETSCROLLBARINFO = 0x00EB SBM_GETSCROLLINFO = 0x00EA SBM_SETPOS = 0x00E0 SBM_SETRANGE = 0x00E2 SBM_SETRANGEREDRAW = 0x00E6 SBM_SETSCROLLINFO = 0x00E9 SBS_BOTTOMALIGN = 4 SBS_HORZ = 0 SBS_LEFTALIGN = 2 SBS_RIGHTALIGN = 4 SBS_SIZEBOX = 8 SBS_SIZEBOXBOTTOMRIGHTALIGN = 4 SBS_SIZEBOXTOPLEFTALIGN = 2 SBS_SIZEGRIP = 16 SBS_TOPALIGN = 2 SBS_VERT = 1 SB_BOTH = 3 SB_BOTTOM = 7 SB_CONST_ALPHA = 0x00000001 SB_CTL = 2 SB_ENDSCROLL = 8 SB_GRAD_RECT = 0x00000010 SB_GRAD_TRI = 0x00000020 SB_HORZ = 0 SB_LEFT = 6 SB_LINEDOWN = 1 SB_LINELEFT = 0 SB_LINERIGHT = 1 SB_LINEUP = 0 SB_NONE = 0x00000000 SB_PAGEDOWN = 3 SB_PAGELEFT = 2 SB_PAGERIGHT = 3 SB_PAGEUP = 2 SB_PIXEL_ALPHA = 0x00000002 SB_PREMULT_ALPHA = 0x00000004 SB_RIGHT = 7 SB_THUMBPOSITION = 4 SB_THUMBTRACK = 5 SB_TOP = 6 SB_VERT = 1 SCALINGFACTORX = 114 SCALINGFACTORY = 115 SCARD_ABSENT = 1 SCARD_ATR_LENGTH = 33 SCARD_CLASS_COMMUNICATIONS = 2 SCARD_CLASS_ICC_STATE = 9 SCARD_CLASS_IFD_PROTOCOL = 8 SCARD_CLASS_MECHANICAL = 6 SCARD_CLASS_PERF = 0x7ffe SCARD_CLASS_POWER_MGMT = 4 SCARD_CLASS_PROTOCOL = 3 SCARD_CLASS_SECURITY = 5 SCARD_CLASS_SYSTEM = 0x7fff SCARD_CLASS_VENDOR_DEFINED = 7 SCARD_CLASS_VENDOR_INFO = 1 SCARD_COLD_RESET = 1 SCARD_EJECT_CARD = 3 SCARD_LEAVE_CARD = 0 SCARD_NEGOTIABLE = 5 SCARD_POWERED = 4 SCARD_POWER_DOWN = 0 SCARD_PRESENT = 2 SCARD_PROTOCOL_DEFAULT = 0x80000000 SCARD_PROTOCOL_OPTIMAL = 0x00000000 SCARD_PROTOCOL_RAW = 0x00010000 SCARD_PROTOCOL_T0 = 0x00000001 SCARD_PROTOCOL_T1 = 0x00000002 SCARD_PROTOCOL_Tx = 3 SCARD_PROTOCOL_UNDEFINED = 0x00000000 SCARD_PROVIDER_CSP = 2 SCARD_PROVIDER_PRIMARY = 1 SCARD_READER_CONFISCATES = 0x00000004 SCARD_READER_EJECTS = 0x00000002 SCARD_READER_SWALLOWS = 0x00000001 SCARD_READER_TYPE_IDE = 0x10 SCARD_READER_TYPE_KEYBOARD = 0x04 SCARD_READER_TYPE_PARALELL = 0x02 SCARD_READER_TYPE_PCMCIA = 0x40 SCARD_READER_TYPE_SCSI = 0x08 SCARD_READER_TYPE_SERIAL = 0x01 SCARD_READER_TYPE_USB = 0x20 SCARD_READER_TYPE_VENDOR = 0xF0 SCARD_RESET_CARD = 1 SCARD_SCOPE_SYSTEM = 2 SCARD_SCOPE_TERMINAL = 1 SCARD_SCOPE_USER = 0 SCARD_SHARE_DIRECT = 3 SCARD_SHARE_EXCLUSIVE = 1 SCARD_SHARE_SHARED = 2 SCARD_SPECIFIC = 6 SCARD_STATE_ATRMATCH = 0x00000040 SCARD_STATE_CHANGED = 0x00000002 SCARD_STATE_EMPTY = 0x00000010 SCARD_STATE_EXCLUSIVE = 0x00000080 SCARD_STATE_IGNORE = 0x00000001 SCARD_STATE_INUSE = 0x00000100 SCARD_STATE_MUTE = 0x00000200 SCARD_STATE_PRESENT = 0x00000020 SCARD_STATE_UNAVAILABLE = 0x00000008 SCARD_STATE_UNAWARE = 0x00000000 SCARD_STATE_UNKNOWN = 0x00000004 SCARD_STATE_UNPOWERED = 0x00000400 SCARD_SWALLOWED = 3 SCARD_S_SUCCESS = 0 SCARD_T0_CMD_LENGTH = 5 SCARD_T0_HEADER_LENGTH = 7 SCARD_T1_EPILOGUE_LENGTH = 2 SCARD_T1_MAX_IFS = 254 SCARD_T1_PROLOGUE_LENGTH = 3 SCARD_UNKNOWN = 0 SCARD_UNPOWER_CARD = 2 SCARD_WARM_RESET = 2 SCERR_NOCARDNAME = 0x4000 SCERR_NOGUIDS = 0x8000 SCHANNEL_ENC_KEY = 0x1 SCHANNEL_MAC_KEY = 0x0 SCHED_E_SERVICE_NOT_LOCALSYSTEM = 6200 SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC = "SchemeDllRetrieveEncodedObjectW" SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC = "SchemeDllRetrieveEncodedObject" SCOPE_SECURITY_INFORMATION = 64 SCREEN_FONTTYPE = 0x2000 SCROLLLOCK_ON = 0x40 SCS_32BIT_BINARY = 0 SCS_64BIT_BINARY = 6 SCS_CAP_COMPSTR = 0x00000001 SCS_CAP_MAKEREAD = 0x00000002 SCS_CAP_SETRECONVERTSTRING = 0x00000004 SCS_CHANGEATTR = 18 SCS_CHANGECLAUSE = 36 SCS_DOS_BINARY = 1 SCS_OS216_BINARY = 5 SCS_PIF_BINARY = 3 SCS_POSIX_BINARY = 4 SCS_QUERYRECONVERTSTRING = 0x00020000 SCS_SETRECONVERTSTRING = 0x00010000 SCS_SETSTR = 9 SCS_THIS_PLATFORM_BINARY = 6 SCS_WOW_BINARY = 2 SC_ARRANGE = 0xF110 SC_CLOSE = 0xF060 SC_CONTEXTHELP = 0xF180 SC_DEFAULT = 0xF160 SC_DLG_FORCE_UI = 0x04 SC_DLG_MINIMAL_UI = 0x01 SC_DLG_NO_UI = 0x02 SC_GROUP_IDENTIFIER = 43 SC_GROUP_IDENTIFIERA = 43 SC_GROUP_IDENTIFIERW = 43 SC_HOTKEY = 0xF150 SC_HSCROLL = 0xF080 SC_ICON = 61472 SC_KEYMENU = 0xF100 SC_MANAGER_ALL_ACCESS = 983103 SC_MANAGER_CONNECT = 0x0001 SC_MANAGER_CREATE_SERVICE = 0x0002 SC_MANAGER_ENUMERATE_SERVICE = 0x0004 SC_MANAGER_LOCK = 0x0008 SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020 SC_MANAGER_QUERY_LOCK_STATUS = 0x0010 SC_MAXIMIZE = 0xF030 SC_MINIMIZE = 0xF020 SC_MONITORPOWER = 0xF170 SC_MOUSEMENU = 0xF090 SC_MOVE = 0xF010 SC_NEXTWINDOW = 0xF040 SC_PREVWINDOW = 0xF050 SC_RESTORE = 0xF120 SC_SCREENSAVE = 0xF140 SC_SEPARATOR = 0xF00F SC_SIZE = 0xF000 SC_TASKLIST = 0xF130 SC_VSCROLL = 0xF070 SC_ZOOM = 61488 SEARCH_ALL = 0x0 SEARCH_ALL_NO_SEQ = 0x4 SEARCH_ALTERNATE = 0x2 SEARCH_ALT_NO_SEQ = 0x6 SEARCH_PRIMARY = 0x1 SEARCH_PRI_NO_SEQ = 0x5 SECTION_ALL_ACCESS = 983071 SECTION_EXTEND_SIZE = 0x0010 SECTION_MAP_EXECUTE = 0x0008 SECTION_MAP_EXECUTE_EXPLICIT = 0x0020 SECTION_MAP_READ = 0x0004 SECTION_MAP_WRITE = 0x0002 SECTION_QUERY = 0x0001 SECURITY_ANONYMOUS_LOGON_RID = 7 SECURITY_APPPOOL_ID_BASE_RID = 82 SECURITY_APPPOOL_ID_RID_COUNT = 6 SECURITY_APP_PACKAGE_BASE_RID = 2 SECURITY_APP_PACKAGE_RID_COUNT = 8 SECURITY_AUTHENTICATED_USER_RID = 11 SECURITY_AUTHENTICATION_AUTHORITY_ASSERTED_RID = 1 SECURITY_AUTHENTICATION_AUTHORITY_RID_COUNT = 1 SECURITY_AUTHENTICATION_SERVICE_ASSERTED_RID = 2 SECURITY_BATCH_RID = 3 SECURITY_BUILTIN_APP_PACKAGE_RID_COUNT = 2 SECURITY_BUILTIN_CAPABILITY_RID_COUNT = 2 SECURITY_BUILTIN_DOMAIN_RID = 32 SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE = 1 SECURITY_CAPABILITY_BASE_RID = 3 SECURITY_CAPABILITY_DOCUMENTS_LIBRARY = 7 SECURITY_CAPABILITY_ENTERPRISE_AUTHENTICATION = 8 SECURITY_CAPABILITY_INTERNET_CLIENT = 1 SECURITY_CAPABILITY_INTERNET_CLIENT_SERVER = 2 SECURITY_CAPABILITY_INTERNET_EXPLORER = 4096 SECURITY_CAPABILITY_MUSIC_LIBRARY = 6 SECURITY_CAPABILITY_PICTURES_LIBRARY = 4 SECURITY_CAPABILITY_PRIVATE_NETWORK_CLIENT_SERVER = 3 SECURITY_CAPABILITY_REMOVABLE_STORAGE = 10 SECURITY_CAPABILITY_RID_COUNT = 5 SECURITY_CAPABILITY_SHARED_USER_CERTIFICATES = 9 SECURITY_CAPABILITY_VIDEOS_LIBRARY = 5 SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_BASE_RID = 85 SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_RID_COUNT = 6 SECURITY_COM_ID_BASE_RID = 89 SECURITY_CONTEXT_TRACKING = 0x40000 SECURITY_CREATOR_GROUP_RID = 1 SECURITY_CREATOR_GROUP_SERVER_RID = 3 SECURITY_CREATOR_OWNER_RID = 0 SECURITY_CREATOR_OWNER_RIGHTS_RID = 4 SECURITY_CREATOR_OWNER_SERVER_RID = 2 SECURITY_CRED_TYPE_BASE_RID = 65 SECURITY_CRED_TYPE_RID_COUNT = 2 SECURITY_CRED_TYPE_THIS_ORG_CERT_RID = 1 SECURITY_DASHOST_ID_BASE_RID = 92 SECURITY_DASHOST_ID_RID_COUNT = 6 SECURITY_DESCRIPTOR_REVISION = 1 SECURITY_DESCRIPTOR_REVISION1 = 1 SECURITY_DIALUP_RID = 1 SECURITY_DYNAMIC_TRACKING = 1 SECURITY_EFFECTIVE_ONLY = 0x80000 SECURITY_ENTERPRISE_CONTROLLERS_RID = 9 SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID = 22 SECURITY_INTERACTIVE_RID = 4 SECURITY_IUSER_RID = 17 SECURITY_LOCAL_LOGON_RID = 1 SECURITY_LOCAL_RID = 0 SECURITY_LOCAL_SERVICE_RID = 19 SECURITY_LOCAL_SYSTEM_RID = 18 SECURITY_LOGON_IDS_RID = 5 SECURITY_LOGON_IDS_RID_COUNT = 3 SECURITY_MANDATORY_HIGH_RID = 12288 SECURITY_MANDATORY_LOW_RID = 4096 SECURITY_MANDATORY_MAXIMUM_USER_RID = 16384 SECURITY_MANDATORY_MEDIUM_RID = 8192 SECURITY_MANDATORY_PROTECTED_PROCESS_RID = 20480 SECURITY_MANDATORY_SYSTEM_RID = 16384 SECURITY_MANDATORY_UNTRUSTED_RID = 0 SECURITY_MAX_ALWAYS_FILTERED = 999 SECURITY_MAX_BASE_RID = 111 SECURITY_MIN_BASE_RID = 80 SECURITY_MIN_NEVER_FILTERED = 1000 SECURITY_NETWORK_RID = 2 SECURITY_NETWORK_SERVICE_RID = 20 SECURITY_NFS_ID_BASE_RID = 88 SECURITY_NT_NON_UNIQUE = 21 SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT = 3 SECURITY_NULL_RID = 0 SECURITY_OTHER_ORGANIZATION_RID = 1000 SECURITY_PACKAGE_BASE_RID = 64 SECURITY_PACKAGE_DIGEST_RID = 21 SECURITY_PACKAGE_NTLM_RID = 10 SECURITY_PACKAGE_RID_COUNT = 2 SECURITY_PACKAGE_SCHANNEL_RID = 14 SECURITY_PRINCIPAL_SELF_RID = 10 SECURITY_PROXY_RID = 8 SECURITY_RDV_GFX_BASE_RID = 91 SECURITY_REMOTE_LOGON_RID = 14 SECURITY_RESERVED_ID_BASE_RID = 81 SECURITY_RESTRICTED_CODE_RID = 12 SECURITY_SERVER_LOGON_RID = 9 SECURITY_SERVICE_ID_BASE_RID = 80 SECURITY_SERVICE_ID_RID_COUNT = 6 SECURITY_SERVICE_RID = 6 SECURITY_SQOS_PRESENT = 0x100000 SECURITY_STATIC_TRACKING = 0 SECURITY_TASK_ID_BASE_RID = 87 SECURITY_TERMINAL_SERVER_RID = 13 SECURITY_THIS_ORGANIZATION_RID = 15 SECURITY_TRUSTED_INSTALLER_RID1 = 956008885 SECURITY_TRUSTED_INSTALLER_RID2 = 3418522649 SECURITY_TRUSTED_INSTALLER_RID3 = 1831038044 SECURITY_TRUSTED_INSTALLER_RID4 = 1853292631 SECURITY_TRUSTED_INSTALLER_RID5 = 2271478464 SECURITY_USERMODEDRIVERHOST_ID_BASE_RID = 84 SECURITY_USERMODEDRIVERHOST_ID_RID_COUNT = 6 SECURITY_VALID_SQOS_FLAGS = 0x1f0000 SECURITY_VIRTUALACCOUNT_ID_RID_COUNT = 6 SECURITY_VIRTUALSERVER_ID_BASE_RID = 83 SECURITY_VIRTUALSERVER_ID_RID_COUNT = 6 SECURITY_WINDOWSMOBILE_ID_BASE_RID = 112 SECURITY_WINDOW_MANAGER_BASE_RID = 90 SECURITY_WMIHOST_ID_BASE_RID = 86 SECURITY_WMIHOST_ID_RID_COUNT = 6 SECURITY_WORLD_RID = 0 SECURITY_WRITE_RESTRICTED_CODE_RID = 33 SEC_COMMIT = 0x8000000 SEC_FILE = 0x800000 SEC_IMAGE = 0x1000000 SEC_IMAGE_NO_EXECUTE = 285212672 SEC_LARGE_PAGES = 0x80000000 SEC_NOCACHE = 0x10000000 SEC_PROTECTED_IMAGE = 0x2000000 SEC_RESERVE = 0x4000000 SEC_WINNT_AUTH_IDENTITY_ANSI = 0x1 SEC_WINNT_AUTH_IDENTITY_UNICODE = 0x2 SEC_WRITECOMBINE = 0x40000000 SEE_MASK_ASYNCOK = 0x100000 SEE_MASK_CLASSKEY = 0x3 SEE_MASK_CLASSNAME = 0x1 SEE_MASK_CONNECTNETDRV = 0x80 SEE_MASK_DEFAULT = 0x0 SEE_MASK_DOENVSUBST = 0x200 SEE_MASK_FLAG_DDEWAIT = 256 SEE_MASK_FLAG_LOG_USAGE = 0x4000000 SEE_MASK_FLAG_NO_UI = 0x400 SEE_MASK_HMONITOR = 0x200000 SEE_MASK_HOTKEY = 0x20 SEE_MASK_ICON = 0x10 SEE_MASK_IDLIST = 0x4 SEE_MASK_INVOKEIDLIST = 0xc SEE_MASK_NOASYNC = 0x100 SEE_MASK_NOCLOSEPROCESS = 0x40 SEE_MASK_NOQUERYCLASSSTORE = 0x1000000 SEE_MASK_NOZONECHECKS = 0x800000 SEE_MASK_NO_CONSOLE = 0x8000 SEE_MASK_UNICODE = 0x4000 SEE_MASK_WAITFORINPUTIDLE = 0x2000000 SEF_AVOID_OWNER_CHECK = 0x10 SEF_AVOID_OWNER_RESTRICTION = 0x1000 SEF_AVOID_PRIVILEGE_CHECK = 0x08 SEF_DACL_AUTO_INHERIT = 0x01 SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT = 0x04 SEF_DEFAULT_GROUP_FROM_PARENT = 0x40 SEF_DEFAULT_OWNER_FROM_PARENT = 0x20 SEF_MACL_NO_EXECUTE_UP = 0x400 SEF_MACL_NO_READ_UP = 0x200 SEF_MACL_NO_WRITE_UP = 0x100 SEF_MACL_VALID_FLAGS = 1792 SEF_SACL_AUTO_INHERIT = 0x02 SELECTDIB = 41 SELECTPAPERSOURCE = 18 SELECT_CAP_CONVERSION = 0x00000001 SELECT_CAP_SENTENCE = 0x00000002 SEMAPHORE_ALL_ACCESS = 2031619 SEMAPHORE_MODIFY_STATE = 0x0002 SEM_FAILCRITICALERRORS = 0x0001 SEM_NOALIGNMENTFAULTEXCEPT = 0x0004 SEM_NOGPFAULTERRORBOX = 0x0002 SEM_NOOPENFILEERRORBOX = 0x8000 SENTINEL_Reason = 0 SERIAL_NUMBER_LENGTH = 32 SERKF_AVAILABLE = 0x00000002 SERKF_INDICATOR = 0x00000004 SERKF_SERIALKEYSON = 0x00000001 SERVER_ACCESS_ADMINISTER = 0x00000001 SERVER_ACCESS_ENUMERATE = 0x00000002 SERVER_ALL_ACCESS = 983043 SERVER_EXECUTE = 131074 SERVER_READ = 131074 SERVER_WRITE = 131075 SERVICES_ACTIVE_DATABASEA = "ServicesActive" SERVICES_FAILED_DATABASEA = "ServicesFailed" SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020 SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010 SERVICE_ACCEPT_PARAMCHANGE = 0x00000008 SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002 SERVICE_ACCEPT_POWEREVENT = 0x00000040 SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080 SERVICE_ACCEPT_SHUTDOWN = 0x00000004 SERVICE_ACCEPT_STOP = 0x00000001 SERVICE_ACTIVE = 0x00000001 SERVICE_ADAPTER = 0x00000004 SERVICE_ALL_ACCESS = 983551 SERVICE_AUTO_START = 0x00000002 SERVICE_BOOT_START = 0x00000000 SERVICE_CHANGE_CONFIG = 0x0002 SERVICE_CONFIG_DESCRIPTION = 1 SERVICE_CONFIG_FAILURE_ACTIONS = 2 SERVICE_CONTINUE_PENDING = 0x00000005 SERVICE_CONTROL_CONTINUE = 0x00000003 SERVICE_CONTROL_DEVICEEVENT = 0x0000000B SERVICE_CONTROL_HARDWAREPROFILECHANGE = 0x0000000C SERVICE_CONTROL_INTERROGATE = 0x00000004 SERVICE_CONTROL_NETBINDADD = 0x00000007 SERVICE_CONTROL_NETBINDDISABLE = 0x0000000A SERVICE_CONTROL_NETBINDENABLE = 0x00000009 SERVICE_CONTROL_NETBINDREMOVE = 0x00000008 SERVICE_CONTROL_PARAMCHANGE = 0x00000006 SERVICE_CONTROL_PAUSE = 0x00000002 SERVICE_CONTROL_POWEREVENT = 0x0000000D SERVICE_CONTROL_SESSIONCHANGE = 0x0000000E SERVICE_CONTROL_SHUTDOWN = 0x00000005 SERVICE_CONTROL_STOP = 0x00000001 SERVICE_DEMAND_START = 0x00000003 SERVICE_DISABLED = 0x00000004 SERVICE_DRIVER = 11 SERVICE_ENUMERATE_DEPENDENTS = 0x0008 SERVICE_ERROR_CRITICAL = 0x00000003 SERVICE_ERROR_IGNORE = 0x00000000 SERVICE_ERROR_NORMAL = 0x00000001 SERVICE_ERROR_SEVERE = 0x00000002 SERVICE_FILE_SYSTEM_DRIVER = 0x00000002 SERVICE_INACTIVE = 0x00000002 SERVICE_INTERACTIVE_PROCESS = 0x00000100 SERVICE_INTERROGATE = 0x0080 SERVICE_KERNEL_DRIVER = 0x00000001 SERVICE_NO_CHANGE = 0xffffffff SERVICE_PAUSED = 0x00000007 SERVICE_PAUSE_CONTINUE = 0x0040 SERVICE_PAUSE_PENDING = 0x00000006 SERVICE_QUERY_CONFIG = 0x0001 SERVICE_QUERY_STATUS = 0x0004 SERVICE_RECOGNIZER_DRIVER = 0x00000008 SERVICE_RUNNING = 0x00000004 SERVICE_RUNS_IN_SYSTEM_PROCESS = 0x00000001 SERVICE_START = 0x0010 SERVICE_START_PENDING = 0x00000002 SERVICE_STATE_ALL = 3 SERVICE_STOP = 0x0020 SERVICE_STOPPED = 0x00000001 SERVICE_STOP_PENDING = 0x00000003 SERVICE_SYSTEM_START = 0x00000001 SERVICE_TYPE_ALL = 319 SERVICE_USER_DEFINED_CONTROL = 0x0100 SERVICE_WIN32 = 48 SERVICE_WIN32_OWN_PROCESS = 0x00000010 SERVICE_WIN32_SHARE_PROCESS = 0x00000020 SESSION_ABORTED = 0x06 SESSION_ALL_ACCESS = 983043 SESSION_ESTABLISHED = 0x03 SESSION_MODIFY_ACCESS = 0x2 SESSION_QUERY_ACCESS = 0x1 SETABORTPROC = 9 SETALLJUSTVALUES = 771 SETBREAK = 8 SETCHARSET = 772 SETCOLORTABLE = 4 SETCOPYCOUNT = 17 SETDIBSCALING = 32 SETDTR = 5 SETICMPROFILE_EMBEDED = 0x00000001 SETKERNTRACK = 770 SETLINECAP = 21 SETLINEJOIN = 22 SETMITERLIMIT = 23 SETRGBSTRINGA = "commdlg_SetRGBColor" SETRTS = 3 SETXOFF = 1 SETXON = 2 SET_ARC_DIRECTION = 4102 SET_BACKGROUND_COLOR = 4103 SET_BOUNDS = 4109 SET_CLIP_BOX = 4108 SET_MIRROR_MODE = 4110 SET_POLY_MODE = 4104 SET_SCREEN_ANGLE = 4105 SET_SPREAD = 4106 SET_TAPE_DRIVE_INFORMATION = 1 SET_TAPE_MEDIA_INFORMATION = 0 SEVERITY_ERROR = 1 SEVERITY_SUCCESS = 0 SE_DACL_AUTO_INHERITED = 1024 SE_DACL_AUTO_INHERIT_REQ = 256 SE_DACL_DEFAULTED = 8 SE_DACL_PRESENT = 4 SE_DACL_PROTECTED = 4096 SE_ERR_ACCESSDENIED = 5 SE_ERR_ASSOCINCOMPLETE = 27 SE_ERR_DDEBUSY = 30 SE_ERR_DDEFAIL = 29 SE_ERR_DDETIMEOUT = 28 SE_ERR_DLLNOTFOUND = 32 SE_ERR_FNF = 2 SE_ERR_NOASSOC = 31 SE_ERR_OOM = 8 SE_ERR_PNF = 3 SE_ERR_SHARE = 26 SE_GROUP_DEFAULTED = 2 SE_GROUP_ENABLED = 4 SE_GROUP_ENABLED_BY_DEFAULT = 2 SE_GROUP_INTEGRITY = 32 SE_GROUP_INTEGRITY_ENABLED = 64 SE_GROUP_LOGON_ID = 3221225472 SE_GROUP_MANDATORY = 1 SE_GROUP_OWNER = 8 SE_GROUP_RESOURCE = 536870912 SE_GROUP_USE_FOR_DENY_ONLY = 16 SE_GROUP_VALID_ATTRIBUTES = 3758096511 SE_LEARNING_MODE_FLAG_PERMISSIVE = 0x00000001 SE_OWNER_DEFAULTED = 1 SE_PRIVILEGE_ENABLED = 2 SE_PRIVILEGE_ENABLED_BY_DEFAULT = 1 SE_PRIVILEGE_REMOVED = 4 SE_PRIVILEGE_USED_FOR_ACCESS = 2147483648 SE_PRIVILEGE_VALID_ATTRIBUTES = 2147483655 SE_RM_CONTROL_VALID = 16384 SE_SACL_AUTO_INHERITED = 2048 SE_SACL_AUTO_INHERIT_REQ = 512 SE_SACL_DEFAULTED = 32 SE_SACL_PRESENT = 16 SE_SACL_PROTECTED = 8192 SE_SECURITY_DESCRIPTOR_FLAG_NO_LABEL_ACE = 0x00000002 SE_SECURITY_DESCRIPTOR_FLAG_NO_OWNER_ACE = 0x00000001 SE_SECURITY_DESCRIPTOR_VALID_FLAGS = 0x00000003 SE_SELF_RELATIVE = 32768 SHADEBLENDCAPS = 120 SHAREVISTRINGA = "commdlg_ShareViolation" SHERB_NOCONFIRMATION = 0x00000001 SHERB_NOPROGRESSUI = 0x00000002 SHERB_NOSOUND = 0x00000004 SHFILEINFO_DEFINED = 0 SHGFI_ADDOVERLAYS = 0x000000020 SHGFI_ATTRIBUTES = 0x000000800 SHGFI_ATTR_SPECIFIED = 0x000020000 SHGFI_DISPLAYNAME = 0x000000200 SHGFI_EXETYPE = 0x000002000 SHGFI_ICON = 0x000000100 SHGFI_ICONLOCATION = 0x000001000 SHGFI_LARGEICON = 0x000000000 SHGFI_LINKOVERLAY = 0x000008000 SHGFI_OPENICON = 0x000000002 SHGFI_OVERLAYINDEX = 0x000000040 SHGFI_PIDL = 0x000000008 SHGFI_SELECTED = 0x000010000 SHGFI_SHELLICONSIZE = 0x000000004 SHGFI_SMALLICON = 0x000000001 SHGFI_SYSICONINDEX = 0x000004000 SHGFI_TYPENAME = 0x000000400 SHGFI_USEFILEATTRIBUTES = 0x000000010 SHGNLI_NOLNK = 0x000000008 SHGNLI_NOLOCNAME = 0x000000010 SHGNLI_NOUNIQUE = 0x000000004 SHGNLI_PIDL = 0x000000001 SHGNLI_PREFIXNAME = 0x000000002 SHIFTJIS_CHARSET = 128 SHIFT_PRESSED = 0x10 SHIL_EXTRALARGE = 2 SHIL_LARGE = 0 SHIL_LAST = 3 SHIL_SMALL = 1 SHIL_SYSSMALL = 3 SHOW_FULLSCREEN = 3 SHOW_ICONWINDOW = 2 SHOW_OPENNOACTIVATE = 4 SHOW_OPENWINDOW = 1 SHTDN_REASON_FLAG_CLEAN_UI = 0x04000000 SHTDN_REASON_FLAG_COMMENT_REQUIRED = 0x01000000 SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000 SHTDN_REASON_FLAG_DIRTY_UI = 0x08000000 SHTDN_REASON_FLAG_PLANNED = 0x80000000 SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000 SHTDN_REASON_LEGACY_API = 2147942400 SHTDN_REASON_MAJOR_APPLICATION = 0x00040000 SHTDN_REASON_MAJOR_HARDWARE = 0x00010000 SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000 SHTDN_REASON_MAJOR_NONE = 0x00000000 SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000 SHTDN_REASON_MAJOR_OTHER = 0x00000000 SHTDN_REASON_MAJOR_POWER = 0x00060000 SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000 SHTDN_REASON_MAJOR_SYSTEM = 0x00050000 SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000F SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b SHTDN_REASON_MINOR_DC_DEMOTION = 0x00000022 SHTDN_REASON_MINOR_DC_PROMOTION = 0x00000021 SHTDN_REASON_MINOR_DISK = 0x00000007 SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d SHTDN_REASON_MINOR_HOTFIX = 0x00000011 SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017 SHTDN_REASON_MINOR_HUNG = 0x00000005 SHTDN_REASON_MINOR_INSTALLATION = 0x00000002 SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001 SHTDN_REASON_MINOR_MMC = 0x00000019 SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009 SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014 SHTDN_REASON_MINOR_NONE = 0x000000ff SHTDN_REASON_MINOR_OTHER = 0x00000000 SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a SHTDN_REASON_MINOR_PROCESSOR = 0x00000008 SHTDN_REASON_MINOR_RECONFIG = 0x00000004 SHTDN_REASON_MINOR_SECURITY = 0x00000013 SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012 SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018 SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010 SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016 SHTDN_REASON_MINOR_SYSTEMRESTORE = 0x0000001a SHTDN_REASON_MINOR_TERMSRV = 0x00000020 SHTDN_REASON_MINOR_UNSTABLE = 0x00000006 SHTDN_REASON_MINOR_UPGRADE = 0x00000003 SHTDN_REASON_MINOR_WMI = 0x00000015 SHTDN_REASON_UNKNOWN = 255 SHTDN_REASON_VALID_BIT_MASK = 0xc0ffffff SHUTDOWN_NORETRY = 0x1 SHUTDOWN_TYPE_LEN = 32 SID_DEFINED = 0 SID_HASH_SIZE = 32 SID_IDENTIFIER_AUTHORITY_DEFINED = 0 SID_MAX_SUB_AUTHORITIES = 15 SID_RECOMMENDED_SUB_AUTHORITIES = 1 SID_REVISION = 1 SIF_ALL = 23 SIF_DISABLENOSCROLL = 0x0008 SIF_PAGE = 0x0002 SIF_POS = 0x0004 SIF_RANGE = 0x0001 SIF_TRACKPOS = 0x0010 SIMPLEBLOB = 0x1 SIMPLEREGION = 2 SIMULATED_FONTTYPE = 0x8000 SIZEFULLSCREEN = 2 SIZEICONIC = 1 SIZENORMAL = 0 SIZEOF_RFPO_DATA = 16 SIZEPALETTE = 104 SIZEZOOMHIDE = 4 SIZEZOOMSHOW = 3 SIZE_MAXHIDE = 4 SIZE_MAXIMIZED = 2 SIZE_MAXSHOW = 3 SIZE_MINIMIZED = 1 SIZE_RESTORED = 0 SKF_AUDIBLEFEEDBACK = 0x00000040 SKF_AVAILABLE = 0x00000002 SKF_CONFIRMHOTKEY = 0x00000008 SKF_HOTKEYACTIVE = 0x00000004 SKF_HOTKEYSOUND = 0x00000010 SKF_INDICATOR = 0x00000020 SKF_LALTLATCHED = 0x10000000 SKF_LALTLOCKED = 0x00100000 SKF_LCTLLATCHED = 0x04000000 SKF_LCTLLOCKED = 0x00040000 SKF_LSHIFTLATCHED = 0x01000000 SKF_LSHIFTLOCKED = 0x00010000 SKF_LWINLATCHED = 0x40000000 SKF_LWINLOCKED = 0x00400000 SKF_RALTLATCHED = 0x20000000 SKF_RALTLOCKED = 0x00200000 SKF_RCTLLATCHED = 0x08000000 SKF_RCTLLOCKED = 0x00080000 SKF_RSHIFTLATCHED = 0x02000000 SKF_RSHIFTLOCKED = 0x00020000 SKF_RWINLATCHED = 0x80000000 SKF_RWINLOCKED = 0x00800000 SKF_STICKYKEYSON = 0x00000001 SKF_TRISTATE = 0x00000080 SKF_TWOKEYSOFF = 0x00000100 SLE_ERROR = 0x00000001 SLE_MINORERROR = 0x00000002 SLE_WARNING = 0x00000003 SMART_ABORT_OFFLINE_SELFTEST = 127 SMART_CMD = 0xB0 SMART_CYL_HI = 0xC2 SMART_CYL_LOW = 0x4F SMART_ERROR_NO_MEM = 7 SMART_EXTENDED_SELFTEST_CAPTIVE = 130 SMART_EXTENDED_SELFTEST_OFFLINE = 2 SMART_GET_VERSION = 475264 SMART_IDE_ERROR = 1 SMART_INVALID_BUFFER = 4 SMART_INVALID_COMMAND = 3 SMART_INVALID_DRIVE = 5 SMART_INVALID_FLAG = 2 SMART_INVALID_IOCTL = 6 SMART_INVALID_REGISTER = 8 SMART_LOG_SECTOR_SIZE = 512 SMART_NOT_SUPPORTED = 9 SMART_NO_ERROR = 0 SMART_NO_IDE_DEVICE = 10 SMART_OFFLINE_ROUTINE_OFFLINE = 0 SMART_RCV_DRIVE_DATA = 508040 SMART_READ_LOG = 0xD5 SMART_SEND_DRIVE_COMMAND = 508036 SMART_SHORT_SELFTEST_CAPTIVE = 129 SMART_SHORT_SELFTEST_OFFLINE = 1 SMART_WRITE_LOG = 0xd6 SMTO_ABORTIFHUNG = 0x0002 SMTO_BLOCK = 0x0001 SMTO_NORMAL = 0x0000 SMTO_NOTIMEOUTIFNOTHUNG = 0x0008 SM_ARRANGE = 56 SM_CARETBLINKINGENABLED = 0x2002 SM_CLEANBOOT = 67 SM_CMETRICS = 97 SM_CMONITORS = 80 SM_CMOUSEBUTTONS = 43 SM_CXBORDER = 5 SM_CXCURSOR = 13 SM_CXDLGFRAME = 7 SM_CXDOUBLECLK = 36 SM_CXDRAG = 68 SM_CXEDGE = 45 SM_CXFIXEDFRAME = 7 SM_CXFOCUSBORDER = 83 SM_CXFRAME = 32 SM_CXFULLSCREEN = 16 SM_CXHSCROLL = 21 SM_CXHTHUMB = 10 SM_CXICON = 11 SM_CXICONSPACING = 38 SM_CXMAXIMIZED = 61 SM_CXMAXTRACK = 59 SM_CXMENUCHECK = 71 SM_CXMENUSIZE = 54 SM_CXMIN = 28 SM_CXMINIMIZED = 57 SM_CXMINSPACING = 47 SM_CXMINTRACK = 34 SM_CXSCREEN = 0 SM_CXSIZE = 30 SM_CXSIZEFRAME = 32 SM_CXSMICON = 49 SM_CXSMSIZE = 52 SM_CXVIRTUALSCREEN = 78 SM_CXVSCROLL = 2 SM_CYBORDER = 6 SM_CYCAPTION = 4 SM_CYCURSOR = 14 SM_CYDLGFRAME = 8 SM_CYDOUBLECLK = 37 SM_CYDRAG = 69 SM_CYEDGE = 46 SM_CYFIXEDFRAME = 8 SM_CYFOCUSBORDER = 84 SM_CYFRAME = 33 SM_CYFULLSCREEN = 17 SM_CYHSCROLL = 3 SM_CYICON = 12 SM_CYICONSPACING = 39 SM_CYKANJIWINDOW = 18 SM_CYMAXIMIZED = 62 SM_CYMAXTRACK = 60 SM_CYMENU = 15 SM_CYMENUCHECK = 72 SM_CYMENUSIZE = 55 SM_CYMIN = 29 SM_CYMINIMIZED = 58 SM_CYMINSPACING = 48 SM_CYMINTRACK = 35 SM_CYSCREEN = 1 SM_CYSIZE = 31 SM_CYSIZEFRAME = 33 SM_CYSMCAPTION = 51 SM_CYSMICON = 50 SM_CYSMSIZE = 53 SM_CYVIRTUALSCREEN = 79 SM_CYVSCROLL = 20 SM_CYVTHUMB = 9 SM_DBCSENABLED = 42 SM_DEBUG = 22 SM_IMMENABLED = 82 SM_MEDIACENTER = 87 SM_MENUDROPALIGNMENT = 40 SM_MIDEASTENABLED = 74 SM_MOUSEPRESENT = 19 SM_MOUSEWHEELPRESENT = 75 SM_NETWORK = 63 SM_PENWINDOWS = 41 SM_REMOTECONTROL = 0x2001 SM_REMOTESESSION = 0x1000 SM_RESERVED1 = 24 SM_RESERVED2 = 25 SM_RESERVED3 = 26 SM_RESERVED4 = 27 SM_SAMEDISPLAYFORMAT = 81 SM_SECURE = 44 SM_SERVERR2 = 89 SM_SHOWSOUNDS = 70 SM_SHUTTINGDOWN = 0x2000 SM_SLOWMACHINE = 73 SM_STARTER = 88 SM_SWAPBUTTON = 23 SM_TABLETPC = 86 SM_XVIRTUALSCREEN = 76 SM_YVIRTUALSCREEN = 77 SNAPSHOT_POLICY_ALWAYS = 1 SNAPSHOT_POLICY_NEVER = 0 SNAPSHOT_POLICY_UNPLANNED = 2 SND_ALIAS = 65536 SND_ALIAS_ID = 1114112 SND_ALIAS_START = 0 SND_APPLICATION = 0x0080 SND_ASYNC = 0x0001 SND_FILENAME = 131072 SND_LOOP = 0x0008 SND_MEMORY = 0x0004 SND_NODEFAULT = 0x0002 SND_NOSTOP = 0x0010 SND_NOWAIT = 8192 SND_PURGE = 0x0040 SND_RESOURCE = 262148 SND_SYNC = 0x0000 SOCKET_ERROR = -1 SOCK_DGRAM = 2 SOCK_RAW = 3 SOCK_RDM = 4 SOCK_SEQPACKET = 5 SOCK_STREAM = 1 SOFTDIST_ADSTATE_AVAILABLE = 0x1 SOFTDIST_ADSTATE_DOWNLOADED = 0x2 SOFTDIST_ADSTATE_INSTALLED = 0x3 SOFTDIST_ADSTATE_NONE = 0x0 SOFTDIST_FLAG_DELETE_SUBSCRIPTION = 0x8 SOFTDIST_FLAG_USAGE_AUTOINSTALL = 0x4 SOFTDIST_FLAG_USAGE_EMAIL = 0x1 SOFTDIST_FLAG_USAGE_PRECACHE = 0x2 SOFTKEYBOARD_TYPE_C1 = 0x0002 SOFTKEYBOARD_TYPE_T1 = 0x0001 SOL_SOCKET = 0xffff SOMAXCONN = 5 SORTED_CTL_EXT_COUNT_OFFSET = 4 SORTED_CTL_EXT_FLAGS_OFFSET = 0 SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG = 0x1 SORTED_CTL_EXT_HASH_BUCKET_OFFSET = 12 SORTED_CTL_EXT_MAX_COLLISION_OFFSET = 8 SORT_CHINESE_BIG5 = 0x0 SORT_CHINESE_BOPOMOFO = 0x3 SORT_CHINESE_PRC = 0x2 SORT_CHINESE_PRCP = 0x0 SORT_CHINESE_RADICALSTROKE = 0x4 SORT_CHINESE_UNICODE = 0x1 SORT_DEFAULT = 0x0 SORT_GEORGIAN_MODERN = 0x1 SORT_GEORGIAN_TRADITIONAL = 0x0 SORT_GERMAN_PHONE_BOOK = 0x1 SORT_HUNGARIAN_DEFAULT = 0x0 SORT_HUNGARIAN_TECHNICAL = 0x1 SORT_INVARIANT_MATH = 0x1 SORT_JAPANESE_RADICALSTROKE = 0x4 SORT_JAPANESE_UNICODE = 0x1 SORT_JAPANESE_XJIS = 0x0 SORT_KOREAN_KSC = 0x0 SORT_KOREAN_UNICODE = 0x1 SORT_STRINGSORT = 0x00001000 SOUND_SYSTEM_APPEND = 14 SOUND_SYSTEM_APPSTART = 12 SOUND_SYSTEM_BEEP = 3 SOUND_SYSTEM_ERROR = 4 SOUND_SYSTEM_FAULT = 13 SOUND_SYSTEM_INFORMATION = 7 SOUND_SYSTEM_MAXIMIZE = 8 SOUND_SYSTEM_MENUCOMMAND = 15 SOUND_SYSTEM_MENUPOPUP = 16 SOUND_SYSTEM_MINIMIZE = 9 SOUND_SYSTEM_QUESTION = 5 SOUND_SYSTEM_RESTOREDOWN = 11 SOUND_SYSTEM_RESTOREUP = 10 SOUND_SYSTEM_SHUTDOWN = 2 SOUND_SYSTEM_STARTUP = 1 SOUND_SYSTEM_WARNING = 6 SO_ACCEPTCONN = 0x0002 SO_BROADCAST = 0x0020 SO_CONNDATA = 0x7000 SO_CONNDATALEN = 0x7004 SO_CONNECT_TIME = 0x700C SO_CONNOPT = 0x7001 SO_CONNOPTLEN = 0x7005 SO_DEBUG = 0x0001 SO_DISCDATA = 0x7002 SO_DISCDATALEN = 0x7006 SO_DISCOPT = 0x7003 SO_DISCOPTLEN = 0x7007 SO_DONTROUTE = 0x0010 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x0008 SO_LINGER = 0x0080 SO_MAXDG = 0x7009 SO_MAXPATHDG = 0x700A SO_OOBINLINE = 0x0100 SO_OPENTYPE = 0x7008 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 SO_REUSEADDR = 0x0004 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_SYNCHRONOUS_ALERT = 0x10 SO_SYNCHRONOUS_NONALERT = 0x20 SO_TYPE = 0x1008 SO_UPDATE_ACCEPT_CONTEXT = 0x700B SO_USELOOPBACK = 0x0040 SPACEPARITY = 4 SPCLPASSTHROUGH2 = 4568 SPECIFIC_RIGHTS_ALL = 65535 SPECSTRINGS_H = 0 SPIF_SENDCHANGE = 2 SPIF_SENDWININICHANGE = 0x0002 SPIF_UPDATEINIFILE = 0x0001 SPI_GETACCESSTIMEOUT = 0x003C SPI_GETACTIVEWINDOWTRACKING = 0x1000 SPI_GETACTIVEWNDTRKTIMEOUT = 0x2002 SPI_GETACTIVEWNDTRKZORDER = 0x100C SPI_GETANIMATION = 0x0048 SPI_GETBEEP = 0x0001 SPI_GETBLOCKSENDINPUTRESETS = 0x1026 SPI_GETBORDER = 0x0005 SPI_GETCARETWIDTH = 0x2006 SPI_GETCOMBOBOXANIMATION = 0x1004 SPI_GETCURSORSHADOW = 0x101A SPI_GETDEFAULTINPUTLANG = 0x0059 SPI_GETDESKWALLPAPER = 0x0073 SPI_GETDRAGFULLWINDOWS = 0x0026 SPI_GETDROPSHADOW = 0x1024 SPI_GETFASTTASKSWITCH = 0x0023 SPI_GETFILTERKEYS = 0x0032 SPI_GETFLATMENU = 0x1022 SPI_GETFOCUSBORDERHEIGHT = 0x2010 SPI_GETFOCUSBORDERWIDTH = 0x200E SPI_GETFONTSMOOTHING = 0x004A SPI_GETFONTSMOOTHINGCONTRAST = 0x200C SPI_GETFONTSMOOTHINGORIENTATION = 0x2012 SPI_GETFONTSMOOTHINGTYPE = 0x200A SPI_GETFOREGROUNDFLASHCOUNT = 0x2004 SPI_GETFOREGROUNDLOCKTIMEOUT = 0x2000 SPI_GETGRADIENTCAPTIONS = 0x1008 SPI_GETGRIDGRANULARITY = 0x0012 SPI_GETHIGHCONTRAST = 0x0042 SPI_GETHOTTRACKING = 0x100E SPI_GETICONMETRICS = 0x002D SPI_GETICONTITLELOGFONT = 0x001F SPI_GETICONTITLEWRAP = 0x0019 SPI_GETKEYBOARDCUES = 0x100A SPI_GETKEYBOARDDELAY = 0x0016 SPI_GETKEYBOARDPREF = 0x0044 SPI_GETKEYBOARDSPEED = 0x000A SPI_GETLISTBOXSMOOTHSCROLLING = 0x1006 SPI_GETLOWPOWERACTIVE = 0x0053 SPI_GETLOWPOWERTIMEOUT = 0x004F SPI_GETMENUANIMATION = 0x1002 SPI_GETMENUDROPALIGNMENT = 0x001B SPI_GETMENUFADE = 0x1012 SPI_GETMENUSHOWDELAY = 0x006A SPI_GETMENUUNDERLINES = 4106 SPI_GETMINIMIZEDMETRICS = 0x002B SPI_GETMOUSE = 0x0003 SPI_GETMOUSECLICKLOCK = 0x101E SPI_GETMOUSECLICKLOCKTIME = 0x2008 SPI_GETMOUSEHOVERHEIGHT = 0x0064 SPI_GETMOUSEHOVERTIME = 0x0066 SPI_GETMOUSEHOVERWIDTH = 0x0062 SPI_GETMOUSEKEYS = 0x0036 SPI_GETMOUSESONAR = 0x101C SPI_GETMOUSESPEED = 0x0070 SPI_GETMOUSETRAILS = 0x005E SPI_GETMOUSEVANISH = 0x1020 SPI_GETNONCLIENTMETRICS = 0x0029 SPI_GETPOWEROFFACTIVE = 0x0054 SPI_GETPOWEROFFTIMEOUT = 0x0050 SPI_GETSCREENREADER = 0x0046 SPI_GETSCREENSAVEACTIVE = 0x0010 SPI_GETSCREENSAVERRUNNING = 0x0072 SPI_GETSCREENSAVETIMEOUT = 0x000E SPI_GETSELECTIONFADE = 0x1014 SPI_GETSERIALKEYS = 0x003E SPI_GETSHOWIMEUI = 0x006E SPI_GETSHOWSOUNDS = 0x0038 SPI_GETSNAPTODEFBUTTON = 0x005F SPI_GETSOUNDSENTRY = 0x0040 SPI_GETSTICKYKEYS = 0x003A SPI_GETTOGGLEKEYS = 0x0034 SPI_GETTOOLTIPANIMATION = 0x1016 SPI_GETTOOLTIPFADE = 0x1018 SPI_GETUIEFFECTS = 0x103E SPI_GETWHEELSCROLLLINES = 0x0068 SPI_GETWINDOWSEXTENSION = 0x005C SPI_GETWORKAREA = 0x0030 SPI_ICONHORIZONTALSPACING = 0x000D SPI_ICONVERTICALSPACING = 0x0018 SPI_LANGDRIVER = 0x000C SPI_SCREENSAVERRUNNING = 97 SPI_SETACCESSTIMEOUT = 0x003D SPI_SETACTIVEWINDOWTRACKING = 0x1001 SPI_SETACTIVEWNDTRKTIMEOUT = 0x2003 SPI_SETACTIVEWNDTRKZORDER = 0x100D SPI_SETANIMATION = 0x0049 SPI_SETBEEP = 0x0002 SPI_SETBLOCKSENDINPUTRESETS = 0x1027 SPI_SETBORDER = 0x0006 SPI_SETCARETWIDTH = 0x2007 SPI_SETCOMBOBOXANIMATION = 0x1005 SPI_SETCURSORS = 0x0057 SPI_SETCURSORSHADOW = 0x101B SPI_SETDEFAULTINPUTLANG = 0x005A SPI_SETDESKPATTERN = 0x0015 SPI_SETDESKWALLPAPER = 0x0014 SPI_SETDOUBLECLICKTIME = 0x0020 SPI_SETDOUBLECLKHEIGHT = 0x001E SPI_SETDOUBLECLKWIDTH = 0x001D SPI_SETDRAGFULLWINDOWS = 0x0025 SPI_SETDRAGHEIGHT = 0x004D SPI_SETDRAGWIDTH = 0x004C SPI_SETDROPSHADOW = 0x1025 SPI_SETFASTTASKSWITCH = 0x0024 SPI_SETFILTERKEYS = 0x0033 SPI_SETFLATMENU = 0x1023 SPI_SETFOCUSBORDERHEIGHT = 0x2011 SPI_SETFOCUSBORDERWIDTH = 0x200F SPI_SETFONTSMOOTHING = 0x004B SPI_SETFONTSMOOTHINGCONTRAST = 0x200D SPI_SETFONTSMOOTHINGORIENTATION = 0x2013 SPI_SETFONTSMOOTHINGTYPE = 0x200B SPI_SETFOREGROUNDFLASHCOUNT = 0x2005 SPI_SETFOREGROUNDLOCKTIMEOUT = 0x2001 SPI_SETGRADIENTCAPTIONS = 0x1009 SPI_SETGRIDGRANULARITY = 0x0013 SPI_SETHANDHELD = 0x004E SPI_SETHIGHCONTRAST = 0x0043 SPI_SETHOTTRACKING = 0x100F SPI_SETICONMETRICS = 0x002E SPI_SETICONS = 0x0058 SPI_SETICONTITLELOGFONT = 0x0022 SPI_SETICONTITLEWRAP = 0x001A SPI_SETKEYBOARDCUES = 0x100B SPI_SETKEYBOARDDELAY = 0x0017 SPI_SETKEYBOARDPREF = 0x0045 SPI_SETKEYBOARDSPEED = 0x000B SPI_SETLANGTOGGLE = 0x005B SPI_SETLISTBOXSMOOTHSCROLLING = 0x1007 SPI_SETLOWPOWERACTIVE = 0x0055 SPI_SETLOWPOWERTIMEOUT = 0x0051 SPI_SETMENUANIMATION = 0x1003 SPI_SETMENUDROPALIGNMENT = 0x001C SPI_SETMENUFADE = 0x1013 SPI_SETMENUSHOWDELAY = 0x006B SPI_SETMENUUNDERLINES = 4107 SPI_SETMINIMIZEDMETRICS = 0x002C SPI_SETMOUSE = 0x0004 SPI_SETMOUSEBUTTONSWAP = 0x0021 SPI_SETMOUSECLICKLOCK = 0x101F SPI_SETMOUSECLICKLOCKTIME = 0x2009 SPI_SETMOUSEHOVERHEIGHT = 0x0065 SPI_SETMOUSEHOVERTIME = 0x0067 SPI_SETMOUSEHOVERWIDTH = 0x0063 SPI_SETMOUSEKEYS = 0x0037 SPI_SETMOUSESONAR = 0x101D SPI_SETMOUSESPEED = 0x0071 SPI_SETMOUSETRAILS = 0x005D SPI_SETMOUSEVANISH = 0x1021 SPI_SETNONCLIENTMETRICS = 0x002A SPI_SETPENWINDOWS = 0x0031 SPI_SETPOWEROFFACTIVE = 0x0056 SPI_SETPOWEROFFTIMEOUT = 0x0052 SPI_SETSCREENREADER = 0x0047 SPI_SETSCREENSAVEACTIVE = 0x0011 SPI_SETSCREENSAVERRUNNING = 0x0061 SPI_SETSCREENSAVETIMEOUT = 0x000F SPI_SETSELECTIONFADE = 0x1015 SPI_SETSERIALKEYS = 0x003F SPI_SETSHOWIMEUI = 0x006F SPI_SETSHOWSOUNDS = 0x0039 SPI_SETSNAPTODEFBUTTON = 0x0060 SPI_SETSOUNDSENTRY = 0x0041 SPI_SETSTICKYKEYS = 0x003B SPI_SETTOGGLEKEYS = 0x0035 SPI_SETTOOLTIPANIMATION = 0x1017 SPI_SETTOOLTIPFADE = 0x1019 SPI_SETUIEFFECTS = 0x103F SPI_SETWHEELSCROLLLINES = 0x0069 SPI_SETWORKAREA = 0x002F SPOINTER_32 = 0 SPOOL_FILE_PERSISTENT = 0x00000001 SPOOL_FILE_TEMPORARY = 0x00000002 SPVERSION_MASK = 0x0000FF00 SP_APPABORT = -2 SP_ERROR = -1 SP_NOTREPORTED = 0x4000 SP_OUTOFDISK = -4 SP_OUTOFMEMORY = -5 SP_USERABORT = -3 SQLITE_WINDIRENT_H = 0 SSF_AVAILABLE = 0x00000002 SSF_INDICATOR = 0x00000004 SSF_SOUNDSENTRYON = 0x00000001 SSGF_DISPLAY = 3 SSGF_NONE = 0 SSTF_BORDER = 2 SSTF_CHARS = 1 SSTF_DISPLAY = 3 SSTF_NONE = 0 SSWF_CUSTOM = 4 SSWF_DISPLAY = 3 SSWF_NONE = 0 SSWF_TITLE = 1 SSWF_WINDOW = 2 SS_BITMAP = 14 SS_BLACKFRAME = 7 SS_BLACKRECT = 4 SS_CENTER = 1 SS_CENTERIMAGE = 512 SS_EDITCONTROL = 8192 SS_ELLIPSISMASK = 49152 SS_ENDELLIPSIS = 16384 SS_ENHMETAFILE = 15 SS_ETCHEDFRAME = 18 SS_ETCHEDHORZ = 16 SS_ETCHEDVERT = 17 SS_GRAYFRAME = 8 SS_GRAYRECT = 5 SS_ICON = 3 SS_LEFT = 0 SS_LEFTNOWORDWRAP = 12 SS_NOPREFIX = 128 SS_NOTIFY = 256 SS_OWNERDRAW = 13 SS_PATHELLIPSIS = 32768 SS_REALSIZECONTROL = 64 SS_REALSIZEIMAGE = 2048 SS_RIGHT = 2 SS_RIGHTJUST = 1024 SS_SIMPLE = 11 SS_SUNKEN = 4096 SS_TYPEMASK = 31 SS_USERITEM = 10 SS_WHITEFRAME = 9 SS_WHITERECT = 6 SS_WORDELLIPSIS = 49152 STACK_SIZE_PARAM_IS_A_RESERVATION = 0x10000 STAMP_AXESLIST = 134245473 STAMP_DESIGNVECTOR = 134248036 STANDARD_RIGHTS_ALL = 2031616 STANDARD_RIGHTS_EXECUTE = 131072 STANDARD_RIGHTS_READ = 131072 STANDARD_RIGHTS_REQUIRED = 983040 STANDARD_RIGHTS_WRITE = 131072 STARTDOC = 10 STARTF_FORCEOFFFEEDBACK = 0x00000080 STARTF_FORCEONFEEDBACK = 0x00000040 STARTF_PREVENTPINNING = 0x00002000 STARTF_RUNFULLSCREEN = 0x00000020 STARTF_TITLEISAPPID = 0x00001000 STARTF_TITLEISLINKNAME = 0x00000800 STARTF_USECOUNTCHARS = 0x00000008 STARTF_USEFILLATTRIBUTE = 0x00000010 STARTF_USEHOTKEY = 0x00000200 STARTF_USEPOSITION = 0x00000004 STARTF_USESHOWWINDOW = 0x00000001 STARTF_USESIZE = 0x00000002 STARTF_USESTDHANDLES = 0x00000100 START_PAGE_GENERAL = 0xffffffff STATE_SYSTEM_ALERT_HIGH = 0x10000000 STATE_SYSTEM_ALERT_LOW = 0x04000000 STATE_SYSTEM_ALERT_MEDIUM = 0x08000000 STATE_SYSTEM_ANIMATED = 0x00004000 STATE_SYSTEM_BUSY = 0x00000800 STATE_SYSTEM_CHECKED = 0x00000010 STATE_SYSTEM_COLLAPSED = 0x00000400 STATE_SYSTEM_DEFAULT = 0x00000100 STATE_SYSTEM_EXPANDED = 0x00000200 STATE_SYSTEM_EXTSELECTABLE = 0x02000000 STATE_SYSTEM_FLOATING = 0x00001000 STATE_SYSTEM_FOCUSABLE = 0x00100000 STATE_SYSTEM_FOCUSED = 0x00000004 STATE_SYSTEM_HOTTRACKED = 0x00000080 STATE_SYSTEM_INDETERMINATE = 32 STATE_SYSTEM_INVISIBLE = 0x00008000 STATE_SYSTEM_LINKED = 0x00400000 STATE_SYSTEM_MARQUEED = 0x00002000 STATE_SYSTEM_MIXED = 0x00000020 STATE_SYSTEM_MOVEABLE = 0x00040000 STATE_SYSTEM_MULTISELECTABLE = 0x01000000 STATE_SYSTEM_OFFSCREEN = 0x00010000 STATE_SYSTEM_PRESSED = 0x00000008 STATE_SYSTEM_PROTECTED = 0x20000000 STATE_SYSTEM_READONLY = 0x00000040 STATE_SYSTEM_SELECTABLE = 0x00200000 STATE_SYSTEM_SELECTED = 0x00000002 STATE_SYSTEM_SELFVOICING = 0x00080000 STATE_SYSTEM_SIZEABLE = 0x00020000 STATE_SYSTEM_TRAVERSED = 0x00800000 STATE_SYSTEM_UNAVAILABLE = 0x00000001 STATE_SYSTEM_VALID = 0x3FFFFFFF STDAPICALLTYPE = 0 STDMETHODCALLTYPE = 0 STDOLE2_LCID = 0x0000 STDOLE2_MAJORVERNUM = 0x2 STDOLE2_MINORVERNUM = 0x0 STDOLE_LCID = 0x0000 STDOLE_MAJORVERNUM = 0x1 STDOLE_MINORVERNUM = 0x0 STGFMT_ANY = 4 STGFMT_DOCFILE = 5 STGFMT_DOCUMENT = 0 STGFMT_FILE = 3 STGFMT_NATIVE = 1 STGFMT_STORAGE = 0 STGM_CONVERT = 131072 STGM_CREATE = 4096 STGM_DELETEONRELEASE = 67108864 STGM_DIRECT = 0 STGM_DIRECT_SWMR = 4194304 STGM_FAILIFTHERE = 0 STGM_NOSCRATCH = 1048576 STGM_NOSNAPSHOT = 2097152 STGM_PRIORITY = 262144 STGM_READ = 0 STGM_READWRITE = 2 STGM_SHARE_DENY_NONE = 64 STGM_SHARE_DENY_READ = 48 STGM_SHARE_DENY_WRITE = 32 STGM_SHARE_EXCLUSIVE = 16 STGM_SIMPLE = 134217728 STGM_TRANSACTED = 65536 STGM_WRITE = 1 STGOPTIONS_VERSION = 2 STGTY_REPEAT = 256 STG_LAYOUT_INTERLEAVED = 1 STG_LAYOUT_SEQUENTIAL = 0 STG_TOEND = 4294967295 STM_GETICON = 0x0171 STM_GETIMAGE = 0x0173 STM_MSGMAX = 0x0174 STM_SETICON = 0x0170 STM_SETIMAGE = 0x0172 STN_CLICKED = 0 STN_DBLCLK = 1 STN_DISABLE = 3 STN_ENABLE = 2 STOCK_LAST = 19 STREAM_CLEAR_ENCRYPTION = 0x00000004 STREAM_CONTAINS_PROPERTIES = 0x00000004 STREAM_CONTAINS_SECURITY = 0x00000002 STREAM_MODIFIED_WHEN_READ = 0x00000001 STREAM_NORMAL_ATTRIBUTE = 0x00000000 STREAM_SET_ENCRYPTION = 0x00000003 STREAM_SPARSE_ATTRIBUTE = 0x00000008 STRETCHBLT = 2048 STRETCH_ANDSCANS = 1 STRETCH_DELETESCANS = 3 STRETCH_HALFTONE = 4 STRETCH_ORSCANS = 2 STRICT = 1 STRUNCATE = 80 STYLE_DESCRIPTION_SIZE = 32 ST_ADVISE = 0x0002 ST_BLOCKED = 0x0008 ST_BLOCKNEXT = 0x0080 ST_CLIENT = 0x0010 ST_CONNECTED = 0x0001 ST_INLIST = 0x0040 ST_ISLOCAL = 0x0004 ST_ISSELF = 0x0100 ST_TERMINATED = 0x0020 SUBLANG_AFRIKAANS_SOUTH_AFRICA = 0x01 SUBLANG_ALBANIAN_ALBANIA = 0x01 SUBLANG_ALSATIAN_FRANCE = 0x01 SUBLANG_AMHARIC_ETHIOPIA = 0x01 SUBLANG_ARABIC_ALGERIA = 0x05 SUBLANG_ARABIC_BAHRAIN = 0x0f SUBLANG_ARABIC_EGYPT = 0x03 SUBLANG_ARABIC_IRAQ = 0x02 SUBLANG_ARABIC_JORDAN = 0x0b SUBLANG_ARABIC_KUWAIT = 0x0d SUBLANG_ARABIC_LEBANON = 0x0c SUBLANG_ARABIC_LIBYA = 0x04 SUBLANG_ARABIC_MOROCCO = 0x06 SUBLANG_ARABIC_OMAN = 0x08 SUBLANG_ARABIC_QATAR = 0x10 SUBLANG_ARABIC_SAUDI_ARABIA = 0x01 SUBLANG_ARABIC_SYRIA = 0x0a SUBLANG_ARABIC_TUNISIA = 0x07 SUBLANG_ARABIC_UAE = 0x0e SUBLANG_ARABIC_YEMEN = 0x09 SUBLANG_ARMENIAN_ARMENIA = 0x01 SUBLANG_ASSAMESE_INDIA = 0x01 SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC = 0x02 SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN = 0x01 SUBLANG_AZERI_CYRILLIC = 0x02 SUBLANG_AZERI_LATIN = 0x01 SUBLANG_BANGLA_BANGLADESH = 0x02 SUBLANG_BANGLA_INDIA = 0x01 SUBLANG_BASHKIR_RUSSIA = 0x01 SUBLANG_BASQUE_BASQUE = 0x01 SUBLANG_BELARUSIAN_BELARUS = 0x01 SUBLANG_BENGALI_BANGLADESH = 0x02 SUBLANG_BENGALI_INDIA = 0x01 SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x08 SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05 SUBLANG_BRETON_FRANCE = 0x01 SUBLANG_BULGARIAN_BULGARIA = 0x01 SUBLANG_CATALAN_CATALAN = 0x01 SUBLANG_CENTRAL_KURDISH_IRAQ = 0x01 SUBLANG_CHEROKEE_CHEROKEE = 0x01 SUBLANG_CHINESE_HONGKONG = 0x03 SUBLANG_CHINESE_MACAU = 0x05 SUBLANG_CHINESE_SIMPLIFIED = 0x02 SUBLANG_CHINESE_SINGAPORE = 0x04 SUBLANG_CHINESE_TRADITIONAL = 0x01 SUBLANG_CORSICAN_FRANCE = 0x01 SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04 SUBLANG_CROATIAN_CROATIA = 0x01 SUBLANG_CUSTOM_DEFAULT = 0x03 SUBLANG_CUSTOM_UNSPECIFIED = 0x04 SUBLANG_CZECH_CZECH_REPUBLIC = 0x01 SUBLANG_DANISH_DENMARK = 0x01 SUBLANG_DARI_AFGHANISTAN = 0x01 SUBLANG_DEFAULT = 0x01 SUBLANG_DIVEHI_MALDIVES = 0x01 SUBLANG_DUTCH = 0x01 SUBLANG_DUTCH_BELGIAN = 0x02 SUBLANG_ENGLISH_AUS = 0x03 SUBLANG_ENGLISH_BELIZE = 0x0a SUBLANG_ENGLISH_CAN = 0x04 SUBLANG_ENGLISH_CARIBBEAN = 0x09 SUBLANG_ENGLISH_EIRE = 0x06 SUBLANG_ENGLISH_INDIA = 0x10 SUBLANG_ENGLISH_IRELAND = 0x06 SUBLANG_ENGLISH_JAMAICA = 0x08 SUBLANG_ENGLISH_MALAYSIA = 0x11 SUBLANG_ENGLISH_NZ = 0x05 SUBLANG_ENGLISH_PHILIPPINES = 0x0d SUBLANG_ENGLISH_SINGAPORE = 0x12 SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07 SUBLANG_ENGLISH_TRINIDAD = 0x0b SUBLANG_ENGLISH_UK = 0x02 SUBLANG_ENGLISH_US = 0x01 SUBLANG_ENGLISH_ZIMBABWE = 0x0c SUBLANG_ESTONIAN_ESTONIA = 0x01 SUBLANG_FAEROESE_FAROE_ISLANDS = 0x01 SUBLANG_FILIPINO_PHILIPPINES = 0x01 SUBLANG_FINNISH_FINLAND = 0x01 SUBLANG_FRENCH = 0x01 SUBLANG_FRENCH_BELGIAN = 0x02 SUBLANG_FRENCH_CANADIAN = 0x03 SUBLANG_FRENCH_LUXEMBOURG = 0x05 SUBLANG_FRENCH_MONACO = 0x06 SUBLANG_FRENCH_SWISS = 0x04 SUBLANG_FRISIAN_NETHERLANDS = 0x01 SUBLANG_FULAH_SENEGAL = 0x02 SUBLANG_GALICIAN_GALICIAN = 0x01 SUBLANG_GEORGIAN_GEORGIA = 0x01 SUBLANG_GERMAN = 0x01 SUBLANG_GERMAN_AUSTRIAN = 0x03 SUBLANG_GERMAN_LIECHTENSTEIN = 0x05 SUBLANG_GERMAN_LUXEMBOURG = 0x04 SUBLANG_GERMAN_SWISS = 0x02 SUBLANG_GREEK_GREECE = 0x01 SUBLANG_GREENLANDIC_GREENLAND = 0x01 SUBLANG_GUJARATI_INDIA = 0x01 SUBLANG_HAUSA_NIGERIA = 1 SUBLANG_HAUSA_NIGERIA_LATIN = 0x01 SUBLANG_HAWAIIAN_US = 0x01 SUBLANG_HEBREW_ISRAEL = 0x01 SUBLANG_HINDI_INDIA = 0x01 SUBLANG_HUNGARIAN_HUNGARY = 0x01 SUBLANG_ICELANDIC_ICELAND = 0x01 SUBLANG_IGBO_NIGERIA = 0x01 SUBLANG_INDONESIAN_INDONESIA = 0x01 SUBLANG_INUKTITUT_CANADA = 0x01 SUBLANG_INUKTITUT_CANADA_LATIN = 0x02 SUBLANG_IRISH_IRELAND = 0x02 SUBLANG_ITALIAN = 0x01 SUBLANG_ITALIAN_SWISS = 0x02 SUBLANG_JAPANESE_JAPAN = 0x01 SUBLANG_KANNADA_INDIA = 0x01 SUBLANG_KASHMIRI_INDIA = 0x02 SUBLANG_KASHMIRI_SASIA = 0x02 SUBLANG_KAZAK_KAZAKHSTAN = 0x01 SUBLANG_KHMER_CAMBODIA = 0x01 SUBLANG_KICHE_GUATEMALA = 0x01 SUBLANG_KINYARWANDA_RWANDA = 0x01 SUBLANG_KONKANI_INDIA = 0x01 SUBLANG_KOREAN = 0x01 SUBLANG_KYRGYZ_KYRGYZSTAN = 0x01 SUBLANG_LAO_LAO = 0x01 SUBLANG_LAO_LAO_PDR = 1 SUBLANG_LATVIAN_LATVIA = 0x01 SUBLANG_LITHUANIAN = 0x01 SUBLANG_LOWER_SORBIAN_GERMANY = 0x02 SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 0x01 SUBLANG_MACEDONIAN_MACEDONIA = 0x01 SUBLANG_MALAYALAM_INDIA = 0x01 SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02 SUBLANG_MALAY_MALAYSIA = 0x01 SUBLANG_MALTESE_MALTA = 0x01 SUBLANG_MAORI_NEW_ZEALAND = 0x01 SUBLANG_MAPUDUNGUN_CHILE = 0x01 SUBLANG_MARATHI_INDIA = 0x01 SUBLANG_MOHAWK_MOHAWK = 0x01 SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 0x01 SUBLANG_MONGOLIAN_PRC = 0x02 SUBLANG_NEPALI_INDIA = 0x02 SUBLANG_NEPALI_NEPAL = 0x01 SUBLANG_NEUTRAL = 0x00 SUBLANG_NORWEGIAN_BOKMAL = 0x01 SUBLANG_NORWEGIAN_NYNORSK = 0x02 SUBLANG_OCCITAN_FRANCE = 0x01 SUBLANG_ORIYA_INDIA = 0x01 SUBLANG_PASHTO_AFGHANISTAN = 0x01 SUBLANG_PERSIAN_IRAN = 0x01 SUBLANG_POLISH_POLAND = 0x01 SUBLANG_PORTUGUESE = 0x02 SUBLANG_PORTUGUESE_BRAZILIAN = 0x01 SUBLANG_PULAR_SENEGAL = 0x02 SUBLANG_PUNJABI_INDIA = 0x01 SUBLANG_PUNJABI_PAKISTAN = 0x02 SUBLANG_QUECHUA_BOLIVIA = 0x01 SUBLANG_QUECHUA_ECUADOR = 0x02 SUBLANG_QUECHUA_PERU = 0x03 SUBLANG_ROMANIAN_ROMANIA = 0x01 SUBLANG_ROMANSH_SWITZERLAND = 0x01 SUBLANG_RUSSIAN_RUSSIA = 0x01 SUBLANG_SAKHA_RUSSIA = 0x01 SUBLANG_SAMI_INARI_FINLAND = 0x09 SUBLANG_SAMI_LULE_NORWAY = 0x04 SUBLANG_SAMI_LULE_SWEDEN = 0x05 SUBLANG_SAMI_NORTHERN_FINLAND = 0x03 SUBLANG_SAMI_NORTHERN_NORWAY = 0x01 SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02 SUBLANG_SAMI_SKOLT_FINLAND = 0x08 SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06 SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07 SUBLANG_SANSKRIT_INDIA = 0x01 SUBLANG_SCOTTISH_GAELIC = 0x01 SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07 SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06 SUBLANG_SERBIAN_CYRILLIC = 0x03 SUBLANG_SERBIAN_LATIN = 0x02 SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC = 0x0c SUBLANG_SERBIAN_MONTENEGRO_LATIN = 0x0b SUBLANG_SERBIAN_SERBIA_CYRILLIC = 0x0a SUBLANG_SERBIAN_SERBIA_LATIN = 0x09 SUBLANG_SINDHI_AFGHANISTAN = 0x02 SUBLANG_SINDHI_INDIA = 0x01 SUBLANG_SINDHI_PAKISTAN = 0x02 SUBLANG_SINHALESE_SRI_LANKA = 0x01 SUBLANG_SLOVAK_SLOVAKIA = 0x01 SUBLANG_SLOVENIAN_SLOVENIA = 0x01 SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01 SUBLANG_SPANISH = 0x01 SUBLANG_SPANISH_ARGENTINA = 0x0b SUBLANG_SPANISH_BOLIVIA = 0x10 SUBLANG_SPANISH_CHILE = 0x0d SUBLANG_SPANISH_COLOMBIA = 0x09 SUBLANG_SPANISH_COSTA_RICA = 0x05 SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07 SUBLANG_SPANISH_ECUADOR = 0x0c SUBLANG_SPANISH_EL_SALVADOR = 0x11 SUBLANG_SPANISH_GUATEMALA = 0x04 SUBLANG_SPANISH_HONDURAS = 0x12 SUBLANG_SPANISH_MEXICAN = 0x02 SUBLANG_SPANISH_MODERN = 0x03 SUBLANG_SPANISH_NICARAGUA = 0x13 SUBLANG_SPANISH_PANAMA = 0x06 SUBLANG_SPANISH_PARAGUAY = 0x0f SUBLANG_SPANISH_PERU = 0x0a SUBLANG_SPANISH_PUERTO_RICO = 0x14 SUBLANG_SPANISH_URUGUAY = 0x0e SUBLANG_SPANISH_US = 0x15 SUBLANG_SPANISH_VENEZUELA = 0x08 SUBLANG_SWAHILI_KENYA = 0x01 SUBLANG_SWEDISH = 0x01 SUBLANG_SWEDISH_FINLAND = 0x02 SUBLANG_SYRIAC = 0x01 SUBLANG_SYRIAC_SYRIA = 1 SUBLANG_SYS_DEFAULT = 0x02 SUBLANG_TAJIK_TAJIKISTAN = 0x01 SUBLANG_TAMAZIGHT_ALGERIA_LATIN = 0x02 SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH = 0x04 SUBLANG_TAMIL_INDIA = 0x01 SUBLANG_TAMIL_SRI_LANKA = 0x02 SUBLANG_TATAR_RUSSIA = 0x01 SUBLANG_TELUGU_INDIA = 0x01 SUBLANG_THAI_THAILAND = 0x01 SUBLANG_TIBETAN_BHUTAN = 0x02 SUBLANG_TIBETAN_PRC = 0x01 SUBLANG_TIGRIGNA_ERITREA = 0x02 SUBLANG_TIGRINYA_ERITREA = 0x02 SUBLANG_TIGRINYA_ETHIOPIA = 0x01 SUBLANG_TSWANA_BOTSWANA = 0x02 SUBLANG_TSWANA_SOUTH_AFRICA = 0x01 SUBLANG_TURKISH_TURKEY = 0x01 SUBLANG_TURKMEN_TURKMENISTAN = 0x01 SUBLANG_UIGHUR_PRC = 0x01 SUBLANG_UI_CUSTOM_DEFAULT = 0x05 SUBLANG_UKRAINIAN_UKRAINE = 0x01 SUBLANG_UPPER_SORBIAN_GERMANY = 0x01 SUBLANG_URDU_INDIA = 0x02 SUBLANG_URDU_PAKISTAN = 0x01 SUBLANG_UZBEK_CYRILLIC = 0x02 SUBLANG_UZBEK_LATIN = 0x01 SUBLANG_VALENCIAN_VALENCIA = 0x02 SUBLANG_VIETNAMESE_VIETNAM = 0x01 SUBLANG_WELSH_UNITED_KINGDOM = 0x01 SUBLANG_WOLOF_SENEGAL = 0x01 SUBLANG_XHOSA_SOUTH_AFRICA = 0x01 SUBLANG_YAKUT_RUSSIA = 0x01 SUBLANG_YI_PRC = 0x01 SUBLANG_YORUBA_NIGERIA = 0x01 SUBLANG_ZULU_SOUTH_AFRICA = 0x01 SUBVERSION_MASK = 0x000000FF SUCCESSFUL_ACCESS_ACE_FLAG = 64 SUPPORT_LANG_NUMBER = 32 SWP_ASYNCWINDOWPOS = 0x4000 SWP_DEFERERASE = 0x2000 SWP_DRAWFRAME = 32 SWP_FRAMECHANGED = 0x0020 SWP_HIDEWINDOW = 0x0080 SWP_NOACTIVATE = 0x0010 SWP_NOCOPYBITS = 0x0100 SWP_NOMOVE = 0x0002 SWP_NOOWNERZORDER = 0x0200 SWP_NOREDRAW = 0x0008 SWP_NOREPOSITION = 512 SWP_NOSENDCHANGING = 0x0400 SWP_NOSIZE = 0x0001 SWP_NOZORDER = 0x0004 SWP_SHOWWINDOW = 0x0040 SW_ERASE = 0x0004 SW_FORCEMINIMIZE = 11 SW_HIDE = 0 SW_INVALIDATE = 0x0002 SW_MAX = 11 SW_MAXIMIZE = 3 SW_MINIMIZE = 6 SW_NORMAL = 1 SW_OTHERUNZOOM = 4 SW_OTHERZOOM = 2 SW_PARENTCLOSING = 1 SW_PARENTOPENING = 3 SW_RESTORE = 9 SW_SCROLLCHILDREN = 0x0001 SW_SHOW = 5 SW_SHOWDEFAULT = 10 SW_SHOWMAXIMIZED = 3 SW_SHOWMINIMIZED = 2 SW_SHOWMINNOACTIVE = 7 SW_SHOWNA = 8 SW_SHOWNOACTIVATE = 4 SW_SHOWNORMAL = 1 SW_SMOOTHSCROLL = 0x0010 SYMBOL_CHARSET = 2 SYMLINK_FLAG_RELATIVE = 1 SYMMETRICWRAPKEYBLOB = 0xb SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY = 0x02 SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE = 0x04 SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY = 0x01 SYNCHRONIZE = 1048576 SYSPAL_ERROR = 0 SYSPAL_NOSTATIC = 2 SYSPAL_NOSTATIC256 = 3 SYSPAL_STATIC = 1 SYSRGN = 4 SYSTEM_ALARM_ACE_TYPE = 3 SYSTEM_ALARM_CALLBACK_ACE_TYPE = 14 SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = 16 SYSTEM_ALARM_OBJECT_ACE_TYPE = 8 SYSTEM_AUDIT_ACE_TYPE = 2 SYSTEM_AUDIT_CALLBACK_ACE_TYPE = 13 SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = 15 SYSTEM_AUDIT_OBJECT_ACE_TYPE = 7 SYSTEM_CACHE_ALIGNMENT_SIZE = 64 SYSTEM_FIXED_FONT = 16 SYSTEM_FONT = 13 SYSTEM_MANDATORY_LABEL_ACE_TYPE = 17 SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP = 0x4 SYSTEM_MANDATORY_LABEL_NO_READ_UP = 0x2 SYSTEM_MANDATORY_LABEL_NO_WRITE_UP = 0x1 SYSTEM_MANDATORY_LABEL_VALID_MASK = 7 SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE = 18 SYSTEM_SCOPED_POLICY_ID_ACE_TYPE = 19 S_ALLTHRESHOLD = 2 S_IEXEC = 64 S_IFBLK = 12288 S_IFCHR = 8192 S_IFDIR = 16384 S_IFIFO = 4096 S_IFMT = 61440 S_IFREG = 32768 S_IREAD = 256 S_IRGRP = 32 S_IROTH = 4 S_IRUSR = 256 S_IRWXG = 56 S_IRWXO = 7 S_IRWXU = 448 S_IWGRP = 16 S_IWOTH = 2 S_IWRITE = 128 S_IWUSR = 128 S_IXGRP = 8 S_IXOTH = 1 S_IXUSR = 64 S_LEGATO = 1 S_NORMAL = 0 S_PERIOD1024 = 1 S_PERIOD2048 = 2 S_PERIOD512 = 0 S_PERIODVOICE = 3 S_QUEUEEMPTY = 0 S_SERBDNT = -5 S_SERDCC = -7 S_SERDDR = -14 S_SERDFQ = -13 S_SERDLN = -6 S_SERDMD = -10 S_SERDPT = -12 S_SERDSH = -11 S_SERDSR = -15 S_SERDST = -16 S_SERDTP = -8 S_SERDVL = -9 S_SERDVNA = -1 S_SERMACT = -3 S_SEROFM = -2 S_SERQFUL = -4 S_STACCATO = 2 S_THRESHOLD = 1 S_WHITE1024 = 5 S_WHITE2048 = 6 S_WHITE512 = 4 S_WHITEVOICE = 7 TAPE_ABSOLUTE_BLOCK = 1 TAPE_ABSOLUTE_POSITION = 0 TAPE_CHECK_FOR_DRIVE_PROBLEM = 2 TAPE_DRIVE_ABSOLUTE_BLK = 0x80001000 TAPE_DRIVE_ABS_BLK_IMMED = 0x80002000 TAPE_DRIVE_CLEAN_REQUESTS = 0x02000000 TAPE_DRIVE_COMPRESSION = 0x00020000 TAPE_DRIVE_ECC = 0x00010000 TAPE_DRIVE_EJECT_MEDIA = 0x01000000 TAPE_DRIVE_END_OF_DATA = 0x80010000 TAPE_DRIVE_EOT_WZ_SIZE = 0x00002000 TAPE_DRIVE_ERASE_BOP_ONLY = 0x00000040 TAPE_DRIVE_ERASE_IMMEDIATE = 0x00000080 TAPE_DRIVE_ERASE_LONG = 0x00000020 TAPE_DRIVE_ERASE_SHORT = 0x00000010 TAPE_DRIVE_FILEMARKS = 0x80040000 TAPE_DRIVE_FIXED = 0x00000001 TAPE_DRIVE_FIXED_BLOCK = 0x00000400 TAPE_DRIVE_FORMAT = 0xA0000000 TAPE_DRIVE_FORMAT_IMMEDIATE = 0xC0000000 TAPE_DRIVE_GET_ABSOLUTE_BLK = 0x00100000 TAPE_DRIVE_GET_LOGICAL_BLK = 0x00200000 TAPE_DRIVE_HIGH_FEATURES = 0x80000000 TAPE_DRIVE_INITIATOR = 0x00000004 TAPE_DRIVE_LOAD_UNLD_IMMED = 0x80000020 TAPE_DRIVE_LOAD_UNLOAD = 0x80000001 TAPE_DRIVE_LOCK_UNLK_IMMED = 0x80000080 TAPE_DRIVE_LOCK_UNLOCK = 0x80000004 TAPE_DRIVE_LOGICAL_BLK = 0x80004000 TAPE_DRIVE_LOG_BLK_IMMED = 0x80008000 TAPE_DRIVE_PADDING = 0x00040000 TAPE_DRIVE_RELATIVE_BLKS = 0x80020000 TAPE_DRIVE_REPORT_SMKS = 0x00080000 TAPE_DRIVE_RESERVED_BIT = 0x80000000 TAPE_DRIVE_REVERSE_POSITION = 0x80400000 TAPE_DRIVE_REWIND_IMMEDIATE = 0x80000008 TAPE_DRIVE_SELECT = 0x00000002 TAPE_DRIVE_SEQUENTIAL_FMKS = 0x80080000 TAPE_DRIVE_SEQUENTIAL_SMKS = 0x80200000 TAPE_DRIVE_SETMARKS = 0x80100000 TAPE_DRIVE_SET_BLOCK_SIZE = 0x80000010 TAPE_DRIVE_SET_CMP_BOP_ONLY = 0x04000000 TAPE_DRIVE_SET_COMPRESSION = 0x80000200 TAPE_DRIVE_SET_ECC = 0x80000100 TAPE_DRIVE_SET_EOT_WZ_SIZE = 0x00400000 TAPE_DRIVE_SET_PADDING = 0x80000400 TAPE_DRIVE_SET_REPORT_SMKS = 0x80000800 TAPE_DRIVE_SPACE_IMMEDIATE = 0x80800000 TAPE_DRIVE_TAPE_CAPACITY = 0x00000100 TAPE_DRIVE_TAPE_REMAINING = 0x00000200 TAPE_DRIVE_TENSION = 0x80000002 TAPE_DRIVE_TENSION_IMMED = 0x80000040 TAPE_DRIVE_VARIABLE_BLOCK = 0x00000800 TAPE_DRIVE_WRITE_FILEMARKS = 0x82000000 TAPE_DRIVE_WRITE_LONG_FMKS = 0x88000000 TAPE_DRIVE_WRITE_MARK_IMMED = 0x90000000 TAPE_DRIVE_WRITE_PROTECT = 0x00001000 TAPE_DRIVE_WRITE_SETMARKS = 0x81000000 TAPE_DRIVE_WRITE_SHORT_FMKS = 0x84000000 TAPE_ERASE_LONG = 1 TAPE_ERASE_SHORT = 0 TAPE_FILEMARKS = 1 TAPE_FIXED_PARTITIONS = 0 TAPE_FORMAT = 5 TAPE_INITIATOR_PARTITIONS = 2 TAPE_LOAD = 0 TAPE_LOCK = 3 TAPE_LOGICAL_BLOCK = 2 TAPE_LOGICAL_POSITION = 1 TAPE_LONG_FILEMARKS = 3 TAPE_PSEUDO_LOGICAL_BLOCK = 3 TAPE_PSEUDO_LOGICAL_POSITION = 2 TAPE_QUERY_DEVICE_ERROR_DATA = 4 TAPE_QUERY_DRIVE_PARAMETERS = 0 TAPE_QUERY_IO_ERROR_DATA = 3 TAPE_QUERY_MEDIA_CAPACITY = 1 TAPE_RESET_STATISTICS = 2 TAPE_RETURN_ENV_INFO = 1 TAPE_RETURN_STATISTICS = 0 TAPE_REWIND = 0 TAPE_SELECT_PARTITIONS = 1 TAPE_SETMARKS = 0 TAPE_SHORT_FILEMARKS = 2 TAPE_SPACE_END_OF_DATA = 4 TAPE_SPACE_FILEMARKS = 6 TAPE_SPACE_RELATIVE_BLOCKS = 5 TAPE_SPACE_SEQUENTIAL_FMKS = 7 TAPE_SPACE_SEQUENTIAL_SMKS = 9 TAPE_SPACE_SETMARKS = 8 TAPE_TENSION = 2 TAPE_UNLOAD = 1 TAPE_UNLOCK = 4 TARGET_IS_NT351_OR_WIN95_OR_LATER = 1 TARGET_IS_NT40_OR_LATER = 1 TARGET_IS_NT50_OR_LATER = 1 TARGET_IS_NT51_OR_LATER = 1 TARGET_IS_NT60_OR_LATER = 0 TARGET_IS_NT61_OR_LATER = 0 TA_BASELINE = 24 TA_BOTTOM = 8 TA_CENTER = 6 TA_LEFT = 0 TA_MASK = 287 TA_NOUPDATECP = 0 TA_RIGHT = 2 TA_RTLREADING = 256 TA_TOP = 0 TA_UPDATECP = 1 TCI_SRCCHARSET = 1 TCI_SRCCODEPAGE = 2 TCI_SRCFONTSIG = 3 TCI_SRCLOCALE = 0x1000 TCP_BSDURGENT = 0x7000 TCP_NODELAY = 0x0001 TC_CP_STROKE = 0x00000004 TC_CR_90 = 0x00000008 TC_CR_ANY = 0x00000010 TC_EA_DOUBLE = 0x00000200 TC_GP_TRAP = 2 TC_HARDERR = 1 TC_IA_ABLE = 0x00000400 TC_NORMAL = 0 TC_OP_CHARACTER = 0x00000001 TC_OP_STROKE = 0x00000002 TC_RA_ABLE = 0x00002000 TC_RESERVED = 0x00008000 TC_SA_CONTIN = 0x00000100 TC_SA_DOUBLE = 0x00000040 TC_SA_INTEGER = 0x00000080 TC_SCROLLBLT = 0x00010000 TC_SF_X_YINDEP = 0x00000020 TC_SIGNAL = 3 TC_SO_ABLE = 0x00001000 TC_UA_ABLE = 0x00000800 TC_VA_ABLE = 0x00004000 TECHNOLOGY = 2 TEXTCAPS = 34 TF_DISCONNECT = 0x01 TF_REUSE_SOCKET = 0x02 TF_WRITE_BEHIND = 0x04 THAI_CHARSET = 222 THREAD_ALL_ACCESS = 2032639 THREAD_BASE_PRIORITY_IDLE = -15 THREAD_BASE_PRIORITY_LOWRT = 15 THREAD_BASE_PRIORITY_MAX = 2 THREAD_BASE_PRIORITY_MIN = -2 THREAD_DIRECT_IMPERSONATION = 512 THREAD_GET_CONTEXT = 8 THREAD_IMPERSONATE = 256 THREAD_MODE_BACKGROUND_BEGIN = 0x00010000 THREAD_MODE_BACKGROUND_END = 0x00020000 THREAD_PRIORITY_ABOVE_NORMAL = 1 THREAD_PRIORITY_BELOW_NORMAL = -1 THREAD_PRIORITY_ERROR_RETURN = 2147483647 THREAD_PRIORITY_HIGHEST = 2 THREAD_PRIORITY_IDLE = -15 THREAD_PRIORITY_LOWEST = -2 THREAD_PRIORITY_NORMAL = 0 THREAD_PRIORITY_TIME_CRITICAL = 15 THREAD_PROFILING_FLAG_DISPATCH = 0x1 THREAD_QUERY_INFORMATION = 64 THREAD_QUERY_LIMITED_INFORMATION = 2048 THREAD_SET_CONTEXT = 16 THREAD_SET_INFORMATION = 32 THREAD_SET_LIMITED_INFORMATION = 1024 THREAD_SET_THREAD_TOKEN = 128 THREAD_SUSPEND_RESUME = 2 THREAD_TERMINATE = 1 TIMEOUT_ASYNC = 0xFFFFFFFF TIMERR_BASE = 96 TIMERR_NOCANDO = 97 TIMERR_NOERROR = 0 TIMERR_STRUCT = 129 TIMER_ABSTIME = 1 TIMER_ALL_ACCESS = 2031619 TIMER_MODIFY_STATE = 0x0002 TIMER_QUERY_STATE = 0x0001 TIME_BYTES = 0x0004 TIME_CALLBACK_EVENT_PULSE = 0x0020 TIME_CALLBACK_EVENT_SET = 0x0010 TIME_CALLBACK_FUNCTION = 0x0000 TIME_FORCE24HOURFORMAT = 0x00000008 TIME_KILL_SYNCHRONOUS = 0x0100 TIME_MIDI = 0x0010 TIME_MS = 0x0001 TIME_NOMINUTESORSECONDS = 0x00000001 TIME_NOSECONDS = 0x00000002 TIME_NOTIMEMARKER = 0x00000004 TIME_ONESHOT = 0x0000 TIME_PERIODIC = 0x0001 TIME_SAMPLES = 0x0002 TIME_SMPTE = 0x0008 TIME_TICKS = 0x0020 TIME_VALID_OID_FLUSH_OBJECT_FUNC = "TimeValidDllFlushObject" TIME_VALID_OID_GET_OBJECT_FUNC = "TimeValidDllGetObject" TIME_ZONE_ID_DAYLIGHT = 2 TIME_ZONE_ID_STANDARD = 1 TIME_ZONE_ID_UNKNOWN = 0 TKF_AVAILABLE = 0x00000002 TKF_CONFIRMHOTKEY = 0x00000008 TKF_HOTKEYACTIVE = 0x00000004 TKF_HOTKEYSOUND = 0x00000010 TKF_INDICATOR = 0x00000020 TKF_TOGGLEKEYSON = 0x00000001 TLS_MINIMUM_AVAILABLE = 64 TME_CANCEL = 0x80000000 TME_HOVER = 0x00000001 TME_LEAVE = 0x00000002 TME_NONCLIENT = 0x00000010 TME_QUERY = 0x40000000 TMPF_DEVICE = 0x08 TMPF_FIXED_PITCH = 0x01 TMPF_TRUETYPE = 0x04 TMPF_VECTOR = 0x02 TOKEN_ADJUST_DEFAULT = 128 TOKEN_ADJUST_GROUPS = 64 TOKEN_ADJUST_PRIVILEGES = 32 TOKEN_ADJUST_SESSIONID = 256 TOKEN_ALL_ACCESS = 983551 TOKEN_ALL_ACCESS_P = 983295 TOKEN_ASSIGN_PRIMARY = 1 TOKEN_DUPLICATE = 2 TOKEN_EXECUTE = 131072 TOKEN_IMPERSONATE = 4 TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN = 0x2 TOKEN_MANDATORY_POLICY_NO_WRITE_UP = 0x1 TOKEN_MANDATORY_POLICY_OFF = 0x0 TOKEN_MANDATORY_POLICY_VALID_MASK = 3 TOKEN_QUERY = 8 TOKEN_QUERY_SOURCE = 16 TOKEN_READ = 131080 TOKEN_SOURCE_LENGTH = 8 TOKEN_WRITE = 131296 TPM_BOTTOMALIGN = 32 TPM_CENTERALIGN = 4 TPM_HORIZONTAL = 0 TPM_HORNEGANIMATION = 2048 TPM_HORPOSANIMATION = 1024 TPM_LAYOUTRTL = 32768 TPM_LEFTALIGN = 0 TPM_LEFTBUTTON = 0 TPM_NOANIMATION = 16384 TPM_NONOTIFY = 128 TPM_RECURSE = 1 TPM_RETURNCMD = 256 TPM_RIGHTALIGN = 8 TPM_RIGHTBUTTON = 2 TPM_TOPALIGN = 0 TPM_VCENTERALIGN = 16 TPM_VERNEGANIMATION = 8192 TPM_VERPOSANIMATION = 4096 TPM_VERTICAL = 64 TRANSACTIONMANAGER_ALL_ACCESS = 983103 TRANSACTIONMANAGER_BIND_TRANSACTION = 0x00020 TRANSACTIONMANAGER_CREATE_RM = 0x00010 TRANSACTIONMANAGER_GENERIC_EXECUTE = 131072 TRANSACTIONMANAGER_GENERIC_READ = 131073 TRANSACTIONMANAGER_GENERIC_WRITE = 131102 TRANSACTIONMANAGER_QUERY_INFORMATION = 0x00001 TRANSACTIONMANAGER_RECOVER = 0x00004 TRANSACTIONMANAGER_RENAME = 0x00008 TRANSACTIONMANAGER_SET_INFORMATION = 0x00002 TRANSACTION_ALL_ACCESS = 2031679 TRANSACTION_COMMIT = 8 TRANSACTION_DO_NOT_PROMOTE = 0x00000001 TRANSACTION_ENLIST = 4 TRANSACTION_GENERIC_EXECUTE = 1179672 TRANSACTION_GENERIC_READ = 1179649 TRANSACTION_GENERIC_WRITE = 1179710 TRANSACTION_MANAGER_COMMIT_DEFAULT = 0x00000000 TRANSACTION_MANAGER_COMMIT_LOWEST = 0x00000008 TRANSACTION_MANAGER_COMMIT_SYSTEM_HIVES = 0x00000004 TRANSACTION_MANAGER_COMMIT_SYSTEM_VOLUME = 0x00000002 TRANSACTION_MANAGER_CORRUPT_FOR_PROGRESS = 0x00000020 TRANSACTION_MANAGER_CORRUPT_FOR_RECOVERY = 0x00000010 TRANSACTION_MANAGER_MAXIMUM_OPTION = 0x0000003f TRANSACTION_MANAGER_VOLATILE = 0x00000001 TRANSACTION_MAXIMUM_OPTION = 0x00000001 TRANSACTION_NOTIFICATION_TM_ONLINE_FLAG_IS_CLUSTERED = 0x1 TRANSACTION_NOTIFY_COMMIT = 0x00000004 TRANSACTION_NOTIFY_COMMIT_COMPLETE = 0x00000040 TRANSACTION_NOTIFY_COMMIT_FINALIZE = 0x40000000 TRANSACTION_NOTIFY_COMMIT_REQUEST = 0x04000000 TRANSACTION_NOTIFY_DELEGATE_COMMIT = 0x00000400 TRANSACTION_NOTIFY_ENLIST_MASK = 0x00040000 TRANSACTION_NOTIFY_ENLIST_PREPREPARE = 0x00001000 TRANSACTION_NOTIFY_INDOUBT = 0x00004000 TRANSACTION_NOTIFY_LAST_RECOVER = 0x00002000 TRANSACTION_NOTIFY_MARSHAL = 0x00020000 TRANSACTION_NOTIFY_MASK = 0x3fffffff TRANSACTION_NOTIFY_PREPARE = 0x00000002 TRANSACTION_NOTIFY_PREPARE_COMPLETE = 0x00000020 TRANSACTION_NOTIFY_PREPREPARE = 0x00000001 TRANSACTION_NOTIFY_PREPREPARE_COMPLETE = 0x00000010 TRANSACTION_NOTIFY_PROMOTE = 0x08000000 TRANSACTION_NOTIFY_PROMOTE_NEW = 0x10000000 TRANSACTION_NOTIFY_PROPAGATE_PULL = 0x00008000 TRANSACTION_NOTIFY_PROPAGATE_PUSH = 0x00010000 TRANSACTION_NOTIFY_RECOVER = 0x00000100 TRANSACTION_NOTIFY_RECOVER_QUERY = 0x00000800 TRANSACTION_NOTIFY_REQUEST_OUTCOME = 0x20000000 TRANSACTION_NOTIFY_RM_DISCONNECTED = 0x01000000 TRANSACTION_NOTIFY_ROLLBACK = 0x00000008 TRANSACTION_NOTIFY_ROLLBACK_COMPLETE = 0x00000080 TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT = 0x00000200 TRANSACTION_NOTIFY_TM_ONLINE = 0x02000000 TRANSACTION_PROPAGATE = 32 TRANSACTION_QUERY_INFORMATION = 1 TRANSACTION_RESOURCE_MANAGER_RIGHTS = 1179703 TRANSACTION_RIGHT_RESERVED1 = 64 TRANSACTION_ROLLBACK = 16 TRANSACTION_SET_INFORMATION = 2 TRANSFORM_CTM = 4107 TRANSPARENT = 1 TRANSPORT_TYPE_CN = 0x01 TRANSPORT_TYPE_DG = 0x02 TRANSPORT_TYPE_LPC = 0x04 TRANSPORT_TYPE_WMSG = 0x08 TRUE = 1 TRUETYPE_FONTTYPE = 0x004 TRUNCATE_EXISTING = 5 TRY_AGAIN = 11002 TT_AVAILABLE = 0x0001 TT_ENABLED = 0x0002 TT_OPENTYPE_FONTTYPE = 0x20000 TT_POLYGON_TYPE = 24 TT_PRIM_CSPLINE = 3 TT_PRIM_LINE = 1 TT_PRIM_QSPLINE = 2 TURKISH_CHARSET = 162 TWOSTOPBITS = 2 TYPE1_FONTTYPE = 0x40000 UAS_EXACTLEGACY = 0x1000 UCLEANUI = 67108864 UDIRTYUI = 134217728 UISF_ACTIVE = 0x4 UISF_HIDEACCEL = 0x2 UISF_HIDEFOCUS = 0x1 UIS_CLEAR = 2 UIS_INITIALIZE = 3 UIS_SET = 1 UI_CAP_2700 = 0x00000001 UI_CAP_ROT90 = 0x00000002 UI_CAP_ROTANY = 0x00000004 ULW_ALPHA = 0x00000002 ULW_COLORKEY = 0x00000001 ULW_EX_NORESIZE = 0x00000008 ULW_OPAQUE = 0x00000004 UNALIGNED64 = 0 UNDEFINE_ALTERNATE = 0xD UNDEFINE_PRIMARY = 0xC UNICODE_NOCHAR = 0xFFFF UNICODE_STRING_MAX_CHARS = 32767 UNIQUE_NAME = 0x00 UNIVERSAL_NAME_INFO_LEVEL = 0x00000001 UNLOAD_DLL_DEBUG_EVENT = 7 UNLOCK_ELEMENT = 1 UNPROTECTED_DACL_SECURITY_INFORMATION = 536870912 UNPROTECTED_SACL_SECURITY_INFORMATION = 268435456 UNRECOVERED_READS_VALID = 0x00000008 UNRECOVERED_WRITES_VALID = 0x00000002 UNWIND_HISTORY_TABLE_GLOBAL = 1 UNWIND_HISTORY_TABLE_LOCAL = 2 UNWIND_HISTORY_TABLE_NONE = 0 UNWIND_HISTORY_TABLE_SIZE = 12 UNW_FLAG_CHAININFO = 0x4 UNW_FLAG_EHANDLER = 0x1 UNW_FLAG_NHANDLER = 0x0 UNW_FLAG_UHANDLER = 0x2 UOI_FLAGS = 1 UOI_NAME = 2 UOI_TYPE = 3 UOI_USER_SID = 4 UPDFCACHE_IFBLANK = 16 UPDFCACHE_IFBLANKORONSAVECACHE = 18 UPDFCACHE_NODATACACHE = 1 UPDFCACHE_NORMALCACHE = 8 UPDFCACHE_ONLYIFBLANK = 2147483648 UPDFCACHE_ONSAVECACHE = 2 UPDFCACHE_ONSTOPCACHE = 4 UPOINTER_32 = 0 URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY = 0x1204 URLACTION_ACTIVEX_CURR_MAX = 0x120B URLACTION_ACTIVEX_DYNSRC_VIDEO_AND_ANIMATION = 0x120A URLACTION_ACTIVEX_MAX = 0x13ff URLACTION_ACTIVEX_MIN = 0x1200 URLACTION_ACTIVEX_NO_WEBOC_SCRIPT = 0x1206 URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY = 0x1202 URLACTION_ACTIVEX_OVERRIDE_DOMAINLIST = 0x120B URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY = 0x1201 URLACTION_ACTIVEX_OVERRIDE_OPTIN = 0x1208 URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION = 0x1207 URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY = 0x1203 URLACTION_ACTIVEX_RUN = 0x1200 URLACTION_ACTIVEX_SCRIPTLET_RUN = 0x1209 URLACTION_ACTIVEX_TREATASUNTRUSTED = 0x1205 URLACTION_ALLOW_ACTIVEX_FILTERING = 0x2702 URLACTION_ALLOW_AUDIO_VIDEO = 0x2701 URLACTION_ALLOW_AUDIO_VIDEO_PLUGINS = 0x2704 URLACTION_ALLOW_CROSSDOMAIN_APPCACHE_MANIFEST = 0x270A URLACTION_ALLOW_CROSSDOMAIN_DROP_ACROSS_WINDOWS = 0x2709 URLACTION_ALLOW_CROSSDOMAIN_DROP_WITHIN_WINDOW = 0x2708 URLACTION_ALLOW_RENDER_LEGACY_DXTFILTERS = 0x270B URLACTION_ALLOW_STRUCTURED_STORAGE_SNIFFING = 0x2703 URLACTION_ALLOW_XDOMAIN_SUBFRAME_RESIZE = 0x1408 URLACTION_ALLOW_ZONE_ELEVATION_OPT_OUT_ADDITION = 0x2706 URLACTION_ALLOW_ZONE_ELEVATION_VIA_OPT_OUT = 0x2705 URLACTION_AUTHENTICATE_CLIENT = 0x1A01 URLACTION_CHANNEL_SOFTDIST_MAX = 0x1Eff URLACTION_CHANNEL_SOFTDIST_MIN = 0x1E00 URLACTION_CHANNEL_SOFTDIST_PERMISSIONS = 0x1E05 URLACTION_CLIENT_CERT_PROMPT = 0x1A04 URLACTION_COOKIES = 0x1A02 URLACTION_COOKIES_ENABLED = 0x1A10 URLACTION_COOKIES_SESSION = 0x1A03 URLACTION_COOKIES_SESSION_THIRD_PARTY = 0x1A06 URLACTION_COOKIES_THIRD_PARTY = 0x1A05 URLACTION_CREDENTIALS_USE = 0x1A00 URLACTION_CROSS_DOMAIN_DATA = 0x1406 URLACTION_DOWNLOAD_CURR_MAX = 0x1004 URLACTION_DOWNLOAD_MAX = 0x11FF URLACTION_DOWNLOAD_MIN = 0x1000 URLACTION_DOWNLOAD_SIGNED_ACTIVEX = 0x1001 URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX = 0x1004 URLACTION_HTML_ALLOW_CROSS_DOMAIN_CANVAS = 0x160D URLACTION_HTML_ALLOW_CROSS_DOMAIN_TEXTTRACK = 0x1610 URLACTION_HTML_ALLOW_CROSS_DOMAIN_WEBWORKER = 0x160F URLACTION_HTML_ALLOW_INDEXEDDB = 0x1611 URLACTION_HTML_ALLOW_INJECTED_DYNAMIC_HTML = 0x160B URLACTION_HTML_ALLOW_WINDOW_CLOSE = 0x160E URLACTION_HTML_FONT_DOWNLOAD = 0x1604 URLACTION_HTML_INCLUDE_FILE_PATH = 0x160A URLACTION_HTML_JAVA_RUN = 0x1605 URLACTION_HTML_MAX = 0x17ff URLACTION_HTML_META_REFRESH = 0x1608 URLACTION_HTML_MIN = 0x1600 URLACTION_HTML_MIXED_CONTENT = 0x1609 URLACTION_HTML_REQUIRE_UTF8_DOCUMENT_CODEPAGE = 0x160C URLACTION_HTML_SUBFRAME_NAVIGATE = 0x1607 URLACTION_HTML_SUBMIT_FORMS = 0x1601 URLACTION_HTML_SUBMIT_FORMS_FROM = 0x1602 URLACTION_HTML_SUBMIT_FORMS_TO = 0x1603 URLACTION_HTML_USERDATA_SAVE = 0x1606 URLACTION_INFODELIVERY_CURR_MAX = 0x1D06 URLACTION_INFODELIVERY_MAX = 0x1Dff URLACTION_INFODELIVERY_MIN = 0x1D00 URLACTION_INFODELIVERY_NO_ADDING_CHANNELS = 0x1D00 URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS = 0x1D03 URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING = 0x1D06 URLACTION_INFODELIVERY_NO_EDITING_CHANNELS = 0x1D01 URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS = 0x1D04 URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS = 0x1D02 URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS = 0x1D05 URLACTION_JAVA_CURR_MAX = 0x1C00 URLACTION_JAVA_MAX = 0x1Cff URLACTION_JAVA_MIN = 0x1C00 URLACTION_JAVA_PERMISSIONS = 0x1C00 URLACTION_MIN = 0x1000 URLACTION_NETWORK_CURR_MAX = 0x1A10 URLACTION_NETWORK_MAX = 0x1Bff URLACTION_NETWORK_MIN = 0x1A00 URLACTION_PLUGGABLE_PROTOCOL_XHR = 0x140B URLACTION_SCRIPT_CURR_MAX = 0x140B URLACTION_SCRIPT_JAVA_USE = 0x1402 URLACTION_SCRIPT_MAX = 0x15ff URLACTION_SCRIPT_MIN = 0x1400 URLACTION_SCRIPT_NAVIGATE = 0x140A URLACTION_SCRIPT_OVERRIDE_SAFETY = 0x1401 URLACTION_SCRIPT_PASTE = 0x1407 URLACTION_SCRIPT_RUN = 0x1400 URLACTION_SCRIPT_SAFE_ACTIVEX = 0x1405 URLACTION_SCRIPT_XSSFILTER = 0x1409 URLACTION_SHELL_CURR_MAX = 0x1811 URLACTION_SHELL_FILE_DOWNLOAD = 0x1803 URLACTION_SHELL_INSTALL_DTITEMS = 0x1800 URLACTION_SHELL_MAX = 0x19ff URLACTION_SHELL_MIN = 0x1800 URLACTION_SHELL_MOVE_OR_COPY = 0x1802 URLACTION_SHELL_SHELLEXECUTE = 0x1806 URLACTION_SHELL_VERB = 0x1804 URLACTION_SHELL_WEBVIEW_VERB = 0x1805 URLMON_OPTION_URL_ENCODING = 0x10000004 URLMON_OPTION_USERAGENT = 0x10000001 URLMON_OPTION_USERAGENT_REFRESH = 0x10000002 URLOSTRM_GETNEWESTVERSION = 0x3 URLOSTRM_USECACHEDCOPY = 0x2 URLOSTRM_USECACHEDCOPY_ONLY = 0x1 URLPOLICY_ACTIVEX_CHECK_LIST = 0x10000 URLPOLICY_ALLOW = 0x0 URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE = 0x10000 URLPOLICY_AUTHENTICATE_CLEARTEXT_OK = 0x0 URLPOLICY_AUTHENTICATE_MUTUAL_ONLY = 0x30000 URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL = 0x30000 URLPOLICY_CHANNEL_SOFTDIST_PRECACHE = 0x20000 URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT = 0x10000 URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY = 0x30000 URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT = 0x20000 URLPOLICY_CREDENTIALS_MUST_PROMPT_USER = 0x10000 URLPOLICY_CREDENTIALS_SILENT_LOGON_OK = 0x0 URLPOLICY_DISALLOW = 0x3 URLPOLICY_DONTCHECKDLGBOX = 0x100 URLPOLICY_JAVA_CUSTOM = 0x800000 URLPOLICY_JAVA_HIGH = 0x10000 URLPOLICY_JAVA_LOW = 0x30000 URLPOLICY_JAVA_MEDIUM = 0x20000 URLPOLICY_JAVA_PROHIBIT = 0x0 URLPOLICY_LOG_ON_ALLOW = 0x40 URLPOLICY_LOG_ON_DISALLOW = 0x80 URLPOLICY_MASK_PERMISSIONS = 0x0f URLPOLICY_NOTIFY_ON_ALLOW = 0x10 URLPOLICY_NOTIFY_ON_DISALLOW = 0x20 URLPOLICY_QUERY = 0x1 URLZONE_ESC_FLAG = 0x100 URL_MK_LEGACY = 0 URL_MK_NO_CANONICALIZE = 2 URL_MK_UNIFORM = 1 URL_OID_GET_OBJECT_URL_FUNC = "UrlDllGetObjectUrl" USAGE_MATCH_TYPE_AND = 0x0 USAGE_MATCH_TYPE_OR = 0x1 USER_CALL_IS_ASYNC = 0x0100 USER_CALL_NEW_CORRELATION_DESC = 0x0200 USER_MARSHAL_CB_SIGNATURE = 85 USER_MARSHAL_FC_BYTE = 1 USER_MARSHAL_FC_CHAR = 2 USER_MARSHAL_FC_DOUBLE = 12 USER_MARSHAL_FC_FLOAT = 10 USER_MARSHAL_FC_HYPER = 11 USER_MARSHAL_FC_LONG = 8 USER_MARSHAL_FC_SHORT = 6 USER_MARSHAL_FC_SMALL = 3 USER_MARSHAL_FC_ULONG = 9 USER_MARSHAL_FC_USHORT = 7 USER_MARSHAL_FC_USMALL = 4 USER_MARSHAL_FC_WCHAR = 5 USER_TIMER_MAXIMUM = 0x7FFFFFFF USER_TIMER_MINIMUM = 0x0000000A USN_DELETE_FLAG_DELETE = 1 USN_DELETE_FLAG_NOTIFY = 2 USN_DELETE_VALID_FLAGS = 3 USN_PAGE_SIZE = 4096 USN_REASON_BASIC_INFO_CHANGE = 32768 USN_REASON_CLOSE = 2147483648 USN_REASON_COMPRESSION_CHANGE = 131072 USN_REASON_DATA_EXTEND = 2 USN_REASON_DATA_OVERWRITE = 1 USN_REASON_DATA_TRUNCATION = 4 USN_REASON_EA_CHANGE = 1024 USN_REASON_ENCRYPTION_CHANGE = 262144 USN_REASON_FILE_CREATE = 256 USN_REASON_FILE_DELETE = 512 USN_REASON_HARD_LINK_CHANGE = 65536 USN_REASON_INDEXABLE_CHANGE = 16384 USN_REASON_NAMED_DATA_EXTEND = 32 USN_REASON_NAMED_DATA_OVERWRITE = 16 USN_REASON_NAMED_DATA_TRUNCATION = 64 USN_REASON_OBJECT_ID_CHANGE = 524288 USN_REASON_RENAME_NEW_NAME = 8192 USN_REASON_RENAME_OLD_NAME = 4096 USN_REASON_REPARSE_POINT_CHANGE = 1048576 USN_REASON_SECURITY_CHANGE = 2048 USN_REASON_STREAM_CHANGE = 2097152 USN_SOURCE_AUXILIARY_DATA = 2 USN_SOURCE_DATA_MANAGEMENT = 1 USN_SOURCE_REPLICATION_MANAGEMENT = 4 UUID_DEFINED = 0 VALID_INHERIT_FLAGS = 31 VALID_NTFT = 0xC0 VARCMP_EQ = 1 VARCMP_GT = 2 VARCMP_LT = 0 VARCMP_NULL = 3 VARIABLE_PITCH = 2 VARIANT_ALPHABOOL = 0x02 VARIANT_CALENDAR_GREGORIAN = 0x40 VARIANT_CALENDAR_HIJRI = 0x08 VARIANT_CALENDAR_THAI = 0x20 VARIANT_LOCALBOOL = 0x10 VARIANT_NOUSEROVERRIDE = 0x04 VARIANT_NOVALUEPROP = 0x01 VARIANT_USE_NLS = 0x80 VENDOR_ID_LENGTH = 8 VERTRES = 10 VERTSIZE = 6 VER_AND = 6 VER_BUILDNUMBER = 0x0000004 VER_CONDITION_MASK = 7 VER_EQUAL = 1 VER_GREATER = 2 VER_GREATER_EQUAL = 3 VER_H = 0 VER_LESS = 4 VER_LESS_EQUAL = 5 VER_MAJORVERSION = 0x0000002 VER_MINORVERSION = 0x0000001 VER_NT_DOMAIN_CONTROLLER = 0x0000002 VER_NT_SERVER = 0x0000003 VER_NT_WORKSTATION = 0x0000001 VER_NUM_BITS_PER_CONDITION_MASK = 3 VER_OR = 7 VER_PLATFORMID = 0x0000008 VER_PLATFORM_WIN32_NT = 2 VER_PLATFORM_WIN32_WINDOWS = 1 VER_PLATFORM_WIN32s = 0 VER_PRODUCT_TYPE = 0x0000080 VER_SERVER_NT = 0x80000000 VER_SERVICEPACKMAJOR = 0x0000020 VER_SERVICEPACKMINOR = 0x0000010 VER_SUITENAME = 0x0000040 VER_SUITE_BACKOFFICE = 0x00000004 VER_SUITE_BLADE = 0x00000400 VER_SUITE_COMMUNICATIONS = 0x00000008 VER_SUITE_COMPUTE_SERVER = 0x00004000 VER_SUITE_DATACENTER = 0x00000080 VER_SUITE_EMBEDDEDNT = 0x00000040 VER_SUITE_EMBEDDED_RESTRICTED = 0x00000800 VER_SUITE_ENTERPRISE = 0x00000002 VER_SUITE_PERSONAL = 0x00000200 VER_SUITE_SECURITY_APPLIANCE = 0x00001000 VER_SUITE_SINGLEUSERTS = 0x00000100 VER_SUITE_SMALLBUSINESS = 0x00000001 VER_SUITE_SMALLBUSINESS_RESTRICTED = 0x00000020 VER_SUITE_STORAGE_SERVER = 0x00002000 VER_SUITE_TERMINAL = 0x00000010 VER_SUITE_WH_SERVER = 0x00008000 VER_WORKSTATION_NT = 0x40000000 VFFF_ISSHAREDFILE = 0x0001 VFF_BUFFTOOSMALL = 0x0004 VFF_CURNEDEST = 0x0001 VFF_FILEINUSE = 0x0002 VFT2_DRV_COMM = 10 VFT2_DRV_DISPLAY = 4 VFT2_DRV_INPUTMETHOD = 11 VFT2_DRV_INSTALLABLE = 8 VFT2_DRV_KEYBOARD = 2 VFT2_DRV_LANGUAGE = 3 VFT2_DRV_MOUSE = 5 VFT2_DRV_NETWORK = 6 VFT2_DRV_PRINTER = 1 VFT2_DRV_SOUND = 9 VFT2_DRV_SYSTEM = 7 VFT2_DRV_VERSIONED_PRINTER = 12 VFT2_FONT_RASTER = 1 VFT2_FONT_TRUETYPE = 3 VFT2_FONT_VECTOR = 2 VFT2_UNKNOWN = 0 VFT_APP = 1 VFT_DLL = 2 VFT_DRV = 3 VFT_FONT = 4 VFT_STATIC_LIB = 7 VFT_UNKNOWN = 0 VFT_VXD = 5 VIETNAMESE_CHARSET = 163 VIEW_E_FIRST = 2147746112 VIEW_E_LAST = 2147746127 VIEW_S_FIRST = 262464 VIEW_S_LAST = 262479 VIFF_DONTDELETEOLD = 0x0002 VIFF_FORCEINSTALL = 0x0001 VIF_ACCESSVIOLATION = 512 VIF_BUFFTOOSMALL = 262144 VIF_CANNOTCREATE = 2048 VIF_CANNOTDELETE = 4096 VIF_CANNOTDELETECUR = 16384 VIF_CANNOTLOADCABINET = 1048576 VIF_CANNOTLOADLZ32 = 524288 VIF_CANNOTREADDST = 131072 VIF_CANNOTREADSRC = 65536 VIF_CANNOTRENAME = 8192 VIF_DIFFCODEPG = 16 VIF_DIFFLANG = 8 VIF_DIFFTYPE = 32 VIF_FILEINUSE = 128 VIF_MISMATCH = 2 VIF_OUTOFMEMORY = 32768 VIF_OUTOFSPACE = 256 VIF_SHARINGVIOLATION = 1024 VIF_SRCOLD = 4 VIF_TEMPFILE = 1 VIF_WRITEPROT = 64 VK_ACCEPT = 0x1E VK_ADD = 0x6B VK_APPS = 0x5D VK_ATTN = 0xF6 VK_BACK = 0x08 VK_BROWSER_BACK = 0xA6 VK_BROWSER_FAVORITES = 0xAB VK_BROWSER_FORWARD = 0xA7 VK_BROWSER_HOME = 0xAC VK_BROWSER_REFRESH = 0xA8 VK_BROWSER_SEARCH = 0xAA VK_BROWSER_STOP = 0xA9 VK_CANCEL = 0x03 VK_CAPITAL = 0x14 VK_CLEAR = 0x0C VK_CONTROL = 0x11 VK_CONVERT = 0x1C VK_CRSEL = 0xF7 VK_DECIMAL = 0x6E VK_DELETE = 0x2E VK_DIVIDE = 0x6F VK_DOWN = 0x28 VK_END = 0x23 VK_EREOF = 0xF9 VK_ESCAPE = 0x1B VK_EXECUTE = 0x2B VK_EXSEL = 0xF8 VK_F1 = 0x70 VK_F10 = 0x79 VK_F11 = 0x7A VK_F12 = 0x7B VK_F13 = 0x7C VK_F14 = 0x7D VK_F15 = 0x7E VK_F16 = 0x7F VK_F17 = 0x80 VK_F18 = 0x81 VK_F19 = 0x82 VK_F2 = 0x71 VK_F20 = 0x83 VK_F21 = 0x84 VK_F22 = 0x85 VK_F23 = 0x86 VK_F24 = 0x87 VK_F3 = 0x72 VK_F4 = 0x73 VK_F5 = 0x74 VK_F6 = 0x75 VK_F7 = 0x76 VK_F8 = 0x77 VK_F9 = 0x78 VK_FINAL = 0x18 VK_HANGEUL = 0x15 VK_HANGUL = 0x15 VK_HANJA = 0x19 VK_HELP = 0x2F VK_HOME = 0x24 VK_ICO_00 = 0xE4 VK_ICO_CLEAR = 0xE6 VK_ICO_HELP = 0xE3 VK_INSERT = 0x2D VK_JUNJA = 0x17 VK_KANA = 0x15 VK_KANJI = 0x19 VK_LAUNCH_APP1 = 0xB6 VK_LAUNCH_APP2 = 0xB7 VK_LAUNCH_MAIL = 0xB4 VK_LAUNCH_MEDIA_SELECT = 0xB5 VK_LBUTTON = 0x01 VK_LCONTROL = 0xA2 VK_LEFT = 0x25 VK_LMENU = 0xA4 VK_LSHIFT = 0xA0 VK_LWIN = 0x5B VK_MBUTTON = 0x04 VK_MEDIA_NEXT_TRACK = 0xB0 VK_MEDIA_PLAY_PAUSE = 0xB3 VK_MEDIA_PREV_TRACK = 0xB1 VK_MEDIA_STOP = 0xB2 VK_MENU = 0x12 VK_MODECHANGE = 0x1F VK_MULTIPLY = 0x6A VK_NEXT = 0x22 VK_NONAME = 0xFC VK_NONCONVERT = 0x1D VK_NUMLOCK = 0x90 VK_NUMPAD0 = 0x60 VK_NUMPAD1 = 0x61 VK_NUMPAD2 = 0x62 VK_NUMPAD3 = 0x63 VK_NUMPAD4 = 0x64 VK_NUMPAD5 = 0x65 VK_NUMPAD6 = 0x66 VK_NUMPAD7 = 0x67 VK_NUMPAD8 = 0x68 VK_NUMPAD9 = 0x69 VK_OEM_1 = 0xBA VK_OEM_102 = 0xE2 VK_OEM_2 = 0xBF VK_OEM_3 = 0xC0 VK_OEM_4 = 0xDB VK_OEM_5 = 0xDC VK_OEM_6 = 0xDD VK_OEM_7 = 0xDE VK_OEM_8 = 0xDF VK_OEM_ATTN = 0xF0 VK_OEM_AUTO = 0xF3 VK_OEM_AX = 0xE1 VK_OEM_BACKTAB = 0xF5 VK_OEM_CLEAR = 0xFE VK_OEM_COMMA = 0xBC VK_OEM_COPY = 0xF2 VK_OEM_CUSEL = 0xEF VK_OEM_ENLW = 0xF4 VK_OEM_FINISH = 0xF1 VK_OEM_FJ_JISHO = 0x92 VK_OEM_FJ_LOYA = 0x95 VK_OEM_FJ_MASSHOU = 0x93 VK_OEM_FJ_ROYA = 0x96 VK_OEM_FJ_TOUROKU = 0x94 VK_OEM_JUMP = 0xEA VK_OEM_MINUS = 0xBD VK_OEM_NEC_EQUAL = 0x92 VK_OEM_PA1 = 0xEB VK_OEM_PA2 = 0xEC VK_OEM_PA3 = 0xED VK_OEM_PERIOD = 0xBE VK_OEM_PLUS = 0xBB VK_OEM_RESET = 0xE9 VK_OEM_WSCTRL = 0xEE VK_PA1 = 0xFD VK_PACKET = 0xE7 VK_PAUSE = 0x13 VK_PLAY = 0xFA VK_PRINT = 0x2A VK_PRIOR = 0x21 VK_PROCESSKEY = 0xE5 VK_RBUTTON = 0x02 VK_RCONTROL = 0xA3 VK_RETURN = 0x0D VK_RIGHT = 0x27 VK_RMENU = 0xA5 VK_RSHIFT = 0xA1 VK_RWIN = 0x5C VK_SCROLL = 0x91 VK_SELECT = 0x29 VK_SEPARATOR = 0x6C VK_SHIFT = 0x10 VK_SLEEP = 0x5F VK_SNAPSHOT = 0x2C VK_SPACE = 0x20 VK_SUBTRACT = 0x6D VK_TAB = 0x09 VK_UP = 0x26 VK_VOLUME_DOWN = 0xAE VK_VOLUME_MUTE = 0xAD VK_VOLUME_UP = 0xAF VK_XBUTTON1 = 0x05 VK_XBUTTON2 = 0x06 VK_ZOOM = 0xFB VOLUME_IS_DIRTY = 1 VOLUME_NAME_DOS = 0x0 VOLUME_NAME_GUID = 0x1 VOLUME_NAME_NONE = 0x4 VOLUME_NAME_NT = 0x2 VOLUME_UPGRADE_SCHEDULED = 2 VOS_DOS = 65536 VOS_DOS_WINDOWS16 = 65537 VOS_DOS_WINDOWS32 = 65540 VOS_NT = 262144 VOS_NT_WINDOWS32 = 262148 VOS_OS216 = 131072 VOS_OS216_PM16 = 131074 VOS_OS232 = 196608 VOS_OS232_PM32 = 196611 VOS_UNKNOWN = 0 VOS_WINCE = 327680 VOS__BASE = 0 VOS__PM16 = 2 VOS__PM32 = 3 VOS__WINDOWS16 = 1 VOS__WINDOWS32 = 4 VP_COMMAND_GET = 0x0001 VP_COMMAND_SET = 0x0002 VP_CP_CMD_ACTIVATE = 0x0001 VP_CP_CMD_CHANGE = 0x0004 VP_CP_CMD_DEACTIVATE = 0x0002 VP_CP_TYPE_APS_TRIGGER = 0x0001 VP_CP_TYPE_MACROVISION = 0x0002 VP_FLAGS_BRIGHTNESS = 0x0040 VP_FLAGS_CONTRAST = 0x0080 VP_FLAGS_COPYPROTECT = 0x0100 VP_FLAGS_FLICKER = 0x0004 VP_FLAGS_MAX_UNSCALED = 0x0010 VP_FLAGS_OVERSCAN = 0x0008 VP_FLAGS_POSITION = 0x0020 VP_FLAGS_TV_MODE = 0x0001 VP_FLAGS_TV_STANDARD = 0x0002 VP_MODE_TV_PLAYBACK = 0x0002 VP_MODE_WIN_GRAPHICS = 0x0001 VP_TV_STANDARD_NTSC_433 = 0x00010000 VP_TV_STANDARD_NTSC_M = 0x0001 VP_TV_STANDARD_NTSC_M_J = 0x0002 VP_TV_STANDARD_PAL_60 = 0x00040000 VP_TV_STANDARD_PAL_B = 0x0004 VP_TV_STANDARD_PAL_D = 0x0008 VP_TV_STANDARD_PAL_G = 0x00020000 VP_TV_STANDARD_PAL_H = 0x0010 VP_TV_STANDARD_PAL_I = 0x0020 VP_TV_STANDARD_PAL_M = 0x0040 VP_TV_STANDARD_PAL_N = 0x0080 VP_TV_STANDARD_SECAM_B = 0x0100 VP_TV_STANDARD_SECAM_D = 0x0200 VP_TV_STANDARD_SECAM_G = 0x0400 VP_TV_STANDARD_SECAM_H = 0x0800 VP_TV_STANDARD_SECAM_K = 0x1000 VP_TV_STANDARD_SECAM_K1 = 0x2000 VP_TV_STANDARD_SECAM_L = 0x4000 VP_TV_STANDARD_SECAM_L1 = 0x00080000 VP_TV_STANDARD_WIN_VGA = 0x8000 VREFRESH = 116 VS_FFI_FILEFLAGSMASK = 63 VS_FFI_SIGNATURE = 4277077181 VS_FFI_STRUCVERSION = 65536 VS_FF_DEBUG = 1 VS_FF_INFOINFERRED = 16 VS_FF_PATCHED = 4 VS_FF_PRERELEASE = 2 VS_FF_PRIVATEBUILD = 8 VS_FF_SPECIALBUILD = 32 VS_USER_DEFINED = 100 VS_VERSION_INFO = 1 VTA_BASELINE = 24 VTA_BOTTOM = 2 VTA_CENTER = 6 VTA_LEFT = 8 VTA_RIGHT = 0 VTA_TOP = 0 VTDATEGRE_MAX = 2958465 VTDATEGRE_MIN = -657434 WAIT_TIMEOUT = 258 WARNING_IPSEC_MM_POLICY_PRUNED = 13024 WARNING_IPSEC_QM_POLICY_PRUNED = 13025 WAVECAPS_LRVOLUME = 0x0008 WAVECAPS_PITCH = 0x0001 WAVECAPS_PLAYBACKRATE = 0x0002 WAVECAPS_SAMPLEACCURATE = 0x0020 WAVECAPS_SYNC = 0x0010 WAVECAPS_VOLUME = 0x0004 WAVERR_BADFORMAT = 32 WAVERR_BASE = 32 WAVERR_LASTERROR = 35 WAVERR_STILLPLAYING = 33 WAVERR_SYNC = 35 WAVERR_UNPREPARED = 34 WAVE_ALLOWSYNC = 0x0002 WAVE_FORMAT_1M08 = 0x00000001 WAVE_FORMAT_1M16 = 0x00000004 WAVE_FORMAT_1S08 = 0x00000002 WAVE_FORMAT_1S16 = 0x00000008 WAVE_FORMAT_2M08 = 0x00000010 WAVE_FORMAT_2M16 = 0x00000040 WAVE_FORMAT_2S08 = 0x00000020 WAVE_FORMAT_2S16 = 0x00000080 WAVE_FORMAT_44M08 = 0x00000100 WAVE_FORMAT_44M16 = 0x00000400 WAVE_FORMAT_44S08 = 0x00000200 WAVE_FORMAT_44S16 = 0x00000800 WAVE_FORMAT_48M08 = 0x00001000 WAVE_FORMAT_48M16 = 0x00004000 WAVE_FORMAT_48S08 = 0x00002000 WAVE_FORMAT_48S16 = 0x00008000 WAVE_FORMAT_4M08 = 0x00000100 WAVE_FORMAT_4M16 = 0x00000400 WAVE_FORMAT_4S08 = 0x00000200 WAVE_FORMAT_4S16 = 0x00000800 WAVE_FORMAT_96M08 = 0x00010000 WAVE_FORMAT_96M16 = 0x00040000 WAVE_FORMAT_96S08 = 0x00020000 WAVE_FORMAT_96S16 = 0x00080000 WAVE_FORMAT_DIRECT = 0x0008 WAVE_FORMAT_DIRECT_QUERY = 9 WAVE_FORMAT_PCM = 1 WAVE_FORMAT_QUERY = 0x0001 WAVE_INVALIDFORMAT = 0x00000000 WAVE_MAPPED = 0x0004 WA_ACTIVE = 1 WA_CLICKACTIVE = 2 WA_INACTIVE = 0 WB_ISDELIMITER = 2 WB_LEFT = 0 WB_RIGHT = 1 WC_COMPOSITECHECK = 0x00000200 WC_DEFAULTCHAR = 0x00000040 WC_DISCARDNS = 0x00000010 WC_NO_BEST_FIT_CHARS = 0x00000400 WC_SEPCHARS = 0x00000020 WDT_INPROC64_CALL = 1349805143 WDT_INPROC_CALL = 1215587415 WDT_REMOTE_CALL = 1383359575 WGL_FONT_LINES = 0 WGL_FONT_POLYGONS = 1 WGL_SWAPMULTIPLE_MAX = 16 WGL_SWAP_MAIN_PLANE = 0x00000001 WGL_SWAP_OVERLAY1 = 0x00000002 WGL_SWAP_OVERLAY10 = 0x00000400 WGL_SWAP_OVERLAY11 = 0x00000800 WGL_SWAP_OVERLAY12 = 0x00001000 WGL_SWAP_OVERLAY13 = 0x00002000 WGL_SWAP_OVERLAY14 = 0x00004000 WGL_SWAP_OVERLAY15 = 0x00008000 WGL_SWAP_OVERLAY2 = 0x00000004 WGL_SWAP_OVERLAY3 = 0x00000008 WGL_SWAP_OVERLAY4 = 0x00000010 WGL_SWAP_OVERLAY5 = 0x00000020 WGL_SWAP_OVERLAY6 = 0x00000040 WGL_SWAP_OVERLAY7 = 0x00000080 WGL_SWAP_OVERLAY8 = 0x00000100 WGL_SWAP_OVERLAY9 = 0x00000200 WGL_SWAP_UNDERLAY1 = 0x00010000 WGL_SWAP_UNDERLAY10 = 0x02000000 WGL_SWAP_UNDERLAY11 = 0x04000000 WGL_SWAP_UNDERLAY12 = 0x08000000 WGL_SWAP_UNDERLAY13 = 0x10000000 WGL_SWAP_UNDERLAY14 = 0x20000000 WGL_SWAP_UNDERLAY15 = 0x40000000 WGL_SWAP_UNDERLAY2 = 0x00020000 WGL_SWAP_UNDERLAY3 = 0x00040000 WGL_SWAP_UNDERLAY4 = 0x00080000 WGL_SWAP_UNDERLAY5 = 0x00100000 WGL_SWAP_UNDERLAY6 = 0x00200000 WGL_SWAP_UNDERLAY7 = 0x00400000 WGL_SWAP_UNDERLAY8 = 0x00800000 WGL_SWAP_UNDERLAY9 = 0x01000000 WHDR_BEGINLOOP = 0x00000004 WHDR_DONE = 0x00000001 WHDR_ENDLOOP = 0x00000008 WHDR_INQUEUE = 0x00000010 WHDR_PREPARED = 0x00000002 WHEEL_DELTA = 120 WHEEL_PAGESCROLL = 4294967295 WHITEONBLACK = 2 WHITE_BRUSH = 0 WHITE_PEN = 6 WH_CALLWNDPROC = 4 WH_CALLWNDPROCRET = 12 WH_CBT = 5 WH_DEBUG = 9 WH_FOREGROUNDIDLE = 11 WH_GETMESSAGE = 3 WH_HARDWARE = 8 WH_JOURNALPLAYBACK = 1 WH_JOURNALRECORD = 0 WH_KEYBOARD = 2 WH_KEYBOARD_LL = 13 WH_MAX = 14 WH_MAXHOOK = 14 WH_MIN = -1 WH_MINHOOK = -1 WH_MOUSE = 7 WH_MOUSE_LL = 14 WH_MSGFILTER = -1 WH_SHELL = 10 WH_SYSMSGFILTER = 6 WIM_CLOSE = 959 WIM_DATA = 960 WIM_OPEN = 958 WIN32_LEAN_AND_MEAN = 0 WINAPI = 0 WINAPI_FAMILY = 3 WINAPI_FAMILY_APP = 2 WINAPI_FAMILY_DESKTOP_APP = 3 WINAPI_INLINE = 0 WINAPI_PARTITION_APP = 0x2 WINAPI_PARTITION_DESKTOP = 0x1 WINDING = 2 WINDOW_BUFFER_SIZE_EVENT = 0x4 WINEVENT_INCONTEXT = 0x0004 WINEVENT_OUTOFCONTEXT = 0x0000 WINEVENT_SKIPOWNPROCESS = 0x0002 WINEVENT_SKIPOWNTHREAD = 0x0001 WININETINFO_OPTION_LOCK_HANDLE = 65534 WINPERF_LOG_DEBUG = 2 WINPERF_LOG_NONE = 0 WINPERF_LOG_USER = 1 WINPERF_LOG_VERBOSE = 3 WINPTHREAD_API = 0 WINSCARDAPI = 0 WINSTA_ACCESSCLIPBOARD = 4 WINSTA_ACCESSGLOBALATOMS = 32 WINSTA_ALL_ACCESS = 895 WINSTA_CREATEDESKTOP = 8 WINSTA_ENUMDESKTOPS = 1 WINSTA_ENUMERATE = 256 WINSTA_EXITWINDOWS = 64 WINSTA_READATTRIBUTES = 2 WINSTA_READSCREEN = 512 WINSTA_WRITEATTRIBUTES = 16 WINVER = 1282 WIN_PTHREADS_TIME_H = 0 WIZ_BODYCX = 184 WIZ_BODYX = 92 WIZ_CXBMP = 80 WIZ_CXDLG = 276 WIZ_CYDLG = 140 WMSZ_BOTTOM = 6 WMSZ_BOTTOMLEFT = 7 WMSZ_BOTTOMRIGHT = 8 WMSZ_LEFT = 1 WMSZ_RIGHT = 2 WMSZ_TOP = 3 WMSZ_TOPLEFT = 4 WMSZ_TOPRIGHT = 5 WM_ACTIVATE = 0x0006 WM_ACTIVATEAPP = 0x001C WM_AFXFIRST = 0x0360 WM_AFXLAST = 0x037F WM_APP = 0x8000 WM_APPCOMMAND = 0x0319 WM_ASKCBFORMATNAME = 0x030C WM_CANCELJOURNAL = 0x004B WM_CANCELMODE = 0x001F WM_CAPTURECHANGED = 0x0215 WM_CHANGECBCHAIN = 0x030D WM_CHANGEUISTATE = 0x0127 WM_CHAR = 0x0102 WM_CHARTOITEM = 0x002F WM_CHILDACTIVATE = 0x0022 WM_CHOOSEFONT_GETLOGFONT = 1025 WM_CHOOSEFONT_SETFLAGS = 1126 WM_CHOOSEFONT_SETLOGFONT = 1125 WM_CLEAR = 0x0303 WM_CLIPBOARDUPDATE = 0x031d WM_CLOSE = 0x0010 WM_COMMAND = 0x0111 WM_COMMNOTIFY = 0x0044 WM_COMPACTING = 0x0041 WM_COMPAREITEM = 0x0039 WM_CONTEXTMENU = 0x007B WM_COPY = 0x0301 WM_COPYDATA = 0x004A WM_CREATE = 0x0001 WM_CTLCOLORBTN = 0x0135 WM_CTLCOLORDLG = 0x0136 WM_CTLCOLOREDIT = 0x0133 WM_CTLCOLORLISTBOX = 0x0134 WM_CTLCOLORMSGBOX = 0x0132 WM_CTLCOLORSCROLLBAR = 0x0137 WM_CTLCOLORSTATIC = 0x0138 WM_CUT = 0x0300 WM_DDE_ACK = 996 WM_DDE_ADVISE = 994 WM_DDE_DATA = 997 WM_DDE_EXECUTE = 1000 WM_DDE_FIRST = 0x03E0 WM_DDE_INITIATE = 992 WM_DDE_LAST = 1000 WM_DDE_POKE = 999 WM_DDE_REQUEST = 998 WM_DDE_TERMINATE = 993 WM_DDE_UNADVISE = 995 WM_DEADCHAR = 0x0103 WM_DELETEITEM = 0x002D WM_DESTROY = 0x0002 WM_DESTROYCLIPBOARD = 0x0307 WM_DEVICECHANGE = 0x0219 WM_DEVMODECHANGE = 0x001B WM_DISPLAYCHANGE = 0x007E WM_DRAWCLIPBOARD = 0x0308 WM_DRAWITEM = 0x002B WM_DROPFILES = 0x0233 WM_ENABLE = 0x000A WM_ENDSESSION = 0x0016 WM_ENTERIDLE = 0x0121 WM_ENTERMENULOOP = 0x0211 WM_ENTERSIZEMOVE = 0x0231 WM_ERASEBKGND = 0x0014 WM_EXITMENULOOP = 0x0212 WM_EXITSIZEMOVE = 0x0232 WM_FONTCHANGE = 0x001D WM_GETDLGCODE = 0x0087 WM_GETFONT = 0x0031 WM_GETHOTKEY = 0x0033 WM_GETICON = 0x007F WM_GETMINMAXINFO = 0x0024 WM_GETOBJECT = 0x003D WM_GETTEXT = 0x000D WM_GETTEXTLENGTH = 0x000E WM_HANDHELDFIRST = 0x0358 WM_HANDHELDLAST = 0x035F WM_HELP = 0x0053 WM_HOTKEY = 0x0312 WM_HSCROLL = 0x0114 WM_HSCROLLCLIPBOARD = 0x030E WM_ICONERASEBKGND = 0x0027 WM_IME_CHAR = 0x0286 WM_IME_COMPOSITION = 0x010F WM_IME_COMPOSITIONFULL = 0x0284 WM_IME_CONTROL = 0x0283 WM_IME_ENDCOMPOSITION = 0x010E WM_IME_KEYDOWN = 0x0290 WM_IME_KEYLAST = 0x010F WM_IME_KEYUP = 0x0291 WM_IME_NOTIFY = 0x0282 WM_IME_REQUEST = 0x0288 WM_IME_SELECT = 0x0285 WM_IME_SETCONTEXT = 0x0281 WM_IME_STARTCOMPOSITION = 0x010D WM_INITDIALOG = 0x0110 WM_INITMENU = 0x0116 WM_INITMENUPOPUP = 0x0117 WM_INPUT = 0x00FF WM_INPUTLANGCHANGE = 0x0051 WM_INPUTLANGCHANGEREQUEST = 0x0050 WM_INPUT_DEVICE_CHANGE = 0x00fe WM_KEYDOWN = 0x0100 WM_KEYFIRST = 0x0100 WM_KEYLAST = 0x0109 WM_KEYUP = 0x0101 WM_KILLFOCUS = 0x0008 WM_LBUTTONDBLCLK = 0x0203 WM_LBUTTONDOWN = 0x0201 WM_LBUTTONUP = 0x0202 WM_MBUTTONDBLCLK = 0x0209 WM_MBUTTONDOWN = 0x0207 WM_MBUTTONUP = 0x0208 WM_MDIACTIVATE = 0x0222 WM_MDICASCADE = 0x0227 WM_MDICREATE = 0x0220 WM_MDIDESTROY = 0x0221 WM_MDIGETACTIVE = 0x0229 WM_MDIICONARRANGE = 0x0228 WM_MDIMAXIMIZE = 0x0225 WM_MDINEXT = 0x0224 WM_MDIREFRESHMENU = 0x0234 WM_MDIRESTORE = 0x0223 WM_MDISETMENU = 0x0230 WM_MDITILE = 0x0226 WM_MEASUREITEM = 0x002C WM_MENUCHAR = 0x0120 WM_MENUCOMMAND = 0x0126 WM_MENUDRAG = 0x0123 WM_MENUGETOBJECT = 0x0124 WM_MENURBUTTONUP = 0x0122 WM_MENUSELECT = 0x011F WM_MOUSEACTIVATE = 0x0021 WM_MOUSEFIRST = 0x0200 WM_MOUSEHOVER = 0x02A1 WM_MOUSELAST = 0x020d WM_MOUSELEAVE = 0x02A3 WM_MOUSEMOVE = 0x0200 WM_MOUSEWHEEL = 0x020A WM_MOVE = 0x0003 WM_MOVING = 0x0216 WM_NCACTIVATE = 0x0086 WM_NCCALCSIZE = 0x0083 WM_NCCREATE = 0x0081 WM_NCDESTROY = 0x0082 WM_NCHITTEST = 0x0084 WM_NCLBUTTONDBLCLK = 0x00A3 WM_NCLBUTTONDOWN = 0x00A1 WM_NCLBUTTONUP = 0x00A2 WM_NCMBUTTONDBLCLK = 0x00A9 WM_NCMBUTTONDOWN = 0x00A7 WM_NCMBUTTONUP = 0x00A8 WM_NCMOUSEHOVER = 0x02A0 WM_NCMOUSELEAVE = 0x02A2 WM_NCMOUSEMOVE = 0x00A0 WM_NCPAINT = 0x0085 WM_NCRBUTTONDBLCLK = 0x00A6 WM_NCRBUTTONDOWN = 0x00A4 WM_NCRBUTTONUP = 0x00A5 WM_NCXBUTTONDBLCLK = 0x00AD WM_NCXBUTTONDOWN = 0x00AB WM_NCXBUTTONUP = 0x00AC WM_NEXTDLGCTL = 0x0028 WM_NEXTMENU = 0x0213 WM_NOTIFY = 0x004E WM_NOTIFYFORMAT = 0x0055 WM_NULL = 0x0000 WM_PAINT = 0x000F WM_PAINTCLIPBOARD = 0x0309 WM_PAINTICON = 0x0026 WM_PALETTECHANGED = 0x0311 WM_PALETTEISCHANGING = 0x0310 WM_PARENTNOTIFY = 0x0210 WM_PASTE = 0x0302 WM_PENWINFIRST = 0x0380 WM_PENWINLAST = 0x038F WM_POWER = 0x0048 WM_POWERBROADCAST = 0x0218 WM_PRINT = 0x0317 WM_PRINTCLIENT = 0x0318 WM_PSD_ENVSTAMPRECT = 1029 WM_PSD_FULLPAGERECT = 1025 WM_PSD_GREEKTEXTRECT = 1028 WM_PSD_MARGINRECT = 1027 WM_PSD_MINMARGINRECT = 1026 WM_PSD_PAGESETUPDLG = 1024 WM_PSD_YAFULLPAGERECT = 1030 WM_QUERYDRAGICON = 0x0037 WM_QUERYENDSESSION = 0x0011 WM_QUERYNEWPALETTE = 0x030F WM_QUERYOPEN = 0x0013 WM_QUERYUISTATE = 0x0129 WM_QUEUESYNC = 0x0023 WM_QUIT = 0x0012 WM_RBUTTONDBLCLK = 0x0206 WM_RBUTTONDOWN = 0x0204 WM_RBUTTONUP = 0x0205 WM_RENDERALLFORMATS = 0x0306 WM_RENDERFORMAT = 0x0305 WM_SETCURSOR = 0x0020 WM_SETFOCUS = 0x0007 WM_SETFONT = 0x0030 WM_SETHOTKEY = 0x0032 WM_SETICON = 0x0080 WM_SETREDRAW = 0x000B WM_SETTEXT = 0x000C WM_SETTINGCHANGE = 26 WM_SHOWWINDOW = 0x0018 WM_SIZE = 0x0005 WM_SIZECLIPBOARD = 0x030B WM_SIZING = 0x0214 WM_SPOOLERSTATUS = 0x002A WM_STYLECHANGED = 0x007D WM_STYLECHANGING = 0x007C WM_SYNCPAINT = 0x0088 WM_SYSCHAR = 0x0106 WM_SYSCOLORCHANGE = 0x0015 WM_SYSCOMMAND = 0x0112 WM_SYSDEADCHAR = 0x0107 WM_SYSKEYDOWN = 0x0104 WM_SYSKEYUP = 0x0105 WM_TABLET_FIRST = 0x02c0 WM_TABLET_LAST = 0x02df WM_TCARD = 0x0052 WM_THEMECHANGED = 0x031A WM_TIMECHANGE = 0x001E WM_TIMER = 0x0113 WM_UNDO = 0x0304 WM_UNICHAR = 0x0109 WM_UNINITMENUPOPUP = 0x0125 WM_UPDATEUISTATE = 0x0128 WM_USER = 0x0400 WM_USERCHANGED = 0x0054 WM_VKEYTOITEM = 0x002E WM_VSCROLL = 0x0115 WM_VSCROLLCLIPBOARD = 0x030A WM_WINDOWPOSCHANGED = 0x0047 WM_WINDOWPOSCHANGING = 0x0046 WM_WININICHANGE = 0x001A WM_WTSSESSION_CHANGE = 0x02B1 WM_XBUTTONDBLCLK = 0x020D WM_XBUTTONDOWN = 0x020B WM_XBUTTONUP = 0x020C WNCON_DYNAMIC = 0x00000008 WNCON_FORNETCARD = 0x00000001 WNCON_NOTROUTED = 0x00000002 WNCON_SLOWLINK = 0x00000004 WNFMT_ABBREVIATED = 0x02 WNFMT_CONNECTION = 0x20 WNFMT_INENUM = 0x10 WNFMT_MULTILINE = 0x01 WNNC_CRED_MANAGER = 0xffff0000 WNNC_NET_10NET = 0x00050000 WNNC_NET_3IN1 = 0x00270000 WNNC_NET_9TILES = 0x00090000 WNNC_NET_APPLETALK = 0x00130000 WNNC_NET_AS400 = 0x000b0000 WNNC_NET_AVID = 0x001a0000 WNNC_NET_AVID1 = 0x003a0000 WNNC_NET_BMC = 0x00180000 WNNC_NET_BWNFS = 0x00100000 WNNC_NET_CLEARCASE = 0x00160000 WNNC_NET_COGENT = 0x00110000 WNNC_NET_CSC = 0x00260000 WNNC_NET_DAV = 0x002e0000 WNNC_NET_DCE = 0x00190000 WNNC_NET_DECORB = 0x00200000 WNNC_NET_DFS = 0x003b0000 WNNC_NET_DISTINCT = 0x00230000 WNNC_NET_DOCUSPACE = 0x001b0000 WNNC_NET_DRIVEONWEB = 0x003e0000 WNNC_NET_EXIFS = 0x002d0000 WNNC_NET_EXTENDNET = 0x00290000 WNNC_NET_FARALLON = 0x00120000 WNNC_NET_FJ_REDIR = 0x00220000 WNNC_NET_FOXBAT = 0x002b0000 WNNC_NET_FRONTIER = 0x00170000 WNNC_NET_FTP_NFS = 0x000c0000 WNNC_NET_GOOGLE = 0x00430000 WNNC_NET_HOB_NFS = 0x00320000 WNNC_NET_IBMAL = 0x00340000 WNNC_NET_INTERGRAPH = 0x00140000 WNNC_NET_KNOWARE = 0x002f0000 WNNC_NET_KWNP = 0x003c0000 WNNC_NET_LANMAN = 131072 WNNC_NET_LANSTEP = 0x00080000 WNNC_NET_LANTASTIC = 0x000a0000 WNNC_NET_LIFENET = 0x000e0000 WNNC_NET_LOCK = 0x00350000 WNNC_NET_LOCUS = 0x00060000 WNNC_NET_MANGOSOFT = 0x001c0000 WNNC_NET_MASFAX = 0x00310000 WNNC_NET_MFILES = 0x00410000 WNNC_NET_MSNET = 0x00010000 WNNC_NET_MS_NFS = 0x00420000 WNNC_NET_NDFS = 0x00440000 WNNC_NET_NETWARE = 0x00030000 WNNC_NET_OBJECT_DIRE = 0x00300000 WNNC_NET_OPENAFS = 0x00390000 WNNC_NET_PATHWORKS = 0x000d0000 WNNC_NET_POWERLAN = 0x000f0000 WNNC_NET_PROTSTOR = 0x00210000 WNNC_NET_QUINCY = 0x00380000 WNNC_NET_RDR2SAMPLE = 0x00250000 WNNC_NET_RIVERFRONT1 = 0x001e0000 WNNC_NET_RIVERFRONT2 = 0x001f0000 WNNC_NET_RSFX = 0x00400000 WNNC_NET_SERNET = 0x001d0000 WNNC_NET_SHIVA = 0x00330000 WNNC_NET_SMB = 0x00020000 WNNC_NET_SRT = 0x00370000 WNNC_NET_STAC = 0x002a0000 WNNC_NET_SUN_PC_NFS = 0x00070000 WNNC_NET_SYMFONET = 0x00150000 WNNC_NET_TERMSRV = 0x00360000 WNNC_NET_TWINS = 0x00240000 WNNC_NET_VINES = 0x00040000 WNNC_NET_VMWARE = 0x003f0000 WNNC_NET_YAHOO = 0x002c0000 WNNC_NET_ZENWORKS = 0x003d0000 WN_ACCESS_DENIED = 5 WN_ALREADY_CONNECTED = 85 WN_BAD_DEV_TYPE = 66 WN_BAD_HANDLE = 6 WN_BAD_LEVEL = 124 WN_BAD_LOCALNAME = 1200 WN_BAD_NETNAME = 67 WN_BAD_PASSWORD = 86 WN_BAD_POINTER = 487 WN_BAD_PROFILE = 1206 WN_BAD_PROVIDER = 1204 WN_BAD_USER = 2202 WN_BAD_VALUE = 87 WN_CANCEL = 1223 WN_CANNOT_OPEN_PROFILE = 1205 WN_CONNECTED_OTHER_PASSWORD = 2108 WN_CONNECTED_OTHER_PASSWORD_DEFAULT = 2109 WN_CONNECTION_CLOSED = 1201 WN_DEVICE_ALREADY_REMEMBERED = 1202 WN_DEVICE_ERROR = 31 WN_DEVICE_IN_USE = 2404 WN_EXTENDED_ERROR = 1208 WN_FUNCTION_BUSY = 170 WN_MORE_DATA = 234 WN_NET_ERROR = 59 WN_NOT_AUTHENTICATED = 1244 WN_NOT_CONNECTED = 2250 WN_NOT_CONTAINER = 1207 WN_NOT_INITIALIZING = 1247 WN_NOT_LOGGED_ON = 1245 WN_NOT_SUPPORTED = 50 WN_NOT_VALIDATED = 1311 WN_NO_ERROR = 0 WN_NO_MORE_DEVICES = 1248 WN_NO_MORE_ENTRIES = 259 WN_NO_NETWORK = 1222 WN_NO_NET_OR_BAD_PATH = 1203 WN_OPEN_FILES = 2401 WN_OUT_OF_MEMORY = 8 WN_RETRY = 1237 WN_SUCCESS = 0 WN_WINDOWS_ERROR = 59 WOM_CLOSE = 956 WOM_DONE = 957 WOM_OPEN = 955 WOW64_CONTEXT_ALL = 65599 WOW64_CONTEXT_CONTROL = 65537 WOW64_CONTEXT_DEBUG_REGISTERS = 65552 WOW64_CONTEXT_EXCEPTION_ACTIVE = 0x08000000 WOW64_CONTEXT_EXCEPTION_REPORTING = 0x80000000 WOW64_CONTEXT_EXCEPTION_REQUEST = 0x40000000 WOW64_CONTEXT_EXTENDED_REGISTERS = 65568 WOW64_CONTEXT_FLOATING_POINT = 65544 WOW64_CONTEXT_FULL = 65543 WOW64_CONTEXT_INTEGER = 65538 WOW64_CONTEXT_SEGMENTS = 65540 WOW64_CONTEXT_SERVICE_ACTIVE = 0x10000000 WOW64_CONTEXT_XSTATE = 65600 WOW64_CONTEXT_i386 = 0x00010000 WOW64_CONTEXT_i486 = 0x00010000 WOW64_MAXIMUM_SUPPORTED_EXTENSION = 512 WOW64_SIZE_OF_80387_REGISTERS = 80 WPF_ASYNCWINDOWPLACEMENT = 0x0004 WPF_RESTORETOMAXIMIZED = 0x0002 WPF_SETMINPOSITION = 0x0001 WRITE_COMPRESSION_INFO_VALID = 0x00000010 WRITE_DAC = 262144 WRITE_OWNER = 524288 WRITE_RESTRICTED = 0x8 WRITE_WATCH_FLAG_RESET = 0x01 WSABASEERR = 10000 WSADESCRIPTION_LEN = 256 WSAEACCES = 10013 WSAEADDRINUSE = 10048 WSAEADDRNOTAVAIL = 10049 WSAEAFNOSUPPORT = 10047 WSAEALREADY = 10037 WSAEBADF = 10009 WSAECANCELLED = 10103 WSAECONNABORTED = 10053 WSAECONNREFUSED = 10061 WSAECONNRESET = 10054 WSAEDESTADDRREQ = 10039 WSAEDISCON = 10101 WSAEDQUOT = 10069 WSAEFAULT = 10014 WSAEHOSTDOWN = 10064 WSAEHOSTUNREACH = 10065 WSAEINPROGRESS = 10036 WSAEINTR = 10004 WSAEINVAL = 10022 WSAEINVALIDPROCTABLE = 10104 WSAEINVALIDPROVIDER = 10105 WSAEISCONN = 10056 WSAELOOP = 10062 WSAEMFILE = 10024 WSAEMSGSIZE = 10040 WSAENAMETOOLONG = 10063 WSAENETDOWN = 10050 WSAENETRESET = 10052 WSAENETUNREACH = 10051 WSAENOBUFS = 10055 WSAENOMORE = 10102 WSAENOPROTOOPT = 10042 WSAENOTCONN = 10057 WSAENOTEMPTY = 10066 WSAENOTSOCK = 10038 WSAEOPNOTSUPP = 10045 WSAEPFNOSUPPORT = 10046 WSAEPROCLIM = 10067 WSAEPROTONOSUPPORT = 10043 WSAEPROTOTYPE = 10041 WSAEPROVIDERFAILEDINIT = 10106 WSAEREFUSED = 10112 WSAEREMOTE = 10071 WSAESHUTDOWN = 10058 WSAESOCKTNOSUPPORT = 10044 WSAESTALE = 10070 WSAETIMEDOUT = 10060 WSAETOOMANYREFS = 10059 WSAEUSERS = 10068 WSAEWOULDBLOCK = 10035 WSAHOST_NOT_FOUND = 11001 WSANOTINITIALISED = 10093 WSANO_ADDRESS = 11004 WSANO_DATA = 11004 WSANO_RECOVERY = 11003 WSASERVICE_NOT_FOUND = 10108 WSASYSCALLFAILURE = 10107 WSASYSNOTREADY = 10091 WSASYS_STATUS_LEN = 128 WSATRY_AGAIN = 11002 WSATYPE_NOT_FOUND = 10109 WSAVERNOTSUPPORTED = 10092 WSA_E_CANCELLED = 10111 WSA_E_NO_MORE = 10110 WSA_QOS_ADMISSION_FAILURE = 11010 WSA_QOS_BAD_OBJECT = 11013 WSA_QOS_BAD_STYLE = 11012 WSA_QOS_EFILTERCOUNT = 11021 WSA_QOS_EFILTERSTYLE = 11019 WSA_QOS_EFILTERTYPE = 11020 WSA_QOS_EFLOWCOUNT = 11023 WSA_QOS_EFLOWDESC = 11026 WSA_QOS_EFLOWSPEC = 11017 WSA_QOS_EOBJLENGTH = 11022 WSA_QOS_EPOLICYOBJ = 11025 WSA_QOS_EPROVSPECBUF = 11018 WSA_QOS_EPSFILTERSPEC = 11028 WSA_QOS_EPSFLOWSPEC = 11027 WSA_QOS_ESDMODEOBJ = 11029 WSA_QOS_ESERVICETYPE = 11016 WSA_QOS_ESHAPERATEOBJ = 11030 WSA_QOS_EUNKNOWNPSOBJ = 11024 WSA_QOS_EUNKOWNPSOBJ = 11024 WSA_QOS_GENERIC_ERROR = 11015 WSA_QOS_NO_RECEIVERS = 11008 WSA_QOS_NO_SENDERS = 11007 WSA_QOS_POLICY_FAILURE = 11011 WSA_QOS_RECEIVERS = 11005 WSA_QOS_REQUEST_CONFIRMED = 11009 WSA_QOS_RESERVED_PETYPE = 11031 WSA_QOS_SENDERS = 11006 WSA_QOS_TRAFFIC_CTRL_ERROR = 11014 WSF_VISIBLE = 1 WS_ACTIVECAPTION = 0x0001 WS_BORDER = 8388608 WS_CAPTION = 12582912 WS_CHILD = 1073741824 WS_CHILDWINDOW = 1073741824 WS_CLIPCHILDREN = 33554432 WS_CLIPSIBLINGS = 67108864 WS_DISABLED = 134217728 WS_DLGFRAME = 4194304 WS_EX_ACCEPTFILES = 16 WS_EX_APPWINDOW = 262144 WS_EX_CLIENTEDGE = 512 WS_EX_COMPOSITED = 33554432 WS_EX_CONTEXTHELP = 1024 WS_EX_CONTROLPARENT = 65536 WS_EX_DLGMODALFRAME = 1 WS_EX_LAYERED = 0x00080000 WS_EX_LAYOUTRTL = 4194304 WS_EX_LEFT = 0 WS_EX_LEFTSCROLLBAR = 16384 WS_EX_LTRREADING = 0 WS_EX_MDICHILD = 64 WS_EX_NOACTIVATE = 134217728 WS_EX_NOINHERITLAYOUT = 1048576 WS_EX_NOPARENTNOTIFY = 4 WS_EX_OVERLAPPEDWINDOW = 768 WS_EX_PALETTEWINDOW = 392 WS_EX_RIGHT = 4096 WS_EX_RIGHTSCROLLBAR = 0 WS_EX_RTLREADING = 8192 WS_EX_STATICEDGE = 131072 WS_EX_TOOLWINDOW = 128 WS_EX_TOPMOST = 8 WS_EX_TRANSPARENT = 32 WS_EX_WINDOWEDGE = 256 WS_GROUP = 131072 WS_HSCROLL = 1048576 WS_ICONIC = 536870912 WS_MAXIMIZE = 16777216 WS_MAXIMIZEBOX = 65536 WS_MINIMIZE = 536870912 WS_MINIMIZEBOX = 131072 WS_OVERLAPPED = 0 WS_OVERLAPPEDWINDOW = 13565952 WS_POPUP = 2147483648 WS_POPUPWINDOW = 2156396544 WS_SIZEBOX = 262144 WS_SYSMENU = 524288 WS_TABSTOP = 65536 WS_THICKFRAME = 262144 WS_TILED = 0 WS_TILEDWINDOW = 13565952 WS_VISIBLE = 268435456 WS_VSCROLL = 2097152 WTS_CONSOLE_CONNECT = 0x1 WTS_CONSOLE_DISCONNECT = 0x2 WTS_REMOTE_CONNECT = 0x3 WTS_REMOTE_DISCONNECT = 0x4 WTS_SESSION_CREATE = 0xa WTS_SESSION_LOCK = 0x7 WTS_SESSION_LOGOFF = 0x6 WTS_SESSION_LOGON = 0x5 WTS_SESSION_REMOTE_CONTROL = 0x9 WTS_SESSION_TERMINATE = 0xb WTS_SESSION_UNLOCK = 0x8 WT_EXECUTEDEFAULT = 0x00000000 WT_EXECUTEDELETEWAIT = 0x00000008 WT_EXECUTEINIOTHREAD = 0x00000001 WT_EXECUTEINLONGTHREAD = 0x00000010 WT_EXECUTEINPERSISTENTIOTHREAD = 0x00000040 WT_EXECUTEINPERSISTENTTHREAD = 0x00000080 WT_EXECUTEINTIMERTHREAD = 0x00000020 WT_EXECUTEINUITHREAD = 0x00000002 WT_EXECUTEINWAITTHREAD = 0x00000004 WT_EXECUTELONGFUNCTION = 0x00000010 WT_EXECUTEONLYONCE = 0x00000008 WT_TRANSFER_IMPERSONATION = 0x00000100 WVR_ALIGNBOTTOM = 0x0040 WVR_ALIGNLEFT = 0x0020 WVR_ALIGNRIGHT = 0x0080 WVR_ALIGNTOP = 0x0010 WVR_HREDRAW = 0x0100 WVR_REDRAW = 768 WVR_VALIDRECTS = 0x0400 WVR_VREDRAW = 0x0200 W_OK = 2 X3_BTYPE_QP_INST_VAL_POS_X = 0 X3_BTYPE_QP_INST_WORD_POS_X = 23 X3_BTYPE_QP_INST_WORD_X = 2 X3_BTYPE_QP_SIZE_X = 9 X3_D_WH_INST_WORD_POS_X = 24 X3_D_WH_INST_WORD_X = 3 X3_D_WH_SIGN_VAL_POS_X = 0 X3_D_WH_SIZE_X = 3 X3_EMPTY_INST_VAL_POS_X = 0 X3_EMPTY_INST_WORD_POS_X = 14 X3_EMPTY_INST_WORD_X = 1 X3_EMPTY_SIZE_X = 2 X3_IMM20_INST_WORD_POS_X = 4 X3_IMM20_INST_WORD_X = 3 X3_IMM20_SIGN_VAL_POS_X = 0 X3_IMM20_SIZE_X = 20 X3_IMM39_1_INST_WORD_POS_X = 0 X3_IMM39_1_INST_WORD_X = 2 X3_IMM39_1_SIGN_VAL_POS_X = 36 X3_IMM39_1_SIZE_X = 23 X3_IMM39_2_INST_WORD_POS_X = 16 X3_IMM39_2_INST_WORD_X = 1 X3_IMM39_2_SIGN_VAL_POS_X = 20 X3_IMM39_2_SIZE_X = 16 X3_I_INST_WORD_POS_X = 27 X3_I_INST_WORD_X = 3 X3_I_SIGN_VAL_POS_X = 59 X3_I_SIZE_X = 1 X3_OPCODE_INST_WORD_POS_X = 28 X3_OPCODE_INST_WORD_X = 3 X3_OPCODE_SIGN_VAL_POS_X = 0 X3_OPCODE_SIZE_X = 4 X3_P_INST_WORD_POS_X = 0 X3_P_INST_WORD_X = 3 X3_P_SIGN_VAL_POS_X = 0 X3_P_SIZE_X = 4 X3_TMPLT_INST_WORD_POS_X = 0 X3_TMPLT_INST_WORD_X = 0 X3_TMPLT_SIGN_VAL_POS_X = 0 X3_TMPLT_SIZE_X = 4 X509_ASN_ENCODING = 0x1 X509_NDR_ENCODING = 0x2 XACT_E_FIRST = 0x8004D000 XACT_E_LAST = 0x8004D029 XACT_S_FIRST = 0x0004D000 XACT_S_LAST = 0x0004D010 XBUTTON1 = 0x0001 XBUTTON2 = 0x0002 XCLASS_BOOL = 0x1000 XCLASS_DATA = 0x2000 XCLASS_FLAGS = 0x4000 XCLASS_MASK = 0xFC00 XCLASS_NOTIFICATION = 0x8000 XSTATE_AVX = 2 XSTATE_GSSE = 2 XSTATE_LEGACY_FLOATING_POINT = 0 XSTATE_LEGACY_SSE = 1 XSTATE_MASK_AVX = 4 XSTATE_MASK_GSSE = 4 XSTATE_MASK_LEGACY = 3 XSTATE_MASK_LEGACY_FLOATING_POINT = 1 XSTATE_MASK_LEGACY_SSE = 2 XST_ADVACKRCVD = 13 XST_ADVDATAACKRCVD = 16 XST_ADVDATASENT = 15 XST_ADVSENT = 11 XST_CONNECTED = 2 XST_DATARCVD = 6 XST_EXECACKRCVD = 10 XST_EXECSENT = 9 XST_INCOMPLETE = 1 XST_INIT1 = 3 XST_INIT2 = 4 XST_NULL = 0 XST_POKEACKRCVD = 8 XST_POKESENT = 7 XST_REQSENT = 5 XST_UNADVACKRCVD = 14 XST_UNADVSENT = 12 XTYPF_ACKREQ = 0x0008 XTYPF_NOBLOCK = 0x0002 XTYPF_NODATA = 0x0004 XTYP_ADVDATA = 16400 XTYP_ADVREQ = 8226 XTYP_ADVSTART = 4144 XTYP_ADVSTOP = 32832 XTYP_CONNECT = 4194 XTYP_CONNECT_CONFIRM = 32882 XTYP_DISCONNECT = 32962 XTYP_ERROR = 32770 XTYP_EXECUTE = 16464 XTYP_MASK = 0x00F0 XTYP_MONITOR = 33010 XTYP_POKE = 16528 XTYP_REGISTER = 32930 XTYP_REQUEST = 8368 XTYP_SHIFT = 4 XTYP_UNREGISTER = 32978 XTYP_WILDCONNECT = 8418 XTYP_XACT_COMPLETE = 32896 X_OK = 1 ZERO_PADDING = 3 X_ADXINTRIN_H_INCLUDED = 0 X_AMD64_ = 0 X_AMMINTRIN_H_INCLUDED = 0 X_APIAPPCONTAINER_ = 0 X_APISECUREBASE_ = 0 X_APISETCCONV_ = 0 X_APISETDEBUG_ = 0 X_APISETFILE_ = 0 X_APISETHANDLE_ = 0 X_APISETLIBLOADER_ = 0 X_APISETNAMESPACE_ = 0 X_APISETREALTIME_ = 0 X_APISETSTRING_ = 0 X_APISETUTIL_ = 0 X_API_SET_H_ = 0 X_APPIDREGFLAGS_DEFINED = 0 X_AUTH_IDENTITY_DEFINED = 0 X_AVX2INTRIN_H_INCLUDED = 0 X_AVX5124FMAPSINTRIN_H_INCLUDED = 0 X_AVX5124VNNIWINTRIN_H_INCLUDED = 0 X_AVX512BITALGINTRIN_H_INCLUDED = 0 X_AVX512BWINTRIN_H_INCLUDED = 0 X_AVX512CDINTRIN_H_INCLUDED = 0 X_AVX512DQINTRIN_H_INCLUDED = 0 X_AVX512ERINTRIN_H_INCLUDED = 0 X_AVX512FINTRIN_H_INCLUDED = 0 X_AVX512IFMAINTRIN_H_INCLUDED = 0 X_AVX512IFMAVLINTRIN_H_INCLUDED = 0 X_AVX512PFINTRIN_H_INCLUDED = 0 X_AVX512VBMI2VLINTRIN_H_INCLUDED = 0 X_AVX512VBMIINTRIN_H_INCLUDED = 0 X_AVX512VBMIVLINTRIN_H_INCLUDED = 0 X_AVX512VLBWINTRIN_H_INCLUDED = 0 X_AVX512VLDQINTRIN_H_INCLUDED = 0 X_AVX512VLINTRIN_H_INCLUDED = 0 X_AVX512VNNIVLINTRIN_H_INCLUDED = 0 X_AVX512VPOPCNTDQINTRIN_H_INCLUDED = 0 X_AVX512VPOPCNTDQVLINTRIN_H_INCLUDED = 0 X_AVXINTRIN_H_INCLUDED = 0 X_A_ARCH = 0x20 X_A_HIDDEN = 0x02 X_A_NORMAL = 0x00 X_A_RDONLY = 0x01 X_A_SUBDIR = 0x10 X_A_SYSTEM = 0x04 X_BASETSD_H_ = 0 X_BEM_H_ = 0 X_BLOB_DEFINED = 0 X_BMI2INTRIN_H_INCLUDED = 0 X_BMIINTRIN_H_INCLUDED = 0 X_BOOLEAN_ = 0 X_BSDTYPES_DEFINED = 0 X_CETINTRIN_H_INCLUDED = 0 X_CLFLUSHOPTINTRIN_H_INCLUDED = 0 X_CLOCK_T_DEFINED = 0 X_CLWBINTRIN_H_INCLUDED = 0 X_CLZEROINTRIN_H_INCLUDED = 0 X_CMP_EQ_OQ = 0x00 X_CMP_EQ_OS = 0x10 X_CMP_EQ_UQ = 0x08 X_CMP_EQ_US = 0x18 X_CMP_FALSE_OQ = 0x0b X_CMP_FALSE_OS = 0x1b X_CMP_GE_OQ = 0x1d X_CMP_GE_OS = 0x0d X_CMP_GT_OQ = 0x1e X_CMP_GT_OS = 0x0e X_CMP_LE_OQ = 0x12 X_CMP_LE_OS = 0x02 X_CMP_LT_OQ = 0x11 X_CMP_LT_OS = 0x01 X_CMP_NEQ_OQ = 0x0c X_CMP_NEQ_OS = 0x1c X_CMP_NEQ_UQ = 0x04 X_CMP_NEQ_US = 0x14 X_CMP_NGE_UQ = 0x19 X_CMP_NGE_US = 0x09 X_CMP_NGT_UQ = 0x1a X_CMP_NGT_US = 0x0a X_CMP_NLE_UQ = 0x16 X_CMP_NLE_US = 0x06 X_CMP_NLT_UQ = 0x15 X_CMP_NLT_US = 0x05 X_CMP_ORD_Q = 0x07 X_CMP_ORD_S = 0x17 X_CMP_TRUE_UQ = 0x0f X_CMP_TRUE_US = 0x1f X_CMP_UNORD_Q = 0x03 X_CMP_UNORD_S = 0x13 X_COMBASEAPI_H_ = 0 X_COM_Outptr_ = 0 X_COM_Outptr_opt_ = 0 X_COM_Outptr_opt_result_maybenull_ = 0 X_COM_Outptr_result_maybenull_ = 0 X_CRT_SECURE_NO_DEPRECATE = 0 X_CY_DEFINED = 0 X_Const_ = 0 X_DATETIMEAPI_H_ = 0 X_DCOMSCM_REMOTECALL_FLAGS_DEFINED = 0 X_DDEHEADER_INCLUDED_ = 0 X_DEF_WINBOOL_ = 0 X_DEVIOCTL_ = 0 X_DEV_T_DEFINED = 0 X_DISKFREE_T_DEFINED = 0 X_DLGSH_INCLUDED_ = 0 X_DWORDLONG_ = 0 X_EMMINTRIN_H_INCLUDED = 0 X_ERRHANDLING_H_ = 0 X_ERROR_STATUS_T_DEFINED = 0 X_F16CINTRIN_H_INCLUDED = 0 X_FD_SET_WINSOCK_DEFINED = 0 X_FIBERS_H_ = 0 X_FILESYSTEMFSCTL_ = 0 X_FILETIME_ = 0 X_FILE_OFFSET_BITS_SET_LSEEK = 0 X_FINDDATA_T_DEFINED = 0 X_FLT_WINERROR_ = 0 X_FMA4INTRIN_H_INCLUDED = 0 X_FMAINTRIN_H_INCLUDED = 0 X_FORCENAMELESSUNION = 1 X_FSIZE_T_DEFINED = 0 X_FXSRINTRIN_H_INCLUDED = 0 X_Field_z_ = 0 X_GETDISKFREE_DEFINED = 0 X_GFNIINTRIN_H_INCLUDED = 0 X_GUIDDEF_H_ = 0 X_HEAPAPI_H_ = 0 X_HITLOGGING_DEFINED = 0 X_HPOWERNOTIFY_DEF_ = 0 X_HRESULT_DEFINED = 0 X_HYPER_DEFINED = 0 X_IMMINTRIN_H_INCLUDED = 0 X_IMM_ = 0 X_IMM_SDK_DEFINED_ = 0 X_INC_CDERR = 0 X_INC_COMMDLG = 0 X_INC_CRT_UNICODE_MACROS = 2 X_INC_DDEMLH = 0 X_INC_DIRECT = 0 X_INC_ERRNO = 0 X_INC_EXCPT = 0 X_INC_FCNTL = 0 X_INC_MMSYSTEM = 0 X_INC_SDKDDKVER = 0 X_INC_SHELLAPI = 0 X_INC_STAT = 0 X_INC_TYPES = 0 X_INC_VIRTDISK = 0 X_INC_WINAPIFAMILY = 0 X_INC_WINDOWS = 0 X_INC_WTIME_INL = 0 X_INC_WTIME_S_INL = 0 X_INO_T_DEFINED = 0 X_INTERLOCKAPI_H_ = 0 X_INTRIN_MAC_ = 0 X_IO_APISET_H_ = 0 X_IO_H_ = 0 X_In_ = 0 X_In_opt_ = 0 X_In_opt_z_ = 0 X_In_z_ = 0 X_Inout_ = 0 X_Inout_opt_ = 0 X_Inout_opt_z_ = 0 X_Inout_z_ = 0 X_JOBAPISET_H_ = 0 X_KTMTYPES_ = 0 X_LANGID_DEFINED = 0 X_LARGE_INTEGER_DEFINED = 0 X_LCID_DEFINED = 0 X_LDT_ENTRY_DEFINED = 0 X_LIST_ENTRY_DEFINED = 0 X_LOGPALETTE_DEFINED = 0 X_LPAUTHENTICATIONEX_DEFINED = 0 X_LPAUTHENTICATION_DEFINED = 0 X_LPBINDCALLBACKREDIRECT_DEFINED = 0 X_LPBINDHOST_DEFINED = 0 X_LPBINDING_DEFINED = 0 X_LPBINDPROTOCOL_DEFINED = 0 X_LPBINDSTATUSCALLBACKEX_DEFINED = 0 X_LPBINDSTATUSCALLBACK_DEFINED = 0 X_LPBLOB_DEFINED = 0 X_LPCATALOGFILEINFO_DEFINED = 0 X_LPCBYTE_DEFINED = 0 X_LPCODEINSTALL_DEFINED = 0 X_LPCVOID_DEFINED = 0 X_LPDATAFILTER_DEFINED = 0 X_LPENCODINGFILTERFACTORY_DEFINED = 0 X_LPGETBINDHANDLE_DEFINED = 0 X_LPHTTPNEGOTIATE2_DEFINED = 0 X_LPHTTPNEGOTIATE3_DEFINED = 0 X_LPHTTPNEGOTIATE_DEFINED = 0 X_LPHTTPSECURITY_DEFINED = 0 X_LPIINTERNET = 0 X_LPIINTERNETBINDINFO = 0 X_LPIINTERNETBINDINFOEX = 0 X_LPIINTERNETPRIORITY_DEFINED = 0 X_LPIINTERNETPROTOCOLINFO_DEFINED = 0 X_LPIINTERNETPROTOCOLROOT_DEFINED = 0 X_LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED = 0 X_LPIINTERNETPROTOCOLSINK_DEFINED = 0 X_LPIINTERNETPROTOCOL_DEFINED = 0 X_LPIINTERNETSESSION_DEFINED = 0 X_LPIINTERNETTHREADSWITCH_DEFINED = 0 X_LPINTERNETHOSTSECURITYMANANGER_DEFINED = 0 X_LPINTERNETSECURITYMANANGER_DEFINED = 0 X_LPINTERNETSECURITYMGRSITE_DEFINED = 0 X_LPINTERNETZONEMANAGER_DEFINED = 0 X_LPIWRAPPEDPROTOCOL_DEFINED = 0 X_LPMONIKERPROP_DEFINED = 0 X_LPPERSISTMONIKER_DEFINED = 0 X_LPSOFTDISTEXT_DEFINED = 0 X_LPWINDOWFORBINDINGUI_DEFINED = 0 X_LPWININETFILESTREAM_DEFINED = 0 X_LPWININETHTTPINFO_DEFINED = 0 X_LPWININETHTTPTIMEOUTS_DEFINED = 0 X_LPWININETINFO_DEFINED = 0 X_LWPINTRIN_H_INCLUDED = 0 X_LZCNTINTRIN_H_INCLUDED = 0 X_LZEXPAND_ = 0 X_MCIDEVICEID_ = 0 X_MCIERROR_ = 0 X_MCX_H_ = 0 X_MEMORYAPI_H_ = 0 X_MINGW_IP_MREQ1_H = 0 X_MINGW_IP_TYPES_H = 0 X_MINWINBASE_ = 0 X_MINWINDEF_ = 0 X_MM3DNOW_H_INCLUDED = 0 X_MMINTRIN_H_INCLUDED = 0 X_MMRESULT_ = 0 X_MM_CMPINT_EQ = 0x0 X_MM_CMPINT_GE = 0x5 X_MM_CMPINT_GT = 0x6 X_MM_CMPINT_LE = 0x2 X_MM_CMPINT_LT = 0x1 X_MM_CMPINT_NE = 0x4 X_MM_CMPINT_NLE = 0x6 X_MM_CMPINT_NLT = 0x5 X_MM_CMPINT_UNUSED = 0x3 X_MM_DENORMALS_ZERO_MASK = 0x0040 X_MM_DENORMALS_ZERO_OFF = 0x0000 X_MM_DENORMALS_ZERO_ON = 0x0040 X_MM_EXCEPT_DENORM = 0x0002 X_MM_EXCEPT_DIV_ZERO = 0x0004 X_MM_EXCEPT_INEXACT = 0x0020 X_MM_EXCEPT_INVALID = 0x0001 X_MM_EXCEPT_MASK = 0x003f X_MM_EXCEPT_OVERFLOW = 0x0008 X_MM_EXCEPT_UNDERFLOW = 0x0010 X_MM_FLUSH_ZERO_MASK = 0x8000 X_MM_FLUSH_ZERO_OFF = 0x0000 X_MM_FLUSH_ZERO_ON = 0x8000 X_MM_FROUND_CEIL = 2 X_MM_FROUND_CUR_DIRECTION = 0x04 X_MM_FROUND_FLOOR = 1 X_MM_FROUND_NEARBYINT = 12 X_MM_FROUND_NINT = 0 X_MM_FROUND_NO_EXC = 0x08 X_MM_FROUND_RAISE_EXC = 0x00 X_MM_FROUND_RINT = 4 X_MM_FROUND_TO_NEAREST_INT = 0x00 X_MM_FROUND_TO_NEG_INF = 0x01 X_MM_FROUND_TO_POS_INF = 0x02 X_MM_FROUND_TO_ZERO = 0x03 X_MM_FROUND_TRUNC = 3 X_MM_MASK_DENORM = 0x0100 X_MM_MASK_DIV_ZERO = 0x0200 X_MM_MASK_INEXACT = 0x1000 X_MM_MASK_INVALID = 0x0080 X_MM_MASK_MASK = 0x1f80 X_MM_MASK_OVERFLOW = 0x0400 X_MM_MASK_UNDERFLOW = 0x0800 X_MM_ROUND_DOWN = 0x2000 X_MM_ROUND_MASK = 0x6000 X_MM_ROUND_NEAREST = 0x0000 X_MM_ROUND_TOWARD_ZERO = 0x6000 X_MM_ROUND_UP = 0x4000 X_MODE_T_ = 0 X_MOVDIRINTRIN_H_INCLUDED = 0 X_MWAITXINTRIN_H_INCLUDED = 0 X_Maybe_raises_SEH_exception_ = 0 X_Must_inspect_result_ = 0 X_NAMEDPIPE_H_ = 0 X_NTDDDISK_H_ = 0 X_NTDDSCRD_H2_ = 0 X_NTDDSTOR_H_ = 0 X_NTDDTAPE_WINNT_ = 0 X_NTSTATUS_PSDK = 0 X_NTTMAPI_ = 0 X_NT_TIB_DEFINED = 0 X_NullNull_terminated_ = 0 X_Null_terminated_ = 0 X_OBJBASE_H_ = 0 X_OBJIDLBASE_ = 0 X_OLE2_H_ = 0 X_OLEAUTO_H_ = 0 X_O_ACCMODE = 3 X_O_APPEND = 0x0008 X_O_BINARY = 0x8000 X_O_CREAT = 0x0100 X_O_EXCL = 0x0400 X_O_NOINHERIT = 0x0080 X_O_RANDOM = 0x0010 X_O_RAW = 32768 X_O_RDONLY = 0x0000 X_O_RDWR = 0x0002 X_O_SEQUENTIAL = 0x0020 X_O_SHORT_LIVED = 0x1000 X_O_TEMPORARY = 0x0040 X_O_TEXT = 0x4000 X_O_TRUNC = 0x0200 X_O_U16TEXT = 0x20000 X_O_U8TEXT = 0x40000 X_O_WRONLY = 0x0001 X_O_WTEXT = 0x10000 X_Out_ = 0 X_Out_opt_ = 0 X_Outptr_ = 0 X_Outptr_opt_ = 0 X_Outptr_opt_result_maybenull_ = 0 X_Outptr_opt_result_maybenull_z_ = 0 X_Outptr_opt_result_nullonfailure_ = 0 X_Outptr_opt_result_z_ = 0 X_Outptr_result_maybenull_ = 0 X_Outptr_result_maybenull_z_ = 0 X_Outptr_result_nullonfailure_ = 0 X_Outptr_result_z_ = 0 X_Outref_ = 0 X_Outref_result_maybenull_ = 0 X_Outref_result_nullonfailure_ = 0 X_PALETTEENTRY_DEFINED = 0 X_PCONFIGINTRIN_H_INCLUDED = 0 X_PID_T_ = 0 X_PKUINTRIN_H_INCLUDED = 0 X_PMMINTRIN_H_INCLUDED = 0 X_POPCNTINTRIN_H_INCLUDED = 0 X_POSIX_CPUTIME = 200809 X_POSIX_MONOTONIC_CLOCK = 200809 X_POSIX_THREAD_CPUTIME = 200809 X_POSIX_TIMERS = 200809 X_PRFCHWINTRIN_H_INCLUDED = 0 X_PROCESSENV_ = 0 X_PROCESSTHREADSAPI_H_ = 0 X_PROCESSTOPOLOGYAPI_H_ = 0 X_PROFILEAPI_H_ = 0 X_PROPVARIANTINIT_DEFINED_ = 0 X_PROVIDER_STRUCTS_DEFINED = 0 X_PRSHT_H_ = 0 X_Printf_format_string_ = 0 X_RDSEEDINTRIN_H_INCLUDED = 0 X_REFCLSID_DEFINED = 0 X_REFFMTID_DEFINED = 0 X_REFGUID_DEFINED = 0 X_REFIID_DEFINED = 0 X_REFPROPVARIANT_DEFINED = 0 X_REFVARIANT_DEFINED = 0 X_ROTFLAGS_DEFINED = 0 X_ROTREGFLAGS_DEFINED = 0 X_ROT_COMPARE_MAX_DEFINED = 0 X_RTL_RUN_ONCE_DEF = 1 X_RTMINTRIN_H_INCLUDED = 0 X_Raises_SEH_exception_ = 0 X_Reserved_ = 0 X_Result_nullonfailure_ = 0 X_Result_zeroonfailure_ = 0 X_Ret_maybenull_ = 0 X_Ret_maybenull_z_ = 0 X_Ret_notnull_ = 0 X_Ret_null_ = 0 X_Ret_z_ = 0 X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 X_SERIALIZEDPROPERTYVALUE_DEFINED_ = 0 X_SGXINTRIN_H_INCLUDED = 0 X_SHAINTRIN_H_INCLUDED = 0 X_SIDD_BIT_MASK = 0x00 X_SIDD_CMP_EQUAL_ANY = 0x00 X_SIDD_CMP_EQUAL_EACH = 0x08 X_SIDD_CMP_EQUAL_ORDERED = 0x0c X_SIDD_CMP_RANGES = 0x04 X_SIDD_LEAST_SIGNIFICANT = 0x00 X_SIDD_MASKED_NEGATIVE_POLARITY = 0x30 X_SIDD_MASKED_POSITIVE_POLARITY = 0x20 X_SIDD_MOST_SIGNIFICANT = 0x40 X_SIDD_NEGATIVE_POLARITY = 0x10 X_SIDD_POSITIVE_POLARITY = 0x00 X_SIDD_SBYTE_OPS = 0x02 X_SIDD_SWORD_OPS = 0x03 X_SIDD_UBYTE_OPS = 0x00 X_SIDD_UNIT_MASK = 0x40 X_SIDD_UWORD_OPS = 0x01 X_SIGSET_T_ = 0 X_SLIST_HEADER_ = 0 X_SMMINTRIN_H_INCLUDED = 0 X_STAT_DEFINED = 0 X_STRALIGN_USE_SECURE_CRT = 0 X_SYNCHAPI_H_ = 0 X_SYSINFOAPI_H_ = 0 X_SYSTEMTIME_ = 0 X_SYSTEMTOPOLOGY_H_ = 0 X_SYS_GUID_OPERATORS_ = 0 X_SYS_GUID_OPERATOR_EQ_ = 0 X_S_IEXEC = 0x0040 X_S_IFBLK = 0x3000 X_S_IFCHR = 0x2000 X_S_IFDIR = 0x4000 X_S_IFIFO = 0x1000 X_S_IFMT = 0xF000 X_S_IFREG = 0x8000 X_S_IREAD = 0x0100 X_S_IRUSR = 256 X_S_IRWXU = 448 X_S_IWRITE = 0x0080 X_S_IWUSR = 128 X_S_IXUSR = 64 X_Scanf_format_string_ = 0 X_Scanf_s_format_string_ = 0 X_TBMINTRIN_H_INCLUDED = 0 X_TEXTMETRIC_DEFINED = 0 X_THREADPOOLAPISET_H_ = 0 X_THREADPOOLLEGACYAPISET_H_ = 0 X_TIMEB_DEFINED = 0 X_TIMEB_H_ = 0 X_TIMEB_H_S = 0 X_TIMESPEC_DEFINED = 0 X_TIMEVAL_DEFINED = 0 X_TIMEZONEAPI_H_ = 0 X_TIMEZONE_DEFINED = 0 X_TIME_H_ = 0 X_TMMINTRIN_H_INCLUDED = 0 X_TM_DEFINED = 0 X_ULONGLONG_ = 0 X_Use_decl_annotations_ = 0 X_VPCLMULQDQINTRIN_H_INCLUDED = 0 X_WAVEFORMATEX_ = 0 X_WBNOINVDINTRIN_H_INCLUDED = 0 X_WDIRECT_DEFINED = 0 X_WFINDDATA_T_DEFINED = 0 X_WIN32_IE = 1538 X_WIN32_IE_IE100 = 0x0a00 X_WIN32_IE_IE20 = 0x0200 X_WIN32_IE_IE30 = 0x0300 X_WIN32_IE_IE302 = 0x0302 X_WIN32_IE_IE40 = 0x0400 X_WIN32_IE_IE401 = 0x0401 X_WIN32_IE_IE50 = 0x0500 X_WIN32_IE_IE501 = 0x0501 X_WIN32_IE_IE55 = 0x0550 X_WIN32_IE_IE60 = 0x0600 X_WIN32_IE_IE60SP1 = 0x0601 X_WIN32_IE_IE60SP2 = 0x0603 X_WIN32_IE_IE70 = 0x0700 X_WIN32_IE_IE80 = 0x0800 X_WIN32_IE_IE90 = 0x0900 X_WIN32_IE_LONGHORN = 1792 X_WIN32_IE_NT4 = 512 X_WIN32_IE_NT4SP1 = 512 X_WIN32_IE_NT4SP2 = 512 X_WIN32_IE_NT4SP3 = 770 X_WIN32_IE_NT4SP4 = 1025 X_WIN32_IE_NT4SP5 = 1025 X_WIN32_IE_NT4SP6 = 1280 X_WIN32_IE_WIN2K = 1281 X_WIN32_IE_WIN2KSP1 = 1281 X_WIN32_IE_WIN2KSP2 = 1281 X_WIN32_IE_WIN2KSP3 = 1281 X_WIN32_IE_WIN2KSP4 = 1281 X_WIN32_IE_WIN6 = 1792 X_WIN32_IE_WIN7 = 2048 X_WIN32_IE_WIN8 = 2560 X_WIN32_IE_WIN98 = 1025 X_WIN32_IE_WIN98SE = 1280 X_WIN32_IE_WINBLUE = 2560 X_WIN32_IE_WINME = 1360 X_WIN32_IE_WS03 = 0x0602 X_WIN32_IE_WS03SP1 = 1539 X_WIN32_IE_XP = 1536 X_WIN32_IE_XPSP1 = 1537 X_WIN32_IE_XPSP2 = 1539 X_WIN32_WINNT_LONGHORN = 0x0600 X_WIN32_WINNT_NT4 = 0x0400 X_WIN32_WINNT_VISTA = 0x0600 X_WIN32_WINNT_WIN10 = 0x0A00 X_WIN32_WINNT_WIN2K = 0x0500 X_WIN32_WINNT_WIN6 = 0x0600 X_WIN32_WINNT_WIN7 = 0x0601 X_WIN32_WINNT_WIN8 = 0x0602 X_WIN32_WINNT_WINBLUE = 0x0603 X_WIN32_WINNT_WINTHRESHOLD = 0x0A00 X_WIN32_WINNT_WINXP = 0x0501 X_WIN32_WINNT_WS03 = 0x0502 X_WIN32_WINNT_WS08 = 0x0600 X_WINBASE_ = 0 X_WINCON_ = 0 X_WINDEF_ = 0 X_WINDOWS_ = 0 X_WINERROR_ = 0 X_WINGDI_ = 0 X_WINIOCTL_ = 0 X_WINNETWK_ = 0 X_WINNLS_ = 0 X_WINNT_ = 0 X_WINPERF_ = 0 X_WINREG_ = 0 X_WINSCARD_H_ = 0 X_WINSOCKAPI_ = 0 X_WINSPOOL_ = 0 X_WINSVC_ = 0 X_WINUSER_ = 0 X_WIO_DEFINED = 0 X_WMMINTRIN_H_INCLUDED = 0 X_WNNC_ = 0 X_WOW64APISET_H_ = 0 X_WSTAT_DEFINED = 0 X_WTIME_DEFINED = 0 X_X86INTRIN_H_INCLUDED = 0 X_XABORT_CAPACITY = 8 X_XABORT_CONFLICT = 4 X_XABORT_DEBUG = 16 X_XABORT_EXPLICIT = 1 X_XABORT_NESTED = 32 X_XABORT_RETRY = 2 X_XBEGIN_STARTED = 18446744073709551615 X_XFORM_ = 0 X_XHRPLUGGABLEPROTOCOL_DEFINED = 0 X_XMMINTRIN_H_INCLUDED = 0 X_XOPMMINTRIN_H_INCLUDED = 0 X_XSAVECINTRIN_H_INCLUDED = 0 X_XSAVEINTRIN_H_INCLUDED = 0 X_XSAVEOPTINTRIN_H_INCLUDED = 0 X_XSAVESINTRIN_H_INCLUDED = 0 X_XTESTINTRIN_H_INCLUDED = 0 X_huge = 0 X_loadds = 0 X_tagBLOB_DEFINED = 0 X_tagBSTRBLOB_DEFINED = 0 X_tagCY_DEFINED = 0 CPRIV_KEY_CACHE_MAX_ITEMS_DEFAULT = 20 CPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS_DEFAULT = 86400 CbNDRContext = 20 Cdecl = 0 Chx1 = 0x0410 Chx10 = 0x0419 Chx11 = 0x041a Chx12 = 0x041b Chx13 = 0x041c Chx14 = 0x041d Chx15 = 0x041e Chx16 = 0x041f Chx2 = 0x0411 Chx3 = 0x0412 Chx4 = 0x0413 Chx5 = 0x0414 Chx6 = 0x0415 Chx7 = 0x0416 Chx8 = 0x0417 Chx9 = 0x0418 Cmb1 = 0x0470 Cmb10 = 0x0479 Cmb11 = 0x047a Cmb12 = 0x047b Cmb13 = 0x047c Cmb14 = 0x047d Cmb15 = 0x047e Cmb16 = 0x047f Cmb2 = 0x0471 Cmb3 = 0x0472 Cmb4 = 0x0473 Cmb5 = 0x0474 Cmb6 = 0x0475 Cmb7 = 0x0476 Cmb8 = 0x0477 Cmb9 = 0x0478 Ctl1 = 0x04A0 CtlFirst = 0x0400 CtlLast = 0x04ff DwFORCE_KEY_PROTECTION_DISABLED = 0x0 DwFORCE_KEY_PROTECTION_HIGH = 0x2 DwFORCE_KEY_PROTECTION_USER_SELECT = 0x1 Edt1 = 0x0480 Edt10 = 0x0489 Edt11 = 0x048a Edt12 = 0x048b Edt13 = 0x048c Edt14 = 0x048d Edt15 = 0x048e Edt16 = 0x048f Edt2 = 0x0481 Edt3 = 0x0482 Edt4 = 0x0483 Edt5 = 0x0484 Edt6 = 0x0485 Edt7 = 0x0486 Edt8 = 0x0487 Edt9 = 0x0488 Far = 0 Frm1 = 0x0434 Frm2 = 0x0435 Frm3 = 0x0436 Frm4 = 0x0437 Grp1 = 0x0430 Grp2 = 0x0431 Grp3 = 0x0432 Grp4 = 0x0433 Ico1 = 0x043c Ico2 = 0x043d Ico3 = 0x043e Ico4 = 0x043f Lst1 = 0x0460 Lst10 = 0x0469 Lst11 = 0x046a Lst12 = 0x046b Lst13 = 0x046c Lst14 = 0x046d Lst15 = 0x046e Lst16 = 0x046f Lst2 = 0x0461 Lst3 = 0x0462 Lst4 = 0x0463 Lst5 = 0x0464 Lst6 = 0x0465 Lst7 = 0x0466 Lst8 = 0x0467 Lst9 = 0x0468 Near = 0 Pascal = 0 Psh1 = 0x0400 Psh10 = 0x0409 Psh11 = 0x040a Psh12 = 0x040b Psh13 = 0x040c Psh14 = 0x040d Psh15 = 0x040e Psh16 = 0x040f Psh2 = 0x0401 Psh3 = 0x0402 Psh4 = 0x0403 Psh5 = 0x0404 Psh6 = 0x0405 Psh7 = 0x0406 Psh8 = 0x0407 Psh9 = 0x0408 PshHelp = 1038 Rad1 = 0x0420 Rad10 = 0x0429 Rad11 = 0x042a Rad12 = 0x042b Rad13 = 0x042c Rad14 = 0x042d Rad15 = 0x042e Rad16 = 0x042f Rad2 = 0x0421 Rad3 = 0x0422 Rad4 = 0x0423 Rad5 = 0x0424 Rad6 = 0x0425 Rad7 = 0x0426 Rad8 = 0x0427 Rad9 = 0x0428 Rct1 = 0x0438 Rct2 = 0x0439 Rct3 = 0x043a Rct4 = 0x043b Scr1 = 0x0490 Scr2 = 0x0491 Scr3 = 0x0492 Scr4 = 0x0493 Scr5 = 0x0494 Scr6 = 0x0495 Scr7 = 0x0496 Scr8 = 0x0497 Stc1 = 0x0440 Stc10 = 0x0449 Stc11 = 0x044a Stc12 = 0x044b Stc13 = 0x044c Stc14 = 0x044d Stc15 = 0x044e Stc16 = 0x044f Stc17 = 0x0450 Stc18 = 0x0451 Stc19 = 0x0452 Stc2 = 0x0441 Stc20 = 0x0453 Stc21 = 0x0454 Stc22 = 0x0455 Stc23 = 0x0456 Stc24 = 0x0457 Stc25 = 0x0458 Stc26 = 0x0459 Stc27 = 0x045a Stc28 = 0x045b Stc29 = 0x045c Stc3 = 0x0442 Stc30 = 0x045d Stc31 = 0x045e Stc32 = 0x045f Stc4 = 0x0443 Stc5 = 0x0444 Stc6 = 0x0445 Stc7 = 0x0446 Stc8 = 0x0447 Stc9 = 0x0448 SzFORCE_KEY_PROTECTION = "ForceKeyProtection" SzKEY_CACHE_ENABLED = "CachePrivateKeys" SzKEY_CACHE_SECONDS = "PrivateKeyLifetimeSeconds" SzKEY_CRYPTOAPI_PRIVATE_KEY_OPTIONS = "Software\\Policies\\Microsoft\\Cryptography" SzOID_ANSI_X942 = "1.2.840.10046" SzOID_ANSI_X942_DH = "1.2.840.10046.2.1" SzOID_ANY_APPLICATION_POLICY = "1.3.6.1.4.1.311.10.12.1" SzOID_ANY_CERT_POLICY = "2.5.29.32.0" SzOID_ANY_ENHANCED_KEY_USAGE = "2.5.29.37.0" SzOID_APPLICATION_CERT_POLICIES = "1.3.6.1.4.1.311.21.10" SzOID_APPLICATION_POLICY_CONSTRAINTS = "1.3.6.1.4.1.311.21.12" SzOID_APPLICATION_POLICY_MAPPINGS = "1.3.6.1.4.1.311.21.11" SzOID_ARCHIVED_KEY_ATTR = "1.3.6.1.4.1.311.21.13" SzOID_ARCHIVED_KEY_CERT_HASH = "1.3.6.1.4.1.311.21.16" SzOID_AUTHORITY_INFO_ACCESS = "1.3.6.1.5.5.7.1.1" SzOID_AUTHORITY_KEY_IDENTIFIER = "2.5.29.1" SzOID_AUTHORITY_KEY_IDENTIFIER2 = "2.5.29.35" SzOID_AUTHORITY_REVOCATION_LIST = "2.5.4.38" SzOID_AUTO_ENROLL_CTL_USAGE = "1.3.6.1.4.1.311.20.1" SzOID_BACKGROUND_OTHER_LOGOTYPE = "1.3.6.1.5.5.7.20.2" SzOID_BASIC_CONSTRAINTS = "2.5.29.10" SzOID_BASIC_CONSTRAINTS2 = "2.5.29.19" SzOID_BIOMETRIC_EXT = "1.3.6.1.5.5.7.1.2" SzOID_BUSINESS_CATEGORY = "2.5.4.15" SzOID_CA_CERTIFICATE = "2.5.4.37" SzOID_CERTIFICATE_REVOCATION_LIST = "2.5.4.39" SzOID_CERTIFICATE_TEMPLATE = "1.3.6.1.4.1.311.21.7" SzOID_CERTSRV_CA_VERSION = "1.3.6.1.4.1.311.21.1" SzOID_CERTSRV_CROSSCA_VERSION = "1.3.6.1.4.1.311.21.22" SzOID_CERTSRV_PREVIOUS_CERT_HASH = "1.3.6.1.4.1.311.21.2" SzOID_CERT_DISALLOWED_FILETIME_PROP_ID = "1.3.6.1.4.1.311.10.11.104" SzOID_CERT_EXTENSIONS = "1.3.6.1.4.1.311.2.1.14" SzOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.28" SzOID_CERT_KEY_IDENTIFIER_PROP_ID = "1.3.6.1.4.1.311.10.11.20" SzOID_CERT_MANIFOLD = "1.3.6.1.4.1.311.20.3" SzOID_CERT_MD5_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.4" SzOID_CERT_POLICIES = "2.5.29.32" SzOID_CERT_POLICIES_95 = "2.5.29.3" SzOID_CERT_POLICIES_95_QUALIFIER1 = "2.16.840.1.113733.1.7.1.1" SzOID_CERT_PROP_ID_PREFIX = "1.3.6.1.4.1.311.10.11." SzOID_CERT_SIGNATURE_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.15" SzOID_CERT_STRONG_KEY_OS_1 = "1.3.6.1.4.1.311.72.2.1" SzOID_CERT_STRONG_KEY_OS_PREFIX = "1.3.6.1.4.1.311.72.2." SzOID_CERT_STRONG_SIGN_OS_1 = "1.3.6.1.4.1.311.72.1.1" SzOID_CERT_STRONG_SIGN_OS_PREFIX = "1.3.6.1.4.1.311.72.1." SzOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.29" SzOID_CMC = "1.3.6.1.5.5.7.7" SzOID_CMC_ADD_ATTRIBUTES = "1.3.6.1.4.1.311.10.10.1" SzOID_CMC_ADD_EXTENSIONS = "1.3.6.1.5.5.7.7.8" SzOID_CMC_DATA_RETURN = "1.3.6.1.5.5.7.7.4" SzOID_CMC_DECRYPTED_POP = "1.3.6.1.5.5.7.7.10" SzOID_CMC_ENCRYPTED_POP = "1.3.6.1.5.5.7.7.9" SzOID_CMC_GET_CERT = "1.3.6.1.5.5.7.7.15" SzOID_CMC_GET_CRL = "1.3.6.1.5.5.7.7.16" SzOID_CMC_IDENTIFICATION = "1.3.6.1.5.5.7.7.2" SzOID_CMC_IDENTITY_PROOF = "1.3.6.1.5.5.7.7.3" SzOID_CMC_ID_CONFIRM_CERT_ACCEPTANCE = "1.3.6.1.5.5.7.7.24" SzOID_CMC_ID_POP_LINK_RANDOM = "1.3.6.1.5.5.7.7.22" SzOID_CMC_ID_POP_LINK_WITNESS = "1.3.6.1.5.5.7.7.23" SzOID_CMC_LRA_POP_WITNESS = "1.3.6.1.5.5.7.7.11" SzOID_CMC_QUERY_PENDING = "1.3.6.1.5.5.7.7.21" SzOID_CMC_RECIPIENT_NONCE = "1.3.6.1.5.5.7.7.7" SzOID_CMC_REG_INFO = "1.3.6.1.5.5.7.7.18" SzOID_CMC_RESPONSE_INFO = "1.3.6.1.5.5.7.7.19" SzOID_CMC_REVOKE_REQUEST = "1.3.6.1.5.5.7.7.17" SzOID_CMC_SENDER_NONCE = "1.3.6.1.5.5.7.7.6" SzOID_CMC_STATUS_INFO = "1.3.6.1.5.5.7.7.1" SzOID_CMC_TRANSACTION_ID = "1.3.6.1.5.5.7.7.5" SzOID_COMMON_NAME = "2.5.4.3" SzOID_COUNTRY_NAME = "2.5.4.6" SzOID_CRL_DIST_POINTS = "2.5.29.31" SzOID_CRL_NEXT_PUBLISH = "1.3.6.1.4.1.311.21.4" SzOID_CRL_NUMBER = "2.5.29.20" SzOID_CRL_REASON_CODE = "2.5.29.21" SzOID_CRL_SELF_CDP = "1.3.6.1.4.1.311.21.14" SzOID_CRL_VIRTUAL_BASE = "1.3.6.1.4.1.311.21.3" SzOID_CROSS_CERTIFICATE_PAIR = "2.5.4.40" SzOID_CROSS_CERT_DIST_POINTS = "1.3.6.1.4.1.311.10.9.1" SzOID_CTL = "1.3.6.1.4.1.311.10.1" SzOID_CT_PKI_DATA = "1.3.6.1.5.5.7.12.2" SzOID_CT_PKI_RESPONSE = "1.3.6.1.5.5.7.12.3" SzOID_DELTA_CRL_INDICATOR = "2.5.29.27" SzOID_DESCRIPTION = "2.5.4.13" SzOID_DESTINATION_INDICATOR = "2.5.4.27" SzOID_DEVICE_SERIAL_NUMBER = "2.5.4.5" SzOID_DH_SINGLE_PASS_STDDH_SHA1_KDF = "1.3.133.16.840.63.0.2" SzOID_DH_SINGLE_PASS_STDDH_SHA256_KDF = "1.3.132.1.11.1" SzOID_DH_SINGLE_PASS_STDDH_SHA384_KDF = "1.3.132.1.11.2" SzOID_DISALLOWED_LIST = "1.3.6.1.4.1.311.10.3.30" SzOID_DN_QUALIFIER = "2.5.4.46" SzOID_DOMAIN_COMPONENT = "0.9.2342.19200300.100.1.25" SzOID_DRM = "1.3.6.1.4.1.311.10.5.1" SzOID_DRM_INDIVIDUALIZATION = "1.3.6.1.4.1.311.10.5.2" SzOID_DS = "2.5" SzOID_DSALG = "2.5.8" SzOID_DSALG_CRPT = "2.5.8.1" SzOID_DSALG_HASH = "2.5.8.2" SzOID_DSALG_RSA = "2.5.8.1.1" SzOID_DSALG_SIGN = "2.5.8.3" SzOID_DS_EMAIL_REPLICATION = "1.3.6.1.4.1.311.21.19" SzOID_ECC_CURVE_P256 = "1.2.840.10045.3.1.7" SzOID_ECC_CURVE_P384 = "1.3.132.0.34" SzOID_ECC_CURVE_P521 = "1.3.132.0.35" SzOID_ECC_PUBLIC_KEY = "1.2.840.10045.2.1" SzOID_ECDSA_SHA1 = "1.2.840.10045.4.1" SzOID_ECDSA_SHA256 = "1.2.840.10045.4.3.2" SzOID_ECDSA_SHA384 = "1.2.840.10045.4.3.3" SzOID_ECDSA_SHA512 = "1.2.840.10045.4.3.4" SzOID_ECDSA_SPECIFIED = "1.2.840.10045.4.3" SzOID_EFS_RECOVERY = "1.3.6.1.4.1.311.10.3.4.1" SzOID_EMBEDDED_NT_CRYPTO = "1.3.6.1.4.1.311.10.3.8" SzOID_ENCRYPTED_KEY_HASH = "1.3.6.1.4.1.311.21.21" SzOID_ENHANCED_KEY_USAGE = "2.5.29.37" SzOID_ENROLLMENT_AGENT = "1.3.6.1.4.1.311.20.2.1" SzOID_ENROLLMENT_CSP_PROVIDER = "1.3.6.1.4.1.311.13.2.2" SzOID_ENROLLMENT_NAME_VALUE_PAIR = "1.3.6.1.4.1.311.13.2.1" SzOID_ENROLL_CERTTYPE_EXTENSION = "1.3.6.1.4.1.311.20.2" SzOID_ENTERPRISE_OID_ROOT = "1.3.6.1.4.1.311.21.8" SzOID_EV_RDN_COUNTRY = "1.3.6.1.4.1.311.60.2.1.3" SzOID_EV_RDN_LOCALE = "1.3.6.1.4.1.311.60.2.1.1" SzOID_EV_RDN_STATE_OR_PROVINCE = "1.3.6.1.4.1.311.60.2.1.2" SzOID_FACSIMILE_TELEPHONE_NUMBER = "2.5.4.23" SzOID_FRESHEST_CRL = "2.5.29.46" SzOID_GIVEN_NAME = "2.5.4.42" SzOID_INFOSEC = "2.16.840.1.101.2.1" SzOID_INFOSEC_SuiteAConfidentiality = "2.16.840.1.101.2.1.1.14" SzOID_INFOSEC_SuiteAIntegrity = "2.16.840.1.101.2.1.1.15" SzOID_INFOSEC_SuiteAKMandSig = "2.16.840.1.101.2.1.1.18" SzOID_INFOSEC_SuiteAKeyManagement = "2.16.840.1.101.2.1.1.17" SzOID_INFOSEC_SuiteASignature = "2.16.840.1.101.2.1.1.13" SzOID_INFOSEC_SuiteATokenProtection = "2.16.840.1.101.2.1.1.16" SzOID_INFOSEC_mosaicConfidentiality = "2.16.840.1.101.2.1.1.4" SzOID_INFOSEC_mosaicIntegrity = "2.16.840.1.101.2.1.1.6" SzOID_INFOSEC_mosaicKMandSig = "2.16.840.1.101.2.1.1.12" SzOID_INFOSEC_mosaicKMandUpdSig = "2.16.840.1.101.2.1.1.20" SzOID_INFOSEC_mosaicKeyManagement = "2.16.840.1.101.2.1.1.10" SzOID_INFOSEC_mosaicSignature = "2.16.840.1.101.2.1.1.2" SzOID_INFOSEC_mosaicTokenProtection = "2.16.840.1.101.2.1.1.8" SzOID_INFOSEC_mosaicUpdatedInteg = "2.16.840.1.101.2.1.1.21" SzOID_INFOSEC_mosaicUpdatedSig = "2.16.840.1.101.2.1.1.19" SzOID_INFOSEC_sdnsConfidentiality = "2.16.840.1.101.2.1.1.3" SzOID_INFOSEC_sdnsIntegrity = "2.16.840.1.101.2.1.1.5" SzOID_INFOSEC_sdnsKMandSig = "2.16.840.1.101.2.1.1.11" SzOID_INFOSEC_sdnsKeyManagement = "2.16.840.1.101.2.1.1.9" SzOID_INFOSEC_sdnsSignature = "2.16.840.1.101.2.1.1.1" SzOID_INFOSEC_sdnsTokenProtection = "2.16.840.1.101.2.1.1.7" SzOID_INHIBIT_ANY_POLICY = "2.5.29.54" SzOID_INITIALS = "2.5.4.43" SzOID_INTERNATIONALIZED_EMAIL_ADDRESS = "1.3.6.1.4.1.311.20.2.4" SzOID_INTERNATIONAL_ISDN_NUMBER = "2.5.4.25" SzOID_IPSEC_KP_IKE_INTERMEDIATE = "1.3.6.1.5.5.8.2.2" SzOID_ISSUED_CERT_HASH = "1.3.6.1.4.1.311.21.17" SzOID_ISSUER_ALT_NAME = "2.5.29.8" SzOID_ISSUER_ALT_NAME2 = "2.5.29.18" SzOID_ISSUING_DIST_POINT = "2.5.29.28" SzOID_KEYID_RDN = "1.3.6.1.4.1.311.10.7.1" SzOID_KEY_ATTRIBUTES = "2.5.29.2" SzOID_KEY_USAGE = "2.5.29.15" SzOID_KEY_USAGE_RESTRICTION = "2.5.29.4" SzOID_KP_CA_EXCHANGE = "1.3.6.1.4.1.311.21.5" SzOID_KP_CSP_SIGNATURE = "1.3.6.1.4.1.311.10.3.16" SzOID_KP_CTL_USAGE_SIGNING = "1.3.6.1.4.1.311.10.3.1" SzOID_KP_DOCUMENT_SIGNING = "1.3.6.1.4.1.311.10.3.12" SzOID_KP_EFS = "1.3.6.1.4.1.311.10.3.4" SzOID_KP_KERNEL_MODE_CODE_SIGNING = "1.3.6.1.4.1.311.61.1.1" SzOID_KP_KERNEL_MODE_HAL_EXTENSION_SIGNING = "1.3.6.1.4.1.311.61.5.1" SzOID_KP_KERNEL_MODE_TRUSTED_BOOT_SIGNING = "1.3.6.1.4.1.311.61.4.1" SzOID_KP_KEY_RECOVERY = "1.3.6.1.4.1.311.10.3.11" SzOID_KP_KEY_RECOVERY_AGENT = "1.3.6.1.4.1.311.21.6" SzOID_KP_LIFETIME_SIGNING = "1.3.6.1.4.1.311.10.3.13" SzOID_KP_MOBILE_DEVICE_SOFTWARE = "1.3.6.1.4.1.311.10.3.14" SzOID_KP_QUALIFIED_SUBORDINATION = "1.3.6.1.4.1.311.10.3.10" SzOID_KP_SMARTCARD_LOGON = "1.3.6.1.4.1.311.20.2.2" SzOID_KP_SMART_DISPLAY = "1.3.6.1.4.1.311.10.3.15" SzOID_KP_TIME_STAMP_SIGNING = "1.3.6.1.4.1.311.10.3.2" SzOID_LEGACY_POLICY_MAPPINGS = "2.5.29.5" SzOID_LICENSES = "1.3.6.1.4.1.311.10.6.1" SzOID_LICENSE_SERVER = "1.3.6.1.4.1.311.10.6.2" SzOID_LOCALITY_NAME = "2.5.4.7" SzOID_LOCAL_MACHINE_KEYSET = "1.3.6.1.4.1.311.17.2" SzOID_LOGOTYPE_EXT = "1.3.6.1.5.5.7.1.12" SzOID_LOYALTY_OTHER_LOGOTYPE = "1.3.6.1.5.5.7.20.1" SzOID_MEMBER = "2.5.4.31" SzOID_NAME_CONSTRAINTS = "2.5.29.30" SzOID_NETSCAPE = "2.16.840.1.113730" SzOID_NETSCAPE_BASE_URL = "2.16.840.1.113730.1.2" SzOID_NETSCAPE_CA_POLICY_URL = "2.16.840.1.113730.1.8" SzOID_NETSCAPE_CA_REVOCATION_URL = "2.16.840.1.113730.1.4" SzOID_NETSCAPE_CERT_EXTENSION = "2.16.840.1.113730.1" SzOID_NETSCAPE_CERT_RENEWAL_URL = "2.16.840.1.113730.1.7" SzOID_NETSCAPE_CERT_SEQUENCE = "2.16.840.1.113730.2.5" SzOID_NETSCAPE_CERT_TYPE = "2.16.840.1.113730.1.1" SzOID_NETSCAPE_COMMENT = "2.16.840.1.113730.1.13" SzOID_NETSCAPE_DATA_TYPE = "2.16.840.1.113730.2" SzOID_NETSCAPE_REVOCATION_URL = "2.16.840.1.113730.1.3" SzOID_NETSCAPE_SSL_SERVER_NAME = "2.16.840.1.113730.1.12" SzOID_NEXT_UPDATE_LOCATION = "1.3.6.1.4.1.311.10.2" SzOID_NIST_AES128_CBC = "2.16.840.1.101.3.4.1.2" SzOID_NIST_AES128_WRAP = "2.16.840.1.101.3.4.1.5" SzOID_NIST_AES192_CBC = "2.16.840.1.101.3.4.1.22" SzOID_NIST_AES192_WRAP = "2.16.840.1.101.3.4.1.25" SzOID_NIST_AES256_CBC = "2.16.840.1.101.3.4.1.42" SzOID_NIST_AES256_WRAP = "2.16.840.1.101.3.4.1.45" SzOID_NIST_sha256 = "2.16.840.1.101.3.4.2.1" SzOID_NIST_sha384 = "2.16.840.1.101.3.4.2.2" SzOID_NIST_sha512 = "2.16.840.1.101.3.4.2.3" SzOID_NT5_CRYPTO = "1.3.6.1.4.1.311.10.3.6" SzOID_NTDS_REPLICATION = "1.3.6.1.4.1.311.25.1" SzOID_NT_PRINCIPAL_NAME = "1.3.6.1.4.1.311.20.2.3" SzOID_OEM_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.7" SzOID_OIW = "1.3.14" SzOID_OIWDIR = "1.3.14.7.2" SzOID_OIWDIR_CRPT = "1.3.14.7.2.1" SzOID_OIWDIR_HASH = "1.3.14.7.2.2" SzOID_OIWDIR_SIGN = "1.3.14.7.2.3" SzOID_OIWDIR_md2 = "1.3.14.7.2.2.1" SzOID_OIWDIR_md2RSA = "1.3.14.7.2.3.1" SzOID_OIWSEC = "1.3.14.3.2" SzOID_OIWSEC_desCBC = "1.3.14.3.2.7" SzOID_OIWSEC_desCFB = "1.3.14.3.2.9" SzOID_OIWSEC_desECB = "1.3.14.3.2.6" SzOID_OIWSEC_desEDE = "1.3.14.3.2.17" SzOID_OIWSEC_desMAC = "1.3.14.3.2.10" SzOID_OIWSEC_desOFB = "1.3.14.3.2.8" SzOID_OIWSEC_dhCommMod = "1.3.14.3.2.16" SzOID_OIWSEC_dsa = "1.3.14.3.2.12" SzOID_OIWSEC_dsaComm = "1.3.14.3.2.20" SzOID_OIWSEC_dsaCommSHA = "1.3.14.3.2.21" SzOID_OIWSEC_dsaCommSHA1 = "1.3.14.3.2.28" SzOID_OIWSEC_dsaSHA1 = "1.3.14.3.2.27" SzOID_OIWSEC_keyHashSeal = "1.3.14.3.2.23" SzOID_OIWSEC_md2RSASign = "1.3.14.3.2.24" SzOID_OIWSEC_md4RSA = "1.3.14.3.2.2" SzOID_OIWSEC_md4RSA2 = "1.3.14.3.2.4" SzOID_OIWSEC_md5RSA = "1.3.14.3.2.3" SzOID_OIWSEC_md5RSASign = "1.3.14.3.2.25" SzOID_OIWSEC_mdc2 = "1.3.14.3.2.19" SzOID_OIWSEC_mdc2RSA = "1.3.14.3.2.14" SzOID_OIWSEC_rsaSign = "1.3.14.3.2.11" SzOID_OIWSEC_rsaXchg = "1.3.14.3.2.22" SzOID_OIWSEC_sha = "1.3.14.3.2.18" SzOID_OIWSEC_sha1 = "1.3.14.3.2.26" SzOID_OIWSEC_sha1RSASign = "1.3.14.3.2.29" SzOID_OIWSEC_shaDSA = "1.3.14.3.2.13" SzOID_OIWSEC_shaRSA = "1.3.14.3.2.15" SzOID_ORGANIZATIONAL_UNIT_NAME = "2.5.4.11" SzOID_ORGANIZATION_NAME = "2.5.4.10" SzOID_OS_VERSION = "1.3.6.1.4.1.311.13.2.3" SzOID_OWNER = "2.5.4.32" SzOID_PHYSICAL_DELIVERY_OFFICE_NAME = "2.5.4.19" SzOID_PKCS = "1.2.840.113549.1" SzOID_PKCS_1 = "1.2.840.113549.1.1" SzOID_PKCS_10 = "1.2.840.113549.1.10" SzOID_PKCS_12 = "1.2.840.113549.1.12" SzOID_PKCS_12_EXTENDED_ATTRIBUTES = "1.3.6.1.4.1.311.17.3" SzOID_PKCS_12_FRIENDLY_NAME_ATTR = "1.2.840.113549.1.9.20" SzOID_PKCS_12_KEY_PROVIDER_NAME_ATTR = "1.3.6.1.4.1.311.17.1" SzOID_PKCS_12_LOCAL_KEY_ID = "1.2.840.113549.1.9.21" SzOID_PKCS_12_PROTECTED_PASSWORD_SECRET_BAG_TYPE_ID = "1.3.6.1.4.1.311.17.4" SzOID_PKCS_12_PbeIds = "1.2.840.113549.1.12.1" SzOID_PKCS_12_pbeWithSHA1And128BitRC2 = "1.2.840.113549.1.12.1.5" SzOID_PKCS_12_pbeWithSHA1And128BitRC4 = "1.2.840.113549.1.12.1.1" SzOID_PKCS_12_pbeWithSHA1And2KeyTripleDES = "1.2.840.113549.1.12.1.4" SzOID_PKCS_12_pbeWithSHA1And3KeyTripleDES = "1.2.840.113549.1.12.1.3" SzOID_PKCS_12_pbeWithSHA1And40BitRC2 = "1.2.840.113549.1.12.1.6" SzOID_PKCS_12_pbeWithSHA1And40BitRC4 = "1.2.840.113549.1.12.1.2" SzOID_PKCS_2 = "1.2.840.113549.1.2" SzOID_PKCS_3 = "1.2.840.113549.1.3" SzOID_PKCS_4 = "1.2.840.113549.1.4" SzOID_PKCS_5 = "1.2.840.113549.1.5" SzOID_PKCS_6 = "1.2.840.113549.1.6" SzOID_PKCS_7 = "1.2.840.113549.1.7" SzOID_PKCS_7_DATA = "1.2.840.113549.1.7.1" SzOID_PKCS_7_DIGESTED = "1.2.840.113549.1.7.5" SzOID_PKCS_7_ENCRYPTED = "1.2.840.113549.1.7.6" SzOID_PKCS_7_ENVELOPED = "1.2.840.113549.1.7.3" SzOID_PKCS_7_SIGNED = "1.2.840.113549.1.7.2" SzOID_PKCS_7_SIGNEDANDENVELOPED = "1.2.840.113549.1.7.4" SzOID_PKCS_8 = "1.2.840.113549.1.8" SzOID_PKCS_9 = "1.2.840.113549.1.9" SzOID_PKCS_9_CONTENT_TYPE = "1.2.840.113549.1.9.3" SzOID_PKCS_9_MESSAGE_DIGEST = "1.2.840.113549.1.9.4" SzOID_PKINIT_KP_KDC = "1.3.6.1.5.2.3.5" SzOID_PKIX = "1.3.6.1.5.5.7" SzOID_PKIX_ACC_DESCR = "1.3.6.1.5.5.7.48" SzOID_PKIX_CA_ISSUERS = "1.3.6.1.5.5.7.48.2" SzOID_PKIX_CA_REPOSITORY = "1.3.6.1.5.5.7.48.5" SzOID_PKIX_KP = "1.3.6.1.5.5.7.3" SzOID_PKIX_KP_CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" SzOID_PKIX_KP_CODE_SIGNING = "1.3.6.1.5.5.7.3.3" SzOID_PKIX_KP_EMAIL_PROTECTION = "1.3.6.1.5.5.7.3.4" SzOID_PKIX_KP_IPSEC_END_SYSTEM = "1.3.6.1.5.5.7.3.5" SzOID_PKIX_KP_IPSEC_TUNNEL = "1.3.6.1.5.5.7.3.6" SzOID_PKIX_KP_IPSEC_USER = "1.3.6.1.5.5.7.3.7" SzOID_PKIX_KP_OCSP_SIGNING = "1.3.6.1.5.5.7.3.9" SzOID_PKIX_KP_SERVER_AUTH = "1.3.6.1.5.5.7.3.1" SzOID_PKIX_KP_TIMESTAMP_SIGNING = "1.3.6.1.5.5.7.3.8" SzOID_PKIX_NO_SIGNATURE = "1.3.6.1.5.5.7.6.2" SzOID_PKIX_OCSP = "1.3.6.1.5.5.7.48.1" SzOID_PKIX_OCSP_BASIC_SIGNED_RESPONSE = "1.3.6.1.5.5.7.48.1.1" SzOID_PKIX_OCSP_NOCHECK = "1.3.6.1.5.5.7.48.1.5" SzOID_PKIX_OCSP_NONCE = "1.3.6.1.5.5.7.48.1.2" SzOID_PKIX_PE = "1.3.6.1.5.5.7.1" SzOID_PKIX_POLICY_QUALIFIER_CPS = "1.3.6.1.5.5.7.2.1" SzOID_PKIX_POLICY_QUALIFIER_USERNOTICE = "1.3.6.1.5.5.7.2.2" SzOID_PKIX_TIME_STAMPING = "1.3.6.1.5.5.7.48.3" SzOID_POLICY_CONSTRAINTS = "2.5.29.36" SzOID_POLICY_MAPPINGS = "2.5.29.33" SzOID_POSTAL_ADDRESS = "2.5.4.16" SzOID_POSTAL_CODE = "2.5.4.17" SzOID_POST_OFFICE_BOX = "2.5.4.18" SzOID_PREFERRED_DELIVERY_METHOD = "2.5.4.28" SzOID_PRESENTATION_ADDRESS = "2.5.4.29" SzOID_PRIVATEKEY_USAGE_PERIOD = "2.5.29.16" SzOID_PRODUCT_UPDATE = "1.3.6.1.4.1.311.31.1" SzOID_QC_EU_COMPLIANCE = "0.4.0.1862.1.1" SzOID_QC_SSCD = "0.4.0.1862.1.4" SzOID_QC_STATEMENTS_EXT = "1.3.6.1.5.5.7.1.3" SzOID_RDN_DUMMY_SIGNER = "1.3.6.1.4.1.311.21.9" SzOID_REASON_CODE_HOLD = "2.5.29.23" SzOID_REGISTERED_ADDRESS = "2.5.4.26" SzOID_REMOVE_CERTIFICATE = "1.3.6.1.4.1.311.10.8.1" SzOID_RENEWAL_CERTIFICATE = "1.3.6.1.4.1.311.13.1" SzOID_REQUEST_CLIENT_INFO = "1.3.6.1.4.1.311.21.20" SzOID_REQUIRE_CERT_CHAIN_POLICY = "1.3.6.1.4.1.311.21.15" SzOID_REVOKED_LIST_SIGNER = "1.3.6.1.4.1.311.10.3.19" SzOID_RFC3161_counterSign = "1.3.6.1.4.1.311.3.3.1" SzOID_ROLE_OCCUPANT = "2.5.4.33" SzOID_ROOT_LIST_SIGNER = "1.3.6.1.4.1.311.10.3.9" SzOID_ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION = "1.3.6.1.4.1.311.60.3.1" SzOID_ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION = "1.3.6.1.4.1.311.60.3.2" SzOID_ROOT_PROGRAM_FLAGS = "1.3.6.1.4.1.311.60.1.1" SzOID_ROOT_PROGRAM_NO_OCSP_FAILOVER_TO_CRL = "1.3.6.1.4.1.311.60.3.3" SzOID_RSA = "1.2.840.113549" SzOID_RSAES_OAEP = "1.2.840.113549.1.1.7" SzOID_RSA_DES_EDE3_CBC = "1.2.840.113549.3.7" SzOID_RSA_DH = "1.2.840.113549.1.3.1" SzOID_RSA_ENCRYPT = "1.2.840.113549.3" SzOID_RSA_HASH = "1.2.840.113549.2" SzOID_RSA_MD2 = "1.2.840.113549.2.2" SzOID_RSA_MD2RSA = "1.2.840.113549.1.1.2" SzOID_RSA_MD4 = "1.2.840.113549.2.4" SzOID_RSA_MD4RSA = "1.2.840.113549.1.1.3" SzOID_RSA_MD5 = "1.2.840.113549.2.5" SzOID_RSA_MD5RSA = "1.2.840.113549.1.1.4" SzOID_RSA_MGF1 = "1.2.840.113549.1.1.8" SzOID_RSA_PSPECIFIED = "1.2.840.113549.1.1.9" SzOID_RSA_RC2CBC = "1.2.840.113549.3.2" SzOID_RSA_RC4 = "1.2.840.113549.3.4" SzOID_RSA_RC5_CBCPad = "1.2.840.113549.3.9" SzOID_RSA_RSA = "1.2.840.113549.1.1.1" SzOID_RSA_SETOAEP_RSA = "1.2.840.113549.1.1.6" SzOID_RSA_SHA1RSA = "1.2.840.113549.1.1.5" SzOID_RSA_SHA256RSA = "1.2.840.113549.1.1.11" SzOID_RSA_SHA384RSA = "1.2.840.113549.1.1.12" SzOID_RSA_SHA512RSA = "1.2.840.113549.1.1.13" SzOID_RSA_SMIMECapabilities = "1.2.840.113549.1.9.15" SzOID_RSA_SMIMEalg = "1.2.840.113549.1.9.16.3" SzOID_RSA_SMIMEalgCMS3DESwrap = "1.2.840.113549.1.9.16.3.6" SzOID_RSA_SMIMEalgCMSRC2wrap = "1.2.840.113549.1.9.16.3.7" SzOID_RSA_SMIMEalgESDH = "1.2.840.113549.1.9.16.3.5" SzOID_RSA_SSA_PSS = "1.2.840.113549.1.1.10" SzOID_RSA_certExtensions = "1.2.840.113549.1.9.14" SzOID_RSA_challengePwd = "1.2.840.113549.1.9.7" SzOID_RSA_contentType = "1.2.840.113549.1.9.3" SzOID_RSA_counterSign = "1.2.840.113549.1.9.6" SzOID_RSA_data = "1.2.840.113549.1.7.1" SzOID_RSA_digestedData = "1.2.840.113549.1.7.5" SzOID_RSA_emailAddr = "1.2.840.113549.1.9.1" SzOID_RSA_encryptedData = "1.2.840.113549.1.7.6" SzOID_RSA_envelopedData = "1.2.840.113549.1.7.3" SzOID_RSA_extCertAttrs = "1.2.840.113549.1.9.9" SzOID_RSA_hashedData = "1.2.840.113549.1.7.5" SzOID_RSA_messageDigest = "1.2.840.113549.1.9.4" SzOID_RSA_preferSignedData = "1.2.840.113549.1.9.15.1" SzOID_RSA_signEnvData = "1.2.840.113549.1.7.4" SzOID_RSA_signedData = "1.2.840.113549.1.7.2" SzOID_RSA_signingTime = "1.2.840.113549.1.9.5" SzOID_RSA_unstructAddr = "1.2.840.113549.1.9.8" SzOID_RSA_unstructName = "1.2.840.113549.1.9.2" SzOID_SEARCH_GUIDE = "2.5.4.14" SzOID_SEE_ALSO = "2.5.4.34" SzOID_SERIALIZED = "1.3.6.1.4.1.311.10.3.3.1" SzOID_SERVER_GATED_CRYPTO = "1.3.6.1.4.1.311.10.3.3" SzOID_SGC_NETSCAPE = "2.16.840.1.113730.4.1" SzOID_SORTED_CTL = "1.3.6.1.4.1.311.10.1.1" SzOID_STATE_OR_PROVINCE_NAME = "2.5.4.8" SzOID_STREET_ADDRESS = "2.5.4.9" SzOID_SUBJECT_ALT_NAME = "2.5.29.7" SzOID_SUBJECT_ALT_NAME2 = "2.5.29.17" SzOID_SUBJECT_DIR_ATTRS = "2.5.29.9" SzOID_SUBJECT_INFO_ACCESS = "1.3.6.1.5.5.7.1.11" SzOID_SUBJECT_KEY_IDENTIFIER = "2.5.29.14" SzOID_SUPPORTED_APPLICATION_CONTEXT = "2.5.4.30" SzOID_SUR_NAME = "2.5.4.4" SzOID_TELEPHONE_NUMBER = "2.5.4.20" SzOID_TELETEXT_TERMINAL_IDENTIFIER = "2.5.4.22" SzOID_TELEX_NUMBER = "2.5.4.21" SzOID_TIMESTAMP_TOKEN = "1.2.840.113549.1.9.16.1.4" SzOID_TITLE = "2.5.4.12" SzOID_USER_CERTIFICATE = "2.5.4.36" SzOID_USER_PASSWORD = "2.5.4.35" SzOID_VERISIGN_BITSTRING_6_13 = "2.16.840.1.113733.1.6.13" SzOID_VERISIGN_ISS_STRONG_CRYPTO = "2.16.840.1.113733.1.8.1" SzOID_VERISIGN_ONSITE_JURISDICTION_HASH = "2.16.840.1.113733.1.6.11" SzOID_VERISIGN_PRIVATE_6_9 = "2.16.840.1.113733.1.6.9" SzOID_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.5" SzOID_X21_ADDRESS = "2.5.4.24" SzOID_X957 = "1.2.840.10040" SzOID_X957_DSA = "1.2.840.10040.4.1" SzOID_X957_SHA1DSA = "1.2.840.10040.4.3" SzOID_YESNO_TRUST_ATTR = "1.3.6.1.4.1.311.10.4.1" SzPRIV_KEY_CACHE_MAX_ITEMS = "PrivKeyCacheMaxItems" SzPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS = "PrivKeyCachePurgeIntervalSeconds" Sz_CERT_STORE_PROV_COLLECTION = "Collection" Sz_CERT_STORE_PROV_FILENAME_W = "File" Sz_CERT_STORE_PROV_LDAP_W = "Ldap" Sz_CERT_STORE_PROV_MEMORY = "Memory" Sz_CERT_STORE_PROV_PHYSICAL_W = "Physical" Sz_CERT_STORE_PROV_PKCS12 = "PKCS12" Sz_CERT_STORE_PROV_PKCS7 = "PKCS7" Sz_CERT_STORE_PROV_SERIALIZED = "Serialized" Sz_CERT_STORE_PROV_SMART_CARD_W = "SmartCard" Sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W = "SystemRegistry" Sz_CERT_STORE_PROV_SYSTEM_W = "System" Tag_inner_PROPVARIANT = 0 FUZZER_HASH = 4001 FUZZER_MX_COST = 1000 FUZZER_MX_LENGTH = 50 FUZZER_MX_OUTPUT_LENGTH = 100 FUZZER_MX_RULEID = 2147483647 FUZZER_NQUEUE = 20 CC_AND = 24 CC_BANG = 15 CC_COMMA = 23 CC_DIGIT = 3 CC_DOLLAR = 4 CC_DOT = 26 CC_EQ = 14 CC_GT = 13 CC_ID = 2 CC_ILLEGAL = 27 CC_KYWD = 1 CC_LP = 17 CC_LT = 12 CC_MINUS = 11 CC_PERCENT = 22 CC_PIPE = 10 CC_PLUS = 20 CC_QUOTE = 8 CC_QUOTE2 = 9 CC_RP = 18 CC_SEMI = 19 CC_SLASH = 16 CC_SPACE = 7 CC_STAR = 21 CC_TILDA = 25 CC_VARALPHA = 5 CC_VARNUM = 6 CC_X = 0 TK_BITAND = 3 TK_BITNOT = 3 TK_BITOR = 3 TK_BLOB = 2 TK_COMMA = 3 TK_CONCAT = 3 TK_DOT = 3 TK_EQ = 3 TK_ERROR = 4 TK_FLOAT = 2 TK_GE = 3 TK_GT = 3 TK_ID = 1 TK_ILLEGAL = 4 TK_INTEGER = 2 TK_LE = 3 TK_LITERAL = 2 TK_LP = 3 TK_LSHIFT = 3 TK_LT = 3 TK_MINUS = 3 TK_NAME = 1 TK_NE = 3 TK_PLUS = 3 TK_PUNCT = 3 TK_REM = 3 TK_RP = 3 TK_RSHIFT = 3 TK_SEMI = 3 TK_SLASH = 3 TK_SPACE = 0 TK_STAR = 3 TK_STRING = 2 TK_VARIABLE = 2 Deliberate_fall_through = 0 RE_EOF = 0 RE_OP_ACCEPT = 6 RE_OP_ANY = 2 RE_OP_ANYSTAR = 3 RE_OP_BOUNDARY = 17 RE_OP_CC_EXC = 8 RE_OP_CC_INC = 7 RE_OP_CC_RANGE = 10 RE_OP_CC_VALUE = 9 RE_OP_DIGIT = 13 RE_OP_FORK = 4 RE_OP_GOTO = 5 RE_OP_MATCH = 1 RE_OP_NOTDIGIT = 14 RE_OP_NOTSPACE = 16 RE_OP_NOTWORD = 12 RE_OP_SPACE = 15 RE_OP_WORD = 11 SERIES_COLUMN_START = 1 SERIES_COLUMN_STEP = 3 SERIES_COLUMN_STOP = 2 SERIES_COLUMN_VALUE = 0 CCLASS_B = 2 CCLASS_C = 3 CCLASS_D = 4 CCLASS_DIGIT = 10 CCLASS_H = 5 CCLASS_L = 6 CCLASS_M = 8 CCLASS_OTHER = 12 CCLASS_R = 7 CCLASS_SILENT = 0 CCLASS_SPACE = 11 CCLASS_VOWEL = 1 CCLASS_Y = 9 FINAL_INS_COST_DIV = 4 SCRIPT_ARABIC = 0x0010 SCRIPT_CYRILLIC = 0x0002 SCRIPT_GREEK = 0x0004 SCRIPT_HEBREW = 0x0008 SCRIPT_LATIN = 0x0001 SPELLFIX_COL_COMMAND = 11 SPELLFIX_COL_DISTANCE = 2 SPELLFIX_COL_LANGID = 3 SPELLFIX_COL_MATCHLEN = 5 SPELLFIX_COL_PHONEHASH = 6 SPELLFIX_COL_RANK = 1 SPELLFIX_COL_SCOPE = 8 SPELLFIX_COL_SCORE = 4 SPELLFIX_COL_SOUNDSLIKE = 10 SPELLFIX_COL_SRCHCNT = 9 SPELLFIX_COL_TOP = 7 SPELLFIX_COL_WORD = 0 SPELLFIX_IDXNUM_DIST = 48 SPELLFIX_IDXNUM_DISTLE = 0x20 SPELLFIX_IDXNUM_DISTLT = 0x10 SPELLFIX_IDXNUM_LANGID = 0x02 SPELLFIX_IDXNUM_MATCH = 0x01 SPELLFIX_IDXNUM_ROWID = 0x40 SPELLFIX_IDXNUM_SCOPE = 0x08 SPELLFIX_IDXNUM_TOP = 0x04 SPELLFIX_MX_HASH = 32 SPELLFIX_MX_RUN = 1 SQLITE_SPELLFIX_STACKALLOC_SZ = 1024 TOTYPE_BIGENDIAN = 0 TOTYPE_LITTLEENDIAN = 1 SWARMVTAB_MAX_OPEN = 9 MAX_MEM_LEVEL = 9 MAX_WBITS = 15 STDC = 0 STDC99 = 0 S_IFLNK = 0120000 ZCONF_H = 0 ZEXPORT = 0 ZEXPORTVA = 0 ZIPFILE_BUFFER_SIZE = 65536 ZIPFILE_CDS_FIXED_SZ = 46 ZIPFILE_CDS_NFILE_OFF = 28 ZIPFILE_CDS_SZCOMPRESSED_OFF = 20 ZIPFILE_EOCD_FIXED_SZ = 22 ZIPFILE_EXTRA_TIMESTAMP = 0x5455 ZIPFILE_F_COLUMN_IDX = 7 ZIPFILE_LFH_FIXED_SZ = 30 ZIPFILE_NEWENTRY_FLAGS = 0x800 ZIPFILE_NEWENTRY_MADEBY = 798 ZIPFILE_NEWENTRY_REQUIRED = 20 ZIPFILE_SIGNATURE_CDS = 0x02014b50 ZIPFILE_SIGNATURE_EOCD = 0x06054b50 ZIPFILE_SIGNATURE_LFH = 0x04034b50 ZLIB_H = 0 ZLIB_VERNUM = 0x12b0 ZLIB_VERSION = "1.2.11" ZLIB_VER_MAJOR = 1 ZLIB_VER_MINOR = 2 ZLIB_VER_REVISION = 11 ZLIB_VER_SUBREVISION = 0 Z_ASCII = 1 Z_BEST_COMPRESSION = 9 Z_BEST_SPEED = 1 Z_BINARY = 0 Z_BLOCK = 5 Z_BUF_ERROR = -5 Z_DATA_ERROR = -3 Z_DEFAULT_COMPRESSION = -1 Z_DEFAULT_STRATEGY = 0 Z_DEFLATED = 8 Z_ERRNO = -1 Z_FILTERED = 1 Z_FINISH = 4 Z_FIXED = 4 Z_FULL_FLUSH = 3 Z_HUFFMAN_ONLY = 2 Z_MEM_ERROR = -4 Z_NEED_DICT = 2 Z_NO_COMPRESSION = 0 Z_NO_FLUSH = 0 Z_NULL = 0 Z_OK = 0 Z_PARTIAL_FLUSH = 1 Z_RLE = 3 Z_STREAM_END = 1 Z_STREAM_ERROR = -2 Z_SYNC_FLUSH = 2 Z_TEXT = 1 Z_TREES = 6 Z_UNKNOWN = 2 Z_VERSION_ERROR = -6 X_ANSI_STDDEF_H = 0 X_GCC_MAX_ALIGN_T = 0 X_INC_STDDEF = 0 X_STDDEF_H = 0 X_STDDEF_H_ = 0 Z_const = 0 SQLITE_RBU_STATE_CHECKPOINT = 3 SQLITE_RBU_STATE_DONE = 4 SQLITE_RBU_STATE_ERROR = 5 SQLITE_RBU_STATE_MOVE = 2 SQLITE_RBU_STATE_OAL = 1 X_SQLITE3RBU_H = 0 MAX_PREPARED_STMTS = 100 NUM_PREPARED_STMTS = 10 SQLITE_EVAL_WITHOUTNULLS = 0x00001 SQLITE_TCL_NRE = 1 TCLSH = 1 ALT_SCHEMA_TABLE = "sqlite_schema" ALT_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" BTREE_APPEND = 0x08 BTREE_APPLICATION_ID = 8 BTREE_AUTOVACUUM_FULL = 1 BTREE_AUTOVACUUM_INCR = 2 BTREE_AUTOVACUUM_NONE = 0 BTREE_AUXDELETE = 0x04 BTREE_BLOBKEY = 2 BTREE_BULKLOAD = 0x00000001 BTREE_DATA_VERSION = 15 BTREE_DEFAULT_CACHE_SIZE = 3 BTREE_FILE_FORMAT = 2 BTREE_FORDELETE = 0x00000008 BTREE_FREE_PAGE_COUNT = 0 BTREE_HINT_RANGE = 0 BTREE_INCR_VACUUM = 7 BTREE_INTKEY = 1 BTREE_LARGEST_ROOT_PAGE = 4 BTREE_MEMORY = 2 BTREE_OMIT_JOURNAL = 1 BTREE_PREFORMAT = 0x80 BTREE_SAVEPOSITION = 0x02 BTREE_SCHEMA_VERSION = 1 BTREE_SEEK_EQ = 0x00000002 BTREE_SINGLE = 4 BTREE_TEXT_ENCODING = 5 BTREE_UNORDERED = 8 BTREE_USER_VERSION = 6 BTREE_WRCSR = 0x00000004 CACHE_STALE = 0 COLFLAG_BUSY = 0x0100 COLFLAG_GENERATED = 0x0060 COLFLAG_HASTYPE = 0x0004 COLFLAG_HIDDEN = 0x0002 COLFLAG_NOINSERT = 0x0062 COLFLAG_NOTAVAIL = 0x0080 COLFLAG_PRIMKEY = 0x0001 COLFLAG_SORTERREF = 0x0010 COLFLAG_STORED = 0x0040 COLFLAG_UNIQUE = 0x0008 COLFLAG_VIRTUAL = 0x0020 COLNAME_COLUMN = 4 COLNAME_DATABASE = 2 COLNAME_DECLTYPE = 1 COLNAME_N = 5 COLNAME_NAME = 0 COLNAME_TABLE = 3 CURTYPE_BTREE = 0 CURTYPE_PSEUDO = 3 CURTYPE_SORTER = 1 CURTYPE_VTAB = 2 DBFLAG_EncodingFixed = 0x0040 DBFLAG_InternalFunc = 0x0020 DBFLAG_PreferBuiltin = 0x0002 DBFLAG_SchemaChange = 0x0001 DBFLAG_SchemaKnownOk = 0x0010 DBFLAG_Vacuum = 0x0004 DBFLAG_VacuumInto = 0x0008 DB_ResetWanted = 0x0008 DB_SchemaLoaded = 0x0001 DB_UnresetViews = 0x0002 DFLT_SCHEMA_TABLE = "sqlite_master" DFLT_TEMP_SCHEMA_TABLE = "sqlite_temp_master" ENAME_NAME = 0 ENAME_SPAN = 1 ENAME_TAB = 2 EP_Agg = 0x000010 EP_CanBeNull = 0x100000 EP_Collate = 0x000100 EP_Commuted = 0x000200 EP_ConstFunc = 0x080000 EP_DblQuoted = 0x000040 EP_Distinct = 0x000002 EP_FixedCol = 0x000008 EP_FromDDL = 0x40000000 EP_FromJoin = 0x000001 EP_HasFunc = 0x000004 EP_IfNullRow = 0x020000 EP_Immutable = 0x02 EP_InfixFunc = 0x000080 EP_IntValue = 0x000400 EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 EP_MemToken = 0x010000 EP_NoReduce = 0x01 EP_Propagate = 2097412 EP_Quoted = 0x4000000 EP_Reduced = 0x002000 EP_Skip = 0x001000 EP_Static = 0x8000000 EP_Subquery = 0x200000 EP_Subrtn = 0x2000000 EP_TokenOnly = 0x004000 EP_Unlikely = 0x040000 EP_VarSelect = 0x000020 EP_Win = 0x008000 EP_WinFunc = 0x1000000 EP_xIsSelect = 0x000800 EXCLUSIVE_LOCK = 4 EXPRDUP_REDUCE = 0x0001 GCC_VERSION = 8003000 HAVE_FCHOWN = 1 HAVE_INT16_T = 1 HAVE_INT32_T = 1 HAVE_INT64_T = 1 HAVE_INT8_T = 1 HAVE_INTPTR_T = 1 HAVE_INTTYPES_H = 1 HAVE_ISNAN = 1 HAVE_LSTAT = 1 HAVE_MALLOC_H = 1 HAVE_MEMORY_H = 1 HAVE_READLINK = 1 HAVE_STDINT_H = 1 HAVE_STDLIB_H = 1 HAVE_STRINGS_H = 1 HAVE_STRING_H = 1 HAVE_SYS_STAT_H = 1 HAVE_SYS_TYPES_H = 1 HAVE_UINT16_T = 1 HAVE_UINT32_T = 1 HAVE_UINT64_T = 1 HAVE_UINT8_T = 1 HAVE_UINTPTR_T = 1 HAVE_UNISTD_H = 1 HAVE_UTIME = 1 INITFLAG_AlterDrop = 0x0002 INITFLAG_AlterRename = 0x0001 INLINEFUNC_affinity = 4 INLINEFUNC_coalesce = 0 INLINEFUNC_expr_compare = 3 INLINEFUNC_expr_implies_expr = 2 INLINEFUNC_iif = 5 INLINEFUNC_implies_nonnull_row = 1 INLINEFUNC_unlikely = 99 INT16_MAX = 32767 INT16_MIN = -32768 INT32_MAX = 2147483647 INT32_MIN = -2147483648 INT64_MAX = 9223372036854775807 INT64_MIN = -9223372036854775808 INT8_MAX = 127 INT8_MIN = -128 INTMAX_MAX = 9223372036854775807 INTMAX_MIN = -9223372036854775808 INTPTR_MAX = 9223372036854775807 INTPTR_MIN = -9223372036854775808 INT_FAST16_MAX = 32767 INT_FAST16_MIN = -32768 INT_FAST32_MAX = 2147483647 INT_FAST32_MIN = -2147483648 INT_FAST64_MAX = 9223372036854775807 INT_FAST64_MIN = -9223372036854775808 INT_FAST8_MAX = 127 INT_FAST8_MIN = -128 INT_LEAST16_MAX = 32767 INT_LEAST16_MIN = -32768 INT_LEAST32_MAX = 2147483647 INT_LEAST32_MIN = -2147483648 INT_LEAST64_MAX = 9223372036854775807 INT_LEAST64_MIN = -9223372036854775808 INT_LEAST8_MAX = 127 INT_LEAST8_MIN = -128 IN_INDEX_EPH = 2 IN_INDEX_INDEX_ASC = 3 IN_INDEX_INDEX_DESC = 4 IN_INDEX_LOOP = 0x0004 IN_INDEX_MEMBERSHIP = 0x0002 IN_INDEX_NOOP = 5 IN_INDEX_NOOP_OK = 0x0001 IN_INDEX_ROWID = 1 JT_CROSS = 0x0002 JT_ERROR = 0x0040 JT_INNER = 0x0001 JT_LEFT = 0x0008 JT_NATURAL = 0x0004 JT_OUTER = 0x0020 JT_RIGHT = 0x0010 KEYINFO_ORDER_BIGNULL = 0x02 KEYINFO_ORDER_DESC = 0x01 LOCATE_NOERR = 0x02 LOCATE_VIEW = 0x01 LOOKASIDE_SMALL = 128 LT_OBJDIR = ".libs/" M10d_Any = 1 M10d_No = 2 M10d_Yes = 0 MEMTYPE_HEAP = 0x01 MEMTYPE_LOOKASIDE = 0x02 MEMTYPE_PCACHE = 0x04 MEM_AffMask = 0x003f MEM_Agg = 0x2000 MEM_Blob = 0x0010 MEM_Cleared = 0x0100 MEM_Dyn = 0x0400 MEM_Ephem = 0x1000 MEM_FromBind = 0x0040 MEM_Int = 0x0004 MEM_IntReal = 0x0020 MEM_Null = 0x0001 MEM_Real = 0x0008 MEM_Static = 0x0800 MEM_Str = 0x0002 MEM_Subtype = 0x8000 MEM_Term = 0x0200 MEM_TypeMask = 0xc1bf MEM_Undefined = 0x0080 MEM_Zero = 0x4000 MSVC_VERSION = 1900 NC_AllowAgg = 0x00001 NC_AllowWin = 0x04000 NC_Complex = 0x02000 NC_FromDDL = 0x40000 NC_GenCol = 0x00008 NC_HasAgg = 0x00010 NC_HasWin = 0x08000 NC_IdxExpr = 0x00020 NC_InAggFunc = 0x20000 NC_IsCheck = 0x00004 NC_IsDDL = 0x10000 NC_MinMaxAgg = 0x01000 NC_PartIdx = 0x00002 NC_SelfRef = 0x0002e NC_UAggInfo = 0x00100 NC_UBaseReg = 0x00400 NC_UEList = 0x00080 NC_UUpsert = 0x00200 NC_VarSelect = 0x00040 NO_LOCK = 0 OE_Abort = 2 OE_Cascade = 10 OE_Default = 11 OE_Fail = 3 OE_Ignore = 4 OE_None = 0 OE_Replace = 5 OE_Restrict = 7 OE_Rollback = 1 OE_SetDflt = 9 OE_SetNull = 8 OE_Update = 6 OLD_P_OVERLAY = 2 OMIT_TEMPDB = 0 ONEPASS_MULTI = 2 ONEPASS_OFF = 0 ONEPASS_SINGLE = 1 OPFLAG_APPEND = 0x08 OPFLAG_AUXDELETE = 0x04 OPFLAG_BULKCSR = 0x01 OPFLAG_EPHEM = 0x01 OPFLAG_FORDELETE = 0x08 OPFLAG_ISNOOP = 0x40 OPFLAG_ISUPDATE = 0x04 OPFLAG_LASTROWID = 0x20 OPFLAG_LENGTHARG = 0x40 OPFLAG_NCHANGE = 0x01 OPFLAG_NOCHNG = 0x01 OPFLAG_NOCHNG_MAGIC = 0x6d OPFLAG_P2ISREG = 0x10 OPFLAG_PERMUTE = 0x01 OPFLAG_PREFORMAT = 0x80 OPFLAG_SAVEPOSITION = 0x02 OPFLAG_SEEKEQ = 0x02 OPFLAG_TYPEOFARG = 0x80 OPFLAG_USESEEKRESULT = 0x10 OPFLG_IN1 = 0x02 OPFLG_IN2 = 0x04 OPFLG_IN3 = 0x08 OPFLG_JUMP = 0x01 OPFLG_OUT2 = 0x10 OPFLG_OUT3 = 0x20 OP_Abortable = 178 OP_Add = 106 OP_AddImm = 83 OP_Affinity = 91 OP_AggFinal = 160 OP_AggInverse = 156 OP_AggStep = 157 OP_AggStep1 = 158 OP_AggValue = 159 OP_And = 44 OP_AutoCommit = 1 OP_BitAnd = 102 OP_BitNot = 113 OP_BitOr = 103 OP_Blob = 74 OP_Cast = 85 OP_Checkpoint = 6 OP_ChngCntRow = 80 OP_Clear = 140 OP_Close = 117 OP_CollSeq = 82 OP_Column = 90 OP_ColumnsUsed = 118 OP_Compare = 87 OP_Concat = 111 OP_Copy = 77 OP_Count = 93 OP_CreateBtree = 142 OP_CursorHint = 174 OP_CursorLock = 162 OP_CursorUnlock = 163 OP_DecrJumpZero = 59 OP_DeferredSeek = 136 OP_Delete = 125 OP_Destroy = 139 OP_Divide = 109 OP_DropIndex = 147 OP_DropTable = 146 OP_DropTrigger = 148 OP_ElseNotEq = 58 OP_EndCoroutine = 66 OP_Eq = 53 OP_Expire = 161 OP_Explain = 177 OP_FinishSeek = 138 OP_FkCounter = 153 OP_FkIfZero = 47 OP_Found = 30 OP_Function = 64 OP_Ge = 57 OP_Gosub = 12 OP_Goto = 11 OP_Gt = 54 OP_Halt = 68 OP_HaltIfNull = 67 OP_IdxDelete = 135 OP_IdxGE = 41 OP_IdxGT = 39 OP_IdxInsert = 133 OP_IdxLE = 38 OP_IdxLT = 40 OP_IdxRowid = 137 OP_If = 18 OP_IfNoHope = 27 OP_IfNot = 20 OP_IfNotOpen = 26 OP_IfNotZero = 49 OP_IfNullRow = 21 OP_IfPos = 48 OP_IfSmaller = 34 OP_IncrVacuum = 60 OP_Init = 62 OP_InitCoroutine = 13 OP_Insert = 123 OP_Int64 = 70 OP_IntCopy = 79 OP_Integer = 69 OP_IntegrityCk = 149 OP_IsNull = 50 OP_IsTrue = 88 OP_JournalMode = 7 OP_Jump = 16 OP_Last = 33 OP_Le = 55 OP_LoadAnalysis = 145 OP_Lt = 56 OP_MakeRecord = 92 OP_MaxPgcnt = 172 OP_MemMax = 154 OP_Move = 76 OP_Multiply = 108 OP_MustBeInt = 15 OP_Ne = 52 OP_NewRowid = 122 OP_Next = 5 OP_NoConflict = 28 OP_Noop = 176 OP_Not = 19 OP_NotExists = 32 OP_NotFound = 29 OP_NotNull = 51 OP_Null = 72 OP_NullRow = 131 OP_Offset = 89 OP_OffsetLimit = 155 OP_Once = 17 OP_OpenAutoindex = 100 OP_OpenDup = 99 OP_OpenEphemeral = 101 OP_OpenPseudo = 115 OP_OpenRead = 97 OP_OpenWrite = 98 OP_Or = 43 OP_Pagecount = 171 OP_Param = 151 OP_ParseSchema = 144 OP_Permutation = 86 OP_Prev = 4 OP_Program = 46 OP_PureFunc = 63 OP_ReadCookie = 94 OP_Real = 152 OP_RealAffinity = 84 OP_ReleaseReg = 175 OP_Remainder = 110 OP_ReopenIdx = 96 OP_ResetCount = 126 OP_ResetSorter = 141 OP_ResultRow = 81 OP_Return = 65 OP_Rewind = 37 OP_RowCell = 124 OP_RowData = 129 OP_RowSetAdd = 150 OP_RowSetRead = 42 OP_RowSetTest = 45 OP_Rowid = 130 OP_SCopy = 78 OP_Savepoint = 0 OP_SeekEnd = 132 OP_SeekGE = 24 OP_SeekGT = 25 OP_SeekHit = 120 OP_SeekLE = 23 OP_SeekLT = 22 OP_SeekRowid = 31 OP_SeekScan = 119 OP_Sequence = 121 OP_SequenceTest = 114 OP_SetCookie = 95 OP_ShiftLeft = 104 OP_ShiftRight = 105 OP_SoftNull = 73 OP_Sort = 36 OP_SorterCompare = 127 OP_SorterData = 128 OP_SorterInsert = 134 OP_SorterNext = 3 OP_SorterOpen = 112 OP_SorterSort = 35 OP_SqlExec = 143 OP_String = 71 OP_String8 = 116 OP_Subtract = 107 OP_TableLock = 164 OP_Trace = 173 OP_Transaction = 2 OP_VBegin = 165 OP_VColumn = 169 OP_VCreate = 166 OP_VDestroy = 167 OP_VFilter = 9 OP_VNext = 61 OP_VOpen = 168 OP_VRename = 170 OP_VUpdate = 10 OP_Vacuum = 8 OP_Variable = 75 OP_Yield = 14 OS_VXWORKS = 0 P4_ADVANCE = -5 P4_COLLSEQ = -2 P4_DYNAMIC = -7 P4_DYNBLOB = -17 P4_EXPR = -10 P4_FREE_IF_LE = -7 P4_FUNCCTX = -16 P4_FUNCDEF = -8 P4_INT32 = -3 P4_INT64 = -14 P4_INTARRAY = -15 P4_KEYINFO = -9 P4_MEM = -11 P4_NOTUSED = 0 P4_REAL = -13 P4_STATIC = -1 P4_SUBPROGRAM = -4 P4_TABLE = -6 P4_TRANSIENT = 0 P4_VTAB = -12 P5_ConstraintCheck = 3 P5_ConstraintFK = 4 P5_ConstraintNotNull = 1 P5_ConstraintUnique = 2 PACKAGE_BUGREPORT = "" PACKAGE_NAME = "sqlite" PACKAGE_STRING = "sqlite 3.35.5" PACKAGE_TARNAME = "sqlite" PAGER_CACHESPILL = 0x20 PAGER_CKPT_FULLFSYNC = 0x10 PAGER_FLAGS_MASK = 0x38 PAGER_FULLFSYNC = 0x08 PAGER_GET_NOCONTENT = 0x01 PAGER_GET_READONLY = 0x02 PAGER_JOURNALMODE_DELETE = 0 PAGER_JOURNALMODE_MEMORY = 4 PAGER_JOURNALMODE_OFF = 2 PAGER_JOURNALMODE_PERSIST = 1 PAGER_JOURNALMODE_QUERY = -1 PAGER_JOURNALMODE_TRUNCATE = 3 PAGER_JOURNALMODE_WAL = 5 PAGER_LOCKINGMODE_EXCLUSIVE = 1 PAGER_LOCKINGMODE_NORMAL = 0 PAGER_LOCKINGMODE_QUERY = -1 PAGER_MEMORY = 0x0002 PAGER_OMIT_JOURNAL = 0x0001 PAGER_SYNCHRONOUS_EXTRA = 0x04 PAGER_SYNCHRONOUS_FULL = 0x03 PAGER_SYNCHRONOUS_MASK = 0x07 PAGER_SYNCHRONOUS_NORMAL = 0x02 PAGER_SYNCHRONOUS_OFF = 0x01 PARSE_MODE_DECLARE_VTAB = 1 PARSE_MODE_NORMAL = 0 PARSE_MODE_RENAME = 2 PARSE_MODE_UNMAP = 3 PENDING_LOCK = 3 PGHDR_CLEAN = 0x001 PGHDR_DIRTY = 0x002 PGHDR_DONT_WRITE = 0x010 PGHDR_MMAP = 0x020 PGHDR_NEED_SYNC = 0x008 PGHDR_WAL_APPEND = 0x040 PGHDR_WRITEABLE = 0x004 PRIX16 = "X" PRIX32 = "X" PRIX64 = "I64X" PRIX8 = "X" PRIXFAST16 = "X" PRIXFAST32 = "X" PRIXFAST64 = "I64X" PRIXFAST8 = "X" PRIXLEAST16 = "X" PRIXLEAST32 = "X" PRIXLEAST64 = "I64X" PRIXLEAST8 = "X" PRIXMAX = "I64X" PRIXPTR = "I64X" PRId16 = "d" PRId32 = "d" PRId64 = "I64d" PRId8 = "d" PRIdFAST16 = "d" PRIdFAST32 = "d" PRIdFAST64 = "I64d" PRIdFAST8 = "d" PRIdLEAST16 = "d" PRIdLEAST32 = "d" PRIdLEAST64 = "I64d" PRIdLEAST8 = "d" PRIdMAX = "I64d" PRIdPTR = "I64d" PRIi16 = "i" PRIi32 = "i" PRIi64 = "I64i" PRIi8 = "i" PRIiFAST16 = "i" PRIiFAST32 = "i" PRIiFAST64 = "I64i" PRIiFAST8 = "i" PRIiLEAST16 = "i" PRIiLEAST32 = "i" PRIiLEAST64 = "I64i" PRIiLEAST8 = "i" PRIiMAX = "I64i" PRIiPTR = "I64i" PRIo16 = "o" PRIo32 = "o" PRIo64 = "I64o" PRIo8 = "o" PRIoFAST16 = "o" PRIoFAST32 = "o" PRIoFAST64 = "I64o" PRIoFAST8 = "o" PRIoLEAST16 = "o" PRIoLEAST32 = "o" PRIoLEAST64 = "I64o" PRIoLEAST8 = "o" PRIoMAX = "I64o" PRIoPTR = "I64o" PRIu16 = "u" PRIu32 = "u" PRIu64 = "I64u" PRIu8 = "u" PRIuFAST16 = "u" PRIuFAST32 = "u" PRIuFAST64 = "I64u" PRIuFAST8 = "u" PRIuLEAST16 = "u" PRIuLEAST32 = "u" PRIuLEAST64 = "I64u" PRIuLEAST8 = "u" PRIuMAX = "I64u" PRIuPTR = "I64u" PRIx16 = "x" PRIx32 = "x" PRIx64 = "I64x" PRIx8 = "x" PRIxFAST16 = "x" PRIxFAST32 = "x" PRIxFAST64 = "I64x" PRIxFAST8 = "x" PRIxLEAST16 = "x" PRIxLEAST32 = "x" PRIxLEAST64 = "I64x" PRIxLEAST8 = "x" PRIxMAX = "I64x" PRIxPTR = "I64x" PTRDIFF_MAX = 9223372036854775807 PTRDIFF_MIN = -9223372036854775808 P_DETACH = 4 P_NOWAIT = 1 P_NOWAITO = 3 P_OVERLAY = 2 P_WAIT = 0 RESERVED_LOCK = 2 SAVEPOINT_BEGIN = 0 SAVEPOINT_RELEASE = 1 SAVEPOINT_ROLLBACK = 2 SCHEMA_ROOT = 1 SCNd16 = "hd" SCNd32 = "d" SCNd64 = "I64d" SCNd8 = "hhd" SCNdFAST16 = "hd" SCNdFAST32 = "d" SCNdFAST64 = "I64d" SCNdFAST8 = "hhd" SCNdLEAST16 = "hd" SCNdLEAST32 = "d" SCNdLEAST64 = "I64d" SCNdLEAST8 = "hhd" SCNdMAX = "I64d" SCNdPTR = "I64d" SCNi16 = "hi" SCNi32 = "i" SCNi64 = "I64i" SCNi8 = "hhi" SCNiFAST16 = "hi" SCNiFAST32 = "i" SCNiFAST64 = "I64i" SCNiFAST8 = "hhi" SCNiLEAST16 = "hi" SCNiLEAST32 = "i" SCNiLEAST64 = "I64i" SCNiLEAST8 = "hhi" SCNiMAX = "I64i" SCNiPTR = "I64i" SCNo16 = "ho" SCNo32 = "o" SCNo64 = "I64o" SCNo8 = "hho" SCNoFAST16 = "ho" SCNoFAST32 = "o" SCNoFAST64 = "I64o" SCNoFAST8 = "hho" SCNoLEAST16 = "ho" SCNoLEAST32 = "o" SCNoLEAST64 = "I64o" SCNoLEAST8 = "hho" SCNoMAX = "I64o" SCNoPTR = "I64o" SCNu16 = "hu" SCNu32 = "u" SCNu64 = "I64u" SCNu8 = "hhu" SCNuFAST16 = "hu" SCNuFAST32 = "u" SCNuFAST64 = "I64u" SCNuFAST8 = "hhu" SCNuLEAST16 = "hu" SCNuLEAST32 = "u" SCNuLEAST64 = "I64u" SCNuLEAST8 = "hhu" SCNuMAX = "I64u" SCNuPTR = "I64u" SCNx16 = "hx" SCNx32 = "x" SCNx64 = "I64x" SCNx8 = "hhx" SCNxFAST16 = "hx" SCNxFAST32 = "x" SCNxFAST64 = "I64x" SCNxFAST8 = "hhx" SCNxLEAST16 = "hx" SCNxLEAST32 = "x" SCNxLEAST64 = "I64x" SCNxLEAST8 = "hhx" SCNxMAX = "I64x" SCNxPTR = "I64x" SELECTTRACE_ENABLED = 0 SF_Aggregate = 0x0000008 SF_All = 0x0000002 SF_ComplexResult = 0x0040000 SF_Compound = 0x0000100 SF_Converted = 0x0010000 SF_Distinct = 0x0000001 SF_Expanded = 0x0000040 SF_FixedLimit = 0x0004000 SF_HasAgg = 0x0000010 SF_HasTypeInfo = 0x0000080 SF_IncludeHidden = 0x0020000 SF_MaybeConvert = 0x0008000 SF_MinMaxAgg = 0x0001000 SF_MultiPart = 0x2000000 SF_MultiValue = 0x0000400 SF_NestedFrom = 0x0000800 SF_NoopOrderBy = 0x0400000 SF_PushDown = 0x1000000 SF_Recursive = 0x0002000 SF_Resolved = 0x0000004 SF_UpdateFrom = 0x0800000 SF_UsesEphemeral = 0x0000020 SF_Values = 0x0000200 SF_View = 0x0200000 SF_WhereBegin = 0x0080000 SF_WinRewrite = 0x0100000 SHARED_LOCK = 1 SHARED_SIZE = 510 SIG_ATOMIC_MAX = 2147483647 SIG_ATOMIC_MIN = -2147483648 SQLITECONFIG_H = 1 SQLITEINT_H = 0 SQLITE_AFF_BLOB = 0x41 SQLITE_AFF_INTEGER = 0x44 SQLITE_AFF_MASK = 0x47 SQLITE_AFF_NONE = 0x40 SQLITE_AFF_NUMERIC = 0x43 SQLITE_AFF_REAL = 0x45 SQLITE_AFF_TEXT = 0x42 SQLITE_ASCII = 1 SQLITE_AllOpts = 0xffffffff SQLITE_AutoIndex = 0x00008000 SQLITE_BIGENDIAN = 0 SQLITE_BIG_DBL = 0 SQLITE_BTREE_H = 0 SQLITE_BYTEORDER = 1234 SQLITE_CacheSpill = 0x00000020 SQLITE_CellSizeCk = 0x00200000 SQLITE_CkptFullFSync = 0x00000010 SQLITE_CountOfView = 0x00000200 SQLITE_CoverIdxScan = 0x00000020 SQLITE_CursorHints = 0x00000400 SQLITE_DEFAULT_AUTOVACUUM = 0 SQLITE_DEFAULT_CACHE_SIZE = -2000 SQLITE_DEFAULT_FILE_FORMAT = 4 SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 SQLITE_DEFAULT_MMAP_SIZE = 0 SQLITE_DEFAULT_PCACHE_INITSZ = 20 SQLITE_DEFAULT_RECURSIVE_TRIGGERS = 0 SQLITE_DEFAULT_SECTOR_SIZE = 4096 SQLITE_DEFAULT_SORTERREF_SIZE = 0x7fffffff SQLITE_DEFAULT_SYNCHRONOUS = 2 SQLITE_DEFAULT_WAL_AUTOCHECKPOINT = 1000 SQLITE_DEFAULT_WAL_SYNCHRONOUS = 2 SQLITE_DEFAULT_WORKER_THREADS = 0 SQLITE_Defensive = 0x10000000 SQLITE_DeferFKs = 0x00080000 SQLITE_DistinctOpt = 0x00000010 SQLITE_DqsDDL = 0x20000000 SQLITE_DqsDML = 0x40000000 SQLITE_ECEL_DUP = 0x01 SQLITE_ECEL_FACTOR = 0x02 SQLITE_ECEL_OMITREF = 0x08 SQLITE_ECEL_REF = 0x04 SQLITE_ENABLE_LOCKING_STYLE = 0 SQLITE_EnableQPSG = 0x00800000 SQLITE_EnableTrigger = 0x00040000 SQLITE_EnableView = 0x80000000 SQLITE_ExistsToIN = 0x00020000 SQLITE_FAULTINJECTOR_COUNT = 1 SQLITE_FAULTINJECTOR_MALLOC = 0 SQLITE_FCNTL_DB_UNCHANGED = 0xca093fa0 SQLITE_FRAME_MAGIC = 0x879fb71e SQLITE_FUNC_CASE = 0x0008 SQLITE_FUNC_CONSTANT = 0x0800 SQLITE_FUNC_COUNT = 0x0100 SQLITE_FUNC_DIRECT = 0x00080000 SQLITE_FUNC_ENCMASK = 0x0003 SQLITE_FUNC_EPHEM = 0x0010 SQLITE_FUNC_HASH_SZ = 23 SQLITE_FUNC_INLINE = 0x00400000 SQLITE_FUNC_INTERNAL = 0x00040000 SQLITE_FUNC_LENGTH = 0x0040 SQLITE_FUNC_LIKE = 0x0004 SQLITE_FUNC_MINMAX = 0x1000 SQLITE_FUNC_NEEDCOLL = 0x0020 SQLITE_FUNC_OFFSET = 0x8000 SQLITE_FUNC_SLOCHNG = 0x2000 SQLITE_FUNC_SUBTYPE = 0x00100000 SQLITE_FUNC_TEST = 0x4000 SQLITE_FUNC_TYPEOF = 0x0080 SQLITE_FUNC_UNLIKELY = 0x0400 SQLITE_FUNC_UNSAFE = 0x00200000 SQLITE_FUNC_WINDOW = 0x00010000 SQLITE_FactorOutConst = 0x00000008 SQLITE_ForeignKeys = 0x00004000 SQLITE_Fts3Tokenizer = 0x00400000 SQLITE_FullColNames = 0x00000004 SQLITE_FullFSync = 0x00000008 SQLITE_GroupByOrder = 0x00000004 SQLITE_HASH_H = 0 SQLITE_HAVE_C99_MATH_FUNCS = 1 SQLITE_HAVE_OS_TRACE = 0 SQLITE_IDXTYPE_APPDEF = 0 SQLITE_IDXTYPE_IPK = 3 SQLITE_IDXTYPE_PRIMARYKEY = 2 SQLITE_IDXTYPE_UNIQUE = 1 SQLITE_IOERR_NOMEM_BKPT = 3082 SQLITE_IgnoreChecks = 0x00000200 SQLITE_JUMPIFNULL = 0x10 SQLITE_KEEPNULL = 0x08 SQLITE_LITTLEENDIAN = 1 SQLITE_LegacyAlter = 0x04000000 SQLITE_LegacyFileFmt = 0x00000002 SQLITE_LoadExtFunc = 0x00020000 SQLITE_LoadExtension = 0x00010000 SQLITE_MAGIC_BUSY = 0xf03b7906 SQLITE_MAGIC_CLOSED = 0x9f3c2d33 SQLITE_MAGIC_ERROR = 0xb5357930 SQLITE_MAGIC_OPEN = 0xa029a697 SQLITE_MAGIC_SICK = 0x4b771290 SQLITE_MAGIC_ZOMBIE = 0x64cffc7f SQLITE_MALLOC_SOFT_LIMIT = 1024 SQLITE_MAX_ATTACHED = 10 SQLITE_MAX_COLUMN = 2000 SQLITE_MAX_COMPOUND_SELECT = 500 SQLITE_MAX_DB = 12 SQLITE_MAX_DEFAULT_PAGE_SIZE = 8192 SQLITE_MAX_EXPR_DEPTH = 1000 SQLITE_MAX_FILE_FORMAT = 4 SQLITE_MAX_FUNCTION_ARG = 127 SQLITE_MAX_LENGTH = 1000000000 SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000 SQLITE_MAX_MMAP_SIZE = 0x7fff0000 SQLITE_MAX_PAGE_COUNT = 1073741823 SQLITE_MAX_PAGE_SIZE = 65536 SQLITE_MAX_SCHEMA_RETRY = 50 SQLITE_MAX_SQL_LENGTH = 1000000000 SQLITE_MAX_TRIGGER_DEPTH = 1000 SQLITE_MAX_VARIABLE_NUMBER = 32766 SQLITE_MAX_VDBE_OP = 250000000 SQLITE_MAX_WORKER_THREADS = 8 SQLITE_MSVC_H = 0 SQLITE_MX_JUMP_OPCODE = 62 SQLITE_MinMaxOpt = 0x00010000 SQLITE_NEED_ERR_NAME = 0 SQLITE_NOMEM_BKPT = 7 SQLITE_NOTNULL = 0x90 SQLITE_NULLEQ = 0x80 SQLITE_N_BTREE_META = 16 SQLITE_N_LIMIT = 12 SQLITE_NoCkptOnClose = 0x00000800 SQLITE_NoSchemaError = 0x08000000 SQLITE_NullCallback = 0x00000100 SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 SQLITE_OS_UNIX = 0 SQLITE_OS_WINCE = 0 SQLITE_OS_WINNT = 1 SQLITE_OS_WINRT = 0 SQLITE_OS_WIN_H = 0 SQLITE_OS_WIN_THREADS = 1 SQLITE_OmitNoopJoin = 0x00000100 SQLITE_OrderByIdxJoin = 0x00000040 SQLITE_PAGER_H = 0 SQLITE_POWERSAFE_OVERWRITE = 1 SQLITE_PREPARE_MASK = 0x0f SQLITE_PREPARE_SAVESQL = 0x80 SQLITE_PRINTF_INTERNAL = 0x01 SQLITE_PRINTF_MALLOCED = 0x04 SQLITE_PRINTF_SQLFUNC = 0x02 SQLITE_PTRSIZE = 8 SQLITE_PropagateConst = 0x00008000 SQLITE_PushDown = 0x00001000 SQLITE_QueryFlattener = 0x00000001 SQLITE_QueryOnly = 0x00100000 SQLITE_ReadUncommit = 0x00000400 SQLITE_RecTriggers = 0x00002000 SQLITE_ResetDatabase = 0x02000000 SQLITE_ReverseOrder = 0x00001000 SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 SQLITE_STOREP2 = 0x20 SQLITE_SYSTEM_MALLOC = 1 SQLITE_ShortColNames = 0x00000040 SQLITE_SimplifyJoin = 0x00002000 SQLITE_SkipScan = 0x00004000 SQLITE_Stat4 = 0x00000800 SQLITE_TEMP_FILE_PREFIX = "etilqs_" SQLITE_TOKEN_KEYWORD = 0x2 SQLITE_TOKEN_QUOTED = 0x1 SQLITE_TRACE_LEGACY = 0x40 SQLITE_TRACE_NONLEGACY_MASK = 0x0f SQLITE_TRACE_XPROFILE = 0x80 SQLITE_Transitive = 0x00000080 SQLITE_TriggerEQP = 0x01000000 SQLITE_TrustedSchema = 0x00000080 SQLITE_UTF16NATIVE = 2 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 SQLITE_WSD = 0 SQLITE_WindowFunc = 0x00000002 SQLITE_WriteSchema = 0x00000001 SRT_Coroutine = 13 SRT_Discard = 4 SRT_DistFifo = 5 SRT_DistQueue = 6 SRT_EphemTab = 12 SRT_Except = 2 SRT_Exists = 3 SRT_Fifo = 8 SRT_Mem = 10 SRT_Output = 9 SRT_Queue = 7 SRT_Set = 11 SRT_Table = 14 SRT_Union = 1 SRT_Upfrom = 15 STDC_HEADERS = 1 TF_Autoincrement = 0x0008 TF_Ephemeral = 0x4000 TF_HasGenerated = 0x0060 TF_HasHidden = 0x0002 TF_HasNotNull = 0x0800 TF_HasPrimaryKey = 0x0004 TF_HasStat1 = 0x0010 TF_HasStat4 = 0x2000 TF_HasStored = 0x0040 TF_HasVirtual = 0x0020 TF_NoVisibleRowid = 0x0200 TF_OOOHidden = 0x0400 TF_Readonly = 0x0001 TF_Shadow = 0x1000 TF_StatsUsed = 0x0100 TF_WithoutRowid = 0x0080 TK_ABORT = 27 TK_ACTION = 28 TK_ADD = 162 TK_AFTER = 29 TK_AGG_COLUMN = 168 TK_AGG_FUNCTION = 167 TK_ALL = 134 TK_ALTER = 161 TK_ALWAYS = 96 TK_ANALYZE = 30 TK_AND = 44 TK_ANY = 101 TK_AS = 24 TK_ASC = 31 TK_ASTERISK = 179 TK_ATTACH = 32 TK_AUTOINCR = 125 TK_BEFORE = 33 TK_BEGIN = 5 TK_BETWEEN = 48 TK_BY = 34 TK_CASCADE = 35 TK_CASE = 156 TK_CAST = 36 TK_CHECK = 123 TK_COLLATE = 112 TK_COLUMN = 166 TK_COLUMNKW = 60 TK_COMMIT = 10 TK_CONFLICT = 37 TK_CONSTRAINT = 118 TK_CREATE = 17 TK_CTIME_KW = 100 TK_CURRENT = 85 TK_DATABASE = 38 TK_DEFAULT = 119 TK_DEFERRABLE = 130 TK_DEFERRED = 7 TK_DELETE = 127 TK_DESC = 39 TK_DETACH = 40 TK_DISTINCT = 139 TK_DO = 61 TK_DROP = 132 TK_EACH = 41 TK_ELSE = 159 TK_END = 11 TK_ESCAPE = 58 TK_EXCEPT = 135 TK_EXCLUDE = 91 TK_EXCLUSIVE = 9 TK_EXISTS = 20 TK_EXPLAIN = 2 TK_FAIL = 42 TK_FILTER = 165 TK_FIRST = 83 TK_FOLLOWING = 86 TK_FOR = 62 TK_FOREIGN = 131 TK_FROM = 141 TK_FUNCTION = 171 TK_GENERATED = 95 TK_GROUP = 145 TK_GROUPS = 92 TK_HAVING = 146 TK_IF = 18 TK_IF_NULL_ROW = 178 TK_IGNORE = 63 TK_IMMEDIATE = 8 TK_IN = 49 TK_INDEX = 160 TK_INDEXED = 115 TK_INITIALLY = 64 TK_INSERT = 126 TK_INSTEAD = 65 TK_INTERSECT = 136 TK_INTO = 150 TK_IS = 45 TK_ISNOT = 170 TK_ISNULL = 50 TK_JOIN = 142 TK_JOIN_KW = 117 TK_KEY = 67 TK_LAST = 84 TK_LIKE_KW = 47 TK_LIMIT = 147 TK_MATCH = 46 TK_MATERIALIZED = 97 TK_NO = 66 TK_NOT = 19 TK_NOTHING = 151 TK_NOTNULL = 51 TK_NULL = 120 TK_NULLS = 82 TK_OF = 68 TK_OFFSET = 69 TK_ON = 114 TK_OR = 43 TK_ORDER = 144 TK_OTHERS = 93 TK_OVER = 164 TK_PARTITION = 87 TK_PLAN = 4 TK_PRAGMA = 70 TK_PRECEDING = 88 TK_PRIMARY = 121 TK_QUERY = 3 TK_RAISE = 71 TK_RANGE = 89 TK_RECURSIVE = 72 TK_REFERENCES = 124 TK_REGISTER = 175 TK_REINDEX = 98 TK_RELEASE = 14 TK_RENAME = 99 TK_REPLACE = 73 TK_RESTRICT = 74 TK_RETURNING = 149 TK_ROLLBACK = 12 TK_ROW = 75 TK_ROWS = 76 TK_SAVEPOINT = 13 TK_SELECT = 137 TK_SELECT_COLUMN = 177 TK_SET = 129 TK_SPAN = 180 TK_TABLE = 16 TK_TEMP = 21 TK_THEN = 158 TK_TIES = 94 TK_TO = 15 TK_TRANSACTION = 6 TK_TRIGGER = 77 TK_TRUEFALSE = 169 TK_TRUTH = 174 TK_UMINUS = 172 TK_UNBOUNDED = 90 TK_UNION = 133 TK_UNIQUE = 122 TK_UPDATE = 128 TK_UPLUS = 173 TK_USING = 143 TK_VACUUM = 78 TK_VALUES = 138 TK_VECTOR = 176 TK_VIEW = 79 TK_VIRTUAL = 80 TK_WHEN = 157 TK_WHERE = 148 TK_WINDOW = 163 TK_WITH = 81 TK_WITHOUT = 25 TRIGGER_AFTER = 2 TRIGGER_BEFORE = 1 UINT16_MAX = 65535 UINT32_MAX = 0xffffffff UINT64_MAX = 0xffffffffffffffff UINT8_MAX = 255 UINTMAX_MAX = 18446744073709551615 UINTPTR_MAX = 18446744073709551615 UINT_FAST16_MAX = 65535 UINT_FAST32_MAX = 4294967295 UINT_FAST64_MAX = 18446744073709551615 UINT_FAST8_MAX = 255 UINT_LEAST16_MAX = 65535 UINT_LEAST32_MAX = 4294967295 UINT_LEAST64_MAX = 18446744073709551615 UINT_LEAST8_MAX = 255 VDBE_DISPLAY_P4 = 1 VDBE_MAGIC_DEAD = 0x5606c3c8 VDBE_MAGIC_HALT = 0x319c2973 VDBE_MAGIC_INIT = 0x16bceaa5 VDBE_MAGIC_RESET = 0x48fa9f76 VDBE_MAGIC_RUN = 0x2df20da3 WAIT_CHILD = 0 WAIT_GRANDCHILD = 1 WCHAR_MAX = 0xffff WCHAR_MIN = 0 WHERE_DISTINCTBY = 0x0080 WHERE_DISTINCT_NOOP = 0 WHERE_DISTINCT_ORDERED = 2 WHERE_DISTINCT_UNIQUE = 1 WHERE_DISTINCT_UNORDERED = 3 WHERE_DUPLICATES_OK = 0x0010 WHERE_GROUPBY = 0x0040 WHERE_ONEPASS_DESIRED = 0x0004 WHERE_ONEPASS_MULTIROW = 0x0008 WHERE_ORDERBY_LIMIT = 0x0800 WHERE_ORDERBY_MAX = 0x0002 WHERE_ORDERBY_MIN = 0x0001 WHERE_ORDERBY_NORMAL = 0x0000 WHERE_OR_SUBCLAUSE = 0x0020 WHERE_SORTBYGROUP = 0x0200 WHERE_USE_LIMIT = 0x4000 WHERE_WANT_DISTINCT = 0x0100 WINT_MAX = 0xffff WINT_MIN = 0 WRC_Abort = 2 WRC_Continue = 0 WRC_Prune = 1 XN_EXPR = -2 XN_ROWID = -1 X_CRT_GETPID_DEFINED = 0 X_GCC_WRAP_STDINT_H = 0 X_GNU_SOURCE = 0 X_INC_CORECRT_STARTUP = 0 X_INC_PROCESS = 0 X_INC_SETJMP = 0 X_INTTYPES_H_ = 0 X_JBLEN = 16 X_JMP_BUF_DEFINED = 0 X_LARGEFILE_SOURCE = 1 X_LARGE_FILE = 1 X_SQLITE_OS_H_ = 0 X_STDINT_H = 0 X_WEXEC_DEFINED = 0 X_XOPEN_SOURCE = 600 BTCF_AtLast = 0x08 BTCF_Incrblob = 0x10 BTCF_Multiple = 0x20 BTCF_Pinned = 0x40 BTCF_ValidNKey = 0x02 BTCF_ValidOvfl = 0x04 BTCF_WriteFlag = 0x01 BTCURSOR_MAX_DEPTH = 20 BTS_EXCLUSIVE = 0x0040 BTS_FAST_SECURE = 0x000c BTS_INITIALLY_EMPTY = 0x0010 BTS_NO_WAL = 0x0020 BTS_OVERWRITE = 0x0008 BTS_PAGESIZE_FIXED = 0x0002 BTS_PENDING = 0x0080 BTS_READ_ONLY = 0x0001 BTS_SECURE_DELETE = 0x0004 CURSOR_FAULT = 4 CURSOR_INVALID = 1 CURSOR_REQUIRESEEK = 3 CURSOR_SKIPNEXT = 2 CURSOR_VALID = 0 PTF_INTKEY = 0x01 PTF_LEAF = 0x08 PTF_LEAFDATA = 0x04 PTF_ZERODATA = 0x02 PTRMAP_BTREE = 5 PTRMAP_FREEPAGE = 2 PTRMAP_OVERFLOW1 = 3 PTRMAP_OVERFLOW2 = 4 PTRMAP_ROOTPAGE = 1 READ_LOCK = 1 SQLITE_FILE_HEADER = "SQLite format 3" TRANS_NONE = 0 TRANS_READ = 1 TRANS_WRITE = 2 WRITE_LOCK = 2 TCL_THREADS = 0 MX_CHUNK_NUMBER = 299 SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET = 400 SQLITE_MULTIPLEX_WAL_8_3_OFFSET = 700 DEVSYM_MAX_PATHNAME = 512 DEVSYM_VFS_NAME = "devsym" WRITECRASH_NAME = "writecrash" SQLITE_INTARRAY_H = 0 JT_MAX_PATHNAME = 512 JT_VFS_NAME = "jt" MALLOC_LOG_FRAMES = 10 DEFAULT_SECTOR_SIZE = 0x1000 MAX_PAGE_SIZE = 0x10000 MULTIPLEX_CTRL_ENABLE = 214014 MULTIPLEX_CTRL_SET_CHUNK_SIZE = 214015 MULTIPLEX_CTRL_SET_MAX_CHUNKS = 214016 SQLITE_MULTIPLEX_CHUNK_SIZE = 2147418112 SQLITE_MULTIPLEX_MAX_CHUNKS = 12 SQLITE_MULTIPLEX_VFS_NAME = "multiplex" SQLITE_TEST_MULTIPLEX_H = 0 MAX_MUTEXES = 14 STATIC_MUTEXES = 12 BLOBSIZE = 10485760 BLOCKSIZE = 512 DATABASE_FILE = 1 FS_VFS_NAME = "fs" JOURNAL_FILE = 2 INST_MAX_PATHNAME = 512 OS_ACCESS = 1 OS_ANNOTATE = 28 OS_CHECKRESERVEDLOCK = 2 OS_CLOSE = 3 OS_CURRENTTIME = 4 OS_DELETE = 5 OS_DEVCHAR = 6 OS_FILECONTROL = 7 OS_FILESIZE = 8 OS_FULLPATHNAME = 9 OS_LOCK = 11 OS_NUMEVENTS = 29 OS_OPEN = 12 OS_RANDOMNESS = 13 OS_READ = 14 OS_SECTORSIZE = 15 OS_SHMBARRIER = 26 OS_SHMLOCK = 25 OS_SHMMAP = 23 OS_SHMUNMAP = 22 OS_SLEEP = 16 OS_SYNC = 17 OS_TRUNCATE = 18 OS_UNLOCK = 19 OS_WRITE = 20 VFSLOG_BUFFERSIZE = 8192 TESTPCACHE_CLEAR = 0xd42670d4 TESTPCACHE_NPAGE = 217 TESTPCACHE_RESERVE = 17 TESTPCACHE_VALID = 0x364585fd TCLVAR_NAME_EQ = 101 TCLVAR_NAME_MATCH = 109 TCLVAR_VALUE_GLOB = 103 TCLVAR_VALUE_LIKE = 108 TCLVAR_VALUE_REGEXP = 114 FAULT_INJECT_NONE = 0 FAULT_INJECT_PERSISTENT = 2 FAULT_INJECT_TRANSIENT = 1 TESTVFS_ACCESS_MASK = 0x00004000 TESTVFS_ALL_MASK = 0x001FFFFF TESTVFS_CKLOCK_MASK = 0x00080000 TESTVFS_CLOSE_MASK = 0x00000800 TESTVFS_DELETE_MASK = 0x00000400 TESTVFS_FCNTL_MASK = 0x00100000 TESTVFS_FULLPATHNAME_MASK = 0x00008000 TESTVFS_LOCK_MASK = 0x00040000 TESTVFS_MAX_ARGS = 12 TESTVFS_MAX_PAGES = 1024 TESTVFS_OPEN_MASK = 0x00000100 TESTVFS_READ_MASK = 0x00010000 TESTVFS_SHMBARRIER_MASK = 0x00000040 TESTVFS_SHMCLOSE_MASK = 0x00000080 TESTVFS_SHMLOCK_MASK = 0x00000010 TESTVFS_SHMMAP_MASK = 0x00000020 TESTVFS_SHMOPEN_MASK = 0x00000001 TESTVFS_SYNC_MASK = 0x00000200 TESTVFS_TRUNCATE_MASK = 0x00002000 TESTVFS_UNLOCK_MASK = 0x00020000 TESTVFS_WRITE_MASK = 0x00001000 ) // Positions to pass to Tcl_QueueEvent: const ( /* tcl.h:1387:1: */ TCL_QUEUE_TAIL = 0 TCL_QUEUE_HEAD = 1 TCL_QUEUE_MARK = 2 ) // The following flags determine whether the blockModeProc above should set // the channel into blocking or nonblocking mode. They are passed as arguments // to the blockModeProc function in the above structure. //---------------------------------------------------------------------------- // Enum for different types of file paths. const ( /* tcl.h:1609:1: */ TCL_PATH_ABSOLUTE = 0 TCL_PATH_RELATIVE = 1 TCL_PATH_VOLUME_RELATIVE = 2 ) //---------------------------------------------------------------------------- // When a TCL command returns, the interpreter contains a result from the // command. Programmers are strongly encouraged to use one of the functions // Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's // result. See the SetResult man page for details. Besides this result, the // command function returns an integer code, which is one of the following: // // TCL_OK Command completed normally; the interpreter's result // contains the command's result. // TCL_ERROR The command couldn't be completed successfully; the // interpreter's result describes what went wrong. // TCL_RETURN The command requests that the current function return; // the interpreter's result contains the function's // return value. // TCL_BREAK The command requests that the innermost loop be // exited; the interpreter's result is meaningless. // TCL_CONTINUE Go on to the next iteration of the current loop; the // interpreter's result is meaningless. //---------------------------------------------------------------------------- // Flags to control what substitutions are performed by Tcl_SubstObj(): // Argument descriptors for math function callbacks in expressions: const ( /* tcl.h:690:1: */ TCL_INT = 0 TCL_DOUBLE = 1 TCL_EITHER = 2 TCL_WIDE_INT = 3 ) const ( /* avx512fintrin.h:4200:1: */ _MM_PERM_AAAA = 0 _MM_PERM_AAAB = 1 _MM_PERM_AAAC = 2 _MM_PERM_AAAD = 3 _MM_PERM_AABA = 4 _MM_PERM_AABB = 5 _MM_PERM_AABC = 6 _MM_PERM_AABD = 7 _MM_PERM_AACA = 8 _MM_PERM_AACB = 9 _MM_PERM_AACC = 10 _MM_PERM_AACD = 11 _MM_PERM_AADA = 12 _MM_PERM_AADB = 13 _MM_PERM_AADC = 14 _MM_PERM_AADD = 15 _MM_PERM_ABAA = 16 _MM_PERM_ABAB = 17 _MM_PERM_ABAC = 18 _MM_PERM_ABAD = 19 _MM_PERM_ABBA = 20 _MM_PERM_ABBB = 21 _MM_PERM_ABBC = 22 _MM_PERM_ABBD = 23 _MM_PERM_ABCA = 24 _MM_PERM_ABCB = 25 _MM_PERM_ABCC = 26 _MM_PERM_ABCD = 27 _MM_PERM_ABDA = 28 _MM_PERM_ABDB = 29 _MM_PERM_ABDC = 30 _MM_PERM_ABDD = 31 _MM_PERM_ACAA = 32 _MM_PERM_ACAB = 33 _MM_PERM_ACAC = 34 _MM_PERM_ACAD = 35 _MM_PERM_ACBA = 36 _MM_PERM_ACBB = 37 _MM_PERM_ACBC = 38 _MM_PERM_ACBD = 39 _MM_PERM_ACCA = 40 _MM_PERM_ACCB = 41 _MM_PERM_ACCC = 42 _MM_PERM_ACCD = 43 _MM_PERM_ACDA = 44 _MM_PERM_ACDB = 45 _MM_PERM_ACDC = 46 _MM_PERM_ACDD = 47 _MM_PERM_ADAA = 48 _MM_PERM_ADAB = 49 _MM_PERM_ADAC = 50 _MM_PERM_ADAD = 51 _MM_PERM_ADBA = 52 _MM_PERM_ADBB = 53 _MM_PERM_ADBC = 54 _MM_PERM_ADBD = 55 _MM_PERM_ADCA = 56 _MM_PERM_ADCB = 57 _MM_PERM_ADCC = 58 _MM_PERM_ADCD = 59 _MM_PERM_ADDA = 60 _MM_PERM_ADDB = 61 _MM_PERM_ADDC = 62 _MM_PERM_ADDD = 63 _MM_PERM_BAAA = 64 _MM_PERM_BAAB = 65 _MM_PERM_BAAC = 66 _MM_PERM_BAAD = 67 _MM_PERM_BABA = 68 _MM_PERM_BABB = 69 _MM_PERM_BABC = 70 _MM_PERM_BABD = 71 _MM_PERM_BACA = 72 _MM_PERM_BACB = 73 _MM_PERM_BACC = 74 _MM_PERM_BACD = 75 _MM_PERM_BADA = 76 _MM_PERM_BADB = 77 _MM_PERM_BADC = 78 _MM_PERM_BADD = 79 _MM_PERM_BBAA = 80 _MM_PERM_BBAB = 81 _MM_PERM_BBAC = 82 _MM_PERM_BBAD = 83 _MM_PERM_BBBA = 84 _MM_PERM_BBBB = 85 _MM_PERM_BBBC = 86 _MM_PERM_BBBD = 87 _MM_PERM_BBCA = 88 _MM_PERM_BBCB = 89 _MM_PERM_BBCC = 90 _MM_PERM_BBCD = 91 _MM_PERM_BBDA = 92 _MM_PERM_BBDB = 93 _MM_PERM_BBDC = 94 _MM_PERM_BBDD = 95 _MM_PERM_BCAA = 96 _MM_PERM_BCAB = 97 _MM_PERM_BCAC = 98 _MM_PERM_BCAD = 99 _MM_PERM_BCBA = 100 _MM_PERM_BCBB = 101 _MM_PERM_BCBC = 102 _MM_PERM_BCBD = 103 _MM_PERM_BCCA = 104 _MM_PERM_BCCB = 105 _MM_PERM_BCCC = 106 _MM_PERM_BCCD = 107 _MM_PERM_BCDA = 108 _MM_PERM_BCDB = 109 _MM_PERM_BCDC = 110 _MM_PERM_BCDD = 111 _MM_PERM_BDAA = 112 _MM_PERM_BDAB = 113 _MM_PERM_BDAC = 114 _MM_PERM_BDAD = 115 _MM_PERM_BDBA = 116 _MM_PERM_BDBB = 117 _MM_PERM_BDBC = 118 _MM_PERM_BDBD = 119 _MM_PERM_BDCA = 120 _MM_PERM_BDCB = 121 _MM_PERM_BDCC = 122 _MM_PERM_BDCD = 123 _MM_PERM_BDDA = 124 _MM_PERM_BDDB = 125 _MM_PERM_BDDC = 126 _MM_PERM_BDDD = 127 _MM_PERM_CAAA = 128 _MM_PERM_CAAB = 129 _MM_PERM_CAAC = 130 _MM_PERM_CAAD = 131 _MM_PERM_CABA = 132 _MM_PERM_CABB = 133 _MM_PERM_CABC = 134 _MM_PERM_CABD = 135 _MM_PERM_CACA = 136 _MM_PERM_CACB = 137 _MM_PERM_CACC = 138 _MM_PERM_CACD = 139 _MM_PERM_CADA = 140 _MM_PERM_CADB = 141 _MM_PERM_CADC = 142 _MM_PERM_CADD = 143 _MM_PERM_CBAA = 144 _MM_PERM_CBAB = 145 _MM_PERM_CBAC = 146 _MM_PERM_CBAD = 147 _MM_PERM_CBBA = 148 _MM_PERM_CBBB = 149 _MM_PERM_CBBC = 150 _MM_PERM_CBBD = 151 _MM_PERM_CBCA = 152 _MM_PERM_CBCB = 153 _MM_PERM_CBCC = 154 _MM_PERM_CBCD = 155 _MM_PERM_CBDA = 156 _MM_PERM_CBDB = 157 _MM_PERM_CBDC = 158 _MM_PERM_CBDD = 159 _MM_PERM_CCAA = 160 _MM_PERM_CCAB = 161 _MM_PERM_CCAC = 162 _MM_PERM_CCAD = 163 _MM_PERM_CCBA = 164 _MM_PERM_CCBB = 165 _MM_PERM_CCBC = 166 _MM_PERM_CCBD = 167 _MM_PERM_CCCA = 168 _MM_PERM_CCCB = 169 _MM_PERM_CCCC = 170 _MM_PERM_CCCD = 171 _MM_PERM_CCDA = 172 _MM_PERM_CCDB = 173 _MM_PERM_CCDC = 174 _MM_PERM_CCDD = 175 _MM_PERM_CDAA = 176 _MM_PERM_CDAB = 177 _MM_PERM_CDAC = 178 _MM_PERM_CDAD = 179 _MM_PERM_CDBA = 180 _MM_PERM_CDBB = 181 _MM_PERM_CDBC = 182 _MM_PERM_CDBD = 183 _MM_PERM_CDCA = 184 _MM_PERM_CDCB = 185 _MM_PERM_CDCC = 186 _MM_PERM_CDCD = 187 _MM_PERM_CDDA = 188 _MM_PERM_CDDB = 189 _MM_PERM_CDDC = 190 _MM_PERM_CDDD = 191 _MM_PERM_DAAA = 192 _MM_PERM_DAAB = 193 _MM_PERM_DAAC = 194 _MM_PERM_DAAD = 195 _MM_PERM_DABA = 196 _MM_PERM_DABB = 197 _MM_PERM_DABC = 198 _MM_PERM_DABD = 199 _MM_PERM_DACA = 200 _MM_PERM_DACB = 201 _MM_PERM_DACC = 202 _MM_PERM_DACD = 203 _MM_PERM_DADA = 204 _MM_PERM_DADB = 205 _MM_PERM_DADC = 206 _MM_PERM_DADD = 207 _MM_PERM_DBAA = 208 _MM_PERM_DBAB = 209 _MM_PERM_DBAC = 210 _MM_PERM_DBAD = 211 _MM_PERM_DBBA = 212 _MM_PERM_DBBB = 213 _MM_PERM_DBBC = 214 _MM_PERM_DBBD = 215 _MM_PERM_DBCA = 216 _MM_PERM_DBCB = 217 _MM_PERM_DBCC = 218 _MM_PERM_DBCD = 219 _MM_PERM_DBDA = 220 _MM_PERM_DBDB = 221 _MM_PERM_DBDC = 222 _MM_PERM_DBDD = 223 _MM_PERM_DCAA = 224 _MM_PERM_DCAB = 225 _MM_PERM_DCAC = 226 _MM_PERM_DCAD = 227 _MM_PERM_DCBA = 228 _MM_PERM_DCBB = 229 _MM_PERM_DCBC = 230 _MM_PERM_DCBD = 231 _MM_PERM_DCCA = 232 _MM_PERM_DCCB = 233 _MM_PERM_DCCC = 234 _MM_PERM_DCCD = 235 _MM_PERM_DCDA = 236 _MM_PERM_DCDB = 237 _MM_PERM_DCDC = 238 _MM_PERM_DCDD = 239 _MM_PERM_DDAA = 240 _MM_PERM_DDAB = 241 _MM_PERM_DDAC = 242 _MM_PERM_DDAD = 243 _MM_PERM_DDBA = 244 _MM_PERM_DDBB = 245 _MM_PERM_DDBC = 246 _MM_PERM_DDBD = 247 _MM_PERM_DDCA = 248 _MM_PERM_DDCB = 249 _MM_PERM_DDCC = 250 _MM_PERM_DDCD = 251 _MM_PERM_DDDA = 252 _MM_PERM_DDDB = 253 _MM_PERM_DDDC = 254 _MM_PERM_DDDD = 255 ) // Constants for mantissa extraction const ( /* avx512fintrin.h:8510:1: */ _MM_MANT_NORM_1_2 = 0 // interval [1, 2) _MM_MANT_NORM_p5_2 = 1 // interval [0.5, 2) _MM_MANT_NORM_p5_1 = 2 // interval [0.5, 1) _MM_MANT_NORM_p75_1p5 = 3 ) const ( /* avx512fintrin.h:8518:1: */ _MM_MANT_SIGN_src = 0 // sign = sign(SRC) _MM_MANT_SIGN_zero = 1 // sign = 0 _MM_MANT_SIGN_nan = 2 ) // Copyright (C) 2002-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // Implemented from the specification included in the Intel C++ Compiler // User Guide and Reference, version 9.0. // We need type definitions from the MMX header file. // Copyright (C) 2002-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // Implemented from the specification included in the Intel C++ Compiler // User Guide and Reference, version 9.0. // Get _mm_malloc () and _mm_free (). // Copyright (C) 2004-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // Constants for use with _mm_prefetch. const ( /* xmmintrin.h:37:1: */ // _MM_HINT_ET is _MM_HINT_T with set 3rd bit. _MM_HINT_ET0 = 7 _MM_HINT_ET1 = 6 _MM_HINT_T0 = 3 _MM_HINT_T1 = 2 _MM_HINT_T2 = 1 _MM_HINT_NTA = 0 ) const ( /* bcrypt.h:417:3: */ DSA_HASH_ALGORITHM_SHA1 = 0 DSA_HASH_ALGORITHM_SHA256 = 1 DSA_HASH_ALGORITHM_SHA512 = 2 ) const ( /* bcrypt.h:423:3: */ DSA_FIPS186_2 = 0 DSA_FIPS186_3 = 1 ) // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. const ( /* combaseapi.h:138:1: */ REGCLS_SINGLEUSE = 0 REGCLS_MULTIPLEUSE = 1 REGCLS_MULTI_SEPARATE = 2 REGCLS_SUSPENDED = 4 REGCLS_SURROGATE = 8 ) const ( /* combaseapi.h:149:1: */ COINITBASE_MULTITHREADED = 0 ) const ( /* combaseapi.h:214:1: */ SMEXF_SERVER = 1 SMEXF_HANDLER = 2 ) const ( /* combaseapi.h:318:1: */ COWAIT_DEFAULT = 0 COWAIT_WAITALL = 1 COWAIT_ALERTABLE = 2 COWAIT_INPUTAVAILABLE = 4 COWAIT_DISPATCH_CALLS = 8 COWAIT_DISPATCH_WINDOW_MESSAGES = 16 ) // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. const ( /* memoryapi.h:18:3: */ LowMemoryResourceNotification = 0 HighMemoryResourceNotification = 1 ) const ( /* minwinbase.h:100:3: */ FindExSearchNameMatch = 0 FindExSearchLimitToDirectories = 1 FindExSearchLimitToDevices = 2 FindExSearchMaxSearchOp = 3 ) const ( /* minwinbase.h:107:3: */ GetFileExInfoStandard = 0 GetFileExMaxInfoLevel = 1 ) const ( /* minwinbase.h:91:3: */ FindExInfoStandard = 0 FindExInfoBasic = 1 FindExInfoMaxInfoLevel = 2 ) const ( /* msxml.h:241:3: */ NODE_INVALID = 0 NODE_ELEMENT = 1 NODE_ATTRIBUTE = 2 NODE_TEXT = 3 NODE_CDATA_SECTION = 4 NODE_ENTITY_REFERENCE = 5 NODE_ENTITY = 6 NODE_PROCESSING_INSTRUCTION = 7 NODE_COMMENT = 8 NODE_DOCUMENT = 9 NODE_DOCUMENT_TYPE = 10 NODE_DOCUMENT_FRAGMENT = 11 NODE_NOTATION = 12 ) const ( /* msxml.h:247:3: */ XMLELEMTYPE_ELEMENT = 0 XMLELEMTYPE_TEXT = 1 XMLELEMTYPE_COMMENT = 2 XMLELEMTYPE_DOCUMENT = 3 XMLELEMTYPE_DTD = 4 XMLELEMTYPE_PI = 5 XMLELEMTYPE_OTHER = 6 ) const ( /* oaidl.h:284:1: */ SF_ERROR = 10 SF_I1 = 16 SF_I2 = 2 SF_I4 = 3 SF_I8 = 20 SF_BSTR = 8 SF_UNKNOWN = 13 SF_DISPATCH = 9 SF_VARIANT = 12 SF_RECORD = 36 SF_HAVEIID = 32781 ) const ( /* oaidl.h:2853:1: */ DESCKIND_NONE = 0 DESCKIND_FUNCDESC = 1 DESCKIND_VARDESC = 2 DESCKIND_TYPECOMP = 3 DESCKIND_IMPLICITAPPOBJ = 4 DESCKIND_MAX = 5 ) // **************************************************************************** // // ITypeLib interface const ( /* oaidl.h:4284:1: */ SYS_WIN16 = 0 SYS_WIN32 = 1 SYS_MAC = 2 SYS_WIN64 = 3 ) const ( /* oaidl.h:4291:1: */ LIBFLAG_FRESTRICTED = 1 LIBFLAG_FCONTROL = 2 LIBFLAG_FHIDDEN = 4 LIBFLAG_FHASDISKIMAGE = 8 ) const ( /* oaidl.h:4950:1: */ CHANGEKIND_ADDMEMBER = 0 CHANGEKIND_DELETEMEMBER = 1 CHANGEKIND_SETNAMES = 2 CHANGEKIND_SETDOCUMENTATION = 3 CHANGEKIND_GENERAL = 4 CHANGEKIND_INVALIDATE = 5 CHANGEKIND_CHANGEFAILED = 6 CHANGEKIND_MAX = 7 ) const ( /* oaidl.h:528:1: */ TKIND_ENUM = 0 TKIND_RECORD = 1 TKIND_MODULE = 2 TKIND_INTERFACE = 3 TKIND_DISPATCH = 4 TKIND_COCLASS = 5 TKIND_ALIAS = 6 TKIND_UNION = 7 TKIND_MAX = 8 ) const ( /* oaidl.h:672:1: */ CC_FASTCALL = 0 CC_CDECL = 1 CC_MSCPASCAL = 2 CC_PASCAL = 2 CC_MACPASCAL = 3 CC_STDCALL = 4 CC_FPFASTCALL = 5 CC_SYSCALL = 6 CC_MPWCDECL = 7 CC_MPWPASCAL = 8 CC_MAX = 9 ) const ( /* oaidl.h:686:1: */ FUNC_VIRTUAL = 0 FUNC_PUREVIRTUAL = 1 FUNC_NONVIRTUAL = 2 FUNC_STATIC = 3 FUNC_DISPATCH = 4 ) const ( /* oaidl.h:694:1: */ INVOKE_FUNC = 1 INVOKE_PROPERTYGET = 2 INVOKE_PROPERTYPUT = 4 INVOKE_PROPERTYPUTREF = 8 ) const ( /* oaidl.h:717:1: */ VAR_PERINSTANCE = 0 VAR_STATIC = 1 VAR_CONST = 2 VAR_DISPATCH = 3 ) const ( /* oaidl.h:746:1: */ TYPEFLAG_FAPPOBJECT = 1 TYPEFLAG_FCANCREATE = 2 TYPEFLAG_FLICENSED = 4 TYPEFLAG_FPREDECLID = 8 TYPEFLAG_FHIDDEN = 16 TYPEFLAG_FCONTROL = 32 TYPEFLAG_FDUAL = 64 TYPEFLAG_FNONEXTENSIBLE = 128 TYPEFLAG_FOLEAUTOMATION = 256 TYPEFLAG_FRESTRICTED = 512 TYPEFLAG_FAGGREGATABLE = 1024 TYPEFLAG_FREPLACEABLE = 2048 TYPEFLAG_FDISPATCHABLE = 4096 TYPEFLAG_FREVERSEBIND = 8192 TYPEFLAG_FPROXY = 16384 ) const ( /* oaidl.h:764:1: */ FUNCFLAG_FRESTRICTED = 1 FUNCFLAG_FSOURCE = 2 FUNCFLAG_FBINDABLE = 4 FUNCFLAG_FREQUESTEDIT = 8 FUNCFLAG_FDISPLAYBIND = 16 FUNCFLAG_FDEFAULTBIND = 32 FUNCFLAG_FHIDDEN = 64 FUNCFLAG_FUSESGETLASTERROR = 128 FUNCFLAG_FDEFAULTCOLLELEM = 256 FUNCFLAG_FUIDEFAULT = 512 FUNCFLAG_FNONBROWSABLE = 1024 FUNCFLAG_FREPLACEABLE = 2048 FUNCFLAG_FIMMEDIATEBIND = 4096 ) const ( /* oaidl.h:780:1: */ VARFLAG_FREADONLY = 1 VARFLAG_FSOURCE = 2 VARFLAG_FBINDABLE = 4 VARFLAG_FREQUESTEDIT = 8 VARFLAG_FDISPLAYBIND = 16 VARFLAG_FDEFAULTBIND = 32 VARFLAG_FHIDDEN = 64 VARFLAG_FRESTRICTED = 128 VARFLAG_FDEFAULTCOLLELEM = 256 VARFLAG_FUIDEFAULT = 512 VARFLAG_FNONBROWSABLE = 1024 VARFLAG_FREPLACEABLE = 2048 VARFLAG_FIMMEDIATEBIND = 4096 ) // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. const ( /* objbase.h:16:1: */ COINIT_APARTMENTTHREADED = 2 COINIT_MULTITHREADED = 0 COINIT_DISABLE_OLE1DDE = 4 COINIT_SPEED_OVER_MEMORY = 8 ) const ( /* objbase.h:87:1: */ SD_LAUNCHPERMISSIONS = 0 SD_ACCESSPERMISSIONS = 1 SD_LAUNCHRESTRICTIONS = 2 SD_ACCESSRESTRICTIONS = 3 ) const ( /* objidl.h:11100:1: */ ADVF_NODATA = 1 ADVF_PRIMEFIRST = 2 ADVF_ONLYONCE = 4 ADVF_DATAONSTOP = 64 ADVFCACHE_NOHANDLER = 8 ADVFCACHE_FORCEBUILTIN = 16 ADVFCACHE_ONSAVE = 32 ) const ( /* objidl.h:11357:1: */ TYMED_HGLOBAL = 1 TYMED_FILE = 2 TYMED_ISTREAM = 4 TYMED_ISTORAGE = 8 TYMED_GDI = 16 TYMED_MFPICT = 32 TYMED_ENHMF = 64 TYMED_NULL = 0 ) const ( /* objidl.h:12272:1: */ DATADIR_GET = 1 DATADIR_SET = 2 ) const ( /* objidl.h:12728:1: */ CALLTYPE_TOPLEVEL = 1 CALLTYPE_NESTED = 2 CALLTYPE_ASYNC = 3 CALLTYPE_TOPLEVEL_CALLPENDING = 4 CALLTYPE_ASYNC_CALLPENDING = 5 ) const ( /* objidl.h:12735:1: */ SERVERCALL_ISHANDLED = 0 SERVERCALL_REJECTED = 1 SERVERCALL_RETRYLATER = 2 ) const ( /* objidl.h:12740:1: */ PENDINGTYPE_TOPLEVEL = 1 PENDINGTYPE_NESTED = 2 ) const ( /* objidl.h:12744:1: */ PENDINGMSG_CANCELCALL = 0 PENDINGMSG_WAITNOPROCESS = 1 PENDINGMSG_WAITDEFPROCESS = 2 ) const ( /* objidl.h:14295:1: */ ServerApplication = 0 LibraryApplication = 1 ) const ( /* objidl.h:14299:1: */ IdleShutdown = 0 ForcedShutdown = 1 ) const ( /* objidl.h:7990:1: */ BIND_MAYBOTHERUSER = 1 BIND_JUSTTESTEXISTENCE = 2 ) const ( /* objidl.h:9048:1: */ MKSYS_NONE = 0 MKSYS_GENERICCOMPOSITE = 1 MKSYS_FILEMONIKER = 2 MKSYS_ANTIMONIKER = 3 MKSYS_ITEMMONIKER = 4 MKSYS_POINTERMONIKER = 5 MKSYS_CLASSMONIKER = 7 MKSYS_OBJREFMONIKER = 8 MKSYS_SESSIONMONIKER = 9 MKSYS_LUAMONIKER = 10 ) const ( /* objidl.h:9060:1: */ MKRREDUCE_ONE = 196608 MKRREDUCE_TOUSER = 131072 MKRREDUCE_THROUGHUSER = 65536 MKRREDUCE_ALL = 0 ) const ( /* objidlbase.h:1222:1: */ EXTCONN_STRONG = 1 EXTCONN_WEAK = 2 EXTCONN_CALLABLE = 4 ) const ( /* objidlbase.h:2106:1: */ STGTY_STORAGE = 1 STGTY_STREAM = 2 STGTY_LOCKBYTES = 3 STGTY_PROPERTY = 4 ) const ( /* objidlbase.h:2113:1: */ STREAM_SEEK_SET = 0 STREAM_SEEK_CUR = 1 STREAM_SEEK_END = 2 ) const ( /* objidlbase.h:2119:1: */ LOCK_WRITE = 1 LOCK_EXCLUSIVE = 2 LOCK_ONLYONCE = 4 ) const ( /* objidlbase.h:3999:1: */ EOAC_NONE = 0 EOAC_MUTUAL_AUTH = 1 EOAC_STATIC_CLOAKING = 32 EOAC_DYNAMIC_CLOAKING = 64 EOAC_ANY_AUTHORITY = 128 EOAC_MAKE_FULLSIC = 256 EOAC_DEFAULT = 2048 EOAC_SECURE_REFS = 2 EOAC_ACCESS_CONTROL = 4 EOAC_APPID = 8 EOAC_DYNAMIC = 16 EOAC_REQUIRE_FULLSIC = 512 EOAC_AUTO_IMPERSONATE = 1024 EOAC_NO_CUSTOM_MARSHAL = 8192 EOAC_DISABLE_AAA = 4096 ) const ( /* objidlbase.h:4353:1: */ COMBND_RPCTIMEOUT = 1 COMBND_SERVER_LOCALITY = 2 COMBND_RESERVED1 = 4 ) const ( /* objidlbase.h:4359:1: */ SERVER_LOCALITY_PROCESS_LOCAL = 0 SERVER_LOCALITY_MACHINE_LOCAL = 1 SERVER_LOCALITY_REMOTE = 2 ) const ( /* objidlbase.h:4483:1: */ COMGLB_EXCEPTION_HANDLING = 1 COMGLB_APPID = 2 COMGLB_RPC_THREADPOOL_SETTING = 3 COMGLB_RO_SETTINGS = 4 COMGLB_UNMARSHALING_POLICY = 5 ) const ( /* objidlbase.h:4491:1: */ COMGLB_EXCEPTION_HANDLE = 0 COMGLB_EXCEPTION_DONOT_HANDLE_FATAL = 1 COMGLB_EXCEPTION_DONOT_HANDLE = 1 COMGLB_EXCEPTION_DONOT_HANDLE_ANY = 2 ) const ( /* objidlbase.h:4498:1: */ COMGLB_RPC_THREADPOOL_SETTING_DEFAULT_POOL = 0 COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL = 1 ) const ( /* objidlbase.h:4503:1: */ COMGLB_STA_MODALLOOP_REMOVE_TOUCH_MESSAGES = 1 COMGLB_STA_MODALLOOP_SHARED_QUEUE_REMOVE_INPUT_MESSAGES = 2 COMGLB_STA_MODALLOOP_SHARED_QUEUE_DONOT_REMOVE_INPUT_MESSAGES = 4 COMGLB_FAST_RUNDOWN = 8 COMGLB_RESERVED1 = 16 COMGLB_RESERVED2 = 32 COMGLB_RESERVED3 = 64 COMGLB_STA_MODALLOOP_SHARED_QUEUE_REORDER_POINTER_MESSAGES = 128 ) const ( /* objidlbase.h:4514:1: */ COMGLB_UNMARSHALING_POLICY_NORMAL = 0 COMGLB_UNMARSHALING_POLICY_STRONG = 1 COMGLB_UNMARSHALING_POLICY_HYBRID = 2 ) // **************************************************************************** // // IAsyncManager interface const ( /* objidlbase.h:5508:1: */ DCOM_NONE = 0 DCOM_CALL_COMPLETE = 1 DCOM_CALL_CANCELED = 2 ) const ( /* objidlbase.h:6915:1: */ APTTYPEQUALIFIER_NONE = 0 APTTYPEQUALIFIER_IMPLICIT_MTA = 1 APTTYPEQUALIFIER_NA_ON_MTA = 2 APTTYPEQUALIFIER_NA_ON_STA = 3 APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA = 4 APTTYPEQUALIFIER_NA_ON_MAINSTA = 5 APTTYPEQUALIFIER_APPLICATION_STA = 6 ) const ( /* objidlbase.h:6925:1: */ APTTYPE_CURRENT = -1 APTTYPE_STA = 0 APTTYPE_MTA = 1 APTTYPE_NA = 2 APTTYPE_MAINSTA = 3 ) const ( /* objidlbase.h:6935:1: */ THDTYPE_BLOCKMESSAGES = 0 THDTYPE_PROCESSMESSAGES = 1 ) const ( /* objidlbase.h:7232:1: */ CO_MARSHALING_SOURCE_IS_APP_CONTAINER = 0 ) const ( /* oleauto.h:590:1: */ REGKIND_DEFAULT = 0 REGKIND_REGISTER = 1 REGKIND_NONE = 2 ) const ( /* oleidl.h:1229:1: */ OLEGETMONIKER_ONLYIFTHERE = 1 OLEGETMONIKER_FORCEASSIGN = 2 OLEGETMONIKER_UNASSIGN = 3 OLEGETMONIKER_TEMPFORUSER = 4 ) const ( /* oleidl.h:1236:1: */ OLEWHICHMK_CONTAINER = 1 OLEWHICHMK_OBJREL = 2 OLEWHICHMK_OBJFULL = 3 ) const ( /* oleidl.h:1242:1: */ USERCLASSTYPE_FULL = 1 USERCLASSTYPE_SHORT = 2 USERCLASSTYPE_APPNAME = 3 ) const ( /* oleidl.h:1248:1: */ OLEMISC_RECOMPOSEONRESIZE = 1 OLEMISC_ONLYICONIC = 2 OLEMISC_INSERTNOTREPLACE = 4 OLEMISC_STATIC = 8 OLEMISC_CANTLINKINSIDE = 16 OLEMISC_CANLINKBYOLE1 = 32 OLEMISC_ISLINKOBJECT = 64 OLEMISC_INSIDEOUT = 128 OLEMISC_ACTIVATEWHENVISIBLE = 256 OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512 OLEMISC_INVISIBLEATRUNTIME = 1024 OLEMISC_ALWAYSRUN = 2048 OLEMISC_ACTSLIKEBUTTON = 4096 OLEMISC_ACTSLIKELABEL = 8192 OLEMISC_NOUIACTIVATE = 16384 OLEMISC_ALIGNABLE = 32768 OLEMISC_SIMPLEFRAME = 65536 OLEMISC_SETCLIENTSITEFIRST = 131072 OLEMISC_IMEMODE = 262144 OLEMISC_IGNOREACTIVATEWHENVISIBLE = 524288 OLEMISC_WANTSTOMENUMERGE = 1048576 OLEMISC_SUPPORTSMULTILEVELUNDO = 2097152 ) const ( /* oleidl.h:1272:1: */ OLECLOSE_SAVEIFDIRTY = 0 OLECLOSE_NOSAVE = 1 OLECLOSE_PROMPTSAVE = 2 ) const ( /* oleidl.h:1792:1: */ OLERENDER_NONE = 0 OLERENDER_DRAW = 1 OLERENDER_FORMAT = 2 OLERENDER_ASIS = 3 ) const ( /* oleidl.h:1934:1: */ OLEUPDATE_ALWAYS = 1 OLEUPDATE_ONCALL = 3 ) const ( /* oleidl.h:1942:1: */ OLELINKBIND_EVENIFCLASSDIFF = 1 ) const ( /* oleidl.h:2225:1: */ BINDSPEED_INDEFINITE = 1 BINDSPEED_MODERATE = 2 BINDSPEED_IMMEDIATE = 3 ) const ( /* oleidl.h:2231:1: */ OLECONTF_EMBEDDINGS = 1 OLECONTF_LINKS = 2 OLECONTF_OTHERS = 4 OLECONTF_ONLYUSER = 8 OLECONTF_ONLYIFRUNNING = 16 ) const ( /* oleidl.h:4465:1: */ OLEVERBATTRIB_NEVERDIRTIES = 1 OLEVERBATTRIB_ONCONTAINERMENU = 2 ) const ( /* oleidl.h:548:1: */ DISCARDCACHE_SAVEIFDIRTY = 0 DISCARDCACHE_NOSAVE = 1 ) const ( /* propidl.h:381:1: */ PIDMSI_STATUS_NORMAL = 0 PIDMSI_STATUS_NEW = 1 PIDMSI_STATUS_PRELIM = 2 PIDMSI_STATUS_DRAFT = 3 PIDMSI_STATUS_INPROGRESS = 4 PIDMSI_STATUS_EDIT = 5 PIDMSI_STATUS_REVIEW = 6 PIDMSI_STATUS_PROOF = 7 PIDMSI_STATUS_FINAL = 8 PIDMSI_STATUS_OTHER = 32767 ) // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // TODO: This isn't actual working on gcc. Either we need to implement // their __try/__except/__finally feature, or we need to do at least for x64 // emulation-code via inline-assembler ... // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. const ( /* rpcasync.h:20:3: */ RpcNotificationTypeNone = 0 RpcNotificationTypeEvent = 1 RpcNotificationTypeApc = 2 RpcNotificationTypeIoc = 3 RpcNotificationTypeHwnd = 4 RpcNotificationTypeCallback = 5 ) const ( /* rpcasync.h:214:1: */ rctInvalid = 0 rctNormal = 1 rctTraining = 2 rctGuaranteed = 3 ) const ( /* rpcasync.h:221:1: */ rlafInvalid = 0 rlafIPv4 = 1 rlafIPv6 = 2 ) const ( /* rpcasync.h:227:1: */ RpcNotificationCallNone = 0 RpcNotificationClientDisconnect = 1 RpcNotificationCallCancel = 2 ) const ( /* rpcasync.h:233:1: */ rcclInvalid = 0 rcclLocal = 1 rcclRemote = 2 rcclClientUnknownLocality = 3 ) const ( /* rpcasync.h:25:3: */ RpcCallComplete = 0 RpcSendComplete = 1 RpcReceiveComplete = 2 ) const ( /* rpcasync.h:78:3: */ eeptAnsiString = 1 eeptUnicodeString = 2 eeptLongVal = 3 eeptShortVal = 4 eeptPointerVal = 5 eeptNone = 6 eeptBinary = 7 ) const ( /* rpcdce.h:443:3: */ RPCHTTP_RS_REDIRECT = 1 RPCHTTP_RS_ACCESS_1 = 2 RPCHTTP_RS_SESSION = 3 RPCHTTP_RS_ACCESS_2 = 4 RPCHTTP_RS_INTERFACE = 5 ) const ( /* rpcdcep.h:41:3: */ PROTOCOL_NOT_LOADED = 1 PROTOCOL_LOADED = 2 PROTOCOL_ADDRESS_CHANGE = 3 ) const ( /* rpcndr.h:360:3: */ USER_MARSHAL_CB_BUFFER_SIZE = 0 USER_MARSHAL_CB_MARSHALL = 1 USER_MARSHAL_CB_UNMARSHALL = 2 USER_MARSHAL_CB_FREE = 3 ) const ( /* rpcndr.h:391:3: */ IDL_CS_NO_CONVERT = 0 IDL_CS_IN_PLACE_CONVERT = 1 IDL_CS_NEW_BUFFER_CONVERT = 2 ) const ( /* rpcndr.h:495:3: */ XLAT_SERVER = 1 XLAT_CLIENT = 2 ) const ( /* rpcndr.h:672:3: */ STUB_UNMARSHAL = 0 STUB_CALL_SERVER = 1 STUB_MARSHAL = 2 STUB_CALL_SERVER_NO_HRESULT = 3 ) const ( /* rpcndr.h:676:3: */ PROXY_CALCSIZE = 0 PROXY_GETBUFFER = 1 PROXY_MARSHAL = 2 PROXY_SENDRECEIVE = 3 PROXY_UNMARSHAL = 4 ) const ( /* sysinfoapi.h:70:3: */ ComputerNameNetBIOS = 0 ComputerNameDnsHostname = 1 ComputerNameDnsDomain = 2 ComputerNameDnsFullyQualified = 3 ComputerNamePhysicalNetBIOS = 4 ComputerNamePhysicalDnsHostname = 5 ComputerNamePhysicalDnsDomain = 6 ComputerNamePhysicalDnsFullyQualified = 7 ComputerNameMax = 8 ) const ( /* urlmon.h:10655:1: */ BINDHANDLETYPES_APPCACHE = 0 BINDHANDLETYPES_DEPENDENCY = 1 BINDHANDLETYPES_COUNT = 2 ) const ( /* urlmon.h:1195:1: */ BINDVERB_GET = 0 BINDVERB_POST = 1 BINDVERB_PUT = 2 BINDVERB_CUSTOM = 3 BINDVERB_RESERVED1 = 4 ) const ( /* urlmon.h:1203:1: */ BINDINFOF_URLENCODESTGMEDDATA = 1 BINDINFOF_URLENCODEDEXTRAINFO = 2 ) const ( /* urlmon.h:1208:1: */ BINDF_ASYNCHRONOUS = 1 BINDF_ASYNCSTORAGE = 2 BINDF_NOPROGRESSIVERENDERING = 4 BINDF_OFFLINEOPERATION = 8 BINDF_GETNEWESTVERSION = 16 BINDF_NOWRITECACHE = 32 BINDF_NEEDFILE = 64 BINDF_PULLDATA = 128 BINDF_IGNORESECURITYPROBLEM = 256 BINDF_RESYNCHRONIZE = 512 BINDF_HYPERLINK = 1024 BINDF_NO_UI = 2048 BINDF_SILENTOPERATION = 4096 BINDF_PRAGMA_NO_CACHE = 8192 BINDF_GETCLASSOBJECT = 16384 BINDF_RESERVED_1 = 32768 BINDF_FREE_THREADED = 65536 BINDF_DIRECT_READ = 131072 BINDF_FORMS_SUBMIT = 262144 BINDF_GETFROMCACHE_IF_NET_FAIL = 524288 BINDF_FROMURLMON = 1048576 BINDF_FWD_BACK = 2097152 BINDF_PREFERDEFAULTHANDLER = 4194304 BINDF_ENFORCERESTRICTED = 8388608 BINDF_RESERVED_2 = 2147483648 BINDF_RESERVED_3 = 16777216 BINDF_RESERVED_4 = 33554432 BINDF_RESERVED_5 = 67108864 BINDF_RESERVED_6 = 134217728 BINDF_RESERVED_7 = 1073741824 BINDF_RESERVED_8 = 536870912 ) const ( /* urlmon.h:1242:1: */ URL_ENCODING_NONE = 0 URL_ENCODING_ENABLE_UTF8 = 268435456 URL_ENCODING_DISABLE_UTF8 = 536870912 ) const ( /* urlmon.h:1298:1: */ BINDINFO_OPTIONS_WININETFLAG = 65536 BINDINFO_OPTIONS_ENABLE_UTF8 = 131072 BINDINFO_OPTIONS_DISABLE_UTF8 = 262144 BINDINFO_OPTIONS_USE_IE_ENCODING = 524288 BINDINFO_OPTIONS_BINDTOOBJECT = 1048576 BINDINFO_OPTIONS_SECURITYOPTOUT = 2097152 BINDINFO_OPTIONS_IGNOREMIMETEXTPLAIN = 4194304 BINDINFO_OPTIONS_USEBINDSTRINGCREDS = 8388608 BINDINFO_OPTIONS_IGNOREHTTPHTTPSREDIRECTS = 16777216 BINDINFO_OPTIONS_IGNORE_SSLERRORS_ONCE = 33554432 BINDINFO_WPC_DOWNLOADBLOCKED = 134217728 BINDINFO_WPC_LOGGING_ENABLED = 268435456 BINDINFO_OPTIONS_ALLOWCONNECTDATA = 536870912 BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS = 1073741824 BINDINFO_OPTIONS_SHDOCVW_NAVIGATE = -2147483648 ) const ( /* urlmon.h:1316:1: */ BSCF_FIRSTDATANOTIFICATION = 1 BSCF_INTERMEDIATEDATANOTIFICATION = 2 BSCF_LASTDATANOTIFICATION = 4 BSCF_DATAFULLYAVAILABLE = 8 BSCF_AVAILABLEDATASIZEUNKNOWN = 16 BSCF_SKIPDRAINDATAFORFILEURLS = 32 BSCF_64BITLENGTHDOWNLOAD = 64 ) const ( /* urlmon.h:1326:1: */ BINDSTATUS_FINDINGRESOURCE = 1 BINDSTATUS_CONNECTING = 2 BINDSTATUS_REDIRECTING = 3 BINDSTATUS_BEGINDOWNLOADDATA = 4 BINDSTATUS_DOWNLOADINGDATA = 5 BINDSTATUS_ENDDOWNLOADDATA = 6 BINDSTATUS_BEGINDOWNLOADCOMPONENTS = 7 BINDSTATUS_INSTALLINGCOMPONENTS = 8 BINDSTATUS_ENDDOWNLOADCOMPONENTS = 9 BINDSTATUS_USINGCACHEDCOPY = 10 BINDSTATUS_SENDINGREQUEST = 11 BINDSTATUS_CLASSIDAVAILABLE = 12 BINDSTATUS_MIMETYPEAVAILABLE = 13 BINDSTATUS_CACHEFILENAMEAVAILABLE = 14 BINDSTATUS_BEGINSYNCOPERATION = 15 BINDSTATUS_ENDSYNCOPERATION = 16 BINDSTATUS_BEGINUPLOADDATA = 17 BINDSTATUS_UPLOADINGDATA = 18 BINDSTATUS_ENDUPLOADDATA = 19 BINDSTATUS_PROTOCOLCLASSID = 20 BINDSTATUS_ENCODING = 21 BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE = 22 BINDSTATUS_CLASSINSTALLLOCATION = 23 BINDSTATUS_DECODING = 24 BINDSTATUS_LOADINGMIMEHANDLER = 25 BINDSTATUS_CONTENTDISPOSITIONATTACH = 26 BINDSTATUS_FILTERREPORTMIMETYPE = 27 BINDSTATUS_CLSIDCANINSTANTIATE = 28 BINDSTATUS_IUNKNOWNAVAILABLE = 29 BINDSTATUS_DIRECTBIND = 30 BINDSTATUS_RAWMIMETYPE = 31 BINDSTATUS_PROXYDETECTING = 32 BINDSTATUS_ACCEPTRANGES = 33 BINDSTATUS_COOKIE_SENT = 34 BINDSTATUS_COMPACT_POLICY_RECEIVED = 35 BINDSTATUS_COOKIE_SUPPRESSED = 36 BINDSTATUS_COOKIE_STATE_UNKNOWN = 37 BINDSTATUS_COOKIE_STATE_ACCEPT = 38 BINDSTATUS_COOKIE_STATE_REJECT = 39 BINDSTATUS_COOKIE_STATE_PROMPT = 40 BINDSTATUS_COOKIE_STATE_LEASH = 41 BINDSTATUS_COOKIE_STATE_DOWNGRADE = 42 BINDSTATUS_POLICY_HREF = 43 BINDSTATUS_P3P_HEADER = 44 BINDSTATUS_SESSION_COOKIE_RECEIVED = 45 BINDSTATUS_PERSISTENT_COOKIE_RECEIVED = 46 BINDSTATUS_SESSION_COOKIES_ALLOWED = 47 BINDSTATUS_CACHECONTROL = 48 BINDSTATUS_CONTENTDISPOSITIONFILENAME = 49 BINDSTATUS_MIMETEXTPLAINMISMATCH = 50 BINDSTATUS_PUBLISHERAVAILABLE = 51 BINDSTATUS_DISPLAYNAMEAVAILABLE = 52 BINDSTATUS_SSLUX_NAVBLOCKED = 53 BINDSTATUS_SERVER_MIMETYPEAVAILABLE = 54 BINDSTATUS_SNIFFED_CLASSIDAVAILABLE = 55 BINDSTATUS_64BIT_PROGRESS = 56 BINDSTATUS_LAST = 56 BINDSTATUS_RESERVED_0 = 57 BINDSTATUS_RESERVED_1 = 58 BINDSTATUS_RESERVED_2 = 59 BINDSTATUS_RESERVED_3 = 60 BINDSTATUS_RESERVED_4 = 61 BINDSTATUS_RESERVED_5 = 62 BINDSTATUS_RESERVED_6 = 63 BINDSTATUS_RESERVED_7 = 64 BINDSTATUS_RESERVED_8 = 65 BINDSTATUS_RESERVED_9 = 66 BINDSTATUS_LAST_PRIVATE = 66 ) const ( /* urlmon.h:1675:1: */ BINDF2_DISABLEBASICOVERHTTP = 1 BINDF2_DISABLEAUTOCOOKIEHANDLING = 2 BINDF2_READ_DATA_GREATER_THAN_4GB = 4 BINDF2_DISABLE_HTTP_REDIRECT_XSECURITYID = 8 BINDF2_SETDOWNLOADMODE = 32 BINDF2_DISABLE_HTTP_REDIRECT_CACHING = 64 BINDF2_KEEP_CALLBACK_MODULE_LOADED = 128 BINDF2_ALLOW_PROXY_CRED_PROMPT = 256 BINDF2_RESERVED_F = 131072 BINDF2_RESERVED_E = 262144 BINDF2_RESERVED_D = 524288 BINDF2_RESERVED_C = 1048576 BINDF2_RESERVED_B = 2097152 BINDF2_RESERVED_A = 4194304 BINDF2_RESERVED_9 = 8388608 BINDF2_RESERVED_8 = 16777216 BINDF2_RESERVED_7 = 33554432 BINDF2_RESERVED_6 = 67108864 BINDF2_RESERVED_5 = 134217728 BINDF2_RESERVED_4 = 268435456 BINDF2_RESERVED_3 = 536870912 BINDF2_RESERVED_2 = 1073741824 BINDF2_RESERVED_1 = 2147483648 ) const ( /* urlmon.h:1989:1: */ AUTHENTICATEF_PROXY = 1 AUTHENTICATEF_BASIC = 2 AUTHENTICATEF_HTTP = 4 ) const ( /* urlmon.h:2702:1: */ CIP_DISK_FULL = 0 CIP_ACCESS_DENIED = 1 CIP_NEWER_VERSION_EXISTS = 2 CIP_OLDER_VERSION_EXISTS = 3 CIP_NAME_CONFLICT = 4 CIP_TRUST_VERIFICATION_COMPONENT_MISSING = 5 CIP_EXE_SELF_REGISTERATION_TIMEOUT = 6 CIP_UNSAFE_TO_ABORT = 7 CIP_NEED_REBOOT = 8 CIP_NEED_REBOOT_UI_PERMISSION = 9 ) const ( /* urlmon.h:5266:1: */ BINDSTRING_HEADERS = 1 BINDSTRING_ACCEPT_MIMES = 2 BINDSTRING_EXTRA_URL = 3 BINDSTRING_LANGUAGE = 4 BINDSTRING_USERNAME = 5 BINDSTRING_PASSWORD = 6 BINDSTRING_UA_PIXELS = 7 BINDSTRING_UA_COLOR = 8 BINDSTRING_OS = 9 BINDSTRING_USER_AGENT = 10 BINDSTRING_ACCEPT_ENCODINGS = 11 BINDSTRING_POST_COOKIE = 12 BINDSTRING_POST_DATA_MIME = 13 BINDSTRING_URL = 14 BINDSTRING_IID = 15 BINDSTRING_FLAG_BIND_TO_OBJECT = 16 BINDSTRING_PTR_BIND_CONTEXT = 17 BINDSTRING_XDR_ORIGIN = 18 BINDSTRING_DOWNLOADPATH = 19 BINDSTRING_ROOTDOC_URL = 20 BINDSTRING_INITIAL_FILENAME = 21 BINDSTRING_PROXY_USERNAME = 22 BINDSTRING_PROXY_PASSWORD = 23 ) const ( /* urlmon.h:5537:1: */ PI_PARSE_URL = 1 PI_FILTER_MODE = 2 PI_FORCE_ASYNC = 4 PI_USE_WORKERTHREAD = 8 PI_MIMEVERIFICATION = 16 PI_CLSIDLOOKUP = 32 PI_DATAPROGRESS = 64 PI_SYNCHRONOUS = 128 PI_APARTMENTTHREADED = 256 PI_CLASSINSTALL = 512 PI_PASSONBINDCTX = 8192 PI_NOMIMEHANDLER = 32768 PI_LOADAPPDIRECT = 16384 PD_FORCE_SWITCH = 65536 PI_PREFERDEFAULTHANDLER = 131072 ) const ( /* urlmon.h:6458:1: */ OIBDG_APARTMENTTHREADED = 256 OIBDG_DATAONLY = 4096 ) const ( /* urlmon.h:6944:1: */ PARSE_CANONICALIZE = 1 PARSE_FRIENDLY = 2 PARSE_SECURITY_URL = 3 PARSE_ROOTDOCUMENT = 4 PARSE_DOCUMENT = 5 PARSE_ANCHOR = 6 PARSE_ENCODE_IS_UNESCAPE = 7 PARSE_DECODE_IS_ESCAPE = 8 PARSE_PATH_FROM_URL = 9 PARSE_URL_FROM_PATH = 10 PARSE_MIME = 11 PARSE_SERVER = 12 PARSE_SCHEMA = 13 PARSE_SITE = 14 PARSE_DOMAIN = 15 PARSE_LOCATION = 16 PARSE_SECURITY_DOMAIN = 17 PARSE_ESCAPE = 18 PARSE_UNESCAPE = 19 ) const ( /* urlmon.h:6966:1: */ PSU_DEFAULT = 1 PSU_SECURITY_URL_ONLY = 2 ) const ( /* urlmon.h:6971:1: */ QUERY_EXPIRATION_DATE = 1 QUERY_TIME_OF_LAST_CHANGE = 2 QUERY_CONTENT_ENCODING = 3 QUERY_CONTENT_TYPE = 4 QUERY_REFRESH = 5 QUERY_RECOMBINE = 6 QUERY_CAN_NAVIGATE = 7 QUERY_USES_NETWORK = 8 QUERY_IS_CACHED = 9 QUERY_IS_INSTALLEDENTRY = 10 QUERY_IS_CACHED_OR_MAPPED = 11 QUERY_USES_CACHE = 12 QUERY_IS_SECURE = 13 QUERY_IS_SAFE = 14 QUERY_USES_HISTORYFOLDER = 15 QUERY_IS_CACHED_AND_USABLE_OFFLINE = 16 ) // **************************************************************************** // // IInternetSecurityManager interface const ( /* urlmon.h:7495:1: */ PUAF_DEFAULT = 0 PUAF_NOUI = 1 PUAF_ISFILE = 2 PUAF_WARN_IF_DENIED = 4 PUAF_FORCEUI_FOREGROUND = 8 PUAF_CHECK_TIFS = 16 PUAF_DONTCHECKBOXINDIALOG = 32 PUAF_TRUSTED = 64 PUAF_ACCEPT_WILDCARD_SCHEME = 128 PUAF_ENFORCERESTRICTED = 256 PUAF_NOSAVEDFILECHECK = 512 PUAF_REQUIRESAVEDFILECHECK = 1024 PUAF_DONT_USE_CACHE = 4096 PUAF_RESERVED1 = 8192 PUAF_RESERVED2 = 16384 PUAF_LMZ_UNLOCKED = 65536 PUAF_LMZ_LOCKED = 131072 PUAF_DEFAULTZONEPOL = 262144 PUAF_NPL_USE_LOCKED_IF_RESTRICTED = 524288 PUAF_NOUIIFLOCKED = 1048576 PUAF_DRAGPROTOCOLCHECK = 2097152 ) const ( /* urlmon.h:7518:1: */ PUAFOUT_DEFAULT = 0 PUAFOUT_ISLOCKZONEPOLICY = 1 ) const ( /* urlmon.h:7524:1: */ SZM_CREATE = 0 SZM_DELETE = 1 ) const ( /* urlmon.h:793:1: */ MIMETYPEPROP = 0 USE_SRC_URL = 1 CLASSIDPROP = 2 TRUSTEDDOWNLOADPROP = 3 POPUPLEVELPROP = 4 ) const ( /* urlmon.h:8834:1: */ URLZONE_INVALID = -1 URLZONE_PREDEFINED_MIN = 0 URLZONE_LOCAL_MACHINE = 0 URLZONE_INTRANET = 1 URLZONE_TRUSTED = 2 URLZONE_INTERNET = 3 URLZONE_UNTRUSTED = 4 URLZONE_PREDEFINED_MAX = 999 URLZONE_USER_MIN = 1000 URLZONE_USER_MAX = 10000 ) const ( /* urlmon.h:8849:1: */ URLTEMPLATE_CUSTOM = 0 URLTEMPLATE_PREDEFINED_MIN = 65536 URLTEMPLATE_LOW = 65536 URLTEMPLATE_MEDLOW = 66816 URLTEMPLATE_MEDIUM = 69632 URLTEMPLATE_MEDHIGH = 70912 URLTEMPLATE_HIGH = 73728 URLTEMPLATE_PREDEFINED_MAX = 131072 ) const ( /* urlmon.h:8860:1: */ MAX_ZONE_PATH = 260 MAX_ZONE_DESCRIPTION = 200 ) const ( /* urlmon.h:8866:1: */ ZAFLAGS_CUSTOM_EDIT = 1 ZAFLAGS_ADD_SITES = 2 ZAFLAGS_REQUIRE_VERIFICATION = 4 ZAFLAGS_INCLUDE_PROXY_OVERRIDE = 8 ZAFLAGS_INCLUDE_INTRANET_SITES = 16 ZAFLAGS_NO_UI = 32 ZAFLAGS_SUPPORTS_VERIFICATION = 64 ZAFLAGS_UNC_AS_INTRANET = 128 ZAFLAGS_DETECT_INTRANET = 256 ZAFLAGS_USE_LOCKED_ZONES = 65536 ZAFLAGS_VERIFY_TEMPLATE_SETTINGS = 131072 ZAFLAGS_NO_CACHE = 262144 ) const ( /* urlmon.h:8894:1: */ URLZONEREG_DEFAULT = 0 URLZONEREG_HKLM = 1 URLZONEREG_HKCU = 2 ) // TODO: Add RTL_UMS... to winnt.h header and add UMS-base API. const ( /* winbase.h:1191:3: */ ThreadMemoryPriority = 0 ThreadAbsoluteCpuPriority = 1 ThreadInformationClassMax = 2 ) const ( /* winbase.h:1197:3: */ ProcessMemoryPriority = 0 ProcessInformationClassMax = 1 ) const ( /* winbase.h:1298:3: */ DEPPolicyAlwaysOff = 0 DEPPolicyAlwaysOn = 1 DEPPolicyOptIn = 2 DEPPolicyOptOut = 3 DEPTotalPolicyCount = 4 ) const ( /* winbase.h:2147:3: */ FindStreamInfoStandard = 0 FindStreamInfoMaxInfoLevel = 1 ) const ( /* winioctl.h:1205:1: */ DeviceProblemNone = 0 DeviceProblemHardware = 1 DeviceProblemCHMError = 2 DeviceProblemDoorOpen = 3 DeviceProblemCalibrationError = 4 DeviceProblemTargetFailure = 5 DeviceProblemCHMMoveError = 6 DeviceProblemCHMZeroError = 7 DeviceProblemCartridgeInsertError = 8 DeviceProblemPositionError = 9 DeviceProblemSensorError = 10 DeviceProblemCartridgeEjectError = 11 DeviceProblemGripperError = 12 DeviceProblemDriveError = 13 ) const ( /* winioctl.h:1736:1: */ StorageDeviceProperty = 0 StorageAdapterProperty = 1 StorageDeviceIdProperty = 2 StorageDeviceUniqueIdProperty = 3 StorageDeviceWriteCacheProperty = 4 StorageMiniportProperty = 5 StorageAccessAlignmentProperty = 6 StorageDeviceSeekPenaltyProperty = 7 StorageDeviceTrimProperty = 8 ) const ( /* winioctl.h:1748:1: */ PropertyStandardQuery = 0 PropertyExistsQuery = 1 PropertyMaskQuery = 2 PropertyQueryMaxDefined = 3 ) const ( /* winioctl.h:266:3: */ DDS_4mm = 32 MiniQic = 33 Travan = 34 QIC = 35 MP_8mm = 36 AME_8mm = 37 AIT1_8mm = 38 DLT = 39 NCTP = 40 IBM_3480 = 41 IBM_3490E = 42 IBM_Magstar_3590 = 43 IBM_Magstar_MP = 44 STK_DATA_D3 = 45 SONY_DTF = 46 DV_6mm = 47 DMI = 48 SONY_D2 = 49 CLEANER_CARTRIDGE = 50 CD_ROM = 51 CD_R = 52 CD_RW = 53 DVD_ROM = 54 DVD_R = 55 DVD_RW = 56 MO_3_RW = 57 MO_5_WO = 58 MO_5_RW = 59 MO_5_LIMDOW = 60 PC_5_WO = 61 PC_5_RW = 62 PD_5_RW = 63 ABL_5_WO = 64 PINNACLE_APEX_5_RW = 65 SONY_12_WO = 66 PHILIPS_12_WO = 67 HITACHI_12_WO = 68 CYGNET_12_WO = 69 KODAK_14_WO = 70 MO_NFR_525 = 71 NIKON_12_RW = 72 IOMEGA_ZIP = 73 IOMEGA_JAZ = 74 SYQUEST_EZ135 = 75 SYQUEST_EZFLYER = 76 SYQUEST_SYJET = 77 AVATAR_F2 = 78 MP2_8mm = 79 DST_S = 80 DST_M = 81 DST_L = 82 VXATape_1 = 83 VXATape_2 = 84 STK_9840 = 85 LTO_Ultrium = 86 LTO_Accelis = 87 DVD_RAM = 88 AIT_8mm = 89 ADR_1 = 90 ADR_2 = 91 STK_9940 = 92 SAIT = 93 VXATape = 94 ) const ( /* winioctl.h:340:3: */ BusTypeUnknown = 0 BusTypeScsi = 1 BusTypeAtapi = 2 BusTypeAta = 3 BusType1394 = 4 BusTypeSsa = 5 BusTypeFibre = 6 BusTypeUsb = 7 BusTypeRAID = 8 BusTypeMax = 9 BusTypeMaxReserved = 127 ) const ( /* winioctl.h:499:1: */ Unknown = 0 F5_1Pt2_512 = 1 F3_1Pt44_512 = 2 F3_2Pt88_512 = 3 F3_20Pt8_512 = 4 F3_720_512 = 5 F5_360_512 = 6 F5_320_512 = 7 F5_320_1024 = 8 F5_180_512 = 9 F5_160_512 = 10 RemovableMedia = 11 FixedMedia = 12 F3_120M_512 = 13 F3_640_512 = 14 F5_640_512 = 15 F5_720_512 = 16 F3_1Pt2_512 = 17 F3_1Pt23_1024 = 18 F5_1Pt23_1024 = 19 F3_128Mb_512 = 20 F3_230Mb_512 = 21 F8_256_128 = 22 F3_200Mb_512 = 23 F3_240M_512 = 24 F3_32M_512 = 25 ) // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. const ( /* winioctl.h:577:1: */ PARTITION_STYLE_MBR = 0 PARTITION_STYLE_GPT = 1 PARTITION_STYLE_RAW = 2 ) const ( /* winioctl.h:667:1: */ DetectNone = 0 DetectInt13 = 1 DetectExInt13 = 2 ) const ( /* winioctl.h:729:1: */ EqualPriority = 0 KeepPrefetchedData = 1 KeepReadData = 2 ) const ( /* winioctl.h:820:1: */ RequestSize = 0 RequestLocation = 1 ) // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. const ( /* winioctl.h:968:1: */ AllElements = 0 ChangerTransport = 1 ChangerSlot = 2 ChangerIEPort = 3 ChangerDrive = 4 ChangerDoor = 5 ChangerKeypad = 6 ChangerMaxElement = 7 ) const ( /* winnls.h:720:3: */ COMPARE_STRING = 1 ) const ( /* winnls.h:756:3: */ GEO_NATION = 1 GEO_LATITUDE = 2 GEO_LONGITUDE = 3 GEO_ISO2 = 4 GEO_ISO3 = 5 GEO_RFC1766 = 6 GEO_LCID = 7 GEO_FRIENDLYNAME = 8 GEO_OFFICIALNAME = 9 GEO_TIMEZONES = 10 GEO_OFFICIALLANGUAGES = 11 GEO_ISO_UN_NUMBER = 12 GEO_PARENT = 13 ) const ( /* winnls.h:772:3: */ GEOCLASS_NATION = 16 GEOCLASS_REGION = 14 GEOCLASS_ALL = 0 ) const ( /* winnt.h:2945:5: */ SidTypeUser = 1 SidTypeGroup = 2 SidTypeDomain = 3 SidTypeAlias = 4 SidTypeWellKnownGroup = 5 SidTypeDeletedAccount = 6 SidTypeInvalid = 7 SidTypeUnknown = 8 SidTypeComputer = 9 SidTypeLabel = 10 SidTypeLogonSession = 11 ) const ( /* winnt.h:3184:5: */ WinNullSid = 0 WinWorldSid = 1 WinLocalSid = 2 WinCreatorOwnerSid = 3 WinCreatorGroupSid = 4 WinCreatorOwnerServerSid = 5 WinCreatorGroupServerSid = 6 WinNtAuthoritySid = 7 WinDialupSid = 8 WinNetworkSid = 9 WinBatchSid = 10 WinInteractiveSid = 11 WinServiceSid = 12 WinAnonymousSid = 13 WinProxySid = 14 WinEnterpriseControllersSid = 15 WinSelfSid = 16 WinAuthenticatedUserSid = 17 WinRestrictedCodeSid = 18 WinTerminalServerSid = 19 WinRemoteLogonIdSid = 20 WinLogonIdsSid = 21 WinLocalSystemSid = 22 WinLocalServiceSid = 23 WinNetworkServiceSid = 24 WinBuiltinDomainSid = 25 WinBuiltinAdministratorsSid = 26 WinBuiltinUsersSid = 27 WinBuiltinGuestsSid = 28 WinBuiltinPowerUsersSid = 29 WinBuiltinAccountOperatorsSid = 30 WinBuiltinSystemOperatorsSid = 31 WinBuiltinPrintOperatorsSid = 32 WinBuiltinBackupOperatorsSid = 33 WinBuiltinReplicatorSid = 34 WinBuiltinPreWindows2000CompatibleAccessSid = 35 WinBuiltinRemoteDesktopUsersSid = 36 WinBuiltinNetworkConfigurationOperatorsSid = 37 WinAccountAdministratorSid = 38 WinAccountGuestSid = 39 WinAccountKrbtgtSid = 40 WinAccountDomainAdminsSid = 41 WinAccountDomainUsersSid = 42 WinAccountDomainGuestsSid = 43 WinAccountComputersSid = 44 WinAccountControllersSid = 45 WinAccountCertAdminsSid = 46 WinAccountSchemaAdminsSid = 47 WinAccountEnterpriseAdminsSid = 48 WinAccountPolicyAdminsSid = 49 WinAccountRasAndIasServersSid = 50 WinNTLMAuthenticationSid = 51 WinDigestAuthenticationSid = 52 WinSChannelAuthenticationSid = 53 WinThisOrganizationSid = 54 WinOtherOrganizationSid = 55 WinBuiltinIncomingForestTrustBuildersSid = 56 WinBuiltinPerfMonitoringUsersSid = 57 WinBuiltinPerfLoggingUsersSid = 58 WinBuiltinAuthorizationAccessSid = 59 WinBuiltinTerminalServerLicenseServersSid = 60 WinBuiltinDCOMUsersSid = 61 WinBuiltinIUsersSid = 62 WinIUserSid = 63 WinBuiltinCryptoOperatorsSid = 64 WinUntrustedLabelSid = 65 WinLowLabelSid = 66 WinMediumLabelSid = 67 WinHighLabelSid = 68 WinSystemLabelSid = 69 WinWriteRestrictedCodeSid = 70 WinCreatorOwnerRightsSid = 71 WinCacheablePrincipalsGroupSid = 72 WinNonCacheablePrincipalsGroupSid = 73 WinEnterpriseReadonlyControllersSid = 74 WinAccountReadonlyControllersSid = 75 WinBuiltinEventLogReadersGroup = 76 WinNewEnterpriseReadonlyControllersSid = 77 WinBuiltinCertSvcDComAccessGroup = 78 WinMediumPlusLabelSid = 79 WinLocalLogonSid = 80 WinConsoleLogonSid = 81 WinThisOrganizationCertificateSid = 82 WinApplicationPackageAuthoritySid = 83 WinBuiltinAnyPackageSid = 84 WinCapabilityInternetClientSid = 85 WinCapabilityInternetClientServerSid = 86 WinCapabilityPrivateNetworkClientServerSid = 87 WinCapabilityPicturesLibrarySid = 88 WinCapabilityVideosLibrarySid = 89 WinCapabilityMusicLibrarySid = 90 WinCapabilityDocumentsLibrarySid = 91 WinCapabilitySharedUserCertificatesSid = 92 WinCapabilityEnterpriseAuthenticationSid = 93 WinCapabilityRemovableStorageSid = 94 WinBuiltinRDSRemoteAccessServersSid = 95 WinBuiltinRDSEndpointServersSid = 96 WinBuiltinRDSManagementServersSid = 97 WinUserModeDriversSid = 98 WinBuiltinHyperVAdminsSid = 99 WinAccountCloneableControllersSid = 100 WinBuiltinAccessControlAssistanceOperatorsSid = 101 WinBuiltinRemoteManagementUsersSid = 102 WinAuthenticationAuthorityAssertedSid = 103 WinAuthenticationServiceAssertedSid = 104 WinLocalAccountSid = 105 WinLocalAccountAndAdministratorSid = 106 WinAccountProtectedUsersSid = 107 WinCapabilityAppointmentsSid = 108 WinCapabilityContactsSid = 109 WinAccountDefaultSystemManagedSid = 110 WinBuiltinDefaultSystemManagedGroupSid = 111 WinBuiltinStorageReplicaAdminsSid = 112 WinAccountKeyAdminsSid = 113 WinAccountEnterpriseKeyAdminsSid = 114 WinAuthenticationKeyTrustSid = 115 WinAuthenticationKeyPropertyMFASid = 116 WinAuthenticationKeyPropertyAttestationSid = 117 ) const ( /* winnt.h:3495:5: */ AclRevisionInformation = 1 AclSizeInformation = 2 ) const ( /* winnt.h:3565:5: */ AuditEventObjectAccess = 0 AuditEventDirectoryServiceAccess = 1 ) const ( /* winnt.h:3597:5: */ AccessReasonNone = 0 AccessReasonAllowedAce = 65536 AccessReasonDeniedAce = 131072 AccessReasonAllowedParentAce = 196608 AccessReasonDeniedParentAce = 262144 AccessReasonNotGrantedByCape = 327680 AccessReasonNotGrantedByParentCape = 393216 AccessReasonNotGrantedToAppContainer = 458752 AccessReasonMissingPrivilege = 1048576 AccessReasonFromPrivilege = 2097152 AccessReasonIntegrityLevel = 3145728 AccessReasonOwnership = 4194304 AccessReasonNullDacl = 5242880 AccessReasonEmptyDacl = 6291456 AccessReasonNoSD = 7340032 AccessReasonNoGrant = 8388608 ) const ( /* winnt.h:3687:5: */ SecurityAnonymous = 0 SecurityIdentification = 1 SecurityImpersonation = 2 SecurityDelegation = 3 ) const ( /* winnt.h:3714:5: */ TokenPrimary = 1 TokenImpersonation = 2 ) const ( /* winnt.h:3719:5: */ TokenElevationTypeDefault = 1 TokenElevationTypeFull = 2 TokenElevationTypeLimited = 3 ) const ( /* winnt.h:3725:5: */ TokenUser = 1 TokenGroups = 2 TokenPrivileges = 3 TokenOwner = 4 TokenPrimaryGroup = 5 TokenDefaultDacl = 6 TokenSource = 7 TokenType = 8 TokenImpersonationLevel = 9 TokenStatistics = 10 TokenRestrictedSids = 11 TokenSessionId = 12 TokenGroupsAndPrivileges = 13 TokenSessionReference = 14 TokenSandBoxInert = 15 TokenAuditPolicy = 16 TokenOrigin = 17 TokenElevationType = 18 TokenLinkedToken = 19 TokenElevation = 20 TokenHasRestrictions = 21 TokenAccessInformation = 22 TokenVirtualizationAllowed = 23 TokenVirtualizationEnabled = 24 TokenIntegrityLevel = 25 TokenUIAccess = 26 TokenMandatoryPolicy = 27 TokenLogonSid = 28 TokenIsAppContainer = 29 TokenCapabilities = 30 TokenAppContainerSid = 31 TokenAppContainerNumber = 32 TokenUserClaimAttributes = 33 TokenDeviceClaimAttributes = 34 TokenRestrictedUserClaimAttributes = 35 TokenRestrictedDeviceClaimAttributes = 36 TokenDeviceGroups = 37 TokenRestrictedDeviceGroups = 38 TokenSecurityAttributes = 39 TokenIsRestricted = 40 MaxTokenInfoClass = 41 ) const ( /* winnt.h:3893:5: */ MandatoryLevelUntrusted = 0 MandatoryLevelLow = 1 MandatoryLevelMedium = 2 MandatoryLevelHigh = 3 MandatoryLevelSystem = 4 MandatoryLevelSecureProcess = 5 MandatoryLevelCount = 6 ) const ( /* winnt.h:4019:5: */ SeLearningModeInvalidType = 0 SeLearningModeSettings = 1 SeLearningModeMax = 2 ) const ( /* winnt.h:4223:5: */ PMCCounter = 0 MaxHardwareCounterType = 1 ) const ( /* winnt.h:4228:5: */ ProcessDEPPolicy = 0 ProcessASLRPolicy = 1 ProcessDynamicCodePolicy = 2 ProcessStrictHandleCheckPolicy = 3 ProcessSystemCallDisablePolicy = 4 ProcessMitigationOptionsMask = 5 ProcessExtensionPointDisablePolicy = 6 ProcessControlFlowGuardPolicy = 7 ProcessSignaturePolicy = 8 ProcessFontDisablePolicy = 9 ProcessImageLoadPolicy = 10 MaxProcessMitigationPolicy = 11 ) const ( /* winnt.h:4426:5: */ ToleranceLow = 1 ToleranceMedium = 2 ToleranceHigh = 3 ) const ( /* winnt.h:4432:5: */ ToleranceIntervalShort = 1 ToleranceIntervalMedium = 2 ToleranceIntervalLong = 3 ) const ( /* winnt.h:4551:5: */ JobObjectBasicAccountingInformation = 1 JobObjectBasicLimitInformation = 2 JobObjectBasicProcessIdList = 3 JobObjectBasicUIRestrictions = 4 JobObjectSecurityLimitInformation = 5 JobObjectEndOfJobTimeInformation = 6 JobObjectAssociateCompletionPortInformation = 7 JobObjectBasicAndIoAccountingInformation = 8 JobObjectExtendedLimitInformation = 9 JobObjectJobSetInformation = 10 JobObjectGroupInformation = 11 JobObjectNotificationLimitInformation = 12 JobObjectLimitViolationInformation = 13 JobObjectGroupInformationEx = 14 JobObjectCpuRateControlInformation = 15 JobObjectCompletionFilter = 16 JobObjectCompletionCounter = 17 JobObjectReserved1Information = 18 JobObjectReserved2Information = 19 JobObjectReserved3Information = 20 JobObjectReserved4Information = 21 JobObjectReserved5Information = 22 JobObjectReserved6Information = 23 JobObjectReserved7Information = 24 JobObjectReserved8Information = 25 MaxJobObjectInfoClass = 26 ) const ( /* winnt.h:4575:5: */ FirmwareTypeUnknown = 0 FirmwareTypeBios = 1 FirmwareTypeUefi = 2 FirmwareTypeMax = 3 ) const ( /* winnt.h:4600:5: */ RelationProcessorCore = 0 RelationNumaNode = 1 RelationCache = 2 RelationProcessorPackage = 3 RelationGroup = 4 RelationAll = 65535 ) const ( /* winnt.h:4607:5: */ CacheUnified = 0 CacheInstruction = 1 CacheData = 2 CacheTrace = 3 ) const ( /* winnt.h:467:1: */ UNSPECIFIED_COMPARTMENT_ID = 0 DEFAULT_COMPARTMENT_ID = 1 ) const ( /* winnt.h:5229:3: */ PowerSystemUnspecified = 0 PowerSystemWorking = 1 PowerSystemSleeping1 = 2 PowerSystemSleeping2 = 3 PowerSystemSleeping3 = 4 PowerSystemHibernate = 5 PowerSystemShutdown = 6 PowerSystemMaximum = 7 ) const ( /* winnt.h:5235:3: */ PowerActionNone = 0 PowerActionReserved = 1 PowerActionSleep = 2 PowerActionHibernate = 3 PowerActionShutdown = 4 PowerActionShutdownReset = 5 PowerActionShutdownOff = 6 PowerActionWarmEject = 7 ) const ( /* winnt.h:5241:3: */ PowerDeviceUnspecified = 0 PowerDeviceD0 = 1 PowerDeviceD1 = 2 PowerDeviceD2 = 3 PowerDeviceD3 = 4 PowerDeviceMaximum = 5 ) const ( /* winnt.h:5246:3: */ PowerMonitorOff = 0 PowerMonitorOn = 1 PowerMonitorDim = 2 ) const ( /* winnt.h:5250:3: */ PowerUserPresent = 0 PowerUserNotPresent = 1 PowerUserInactive = 2 PowerUserMaximum = 3 PowerUserInvalid = 3 ) const ( /* winnt.h:5266:3: */ LT_DONT_CARE = 0 LT_LOWEST_LATENCY = 1 ) const ( /* winnt.h:5281:3: */ PowerRequestDisplayRequired = 0 PowerRequestSystemRequired = 1 PowerRequestAwayModeRequired = 2 PowerRequestExecutionRequired = 3 ) const ( /* winnt.h:5309:5: */ SystemPowerPolicyAc = 0 SystemPowerPolicyDc = 1 VerifySystemPolicyAc = 2 VerifySystemPolicyDc = 3 SystemPowerCapabilities = 4 SystemBatteryState = 5 SystemPowerStateHandler = 6 ProcessorStateHandler = 7 SystemPowerPolicyCurrent = 8 AdministratorPowerPolicy = 9 SystemReserveHiberFile = 10 ProcessorInformation = 11 SystemPowerInformation = 12 ProcessorStateHandler2 = 13 LastWakeTime = 14 LastSleepTime = 15 SystemExecutionState = 16 SystemPowerStateNotifyHandler = 17 ProcessorPowerPolicyAc = 18 ProcessorPowerPolicyDc = 19 VerifyProcessorPowerPolicyAc = 20 VerifyProcessorPowerPolicyDc = 21 ProcessorPowerPolicyCurrent = 22 SystemPowerStateLogging = 23 SystemPowerLoggingEntry = 24 SetPowerSettingValue = 25 NotifyUserPowerSetting = 26 PowerInformationLevelUnused0 = 27 SystemMonitorHiberBootPowerOff = 28 SystemVideoState = 29 TraceApplicationPowerMessage = 30 TraceApplicationPowerMessageEnd = 31 ProcessorPerfStates = 32 ProcessorIdleStates = 33 ProcessorCap = 34 SystemWakeSource = 35 SystemHiberFileInformation = 36 TraceServicePowerMessage = 37 ProcessorLoad = 38 PowerShutdownNotification = 39 MonitorCapabilities = 40 SessionPowerInit = 41 SessionDisplayState = 42 PowerRequestCreate = 43 PowerRequestAction = 44 GetPowerRequestList = 45 ProcessorInformationEx = 46 NotifyUserModeLegacyPowerEvent = 47 GroupPark = 48 ProcessorIdleDomains = 49 WakeTimerList = 50 SystemHiberFileSize = 51 ProcessorIdleStatesHv = 52 ProcessorPerfStatesHv = 53 ProcessorPerfCapHv = 54 ProcessorSetIdle = 55 LogicalProcessorIdling = 56 UserPresence = 57 PowerSettingNotificationName = 58 GetPowerSettingValue = 59 IdleResiliency = 60 SessionRITState = 61 SessionConnectNotification = 62 SessionPowerCleanup = 63 SessionLockState = 64 SystemHiberbootState = 65 PlatformInformation = 66 PdcInvocation = 67 MonitorInvocation = 68 FirmwareTableInformationRegistered = 69 SetShutdownSelectedTime = 70 SuspendResumeInvocation = 71 PlmPowerRequestCreate = 72 ScreenOff = 73 CsDeviceNotification = 74 PlatformRole = 75 LastResumePerformance = 76 DisplayBurst = 77 ExitLatencySamplingPercentage = 78 ApplyLowPowerScenarioSettings = 79 PowerInformationLevelMaximum = 80 ) const ( /* winnt.h:5393:5: */ UserNotPresent = 0 UserPresent = 1 UserUnknown = 255 ) const ( /* winnt.h:5429:5: */ MonitorRequestReasonUnknown = 0 MonitorRequestReasonPowerButton = 1 MonitorRequestReasonRemoteConnection = 2 MonitorRequestReasonScMonitorpower = 3 MonitorRequestReasonUserInput = 4 MonitorRequestReasonAcDcDisplayBurst = 5 MonitorRequestReasonUserDisplayBurst = 6 MonitorRequestReasonPoSetSystemState = 7 MonitorRequestReasonSetThreadExecutionState = 8 MonitorRequestReasonFullWake = 9 MonitorRequestReasonSessionUnlock = 10 MonitorRequestReasonScreenOffRequest = 11 MonitorRequestReasonIdleTimeout = 12 MonitorRequestReasonPolicyChange = 13 MonitorRequestReasonMax = 14 ) const ( /* winnt.h:5459:5: */ PoAc = 0 PoDc = 1 PoHot = 2 PoConditionMaximum = 3 ) const ( /* winnt.h:5486:5: */ PlatformRoleUnspecified = 0 PlatformRoleDesktop = 1 PlatformRoleMobile = 2 PlatformRoleWorkstation = 3 PlatformRoleEnterpriseServer = 4 PlatformRoleSOHOServer = 5 PlatformRoleAppliancePC = 6 PlatformRolePerformanceServer = 7 PlatformRoleSlate = 8 PlatformRoleMaximum = 9 ) const ( /* winnt.h:6623:5: */ IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1 ) const ( /* winnt.h:7494:5: */ IMPORT_OBJECT_CODE = 0 IMPORT_OBJECT_DATA = 1 IMPORT_OBJECT_CONST = 2 ) const ( /* winnt.h:7498:5: */ IMPORT_OBJECT_ORDINAL = 0 IMPORT_OBJECT_NAME = 1 IMPORT_OBJECT_NAME_NO_PREFIX = 2 IMPORT_OBJECT_NAME_UNDECORATE = 3 ) const ( /* winnt.h:7504:5: */ COMIMAGE_FLAGS_ILONLY = 1 COMIMAGE_FLAGS_32BITREQUIRED = 2 COMIMAGE_FLAGS_IL_LIBRARY = 4 COMIMAGE_FLAGS_STRONGNAMESIGNED = 8 COMIMAGE_FLAGS_TRACKDEBUGDATA = 65536 COR_VERSION_MAJOR_V2 = 2 COR_VERSION_MAJOR = 2 COR_VERSION_MINOR = 0 COR_DELETED_NAME_LENGTH = 8 COR_VTABLEGAP_NAME_LENGTH = 8 NATIVE_TYPE_MAX_CB = 1 COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 255 IMAGE_COR_MIH_METHODRVA = 1 IMAGE_COR_MIH_EHRVA = 2 IMAGE_COR_MIH_BASICBLOCK = 8 COR_VTABLE_32BIT = 1 COR_VTABLE_64BIT = 2 COR_VTABLE_FROM_UNMANAGED = 4 COR_VTABLE_CALL_MOST_DERIVED = 16 IMAGE_COR_EATJ_THUNK_SIZE = 32 MAX_CLASS_NAME = 1024 MAX_PACKAGE_NAME = 1024 ) const ( /* winnt.h:7909:5: */ UmsThreadInvalidInfoClass = 0 UmsThreadUserContext = 1 UmsThreadPriority = 2 UmsThreadAffinity = 3 UmsThreadTeb = 4 UmsThreadIsSuspended = 5 UmsThreadIsTerminated = 6 UmsThreadMaxInfoClass = 7 ) const ( /* winnt.h:7920:5: */ UmsSchedulerStartup = 0 UmsSchedulerThreadBlocked = 1 UmsSchedulerThreadYield = 2 ) const ( /* winnt.h:7995:5: */ HeapCompatibilityInformation = 0 HeapEnableTerminationOnCorruption = 1 ) const ( /* winnt.h:8023:5: */ ActivationContextBasicInformation = 1 ActivationContextDetailedInformation = 2 AssemblyDetailedInformationInActivationContext = 3 FileInformationInAssemblyOfAssemblyInActivationContext = 4 RunlevelInformationInActivationContext = 5 CompatibilityInformationInActivationContext = 6 ActivationContextManifestResourceName = 7 MaxActivationContextInfoClass = 8 AssemblyDetailedInformationInActivationContxt = 3 FileInformationInAssemblyOfAssemblyInActivationContxt = 4 ) const ( /* winnt.h:8036:5: */ ACTCTX_RUN_LEVEL_UNSPECIFIED = 0 ACTCTX_RUN_LEVEL_AS_INVOKER = 1 ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE = 2 ACTCTX_RUN_LEVEL_REQUIRE_ADMIN = 3 ACTCTX_RUN_LEVEL_NUMBERS = 4 ) const ( /* winnt.h:8044:5: */ ACTCTX_COMPATIBILITY_ELEMENT_TYPE_UNKNOWN = 0 ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS = 1 ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MITIGATION = 2 ) const ( /* winnt.h:8465:5: */ DriverType = 1 FileSystemType = 2 Win32ServiceOwnProcess = 16 Win32ServiceShareProcess = 32 AdapterType = 4 RecognizerType = 8 ) const ( /* winnt.h:8470:5: */ BootLoad = 0 SystemLoad = 1 AutoLoad = 2 DemandLoad = 3 DisableLoad = 4 ) const ( /* winnt.h:8475:5: */ IgnoreError = 0 NormalError = 1 SevereError = 2 CriticalError = 3 ) const ( /* winnt.h:8675:5: */ TapeDriveProblemNone = 0 TapeDriveReadWriteWarning = 1 TapeDriveReadWriteError = 2 TapeDriveReadWarning = 3 TapeDriveWriteWarning = 4 TapeDriveReadError = 5 TapeDriveWriteError = 6 TapeDriveHardwareError = 7 TapeDriveUnsupportedMedia = 8 TapeDriveScsiConnectionError = 9 TapeDriveTimetoClean = 10 TapeDriveCleanDriveNow = 11 TapeDriveMediaLifeExpired = 12 TapeDriveSnappedTape = 13 ) const ( /* winnt.h:8685:3: */ TP_CALLBACK_PRIORITY_HIGH = 0 TP_CALLBACK_PRIORITY_NORMAL = 1 TP_CALLBACK_PRIORITY_LOW = 2 TP_CALLBACK_PRIORITY_INVALID = 3 TP_CALLBACK_PRIORITY_COUNT = 3 ) const ( /* winnt.h:8878:7: */ TransactionOutcomeUndetermined = 1 TransactionOutcomeCommitted = 2 TransactionOutcomeAborted = 3 ) const ( /* winnt.h:8884:7: */ TransactionStateNormal = 1 TransactionStateIndoubt = 2 TransactionStateCommittedNotify = 3 ) const ( /* winnt.h:8956:7: */ TransactionBasicInformation = 0 TransactionPropertiesInformation = 1 TransactionEnlistmentInformation = 2 TransactionSuperiorEnlistmentInformation = 3 TransactionBindInformation = 4 TransactionDTCPrivateInformation = 5 ) const ( /* winnt.h:8965:7: */ TransactionManagerBasicInformation = 0 TransactionManagerLogInformation = 1 TransactionManagerLogPathInformation = 2 TransactionManagerOnlineProbeInformation = 3 TransactionManagerRecoveryInformation = 4 TransactionManagerOldestTransactionInformation = 5 ) const ( /* winnt.h:8974:7: */ ResourceManagerBasicInformation = 0 ResourceManagerCompletionInformation = 1 ) const ( /* winnt.h:8991:7: */ EnlistmentBasicInformation = 0 EnlistmentRecoveryInformation = 1 EnlistmentCrmInformation = 2 ) const ( /* winnt.h:9006:7: */ KTMOBJECT_TRANSACTION = 0 KTMOBJECT_TRANSACTION_MANAGER = 1 KTMOBJECT_RESOURCE_MANAGER = 2 KTMOBJECT_ENLISTMENT = 3 KTMOBJECT_INVALID = 4 ) const ( /* winspool.h:1088:3: */ BIDI_NULL = 0 BIDI_INT = 1 BIDI_FLOAT = 2 BIDI_BOOL = 3 BIDI_STRING = 4 BIDI_TEXT = 5 BIDI_ENUM = 6 BIDI_BLOB = 7 ) const ( /* winsvc.h:106:3: */ SC_ACTION_NONE = 0 SC_ACTION_RESTART = 1 SC_ACTION_REBOOT = 2 SC_ACTION_RUN_COMMAND = 3 ) const ( /* winsvc.h:139:3: */ SC_STATUS_PROCESS_INFO = 0 ) const ( /* winsvc.h:143:3: */ SC_ENUM_PROCESS_INFO = 0 ) const ( /* wtypes.h:181:1: */ DVASPECT_CONTENT = 1 DVASPECT_THUMBNAIL = 2 DVASPECT_ICON = 4 DVASPECT_DOCPRINT = 8 ) const ( /* wtypes.h:188:1: */ STGC_DEFAULT = 0 STGC_OVERWRITE = 1 STGC_ONLYIFCURRENT = 2 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4 STGC_CONSOLIDATE = 8 ) const ( /* wtypes.h:196:1: */ STGMOVE_MOVE = 0 STGMOVE_COPY = 1 STGMOVE_SHALLOWCOPY = 2 ) const ( /* wtypes.h:202:1: */ STATFLAG_DEFAULT = 0 STATFLAG_NONAME = 1 STATFLAG_NOOPEN = 2 ) const ( /* wtypes.h:512:1: */ VT_EMPTY = 0 VT_NULL = 1 VT_I2 = 2 VT_I4 = 3 VT_R4 = 4 VT_R8 = 5 VT_CY = 6 VT_DATE = 7 VT_BSTR = 8 VT_DISPATCH = 9 VT_ERROR = 10 VT_BOOL = 11 VT_VARIANT = 12 VT_UNKNOWN = 13 VT_DECIMAL = 14 VT_I1 = 16 VT_UI1 = 17 VT_UI2 = 18 VT_UI4 = 19 VT_I8 = 20 VT_UI8 = 21 VT_INT = 22 VT_UINT = 23 VT_VOID = 24 VT_HRESULT = 25 VT_PTR = 26 VT_SAFEARRAY = 27 VT_CARRAY = 28 VT_USERDEFINED = 29 VT_LPSTR = 30 VT_LPWSTR = 31 VT_RECORD = 36 VT_INT_PTR = 37 VT_UINT_PTR = 38 VT_FILETIME = 64 VT_BLOB = 65 VT_STREAM = 66 VT_STORAGE = 67 VT_STREAMED_OBJECT = 68 VT_STORED_OBJECT = 69 VT_BLOB_OBJECT = 70 VT_CF = 71 VT_CLSID = 72 VT_VERSIONED_STREAM = 73 VT_BSTR_BLOB = 4095 VT_VECTOR = 4096 VT_ARRAY = 8192 VT_BYREF = 16384 VT_RESERVED = 32768 VT_ILLEGAL = 65535 VT_ILLEGALMASKED = 4095 VT_TYPEMASK = 4095 ) const ( /* wtypes.h:594:1: */ TYSPEC_CLSID = 0 TYSPEC_FILEEXT = 1 TYSPEC_MIMETYPE = 2 TYSPEC_FILENAME = 3 TYSPEC_PROGID = 4 TYSPEC_PACKAGENAME = 5 TYSPEC_OBJECTID = 6 ) const ( /* wtypesbase.h:232:1: */ MEMCTX_TASK = 1 MEMCTX_SHARED = 2 MEMCTX_MACSYSTEM = 3 MEMCTX_UNKNOWN = -1 MEMCTX_SAME = -2 ) const ( /* wtypesbase.h:268:1: */ CLSCTX_INPROC_SERVER = 1 CLSCTX_INPROC_HANDLER = 2 CLSCTX_LOCAL_SERVER = 4 CLSCTX_INPROC_SERVER16 = 8 CLSCTX_REMOTE_SERVER = 16 CLSCTX_INPROC_HANDLER16 = 32 CLSCTX_RESERVED1 = 64 CLSCTX_RESERVED2 = 128 CLSCTX_RESERVED3 = 256 CLSCTX_RESERVED4 = 512 CLSCTX_NO_CODE_DOWNLOAD = 1024 CLSCTX_RESERVED5 = 2048 CLSCTX_NO_CUSTOM_MARSHAL = 4096 CLSCTX_ENABLE_CODE_DOWNLOAD = 8192 CLSCTX_NO_FAILURE_LOG = 16384 CLSCTX_DISABLE_AAA = 32768 CLSCTX_ENABLE_AAA = 65536 CLSCTX_FROM_DEFAULT_CONTEXT = 131072 CLSCTX_ACTIVATE_32_BIT_SERVER = 262144 CLSCTX_ACTIVATE_64_BIT_SERVER = 524288 CLSCTX_ENABLE_CLOAKING = 1048576 CLSCTX_APPCONTAINER = 4194304 CLSCTX_ACTIVATE_AAA_AS_IU = 8388608 CLSCTX_PS_DLL = -2147483648 ) const ( /* wtypesbase.h:297:1: */ MSHLFLAGS_NORMAL = 0 MSHLFLAGS_TABLESTRONG = 1 MSHLFLAGS_TABLEWEAK = 2 MSHLFLAGS_NOPING = 4 MSHLFLAGS_RESERVED1 = 8 MSHLFLAGS_RESERVED2 = 16 MSHLFLAGS_RESERVED3 = 32 MSHLFLAGS_RESERVED4 = 64 ) const ( /* wtypesbase.h:308:1: */ MSHCTX_LOCAL = 0 MSHCTX_NOSHAREDMEM = 1 MSHCTX_DIFFERENTMACHINE = 2 MSHCTX_INPROC = 3 MSHCTX_CROSSCTX = 4 ) type ptrdiff_t = int64 /* :3:26 */ type size_t = uint64 /* :9:23 */ type wchar_t = uint16 /* :15:24 */ type va_list = uintptr /* :50:27 */ // CAPI3REF: Database Connection Handle // KEYWORDS: {database connection} {database connections} // // Each open SQLite database is represented by a pointer to an instance of // the opaque structure named "sqlite3". It is useful to think of an sqlite3 // pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and // [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] // and [sqlite3_close_v2()] are its destructors. There are many other // interfaces (such as // [sqlite3_prepare_v2()], [sqlite3_create_function()], and // [sqlite3_busy_timeout()] to name but three) that are methods on an // sqlite3 object. type sqlite32 = struct { FpVfs uintptr FpVdbe uintptr FpDfltColl uintptr Fmutex uintptr FaDb uintptr FnDb int32 FmDbFlags u32 Fflags u64 FlastRowid i64 FszMmap i64 FnSchemaLock u32 FopenFlags uint32 FerrCode int32 FerrMask int32 FiSysErrno int32 FdbOptFlags u32 Fenc u8 FautoCommit u8 Ftemp_store u8 FmallocFailed u8 FbBenignMalloc u8 FdfltLockMode u8 FnextAutovac int8 FsuppressErr u8 FvtabOnConflict u8 FisTransactionSavepoint u8 FmTrace u8 FnoSharedCache u8 FnSqlExec u8 _ [3]byte FnextPagesize int32 Fmagic u32 FnChange int32 FnTotalChange int32 FaLimit [12]int32 FnMaxSorterMmap int32 _ [4]byte Finit struct { FnewTnum Pgno FiDb u8 Fbusy u8 _ [2]byte ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1, unsigned bDropColumn: 1 */ _ [7]byte FazInit uintptr } FnVdbeActive int32 FnVdbeRead int32 FnVdbeWrite int32 FnVdbeExec int32 FnVDestroy int32 FnExtension int32 FaExtension uintptr Ftrace struct{ FxLegacy uintptr } FpTraceArg uintptr FxProfile uintptr FpProfileArg uintptr FpCommitArg uintptr FxCommitCallback uintptr FpRollbackArg uintptr FxRollbackCallback uintptr FpUpdateArg uintptr FxUpdateCallback uintptr FpParse uintptr FpPreUpdateArg uintptr FxPreUpdateCallback uintptr FpPreUpdate uintptr FxWalCallback uintptr FpWalArg uintptr FxCollNeeded uintptr FxCollNeeded16 uintptr FpCollNeededArg uintptr FpErr uintptr Fu1 struct { _ [0]uint64 FisInterrupted int32 _ [4]byte } Flookaside Lookaside FxAuth sqlite3_xauth FpAuthArg uintptr FxProgress uintptr FpProgressArg uintptr FnProgressOps uint32 FnVTrans int32 FaModule Hash FpVtabCtx uintptr FaVTrans uintptr FpDisconnect uintptr FaFunc Hash FaCollSeq Hash FbusyHandler BusyHandler FaDbStatic [2]Db FpSavepoint uintptr FnAnalysisLimit int32 FbusyTimeout int32 FnSavepoint int32 FnStatement int32 FnDeferredCons i64 FnDeferredImmCons i64 FpnBytesFreed uintptr FpBlockingConnection uintptr FpUnlockConnection uintptr FpUnlockArg uintptr FxUnlockNotify uintptr FpNextBlocked uintptr } /* sqlite3.h:249:9 */ // CAPI3REF: 64-Bit Integer Types // KEYWORDS: sqlite_int64 sqlite_uint64 // // Because there is no cross-platform way to specify 64-bit integer types // SQLite includes typedefs for 64-bit signed and unsigned integers. // // The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. // The sqlite_int64 and sqlite_uint64 types are supported for backwards // compatibility only. // // ^The sqlite3_int64 and sqlite_int64 types can store integer values // between -9223372036854775808 and +9223372036854775807 inclusive. ^The // sqlite3_uint64 and sqlite_uint64 types can store integer values // between 0 and +18446744073709551615 inclusive. type sqlite_int64 = int64 /* sqlite3.h:275:19 */ type sqlite_uint64 = uint64 /* sqlite3.h:276:28 */ type sqlite3_int64 = sqlite_int64 /* sqlite3.h:281:22 */ type sqlite3_uint64 = sqlite_uint64 /* sqlite3.h:282:23 */ // The type for a callback function. // This is legacy and deprecated. It is included for historical // compatibility and is not documented. type sqlite3_callback = uintptr /* sqlite3.h:338:13 */ // CAPI3REF: Result Codes // KEYWORDS: {result code definitions} // // Many SQLite functions return an integer result code from the set shown // here in order to indicate success or failure. // // New error codes may be added in future versions of SQLite. // // See also: [extended result code definitions] // beginning-of-error-codes // end-of-error-codes // CAPI3REF: Extended Result Codes // KEYWORDS: {extended result code definitions} // // In its default configuration, SQLite API routines return one of 30 integer // [result codes]. However, experience has shown that many of // these result codes are too coarse-grained. They do not provide as // much information about problems as programmers might like. In an effort to // address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8] // and later) include // support for additional result codes that provide more detailed information // about errors. These [extended result codes] are enabled or disabled // on a per database connection basis using the // [sqlite3_extended_result_codes()] API. Or, the extended code for // the most recent error can be obtained using // [sqlite3_extended_errcode()]. // CAPI3REF: Flags For File Open Operations // // These bit values are intended for use in the // 3rd parameter to the [sqlite3_open_v2()] interface and // in the 4th parameter to the [sqlite3_vfs.xOpen] method. // Reserved: 0x00F00000 // Legacy compatibility: // CAPI3REF: Device Characteristics // // The xDeviceCharacteristics method of the [sqlite3_io_methods] // object returns an integer which is a vector of these // bit values expressing I/O characteristics of the mass storage // device that holds the file that the [sqlite3_io_methods] // refers to. // // The SQLITE_IOCAP_ATOMIC property means that all writes of // any size are atomic. The SQLITE_IOCAP_ATOMICnnn values // mean that writes of blocks that are nnn bytes in size and // are aligned to an address which is an integer multiple of // nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means // that when data is appended to a file, the data is appended // first then the size of the file is extended, never the other // way around. The SQLITE_IOCAP_SEQUENTIAL property means that // information is written to disk in the same order as calls // to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that // after reboot following a crash or power loss, the only bytes in a // file that were written at the application level might have changed // and that adjacent bytes, even bytes within the same sector are // guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN // flag indicates that a file cannot be deleted when open. The // SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on // read-only media and cannot be changed even by processes with // elevated privileges. // // The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying // filesystem supports doing multiple write operations atomically when those // write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and // [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. // CAPI3REF: File Locking Levels // // SQLite uses one of these integer values as the second // argument to calls it makes to the xLock() and xUnlock() methods // of an [sqlite3_io_methods] object. // CAPI3REF: Synchronization Type Flags // // When SQLite invokes the xSync() method of an // [sqlite3_io_methods] object it uses a combination of // these integer values as the second argument. // // When the SQLITE_SYNC_DATAONLY flag is used, it means that the // sync operation only needs to flush data to mass storage. Inode // information need not be flushed. If the lower four bits of the flag // equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. // If the lower four bits equal SQLITE_SYNC_FULL, that means // to use Mac OS X style fullsync instead of fsync(). // // Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags // with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL // settings. The [synchronous pragma] determines when calls to the // xSync VFS method occur and applies uniformly across all platforms. // The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how // energetic or rigorous or forceful the sync operations are and // only make a difference on Mac OSX for the default SQLite code. // (Third-party VFS implementations might also make the distinction // between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the // operating systems natively supported by SQLite, only Mac OSX // cares about the difference.) // CAPI3REF: OS Interface Open File Handle // // An [sqlite3_file] object represents an open file in the // [sqlite3_vfs | OS interface layer]. Individual OS interface // implementations will // want to subclass this object by appending additional fields // for their own use. The pMethods entry is a pointer to an // [sqlite3_io_methods] object that defines methods for performing // I/O operations on the open file. type sqlite3_file1 = struct{ FpMethods uintptr } /* sqlite3.h:684:9 */ // CAPI3REF: Result Codes // KEYWORDS: {result code definitions} // // Many SQLite functions return an integer result code from the set shown // here in order to indicate success or failure. // // New error codes may be added in future versions of SQLite. // // See also: [extended result code definitions] // beginning-of-error-codes // end-of-error-codes // CAPI3REF: Extended Result Codes // KEYWORDS: {extended result code definitions} // // In its default configuration, SQLite API routines return one of 30 integer // [result codes]. However, experience has shown that many of // these result codes are too coarse-grained. They do not provide as // much information about problems as programmers might like. In an effort to // address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8] // and later) include // support for additional result codes that provide more detailed information // about errors. These [extended result codes] are enabled or disabled // on a per database connection basis using the // [sqlite3_extended_result_codes()] API. Or, the extended code for // the most recent error can be obtained using // [sqlite3_extended_errcode()]. // CAPI3REF: Flags For File Open Operations // // These bit values are intended for use in the // 3rd parameter to the [sqlite3_open_v2()] interface and // in the 4th parameter to the [sqlite3_vfs.xOpen] method. // Reserved: 0x00F00000 // Legacy compatibility: // CAPI3REF: Device Characteristics // // The xDeviceCharacteristics method of the [sqlite3_io_methods] // object returns an integer which is a vector of these // bit values expressing I/O characteristics of the mass storage // device that holds the file that the [sqlite3_io_methods] // refers to. // // The SQLITE_IOCAP_ATOMIC property means that all writes of // any size are atomic. The SQLITE_IOCAP_ATOMICnnn values // mean that writes of blocks that are nnn bytes in size and // are aligned to an address which is an integer multiple of // nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means // that when data is appended to a file, the data is appended // first then the size of the file is extended, never the other // way around. The SQLITE_IOCAP_SEQUENTIAL property means that // information is written to disk in the same order as calls // to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that // after reboot following a crash or power loss, the only bytes in a // file that were written at the application level might have changed // and that adjacent bytes, even bytes within the same sector are // guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN // flag indicates that a file cannot be deleted when open. The // SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on // read-only media and cannot be changed even by processes with // elevated privileges. // // The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying // filesystem supports doing multiple write operations atomically when those // write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and // [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. // CAPI3REF: File Locking Levels // // SQLite uses one of these integer values as the second // argument to calls it makes to the xLock() and xUnlock() methods // of an [sqlite3_io_methods] object. // CAPI3REF: Synchronization Type Flags // // When SQLite invokes the xSync() method of an // [sqlite3_io_methods] object it uses a combination of // these integer values as the second argument. // // When the SQLITE_SYNC_DATAONLY flag is used, it means that the // sync operation only needs to flush data to mass storage. Inode // information need not be flushed. If the lower four bits of the flag // equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. // If the lower four bits equal SQLITE_SYNC_FULL, that means // to use Mac OS X style fullsync instead of fsync(). // // Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags // with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL // settings. The [synchronous pragma] determines when calls to the // xSync VFS method occur and applies uniformly across all platforms. // The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how // energetic or rigorous or forceful the sync operations are and // only make a difference on Mac OSX for the default SQLite code. // (Third-party VFS implementations might also make the distinction // between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the // operating systems natively supported by SQLite, only Mac OSX // cares about the difference.) // CAPI3REF: OS Interface Open File Handle // // An [sqlite3_file] object represents an open file in the // [sqlite3_vfs | OS interface layer]. Individual OS interface // implementations will // want to subclass this object by appending additional fields // for their own use. The pMethods entry is a pointer to an // [sqlite3_io_methods] object that defines methods for performing // I/O operations on the open file. type sqlite3_file = sqlite3_file1 /* sqlite3.h:684:29 */ type sqlite3_io_methods1 = struct { FiVersion int32 _ [4]byte FxClose uintptr FxRead uintptr FxWrite uintptr FxTruncate uintptr FxSync uintptr FxFileSize uintptr FxLock uintptr FxUnlock uintptr FxCheckReservedLock uintptr FxFileControl uintptr FxSectorSize uintptr FxDeviceCharacteristics uintptr FxShmMap uintptr FxShmLock uintptr FxShmBarrier uintptr FxShmUnmap uintptr FxFetch uintptr FxUnfetch uintptr } /* sqlite3.h:684:9 */ // CAPI3REF: OS Interface File Virtual Methods Object // // Every file opened by the [sqlite3_vfs.xOpen] method populates an // [sqlite3_file] object (or, more commonly, a subclass of the // [sqlite3_file] object) with a pointer to an instance of this object. // This object defines the methods used to perform various operations // against the open file represented by the [sqlite3_file] object. // // If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element // to a non-NULL pointer, then the sqlite3_io_methods.xClose method // may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed. The // only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen] // is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element // to NULL. // // The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or // [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). // The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] // flag may be ORed in to indicate that only the data of the file // and not its inode needs to be synced. // // The integer values to xLock() and xUnlock() are one of //
    //
  • [SQLITE_LOCK_NONE], //
  • [SQLITE_LOCK_SHARED], //
  • [SQLITE_LOCK_RESERVED], //
  • [SQLITE_LOCK_PENDING], or //
  • [SQLITE_LOCK_EXCLUSIVE]. //
// xLock() increases the lock. xUnlock() decreases the lock. // The xCheckReservedLock() method checks whether any database connection, // either in this process or in some other process, is holding a RESERVED, // PENDING, or EXCLUSIVE lock on the file. It returns true // if such a lock exists and false otherwise. // // The xFileControl() method is a generic interface that allows custom // VFS implementations to directly control an open file using the // [sqlite3_file_control()] interface. The second "op" argument is an // integer opcode. The third argument is a generic pointer intended to // point to a structure that may contain arguments or space in which to // write return values. Potential uses for xFileControl() might be // functions to enable blocking locks with timeouts, to change the // locking strategy (for example to use dot-file locks), to inquire // about the status of a lock, or to break stale locks. The SQLite // core reserves all opcodes less than 100 for its own use. // A [file control opcodes | list of opcodes] less than 100 is available. // Applications that define a custom xFileControl method should use opcodes // greater than 100 to avoid conflicts. VFS implementations should // return [SQLITE_NOTFOUND] for file control opcodes that they do not // recognize. // // The xSectorSize() method returns the sector size of the // device that underlies the file. The sector size is the // minimum write that can be performed without disturbing // other bytes in the file. The xDeviceCharacteristics() // method returns a bit vector describing behaviors of the // underlying device: // //
    //
  • [SQLITE_IOCAP_ATOMIC] //
  • [SQLITE_IOCAP_ATOMIC512] //
  • [SQLITE_IOCAP_ATOMIC1K] //
  • [SQLITE_IOCAP_ATOMIC2K] //
  • [SQLITE_IOCAP_ATOMIC4K] //
  • [SQLITE_IOCAP_ATOMIC8K] //
  • [SQLITE_IOCAP_ATOMIC16K] //
  • [SQLITE_IOCAP_ATOMIC32K] //
  • [SQLITE_IOCAP_ATOMIC64K] //
  • [SQLITE_IOCAP_SAFE_APPEND] //
  • [SQLITE_IOCAP_SEQUENTIAL] //
  • [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN] //
  • [SQLITE_IOCAP_POWERSAFE_OVERWRITE] //
  • [SQLITE_IOCAP_IMMUTABLE] //
  • [SQLITE_IOCAP_BATCH_ATOMIC] //
// // The SQLITE_IOCAP_ATOMIC property means that all writes of // any size are atomic. The SQLITE_IOCAP_ATOMICnnn values // mean that writes of blocks that are nnn bytes in size and // are aligned to an address which is an integer multiple of // nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means // that when data is appended to a file, the data is appended // first then the size of the file is extended, never the other // way around. The SQLITE_IOCAP_SEQUENTIAL property means that // information is written to disk in the same order as calls // to xWrite(). // // If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill // in the unread portions of the buffer with zeros. A VFS that // fails to zero-fill short reads might seem to work. However, // failure to zero-fill short reads will eventually lead to // database corruption. type sqlite3_io_methods = sqlite3_io_methods1 /* sqlite3.h:783:35 */ // CAPI3REF: Standard File Control Opcodes // KEYWORDS: {file control opcodes} {file control opcode} // // These integer constants are opcodes for the xFileControl method // of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] // interface. // //
    //
  • [[SQLITE_FCNTL_LOCKSTATE]] // The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This // opcode causes the xFileControl method to write the current state of // the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], // [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) // into an integer that the pArg argument points to. This capability // is used during testing and is only available when the SQLITE_TEST // compile-time option is used. // //
  • [[SQLITE_FCNTL_SIZE_HINT]] // The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS // layer a hint of how large the database file will grow to be during the // current transaction. This hint is not guaranteed to be accurate but it // is often close. The underlying VFS might choose to preallocate database // file space based on this hint in order to help writes to the database // file run faster. // //
  • [[SQLITE_FCNTL_SIZE_LIMIT]] // The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that // implements [sqlite3_deserialize()] to set an upper bound on the size // of the in-memory database. The argument is a pointer to a [sqlite3_int64]. // If the integer pointed to is negative, then it is filled in with the // current limit. Otherwise the limit is set to the larger of the value // of the integer pointed to and the current database size. The integer // pointed to is set to the new limit. // //
  • [[SQLITE_FCNTL_CHUNK_SIZE]] // The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS // extends and truncates the database file in chunks of a size specified // by the user. The fourth argument to [sqlite3_file_control()] should // point to an integer (type int) containing the new chunk-size to use // for the nominated database. Allocating database file space in large // chunks (say 1MB at a time), may reduce file-system fragmentation and // improve performance on some systems. // //
  • [[SQLITE_FCNTL_FILE_POINTER]] // The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer // to the [sqlite3_file] object associated with a particular database // connection. See also [SQLITE_FCNTL_JOURNAL_POINTER]. // //
  • [[SQLITE_FCNTL_JOURNAL_POINTER]] // The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer // to the [sqlite3_file] object associated with the journal file (either // the [rollback journal] or the [write-ahead log]) for a particular database // connection. See also [SQLITE_FCNTL_FILE_POINTER]. // //
  • [[SQLITE_FCNTL_SYNC_OMITTED]] // No longer in use. // //
  • [[SQLITE_FCNTL_SYNC]] // The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and // sent to the VFS immediately before the xSync method is invoked on a // database file descriptor. Or, if the xSync method is not invoked // because the user has configured SQLite with // [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place // of the xSync method. In most cases, the pointer argument passed with // this file-control is NULL. However, if the database file is being synced // as part of a multi-database commit, the argument points to a nul-terminated // string containing the transactions super-journal file name. VFSes that // do not need this signal should silently ignore this opcode. Applications // should not call [sqlite3_file_control()] with this opcode as doing so may // disrupt the operation of the specialized VFSes that do require it. // //
  • [[SQLITE_FCNTL_COMMIT_PHASETWO]] // The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite // and sent to the VFS after a transaction has been committed immediately // but before the database is unlocked. VFSes that do not need this signal // should silently ignore this opcode. Applications should not call // [sqlite3_file_control()] with this opcode as doing so may disrupt the // operation of the specialized VFSes that do require it. // //
  • [[SQLITE_FCNTL_WIN32_AV_RETRY]] // ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic // retry counts and intervals for certain disk I/O operations for the // windows [VFS] in order to provide robustness in the presence of // anti-virus programs. By default, the windows VFS will retry file read, // file write, and file delete operations up to 10 times, with a delay // of 25 milliseconds before the first retry and with the delay increasing // by an additional 25 milliseconds with each subsequent retry. This // opcode allows these two values (10 retries and 25 milliseconds of delay) // to be adjusted. The values are changed for all database connections // within the same process. The argument is a pointer to an array of two // integers where the first integer is the new retry count and the second // integer is the delay. If either integer is negative, then the setting // is not changed but instead the prior value of that setting is written // into the array entry, allowing the current retry settings to be // interrogated. The zDbName parameter is ignored. // //
  • [[SQLITE_FCNTL_PERSIST_WAL]] // ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the // persistent [WAL | Write Ahead Log] setting. By default, the auxiliary // write ahead log ([WAL file]) and shared memory // files used for transaction control // are automatically deleted when the latest connection to the database // closes. Setting persistent WAL mode causes those files to persist after // close. Persisting the files is useful when other processes that do not // have write permission on the directory containing the database file want // to read the database file, as the WAL and shared memory files must exist // in order for the database to be readable. The fourth parameter to // [sqlite3_file_control()] for this opcode should be a pointer to an integer. // That integer is 0 to disable persistent WAL mode or 1 to enable persistent // WAL mode. If the integer is -1, then it is overwritten with the current // WAL persistence setting. // //
  • [[SQLITE_FCNTL_POWERSAFE_OVERWRITE]] // ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the // persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting // determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the // xDeviceCharacteristics methods. The fourth parameter to // [sqlite3_file_control()] for this opcode should be a pointer to an integer. // That integer is 0 to disable zero-damage mode or 1 to enable zero-damage // mode. If the integer is -1, then it is overwritten with the current // zero-damage mode setting. // //
  • [[SQLITE_FCNTL_OVERWRITE]] // ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening // a write transaction to indicate that, unless it is rolled back for some // reason, the entire database file will be overwritten by the current // transaction. This is used by VACUUM operations. // //
  • [[SQLITE_FCNTL_VFSNAME]] // ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of // all [VFSes] in the VFS stack. The names are of all VFS shims and the // final bottom-level VFS are written into memory obtained from // [sqlite3_malloc()] and the result is stored in the char* variable // that the fourth parameter of [sqlite3_file_control()] points to. // The caller is responsible for freeing the memory when done. As with // all file-control actions, there is no guarantee that this will actually // do anything. Callers should initialize the char* variable to a NULL // pointer in case this file-control is not implemented. This file-control // is intended for diagnostic use only. // //
  • [[SQLITE_FCNTL_VFS_POINTER]] // ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level // [VFSes] currently in use. ^(The argument X in // sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be // of type "[sqlite3_vfs] **". This opcodes will set *X // to a pointer to the top-level VFS.)^ // ^When there are multiple VFS shims in the stack, this opcode finds the // upper-most shim only. // //
  • [[SQLITE_FCNTL_PRAGMA]] // ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA] // file control is sent to the open [sqlite3_file] object corresponding // to the database file to which the pragma statement refers. ^The argument // to the [SQLITE_FCNTL_PRAGMA] file control is an array of // pointers to strings (char**) in which the second element of the array // is the name of the pragma and the third element is the argument to the // pragma or NULL if the pragma has no argument. ^The handler for an // [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element // of the char** argument point to a string obtained from [sqlite3_mprintf()] // or the equivalent and that string will become the result of the pragma or // the error message if the pragma fails. ^If the // [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal // [PRAGMA] processing continues. ^If the [SQLITE_FCNTL_PRAGMA] // file control returns [SQLITE_OK], then the parser assumes that the // VFS has handled the PRAGMA itself and the parser generates a no-op // prepared statement if result string is NULL, or that returns a copy // of the result string if the string is non-NULL. // ^If the [SQLITE_FCNTL_PRAGMA] file control returns // any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means // that the VFS encountered an error while handling the [PRAGMA] and the // compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA] // file control occurs at the beginning of pragma statement analysis and so // it is able to override built-in [PRAGMA] statements. // //
  • [[SQLITE_FCNTL_BUSYHANDLER]] // ^The [SQLITE_FCNTL_BUSYHANDLER] // file-control may be invoked by SQLite on the database file handle // shortly after it is opened in order to provide a custom VFS with access // to the connection's busy-handler callback. The argument is of type (void**) // - an array of two (void *) values. The first (void *) actually points // to a function of type (int (*)(void *)). In order to invoke the connection's // busy-handler, this function should be invoked with the second (void *) in // the array as the only argument. If it returns non-zero, then the operation // should be retried. If it returns zero, the custom VFS should abandon the // current operation. // //
  • [[SQLITE_FCNTL_TEMPFILENAME]] // ^Applications can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control // to have SQLite generate a // temporary filename using the same algorithm that is followed to generate // temporary filenames for TEMP tables and other internal uses. The // argument should be a char** which will be filled with the filename // written into memory obtained from [sqlite3_malloc()]. The caller should // invoke [sqlite3_free()] on the result to avoid a memory leak. // //
  • [[SQLITE_FCNTL_MMAP_SIZE]] // The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the // maximum number of bytes that will be used for memory-mapped I/O. // The argument is a pointer to a value of type sqlite3_int64 that // is an advisory maximum number of bytes in the file to memory map. The // pointer is overwritten with the old value. The limit is not changed if // the value originally pointed to is negative, and so the current limit // can be queried by passing in a pointer to a negative number. This // file-control is used internally to implement [PRAGMA mmap_size]. // //
  • [[SQLITE_FCNTL_TRACE]] // The [SQLITE_FCNTL_TRACE] file control provides advisory information // to the VFS about what the higher layers of the SQLite stack are doing. // This file control is used by some VFS activity tracing [shims]. // The argument is a zero-terminated string. Higher layers in the // SQLite stack may generate instances of this file control if // the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled. // //
  • [[SQLITE_FCNTL_HAS_MOVED]] // The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a // pointer to an integer and it writes a boolean into that integer depending // on whether or not the file has been renamed, moved, or deleted since it // was first opened. // //
  • [[SQLITE_FCNTL_WIN32_GET_HANDLE]] // The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the // underlying native file handle associated with a file handle. This file // control interprets its argument as a pointer to a native file handle and // writes the resulting value there. // //
  • [[SQLITE_FCNTL_WIN32_SET_HANDLE]] // The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This // opcode causes the xFileControl method to swap the file handle with the one // pointed to by the pArg argument. This capability is used during testing // and only needs to be supported when SQLITE_TEST is defined. // //
  • [[SQLITE_FCNTL_WAL_BLOCK]] // The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might // be advantageous to block on the next WAL lock if the lock is not immediately // available. The WAL subsystem issues this signal during rare // circumstances in order to fix a problem with priority inversion. // Applications should not use this file-control. // //
  • [[SQLITE_FCNTL_ZIPVFS]] // The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other // VFS should return SQLITE_NOTFOUND for this opcode. // //
  • [[SQLITE_FCNTL_RBU]] // The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by // the RBU extension only. All other VFS should return SQLITE_NOTFOUND for // this opcode. // //
  • [[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]] // If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then // the file descriptor is placed in "batch write mode", which // means all subsequent write operations will be deferred and done // atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. Systems // that do not support batch atomic writes will return SQLITE_NOTFOUND. // ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to // the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or // [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make // no VFS interface calls on the same [sqlite3_file] file descriptor // except for calls to the xWrite method and the xFileControl method // with [SQLITE_FCNTL_SIZE_HINT]. // //
  • [[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]] // The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write // operations since the previous successful call to // [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically. // This file control returns [SQLITE_OK] if and only if the writes were // all performed successfully and have been committed to persistent storage. // ^Regardless of whether or not it is successful, this file control takes // the file descriptor out of batch write mode so that all subsequent // write operations are independent. // ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without // a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]. // //
  • [[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]] // The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write // operations since the previous successful call to // [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back. // ^This file control takes the file descriptor out of batch write mode // so that all subsequent write operations are independent. // ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without // a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]. // //
  • [[SQLITE_FCNTL_LOCK_TIMEOUT]] // The [SQLITE_FCNTL_LOCK_TIMEOUT] opcode is used to configure a VFS // to block for up to M milliseconds before failing when attempting to // obtain a file lock using the xLock or xShmLock methods of the VFS. // The parameter is a pointer to a 32-bit signed integer that contains // the value that M is to be set to. Before returning, the 32-bit signed // integer is overwritten with the previous value of M. // //
  • [[SQLITE_FCNTL_DATA_VERSION]] // The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to // a database file. The argument is a pointer to a 32-bit unsigned integer. // The "data version" for the pager is written into the pointer. The // "data version" changes whenever any change occurs to the corresponding // database file, either through SQL statements on the same database // connection or through transactions committed by separate database // connections possibly in other processes. The [sqlite3_total_changes()] // interface can be used to find if any database on the connection has changed, // but that interface responds to changes on TEMP as well as MAIN and does // not provide a mechanism to detect changes to MAIN only. Also, the // [sqlite3_total_changes()] interface responds to internal changes only and // omits changes made by other database connections. The // [PRAGMA data_version] command provides a mechanism to detect changes to // a single attached database that occur due to other database connections, // but omits changes implemented by the database connection on which it is // called. This file control is the only mechanism to detect changes that // happen either internally or externally and that are associated with // a particular attached database. // //
  • [[SQLITE_FCNTL_CKPT_START]] // The [SQLITE_FCNTL_CKPT_START] opcode is invoked from within a checkpoint // in wal mode before the client starts to copy pages from the wal // file to the database file. // //
  • [[SQLITE_FCNTL_CKPT_DONE]] // The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint // in wal mode after the client has finished copying pages from the wal // file to the database file, but before the *-shm file is updated to // record the fact that the pages have been checkpointed. //
// deprecated names // CAPI3REF: Mutex Handle // // The mutex module within SQLite defines [sqlite3_mutex] to be an // abstract type for a mutex object. The SQLite core never looks // at the internal representation of an [sqlite3_mutex]. It only // deals with pointers to the [sqlite3_mutex] object. // // Mutexes are created using [sqlite3_mutex_alloc()]. type sqlite3_mutex1 = struct { FpReal uintptr FeType int32 _ [4]byte } /* sqlite3.h:1187:9 */ // CAPI3REF: Loadable Extension Thunk // // A pointer to the opaque sqlite3_api_routines structure is passed as // the third parameter to entry points of [loadable extensions]. This // structure must be typedefed in order to work around compiler warnings // on some platforms. type sqlite3_api_routines1 = struct { Faggregate_context uintptr Faggregate_count uintptr Fbind_blob uintptr Fbind_double uintptr Fbind_int uintptr Fbind_int64 uintptr Fbind_null uintptr Fbind_parameter_count uintptr Fbind_parameter_index uintptr Fbind_parameter_name uintptr Fbind_text uintptr Fbind_text16 uintptr Fbind_value uintptr Fbusy_handler uintptr Fbusy_timeout uintptr Fchanges uintptr Fclose uintptr Fcollation_needed uintptr Fcollation_needed16 uintptr Fcolumn_blob uintptr Fcolumn_bytes uintptr Fcolumn_bytes16 uintptr Fcolumn_count uintptr Fcolumn_database_name uintptr Fcolumn_database_name16 uintptr Fcolumn_decltype uintptr Fcolumn_decltype16 uintptr Fcolumn_double uintptr Fcolumn_int uintptr Fcolumn_int64 uintptr Fcolumn_name uintptr Fcolumn_name16 uintptr Fcolumn_origin_name uintptr Fcolumn_origin_name16 uintptr Fcolumn_table_name uintptr Fcolumn_table_name16 uintptr Fcolumn_text uintptr Fcolumn_text16 uintptr Fcolumn_type uintptr Fcolumn_value uintptr Fcommit_hook uintptr Fcomplete uintptr Fcomplete16 uintptr Fcreate_collation uintptr Fcreate_collation16 uintptr Fcreate_function uintptr Fcreate_function16 uintptr Fcreate_module uintptr Fdata_count uintptr Fdb_handle uintptr Fdeclare_vtab uintptr Fenable_shared_cache uintptr Ferrcode uintptr Ferrmsg uintptr Ferrmsg16 uintptr Fexec uintptr Fexpired uintptr Ffinalize uintptr Ffree uintptr Ffree_table uintptr Fget_autocommit uintptr Fget_auxdata uintptr Fget_table uintptr Fglobal_recover uintptr Finterruptx uintptr Flast_insert_rowid uintptr Flibversion uintptr Flibversion_number uintptr Fmalloc uintptr Fmprintf uintptr Fopen uintptr Fopen16 uintptr Fprepare uintptr Fprepare16 uintptr Fprofile uintptr Fprogress_handler uintptr Frealloc uintptr Freset uintptr Fresult_blob uintptr Fresult_double uintptr Fresult_error uintptr Fresult_error16 uintptr Fresult_int uintptr Fresult_int64 uintptr Fresult_null uintptr Fresult_text uintptr Fresult_text16 uintptr Fresult_text16be uintptr Fresult_text16le uintptr Fresult_value uintptr Frollback_hook uintptr Fset_authorizer uintptr Fset_auxdata uintptr Fxsnprintf uintptr Fstep uintptr Ftable_column_metadata uintptr Fthread_cleanup uintptr Ftotal_changes uintptr Ftrace uintptr Ftransfer_bindings uintptr Fupdate_hook uintptr Fuser_data uintptr Fvalue_blob uintptr Fvalue_bytes uintptr Fvalue_bytes16 uintptr Fvalue_double uintptr Fvalue_int uintptr Fvalue_int64 uintptr Fvalue_numeric_type uintptr Fvalue_text uintptr Fvalue_text16 uintptr Fvalue_text16be uintptr Fvalue_text16le uintptr Fvalue_type uintptr Fvmprintf uintptr Foverload_function uintptr Fprepare_v2 uintptr Fprepare16_v2 uintptr Fclear_bindings uintptr Fcreate_module_v2 uintptr Fbind_zeroblob uintptr Fblob_bytes uintptr Fblob_close uintptr Fblob_open uintptr Fblob_read uintptr Fblob_write uintptr Fcreate_collation_v2 uintptr Ffile_control uintptr Fmemory_highwater uintptr Fmemory_used uintptr Fmutex_alloc uintptr Fmutex_enter uintptr Fmutex_free uintptr Fmutex_leave uintptr Fmutex_try uintptr Fopen_v2 uintptr Frelease_memory uintptr Fresult_error_nomem uintptr Fresult_error_toobig uintptr Fsleep uintptr Fsoft_heap_limit uintptr Fvfs_find uintptr Fvfs_register uintptr Fvfs_unregister uintptr Fxthreadsafe uintptr Fresult_zeroblob uintptr Fresult_error_code uintptr Ftest_control uintptr Frandomness uintptr Fcontext_db_handle uintptr Fextended_result_codes uintptr Flimit uintptr Fnext_stmt uintptr Fsql uintptr Fstatus uintptr Fbackup_finish uintptr Fbackup_init uintptr Fbackup_pagecount uintptr Fbackup_remaining uintptr Fbackup_step uintptr Fcompileoption_get uintptr Fcompileoption_used uintptr Fcreate_function_v2 uintptr Fdb_config uintptr Fdb_mutex uintptr Fdb_status uintptr Fextended_errcode uintptr Flog uintptr Fsoft_heap_limit64 uintptr Fsourceid uintptr Fstmt_status uintptr Fstrnicmp uintptr Funlock_notify uintptr Fwal_autocheckpoint uintptr Fwal_checkpoint uintptr Fwal_hook uintptr Fblob_reopen uintptr Fvtab_config uintptr Fvtab_on_conflict uintptr Fclose_v2 uintptr Fdb_filename uintptr Fdb_readonly uintptr Fdb_release_memory uintptr Ferrstr uintptr Fstmt_busy uintptr Fstmt_readonly uintptr Fstricmp uintptr Furi_boolean uintptr Furi_int64 uintptr Furi_parameter uintptr Fxvsnprintf uintptr Fwal_checkpoint_v2 uintptr Fauto_extension uintptr Fbind_blob64 uintptr Fbind_text64 uintptr Fcancel_auto_extension uintptr Fload_extension uintptr Fmalloc64 uintptr Fmsize uintptr Frealloc64 uintptr Freset_auto_extension uintptr Fresult_blob64 uintptr Fresult_text64 uintptr Fstrglob uintptr Fvalue_dup uintptr Fvalue_free uintptr Fresult_zeroblob64 uintptr Fbind_zeroblob64 uintptr Fvalue_subtype uintptr Fresult_subtype uintptr Fstatus64 uintptr Fstrlike uintptr Fdb_cacheflush uintptr Fsystem_errno uintptr Ftrace_v2 uintptr Fexpanded_sql uintptr Fset_last_insert_rowid uintptr Fprepare_v3 uintptr Fprepare16_v3 uintptr Fbind_pointer uintptr Fresult_pointer uintptr Fvalue_pointer uintptr Fvtab_nochange uintptr Fvalue_nochange uintptr Fvtab_collation uintptr Fkeyword_count uintptr Fkeyword_name uintptr Fkeyword_check uintptr Fstr_new uintptr Fstr_finish uintptr Fstr_appendf uintptr Fstr_vappendf uintptr Fstr_append uintptr Fstr_appendall uintptr Fstr_appendchar uintptr Fstr_reset uintptr Fstr_errcode uintptr Fstr_length uintptr Fstr_value uintptr Fcreate_window_function uintptr Fnormalized_sql uintptr Fstmt_isexplain uintptr Fvalue_frombind uintptr Fdrop_modules uintptr Fhard_heap_limit64 uintptr Furi_key uintptr Ffilename_database uintptr Ffilename_journal uintptr Ffilename_wal uintptr Fcreate_filename uintptr Ffree_filename uintptr Fdatabase_file_object uintptr Ftxn_state uintptr } /* sqlite3.h:1197:9 */ // CAPI3REF: OS Interface Object // // An instance of the sqlite3_vfs object defines the interface between // the SQLite core and the underlying operating system. The "vfs" // in the name of the object stands for "virtual file system". See // the [VFS | VFS documentation] for further information. // // The VFS interface is sometimes extended by adding new methods onto // the end. Each time such an extension occurs, the iVersion field // is incremented. The iVersion value started out as 1 in // SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2 // with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased // to 3 with SQLite [version 3.7.6] on [dateof:3.7.6]. Additional fields // may be appended to the sqlite3_vfs object and the iVersion value // may increase again in future versions of SQLite. // Note that due to an oversight, the structure // of the sqlite3_vfs object changed in the transition from // SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0] // and yet the iVersion field was not increased. // // The szOsFile field is the size of the subclassed [sqlite3_file] // structure used by this VFS. mxPathname is the maximum length of // a pathname in this VFS. // // Registered sqlite3_vfs objects are kept on a linked list formed by // the pNext pointer. The [sqlite3_vfs_register()] // and [sqlite3_vfs_unregister()] interfaces manage this list // in a thread-safe way. The [sqlite3_vfs_find()] interface // searches the list. Neither the application code nor the VFS // implementation should use the pNext pointer. // // The pNext field is the only field in the sqlite3_vfs // structure that SQLite will ever modify. SQLite will only access // or modify this field while holding a particular static mutex. // The application should never modify anything within the sqlite3_vfs // object once the object has been registered. // // The zName field holds the name of the VFS module. The name must // be unique across all VFS modules. // // [[sqlite3_vfs.xOpen]] // ^SQLite guarantees that the zFilename parameter to xOpen // is either a NULL pointer or string obtained // from xFullPathname() with an optional suffix added. // ^If a suffix is added to the zFilename parameter, it will // consist of a single "-" character followed by no more than // 11 alphanumeric and/or "-" characters. // ^SQLite further guarantees that // the string will be valid and unchanged until xClose() is // called. Because of the previous sentence, // the [sqlite3_file] can safely store a pointer to the // filename if it needs to remember the filename for some reason. // If the zFilename parameter to xOpen is a NULL pointer then xOpen // must invent its own temporary name for the file. ^Whenever the // xFilename parameter is NULL it will also be the case that the // flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. // // The flags argument to xOpen() includes all bits set in // the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] // or [sqlite3_open16()] is used, then flags includes at least // [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. // If xOpen() opens a file read-only then it sets *pOutFlags to // include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. // // ^(SQLite will also add one of the following flags to the xOpen() // call, depending on the object being opened: // //
    //
  • [SQLITE_OPEN_MAIN_DB] //
  • [SQLITE_OPEN_MAIN_JOURNAL] //
  • [SQLITE_OPEN_TEMP_DB] //
  • [SQLITE_OPEN_TEMP_JOURNAL] //
  • [SQLITE_OPEN_TRANSIENT_DB] //
  • [SQLITE_OPEN_SUBJOURNAL] //
  • [SQLITE_OPEN_SUPER_JOURNAL] //
  • [SQLITE_OPEN_WAL] //
)^ // // The file I/O implementation can use the object type flags to // change the way it deals with files. For example, an application // that does not care about crash recovery or rollback might make // the open of a journal file a no-op. Writes to this journal would // also be no-ops, and any attempt to read the journal would return // SQLITE_IOERR. Or the implementation might recognize that a database // file will be doing page-aligned sector reads and writes in a random // order and set up its I/O subsystem accordingly. // // SQLite might also add one of the following flags to the xOpen method: // //
    //
  • [SQLITE_OPEN_DELETEONCLOSE] //
  • [SQLITE_OPEN_EXCLUSIVE] //
// // The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be // deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] // will be set for TEMP databases and their journals, transient // databases, and subjournals. // // ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction // with the [SQLITE_OPEN_CREATE] flag, which are both directly // analogous to the O_EXCL and O_CREAT flags of the POSIX open() // API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the // SQLITE_OPEN_CREATE, is used to indicate that file should always // be created, and that it is an error if it already exists. // It is not used to indicate the file should be opened // for exclusive access. // // ^At least szOsFile bytes of memory are allocated by SQLite // to hold the [sqlite3_file] structure passed as the third // argument to xOpen. The xOpen method does not have to // allocate the structure; it should just fill it in. Note that // the xOpen method must set the sqlite3_file.pMethods to either // a valid [sqlite3_io_methods] object or to NULL. xOpen must do // this even if the open fails. SQLite expects that the sqlite3_file.pMethods // element will be valid after xOpen returns regardless of the success // or failure of the xOpen call. // // [[sqlite3_vfs.xAccess]] // ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] // to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to // test whether a file is readable and writable, or [SQLITE_ACCESS_READ] // to test whether a file is at least readable. The SQLITE_ACCESS_READ // flag is never actually used and is not implemented in the built-in // VFSes of SQLite. The file is named by the second argument and can be a // directory. The xAccess method returns [SQLITE_OK] on success or some // non-zero error code if there is an I/O error or if the name of // the file given in the second argument is illegal. If SQLITE_OK // is returned, then non-zero or zero is written into *pResOut to indicate // whether or not the file is accessible. // // ^SQLite will always allocate at least mxPathname+1 bytes for the // output buffer xFullPathname. The exact size of the output buffer // is also passed as a parameter to both methods. If the output buffer // is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is // handled as a fatal error by SQLite, vfs implementations should endeavor // to prevent this by setting mxPathname to a sufficiently large value. // // The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() // interfaces are not strictly a part of the filesystem, but they are // included in the VFS structure for completeness. // The xRandomness() function attempts to return nBytes bytes // of good-quality randomness into zOut. The return value is // the actual number of bytes of randomness obtained. // The xSleep() method causes the calling thread to sleep for at // least the number of microseconds given. ^The xCurrentTime() // method returns a Julian Day Number for the current date and time as // a floating point value. // ^The xCurrentTimeInt64() method returns, as an integer, the Julian // Day Number multiplied by 86400000 (the number of milliseconds in // a 24-hour day). // ^SQLite will use the xCurrentTimeInt64() method to get the current // date and time if that method is available (if iVersion is 2 or // greater and the function pointer is not NULL) and will fall back // to xCurrentTime() if xCurrentTimeInt64() is unavailable. // // ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces // are not used by the SQLite core. These optional interfaces are provided // by some VFSes to facilitate testing of the VFS code. By overriding // system calls with functions under its control, a test program can // simulate faults and error conditions that would otherwise be difficult // or impossible to induce. The set of system calls that can be overridden // varies from one VFS to another, and from one version of the same VFS to the // next. Applications that use these interfaces must be prepared for any // or all of these interfaces to be NULL or for their behavior to change // from one release to the next. Applications must not attempt to access // any of these methods if the iVersion of the VFS is less than 3. type sqlite3_vfs1 = struct { FiVersion int32 FszOsFile int32 FmxPathname int32 _ [4]byte FpNext uintptr FzName uintptr FpAppData uintptr FxOpen uintptr FxDelete uintptr FxAccess uintptr FxFullPathname uintptr FxDlOpen uintptr FxDlError uintptr FxDlSym uintptr FxDlClose uintptr FxRandomness uintptr FxSleep uintptr FxCurrentTime uintptr FxGetLastError uintptr FxCurrentTimeInt64 uintptr FxSetSystemCall uintptr FxGetSystemCall uintptr FxNextSystemCall uintptr } /* sqlite3.h:1368:9 */ // CAPI3REF: OS Interface Object // // An instance of the sqlite3_vfs object defines the interface between // the SQLite core and the underlying operating system. The "vfs" // in the name of the object stands for "virtual file system". See // the [VFS | VFS documentation] for further information. // // The VFS interface is sometimes extended by adding new methods onto // the end. Each time such an extension occurs, the iVersion field // is incremented. The iVersion value started out as 1 in // SQLite [version 3.5.0] on [dateof:3.5.0], then increased to 2 // with SQLite [version 3.7.0] on [dateof:3.7.0], and then increased // to 3 with SQLite [version 3.7.6] on [dateof:3.7.6]. Additional fields // may be appended to the sqlite3_vfs object and the iVersion value // may increase again in future versions of SQLite. // Note that due to an oversight, the structure // of the sqlite3_vfs object changed in the transition from // SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0] // and yet the iVersion field was not increased. // // The szOsFile field is the size of the subclassed [sqlite3_file] // structure used by this VFS. mxPathname is the maximum length of // a pathname in this VFS. // // Registered sqlite3_vfs objects are kept on a linked list formed by // the pNext pointer. The [sqlite3_vfs_register()] // and [sqlite3_vfs_unregister()] interfaces manage this list // in a thread-safe way. The [sqlite3_vfs_find()] interface // searches the list. Neither the application code nor the VFS // implementation should use the pNext pointer. // // The pNext field is the only field in the sqlite3_vfs // structure that SQLite will ever modify. SQLite will only access // or modify this field while holding a particular static mutex. // The application should never modify anything within the sqlite3_vfs // object once the object has been registered. // // The zName field holds the name of the VFS module. The name must // be unique across all VFS modules. // // [[sqlite3_vfs.xOpen]] // ^SQLite guarantees that the zFilename parameter to xOpen // is either a NULL pointer or string obtained // from xFullPathname() with an optional suffix added. // ^If a suffix is added to the zFilename parameter, it will // consist of a single "-" character followed by no more than // 11 alphanumeric and/or "-" characters. // ^SQLite further guarantees that // the string will be valid and unchanged until xClose() is // called. Because of the previous sentence, // the [sqlite3_file] can safely store a pointer to the // filename if it needs to remember the filename for some reason. // If the zFilename parameter to xOpen is a NULL pointer then xOpen // must invent its own temporary name for the file. ^Whenever the // xFilename parameter is NULL it will also be the case that the // flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. // // The flags argument to xOpen() includes all bits set in // the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] // or [sqlite3_open16()] is used, then flags includes at least // [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. // If xOpen() opens a file read-only then it sets *pOutFlags to // include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. // // ^(SQLite will also add one of the following flags to the xOpen() // call, depending on the object being opened: // //
    //
  • [SQLITE_OPEN_MAIN_DB] //
  • [SQLITE_OPEN_MAIN_JOURNAL] //
  • [SQLITE_OPEN_TEMP_DB] //
  • [SQLITE_OPEN_TEMP_JOURNAL] //
  • [SQLITE_OPEN_TRANSIENT_DB] //
  • [SQLITE_OPEN_SUBJOURNAL] //
  • [SQLITE_OPEN_SUPER_JOURNAL] //
  • [SQLITE_OPEN_WAL] //
)^ // // The file I/O implementation can use the object type flags to // change the way it deals with files. For example, an application // that does not care about crash recovery or rollback might make // the open of a journal file a no-op. Writes to this journal would // also be no-ops, and any attempt to read the journal would return // SQLITE_IOERR. Or the implementation might recognize that a database // file will be doing page-aligned sector reads and writes in a random // order and set up its I/O subsystem accordingly. // // SQLite might also add one of the following flags to the xOpen method: // //
    //
  • [SQLITE_OPEN_DELETEONCLOSE] //
  • [SQLITE_OPEN_EXCLUSIVE] //
// // The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be // deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] // will be set for TEMP databases and their journals, transient // databases, and subjournals. // // ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction // with the [SQLITE_OPEN_CREATE] flag, which are both directly // analogous to the O_EXCL and O_CREAT flags of the POSIX open() // API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the // SQLITE_OPEN_CREATE, is used to indicate that file should always // be created, and that it is an error if it already exists. // It is not used to indicate the file should be opened // for exclusive access. // // ^At least szOsFile bytes of memory are allocated by SQLite // to hold the [sqlite3_file] structure passed as the third // argument to xOpen. The xOpen method does not have to // allocate the structure; it should just fill it in. Note that // the xOpen method must set the sqlite3_file.pMethods to either // a valid [sqlite3_io_methods] object or to NULL. xOpen must do // this even if the open fails. SQLite expects that the sqlite3_file.pMethods // element will be valid after xOpen returns regardless of the success // or failure of the xOpen call. // // [[sqlite3_vfs.xAccess]] // ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] // to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to // test whether a file is readable and writable, or [SQLITE_ACCESS_READ] // to test whether a file is at least readable. The SQLITE_ACCESS_READ // flag is never actually used and is not implemented in the built-in // VFSes of SQLite. The file is named by the second argument and can be a // directory. The xAccess method returns [SQLITE_OK] on success or some // non-zero error code if there is an I/O error or if the name of // the file given in the second argument is illegal. If SQLITE_OK // is returned, then non-zero or zero is written into *pResOut to indicate // whether or not the file is accessible. // // ^SQLite will always allocate at least mxPathname+1 bytes for the // output buffer xFullPathname. The exact size of the output buffer // is also passed as a parameter to both methods. If the output buffer // is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is // handled as a fatal error by SQLite, vfs implementations should endeavor // to prevent this by setting mxPathname to a sufficiently large value. // // The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() // interfaces are not strictly a part of the filesystem, but they are // included in the VFS structure for completeness. // The xRandomness() function attempts to return nBytes bytes // of good-quality randomness into zOut. The return value is // the actual number of bytes of randomness obtained. // The xSleep() method causes the calling thread to sleep for at // least the number of microseconds given. ^The xCurrentTime() // method returns a Julian Day Number for the current date and time as // a floating point value. // ^The xCurrentTimeInt64() method returns, as an integer, the Julian // Day Number multiplied by 86400000 (the number of milliseconds in // a 24-hour day). // ^SQLite will use the xCurrentTimeInt64() method to get the current // date and time if that method is available (if iVersion is 2 or // greater and the function pointer is not NULL) and will fall back // to xCurrentTime() if xCurrentTimeInt64() is unavailable. // // ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces // are not used by the SQLite core. These optional interfaces are provided // by some VFSes to facilitate testing of the VFS code. By overriding // system calls with functions under its control, a test program can // simulate faults and error conditions that would otherwise be difficult // or impossible to induce. The set of system calls that can be overridden // varies from one VFS to another, and from one version of the same VFS to the // next. Applications that use these interfaces must be prepared for any // or all of these interfaces to be NULL or for their behavior to change // from one release to the next. Applications must not attempt to access // any of these methods if the iVersion of the VFS is less than 3. type sqlite3_vfs = sqlite3_vfs1 /* sqlite3.h:1368:28 */ type sqlite3_syscall_ptr = uintptr /* sqlite3.h:1369:14 */ // CAPI3REF: Memory Allocation Routines // // An instance of this object defines the interface between SQLite // and low-level memory allocation routines. // // This object is used in only one place in the SQLite interface. // A pointer to an instance of this object is the argument to // [sqlite3_config()] when the configuration option is // [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. // By creating an instance of this object // and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) // during configuration, an application can specify an alternative // memory allocation subsystem for SQLite to use for all of its // dynamic memory needs. // // Note that SQLite comes with several [built-in memory allocators] // that are perfectly adequate for the overwhelming majority of applications // and that this object is only useful to a tiny minority of applications // with specialized memory allocation requirements. This object is // also used during testing of SQLite in order to specify an alternative // memory allocator that simulates memory out-of-memory conditions in // order to verify that SQLite recovers gracefully from such // conditions. // // The xMalloc, xRealloc, and xFree methods must work like the // malloc(), realloc() and free() functions from the standard C library. // ^SQLite guarantees that the second argument to // xRealloc is always a value returned by a prior call to xRoundup. // // xSize should return the allocated size of a memory allocation // previously obtained from xMalloc or xRealloc. The allocated size // is always at least as big as the requested size but may be larger. // // The xRoundup method returns what would be the allocated size of // a memory allocation given a particular requested size. Most memory // allocators round up memory allocations at least to the next multiple // of 8. Some allocators round up to a larger multiple or to a power of 2. // Every memory allocation request coming in through [sqlite3_malloc()] // or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, // that causes the corresponding memory allocation to fail. // // The xInit method initializes the memory allocator. For example, // it might allocate any required mutexes or initialize internal data // structures. The xShutdown method is invoked (indirectly) by // [sqlite3_shutdown()] and should deallocate any resources acquired // by xInit. The pAppData pointer is used as the only parameter to // xInit and xShutdown. // // SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes // the xInit method, so the xInit method need not be threadsafe. The // xShutdown method is only called from [sqlite3_shutdown()] so it does // not need to be threadsafe either. For all other methods, SQLite // holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the // [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which // it is by default) and so the methods are automatically serialized. // However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other // methods must be threadsafe or else make their own arrangements for // serialization. // // SQLite will never invoke xInit() more than once without an intervening // call to xShutdown(). type sqlite3_mem_methods1 = struct { FxMalloc uintptr FxFree uintptr FxRealloc uintptr FxSize uintptr FxRoundup uintptr FxInit uintptr FxShutdown uintptr FpAppData uintptr } /* sqlite3.h:1666:9 */ // CAPI3REF: Memory Allocation Routines // // An instance of this object defines the interface between SQLite // and low-level memory allocation routines. // // This object is used in only one place in the SQLite interface. // A pointer to an instance of this object is the argument to // [sqlite3_config()] when the configuration option is // [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. // By creating an instance of this object // and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) // during configuration, an application can specify an alternative // memory allocation subsystem for SQLite to use for all of its // dynamic memory needs. // // Note that SQLite comes with several [built-in memory allocators] // that are perfectly adequate for the overwhelming majority of applications // and that this object is only useful to a tiny minority of applications // with specialized memory allocation requirements. This object is // also used during testing of SQLite in order to specify an alternative // memory allocator that simulates memory out-of-memory conditions in // order to verify that SQLite recovers gracefully from such // conditions. // // The xMalloc, xRealloc, and xFree methods must work like the // malloc(), realloc() and free() functions from the standard C library. // ^SQLite guarantees that the second argument to // xRealloc is always a value returned by a prior call to xRoundup. // // xSize should return the allocated size of a memory allocation // previously obtained from xMalloc or xRealloc. The allocated size // is always at least as big as the requested size but may be larger. // // The xRoundup method returns what would be the allocated size of // a memory allocation given a particular requested size. Most memory // allocators round up memory allocations at least to the next multiple // of 8. Some allocators round up to a larger multiple or to a power of 2. // Every memory allocation request coming in through [sqlite3_malloc()] // or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, // that causes the corresponding memory allocation to fail. // // The xInit method initializes the memory allocator. For example, // it might allocate any required mutexes or initialize internal data // structures. The xShutdown method is invoked (indirectly) by // [sqlite3_shutdown()] and should deallocate any resources acquired // by xInit. The pAppData pointer is used as the only parameter to // xInit and xShutdown. // // SQLite holds the [SQLITE_MUTEX_STATIC_MAIN] mutex when it invokes // the xInit method, so the xInit method need not be threadsafe. The // xShutdown method is only called from [sqlite3_shutdown()] so it does // not need to be threadsafe either. For all other methods, SQLite // holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the // [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which // it is by default) and so the methods are automatically serialized. // However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other // methods must be threadsafe or else make their own arrangements for // serialization. // // SQLite will never invoke xInit() more than once without an intervening // call to xShutdown(). type sqlite3_mem_methods = sqlite3_mem_methods1 /* sqlite3.h:1666:36 */ // CAPI3REF: Dynamically Typed Value Object // KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} // // SQLite uses the sqlite3_value object to represent all values // that can be stored in a database table. SQLite uses dynamic typing // for the values it stores. ^Values stored in sqlite3_value objects // can be integers, floating point values, strings, BLOBs, or NULL. // // An sqlite3_value object may be either "protected" or "unprotected". // Some interfaces require a protected sqlite3_value. Other interfaces // will accept either a protected or an unprotected sqlite3_value. // Every interface that accepts sqlite3_value arguments specifies // whether or not it requires a protected sqlite3_value. The // [sqlite3_value_dup()] interface can be used to construct a new // protected sqlite3_value from an unprotected sqlite3_value. // // The terms "protected" and "unprotected" refer to whether or not // a mutex is held. An internal mutex is held for a protected // sqlite3_value object but no mutex is held for an unprotected // sqlite3_value object. If SQLite is compiled to be single-threaded // (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) // or if SQLite is run in one of reduced mutex modes // [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] // then there is no distinction between protected and unprotected // sqlite3_value objects and they can be used interchangeably. However, // for maximum code portability it is recommended that applications // still make the distinction between protected and unprotected // sqlite3_value objects even when not strictly required. // // ^The sqlite3_value objects that are passed as parameters into the // implementation of [application-defined SQL functions] are protected. // ^The sqlite3_value object returned by // [sqlite3_column_value()] is unprotected. // Unprotected sqlite3_value objects may only be used as arguments // to [sqlite3_result_value()], [sqlite3_bind_value()], and // [sqlite3_value_dup()]. // The [sqlite3_value_blob | sqlite3_value_type()] family of // interfaces require protected sqlite3_value objects. type sqlite3_value1 = struct { Fu struct{ Fr float64 } Fflags u16 Fenc u8 FeSubtype u8 Fn int32 Fz uintptr FzMalloc uintptr FszMalloc int32 FuTemp u32 Fdb uintptr FxDel uintptr } /* sqlite3.h:249:9 */ // CAPI3REF: SQL Function Context Object // // The context in which an SQL function executes is stored in an // sqlite3_context object. ^A pointer to an sqlite3_context object // is always first parameter to [application-defined SQL functions]. // The application-defined SQL function implementation will pass this // pointer through into calls to [sqlite3_result_int | sqlite3_result()], // [sqlite3_aggregate_context()], [sqlite3_user_data()], // [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], // and/or [sqlite3_set_auxdata()]. type sqlite3_context1 = struct { FpOut uintptr FpFunc uintptr FpMem uintptr FpVdbe uintptr FiOp int32 FisError int32 FskipFlag u8 Fargc u8 _ [6]byte Fargv [1]uintptr } /* sqlite3.h:249:9 */ // CAPI3REF: Constants Defining Special Destructor Behavior // // These are special values for the destructor that is passed in as the // final argument to routines like [sqlite3_result_blob()]. ^If the destructor // argument is SQLITE_STATIC, it means that the content pointer is constant // and will never change. It does not need to be destroyed. ^The // SQLITE_TRANSIENT value means that the content will likely change in // the near future and that SQLite should make its own private copy of // the content before returning. // // The typedef is necessary to work around problems in certain // C++ compilers. type sqlite3_destructor_type = uintptr /* sqlite3.h:5635:14 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. // If this is a problem for you, do not use the interface at this time. // // When the virtual-table mechanism stabilizes, we will declare the // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface type sqlite3_vtab1 = struct { FpModule uintptr FnRef int32 _ [4]byte FzErrMsg uintptr } /* sqlite3.h:6754:9 */ // The interface to the virtual-table mechanism is currently considered // to be experimental. The interface might change in incompatible ways. // If this is a problem for you, do not use the interface at this time. // // When the virtual-table mechanism stabilizes, we will declare the // interface fixed, support it indefinitely, and remove this comment. // Structures used by the virtual table interface type sqlite3_vtab = sqlite3_vtab1 /* sqlite3.h:6754:29 */ type sqlite3_index_info1 = struct { FnConstraint int32 _ [4]byte FaConstraint uintptr FnOrderBy int32 _ [4]byte FaOrderBy uintptr FaConstraintUsage uintptr FidxNum int32 _ [4]byte FidxStr uintptr FneedToFreeIdxStr int32 ForderByConsumed int32 FestimatedCost float64 FestimatedRows sqlite3_int64 FidxFlags int32 _ [4]byte FcolUsed sqlite3_uint64 } /* sqlite3.h:6755:9 */ type sqlite3_index_info = sqlite3_index_info1 /* sqlite3.h:6755:35 */ type sqlite3_vtab_cursor1 = struct{ FpVtab uintptr } /* sqlite3.h:6756:9 */ type sqlite3_vtab_cursor = sqlite3_vtab_cursor1 /* sqlite3.h:6756:36 */ type sqlite3_module1 = struct { FiVersion int32 _ [4]byte FxCreate uintptr FxConnect uintptr FxBestIndex uintptr FxDisconnect uintptr FxDestroy uintptr FxOpen uintptr FxClose uintptr FxFilter uintptr FxNext uintptr FxEof uintptr FxColumn uintptr FxRowid uintptr FxUpdate uintptr FxBegin uintptr FxSync uintptr FxCommit uintptr FxRollback uintptr FxFindFunction uintptr FxRename uintptr FxSavepoint uintptr FxRelease uintptr FxRollbackTo uintptr FxShadowName uintptr } /* sqlite3.h:6754:9 */ type sqlite3_module = sqlite3_module1 /* sqlite3.h:6757:31 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info // // The sqlite3_index_info structure and its substructures is used as part // of the [virtual table] interface to // pass information into and receive the reply from the [xBestIndex] // method of a [virtual table module]. The fields under **Inputs** are the // inputs to xBestIndex and are read-only. xBestIndex inserts its // results into the **Outputs** fields. // // ^(The aConstraint[] array records WHERE clause constraints of the form: // //
column OP expr
// // where OP is =, <, <=, >, or >=.)^ ^(The particular operator is // stored in aConstraint[].op using one of the // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ // ^(The index of the column is stored in // aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the // expr on the right-hand side can be evaluated (and thus the constraint // is usable) and false if it cannot.)^ // // ^The optimizer automatically inverts terms of the form "expr OP column" // and makes other simplifications to the WHERE clause in an attempt to // get as many WHERE clause terms into the form shown above as possible. // ^The aConstraint[] array only reports WHERE clause terms that are // relevant to the particular virtual table being queried. // // ^Information about the ORDER BY clause is stored in aOrderBy[]. // ^Each term of aOrderBy records a column of the ORDER BY clause. // // The colUsed field indicates which columns of the virtual table may be // required by the current scan. Virtual table columns are numbered from // zero in the order in which they appear within the CREATE TABLE statement // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), // the corresponding bit is set within the colUsed mask if the column may be // required by SQLite. If the table has at least 64 columns and any column // to the right of the first 63 is required, then bit 63 of colUsed is also // set. In other words, column iCol may be required if the expression // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to // non-zero. // // The [xBestIndex] method must fill aConstraintUsage[] with information // about what parameters to pass to xFilter. ^If argvIndex>0 then // the right-hand side of the corresponding aConstraint[] is evaluated // and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit // is true, then the constraint is assumed to be fully handled by the // virtual table and might not be checked again by the byte code.)^ ^(The // aConstraintUsage[].omit flag is an optimization hint. When the omit flag // is left in its default setting of false, the constraint will always be // checked separately in byte code. If the omit flag is change to true, then // the constraint may or may not be checked in byte code. In other words, // when the omit flag is true there is no guarantee that the constraint will // not be checked again using byte code.)^ // // ^The idxNum and idxPtr values are recorded and passed into the // [xFilter] method. // ^[sqlite3_free()] is used to free idxPtr if and only if // needToFreeIdxPtr is true. // // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in // the correct order to satisfy the ORDER BY clause so that no separate // sorting step is required. // // ^The estimatedCost value is an estimate of the cost of a particular // strategy. A cost of N indicates that the cost of the strategy is similar // to a linear scan of an SQLite table with N rows. A cost of log(N) // indicates that the expense of the operation is similar to that of a // binary search on a unique indexed field of an SQLite table with N rows. // // ^The estimatedRows value is an estimate of the number of rows that // will be returned by the strategy. // // The xBestIndex method may optionally populate the idxFlags field with a // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite // assumes that the strategy may visit at most one row. // // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then // SQLite also assumes that if a call to the xUpdate() method is made as // part of the same statement to delete or update a virtual table row and the // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback // any database changes. In other words, if the xUpdate() returns // SQLITE_CONSTRAINT, the database contents must be exactly as they were // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by // the xUpdate method are automatically rolled back by SQLite. // // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info // structure for SQLite [version 3.8.2] ([dateof:3.8.2]). // If a virtual table extension is // used with an SQLite version earlier than 3.8.2, the results of attempting // to read or write the estimatedRows field are undefined (but are likely // to include crashing the application). The estimatedRows field should // therefore only be used if [sqlite3_libversion_number()] returns a // value greater than or equal to 3008002. Similarly, the idxFlags field // was added for [version 3.9.0] ([dateof:3.9.0]). // It may therefore only be used if // sqlite3_libversion_number() returns a value greater than or equal to // 3009000. type sqlite3_index_constraint = struct { FiColumn int32 Fop uint8 Fusable uint8 _ [2]byte FiTermOffset int32 } /* sqlite3.h:6755:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info // // The sqlite3_index_info structure and its substructures is used as part // of the [virtual table] interface to // pass information into and receive the reply from the [xBestIndex] // method of a [virtual table module]. The fields under **Inputs** are the // inputs to xBestIndex and are read-only. xBestIndex inserts its // results into the **Outputs** fields. // // ^(The aConstraint[] array records WHERE clause constraints of the form: // //
column OP expr
// // where OP is =, <, <=, >, or >=.)^ ^(The particular operator is // stored in aConstraint[].op using one of the // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ // ^(The index of the column is stored in // aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the // expr on the right-hand side can be evaluated (and thus the constraint // is usable) and false if it cannot.)^ // // ^The optimizer automatically inverts terms of the form "expr OP column" // and makes other simplifications to the WHERE clause in an attempt to // get as many WHERE clause terms into the form shown above as possible. // ^The aConstraint[] array only reports WHERE clause terms that are // relevant to the particular virtual table being queried. // // ^Information about the ORDER BY clause is stored in aOrderBy[]. // ^Each term of aOrderBy records a column of the ORDER BY clause. // // The colUsed field indicates which columns of the virtual table may be // required by the current scan. Virtual table columns are numbered from // zero in the order in which they appear within the CREATE TABLE statement // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), // the corresponding bit is set within the colUsed mask if the column may be // required by SQLite. If the table has at least 64 columns and any column // to the right of the first 63 is required, then bit 63 of colUsed is also // set. In other words, column iCol may be required if the expression // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to // non-zero. // // The [xBestIndex] method must fill aConstraintUsage[] with information // about what parameters to pass to xFilter. ^If argvIndex>0 then // the right-hand side of the corresponding aConstraint[] is evaluated // and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit // is true, then the constraint is assumed to be fully handled by the // virtual table and might not be checked again by the byte code.)^ ^(The // aConstraintUsage[].omit flag is an optimization hint. When the omit flag // is left in its default setting of false, the constraint will always be // checked separately in byte code. If the omit flag is change to true, then // the constraint may or may not be checked in byte code. In other words, // when the omit flag is true there is no guarantee that the constraint will // not be checked again using byte code.)^ // // ^The idxNum and idxPtr values are recorded and passed into the // [xFilter] method. // ^[sqlite3_free()] is used to free idxPtr if and only if // needToFreeIdxPtr is true. // // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in // the correct order to satisfy the ORDER BY clause so that no separate // sorting step is required. // // ^The estimatedCost value is an estimate of the cost of a particular // strategy. A cost of N indicates that the cost of the strategy is similar // to a linear scan of an SQLite table with N rows. A cost of log(N) // indicates that the expense of the operation is similar to that of a // binary search on a unique indexed field of an SQLite table with N rows. // // ^The estimatedRows value is an estimate of the number of rows that // will be returned by the strategy. // // The xBestIndex method may optionally populate the idxFlags field with a // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite // assumes that the strategy may visit at most one row. // // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then // SQLite also assumes that if a call to the xUpdate() method is made as // part of the same statement to delete or update a virtual table row and the // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback // any database changes. In other words, if the xUpdate() returns // SQLITE_CONSTRAINT, the database contents must be exactly as they were // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by // the xUpdate method are automatically rolled back by SQLite. // // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info // structure for SQLite [version 3.8.2] ([dateof:3.8.2]). // If a virtual table extension is // used with an SQLite version earlier than 3.8.2, the results of attempting // to read or write the estimatedRows field are undefined (but are likely // to include crashing the application). The estimatedRows field should // therefore only be used if [sqlite3_libversion_number()] returns a // value greater than or equal to 3008002. Similarly, the idxFlags field // was added for [version 3.9.0] ([dateof:3.9.0]). // It may therefore only be used if // sqlite3_libversion_number() returns a value greater than or equal to // 3009000. type sqlite3_index_orderby = struct { FiColumn int32 Fdesc uint8 _ [3]byte } /* sqlite3.h:6755:9 */ // CAPI3REF: Virtual Table Indexing Information // KEYWORDS: sqlite3_index_info // // The sqlite3_index_info structure and its substructures is used as part // of the [virtual table] interface to // pass information into and receive the reply from the [xBestIndex] // method of a [virtual table module]. The fields under **Inputs** are the // inputs to xBestIndex and are read-only. xBestIndex inserts its // results into the **Outputs** fields. // // ^(The aConstraint[] array records WHERE clause constraints of the form: // //
column OP expr
// // where OP is =, <, <=, >, or >=.)^ ^(The particular operator is // stored in aConstraint[].op using one of the // [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ // ^(The index of the column is stored in // aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the // expr on the right-hand side can be evaluated (and thus the constraint // is usable) and false if it cannot.)^ // // ^The optimizer automatically inverts terms of the form "expr OP column" // and makes other simplifications to the WHERE clause in an attempt to // get as many WHERE clause terms into the form shown above as possible. // ^The aConstraint[] array only reports WHERE clause terms that are // relevant to the particular virtual table being queried. // // ^Information about the ORDER BY clause is stored in aOrderBy[]. // ^Each term of aOrderBy records a column of the ORDER BY clause. // // The colUsed field indicates which columns of the virtual table may be // required by the current scan. Virtual table columns are numbered from // zero in the order in which they appear within the CREATE TABLE statement // passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), // the corresponding bit is set within the colUsed mask if the column may be // required by SQLite. If the table has at least 64 columns and any column // to the right of the first 63 is required, then bit 63 of colUsed is also // set. In other words, column iCol may be required if the expression // (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to // non-zero. // // The [xBestIndex] method must fill aConstraintUsage[] with information // about what parameters to pass to xFilter. ^If argvIndex>0 then // the right-hand side of the corresponding aConstraint[] is evaluated // and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit // is true, then the constraint is assumed to be fully handled by the // virtual table and might not be checked again by the byte code.)^ ^(The // aConstraintUsage[].omit flag is an optimization hint. When the omit flag // is left in its default setting of false, the constraint will always be // checked separately in byte code. If the omit flag is change to true, then // the constraint may or may not be checked in byte code. In other words, // when the omit flag is true there is no guarantee that the constraint will // not be checked again using byte code.)^ // // ^The idxNum and idxPtr values are recorded and passed into the // [xFilter] method. // ^[sqlite3_free()] is used to free idxPtr if and only if // needToFreeIdxPtr is true. // // ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in // the correct order to satisfy the ORDER BY clause so that no separate // sorting step is required. // // ^The estimatedCost value is an estimate of the cost of a particular // strategy. A cost of N indicates that the cost of the strategy is similar // to a linear scan of an SQLite table with N rows. A cost of log(N) // indicates that the expense of the operation is similar to that of a // binary search on a unique indexed field of an SQLite table with N rows. // // ^The estimatedRows value is an estimate of the number of rows that // will be returned by the strategy. // // The xBestIndex method may optionally populate the idxFlags field with a // mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - // SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite // assumes that the strategy may visit at most one row. // // Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then // SQLite also assumes that if a call to the xUpdate() method is made as // part of the same statement to delete or update a virtual table row and the // implementation returns SQLITE_CONSTRAINT, then there is no need to rollback // any database changes. In other words, if the xUpdate() returns // SQLITE_CONSTRAINT, the database contents must be exactly as they were // before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not // set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by // the xUpdate method are automatically rolled back by SQLite. // // IMPORTANT: The estimatedRows field was added to the sqlite3_index_info // structure for SQLite [version 3.8.2] ([dateof:3.8.2]). // If a virtual table extension is // used with an SQLite version earlier than 3.8.2, the results of attempting // to read or write the estimatedRows field are undefined (but are likely // to include crashing the application). The estimatedRows field should // therefore only be used if [sqlite3_libversion_number()] returns a // value greater than or equal to 3008002. Similarly, the idxFlags field // was added for [version 3.9.0] ([dateof:3.9.0]). // It may therefore only be used if // sqlite3_libversion_number() returns a value greater than or equal to // 3009000. type sqlite3_index_constraint_usage = struct { FargvIndex int32 Fomit uint8 _ [3]byte } /* sqlite3.h:6755:9 */ // CAPI3REF: Mutex Methods Object // // An instance of this structure defines the low-level routines // used to allocate and use mutexes. // // Usually, the default mutex implementations provided by SQLite are // sufficient, however the application has the option of substituting a custom // implementation for specialized deployments or systems for which SQLite // does not provide a suitable implementation. In this case, the application // creates and populates an instance of this structure to pass // to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. // Additionally, an instance of this structure can be used as an // output variable when querying the system for the current mutex // implementation, using the [SQLITE_CONFIG_GETMUTEX] option. // // ^The xMutexInit method defined by this structure is invoked as // part of system initialization by the sqlite3_initialize() function. // ^The xMutexInit routine is called by SQLite exactly once for each // effective call to [sqlite3_initialize()]. // // ^The xMutexEnd method defined by this structure is invoked as // part of system shutdown by the sqlite3_shutdown() function. The // implementation of this method is expected to release all outstanding // resources obtained by the mutex methods implementation, especially // those obtained by the xMutexInit method. ^The xMutexEnd() // interface is invoked exactly once for each call to [sqlite3_shutdown()]. // // ^(The remaining seven methods defined by this structure (xMutexAlloc, // xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and // xMutexNotheld) implement the following interfaces (respectively): // //
    //
  • [sqlite3_mutex_alloc()]
  • //
  • [sqlite3_mutex_free()]
  • //
  • [sqlite3_mutex_enter()]
  • //
  • [sqlite3_mutex_try()]
  • //
  • [sqlite3_mutex_leave()]
  • //
  • [sqlite3_mutex_held()]
  • //
  • [sqlite3_mutex_notheld()]
  • //
)^ // // The only difference is that the public sqlite3_XXX functions enumerated // above silently ignore any invocations that pass a NULL pointer instead // of a valid mutex handle. The implementations of the methods defined // by this structure are not required to handle this case. The results // of passing a NULL pointer instead of a valid mutex handle are undefined // (i.e. it is acceptable to provide an implementation that segfaults if // it is passed a NULL pointer). // // The xMutexInit() method must be threadsafe. It must be harmless to // invoke xMutexInit() multiple times within the same process and without // intervening calls to xMutexEnd(). Second and subsequent calls to // xMutexInit() must be no-ops. // // xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] // and its associates). Similarly, xMutexAlloc() must not use SQLite memory // allocation for a static mutex. ^However xMutexAlloc() may use SQLite // memory allocation for a fast or recursive mutex. // // ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. type sqlite3_mutex_methods1 = struct { FxMutexInit uintptr FxMutexEnd uintptr FxMutexAlloc uintptr FxMutexFree uintptr FxMutexEnter uintptr FxMutexTry uintptr FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr } /* sqlite3.h:7589:9 */ // CAPI3REF: Mutex Methods Object // // An instance of this structure defines the low-level routines // used to allocate and use mutexes. // // Usually, the default mutex implementations provided by SQLite are // sufficient, however the application has the option of substituting a custom // implementation for specialized deployments or systems for which SQLite // does not provide a suitable implementation. In this case, the application // creates and populates an instance of this structure to pass // to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. // Additionally, an instance of this structure can be used as an // output variable when querying the system for the current mutex // implementation, using the [SQLITE_CONFIG_GETMUTEX] option. // // ^The xMutexInit method defined by this structure is invoked as // part of system initialization by the sqlite3_initialize() function. // ^The xMutexInit routine is called by SQLite exactly once for each // effective call to [sqlite3_initialize()]. // // ^The xMutexEnd method defined by this structure is invoked as // part of system shutdown by the sqlite3_shutdown() function. The // implementation of this method is expected to release all outstanding // resources obtained by the mutex methods implementation, especially // those obtained by the xMutexInit method. ^The xMutexEnd() // interface is invoked exactly once for each call to [sqlite3_shutdown()]. // // ^(The remaining seven methods defined by this structure (xMutexAlloc, // xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and // xMutexNotheld) implement the following interfaces (respectively): // //
    //
  • [sqlite3_mutex_alloc()]
  • //
  • [sqlite3_mutex_free()]
  • //
  • [sqlite3_mutex_enter()]
  • //
  • [sqlite3_mutex_try()]
  • //
  • [sqlite3_mutex_leave()]
  • //
  • [sqlite3_mutex_held()]
  • //
  • [sqlite3_mutex_notheld()]
  • //
)^ // // The only difference is that the public sqlite3_XXX functions enumerated // above silently ignore any invocations that pass a NULL pointer instead // of a valid mutex handle. The implementations of the methods defined // by this structure are not required to handle this case. The results // of passing a NULL pointer instead of a valid mutex handle are undefined // (i.e. it is acceptable to provide an implementation that segfaults if // it is passed a NULL pointer). // // The xMutexInit() method must be threadsafe. It must be harmless to // invoke xMutexInit() multiple times within the same process and without // intervening calls to xMutexEnd(). Second and subsequent calls to // xMutexInit() must be no-ops. // // xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] // and its associates). Similarly, xMutexAlloc() must not use SQLite memory // allocation for a static mutex. ^However xMutexAlloc() may use SQLite // memory allocation for a fast or recursive mutex. // // ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is // called, but only if the prior call to xMutexInit returned SQLITE_OK. // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. type sqlite3_mutex_methods = sqlite3_mutex_methods1 /* sqlite3.h:7589:38 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} // // An instance of the sqlite3_str object contains a dynamically-sized // string under construction. // // The lifecycle of an sqlite3_str object is as follows: //
    //
  1. ^The sqlite3_str object is created using [sqlite3_str_new()]. //
  2. ^Text is appended to the sqlite3_str object using various // methods, such as [sqlite3_str_appendf()]. //
  3. ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. //
type sqlite3_str1 = struct { Fdb uintptr FzText uintptr FnAlloc u32 FmxAlloc u32 FnChar u32 FaccError u8 FprintfFlags u8 _ [2]byte } /* sqlite3.h:7851:9 */ // CAPI3REF: Custom Page Cache Object // // The sqlite3_pcache_page object represents a single page in the // page cache. The page cache will allocate instances of this // object. Various methods of the page cache use pointers to instances // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. type sqlite3_pcache_page1 = struct { FpBuf uintptr FpExtra uintptr } /* sqlite3.h:8344:9 */ // CAPI3REF: Custom Page Cache Object // // The sqlite3_pcache_page object represents a single page in the // page cache. The page cache will allocate instances of this // object. Various methods of the page cache use pointers to instances // of this object as parameters or as their return value. // // See [sqlite3_pcache_methods2] for additional information. type sqlite3_pcache_page = sqlite3_pcache_page1 /* sqlite3.h:8344:36 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} // // ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can // register an alternative page cache implementation by passing in an // instance of the sqlite3_pcache_methods2 structure.)^ // In many applications, most of the heap memory allocated by // SQLite is used for the page cache. // By implementing a // custom page cache using this API, an application can better control // the amount of memory consumed by SQLite, the way in which // that memory is allocated and released, and the policies used to // determine exactly which parts of a database file are cached and for // how long. // // The alternative page cache mechanism is an // extreme measure that is only needed by the most demanding applications. // The built-in page cache is recommended for most uses. // // ^(The contents of the sqlite3_pcache_methods2 structure are copied to an // internal buffer by SQLite within the call to [sqlite3_config]. Hence // the application may discard the parameter after the call to // [sqlite3_config()] returns.)^ // // [[the xInit() page cache method]] // ^(The xInit() method is called once for each effective // call to [sqlite3_initialize()])^ // (usually only once during the lifetime of the process). ^(The xInit() // method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^ // The intent of the xInit() method is to set up global data structures // required by the custom page cache implementation. // ^(If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined // page cache.)^ // // [[the xShutdown() page cache method]] // ^The xShutdown() method is called by [sqlite3_shutdown()]. // It can be used to clean up // any outstanding resources before process shutdown, if required. // ^The xShutdown() method may be NULL. // // ^SQLite automatically serializes calls to the xInit method, // so the xInit method need not be threadsafe. ^The // xShutdown method is only called from [sqlite3_shutdown()] so it does // not need to be threadsafe either. All other methods must be threadsafe // in multithreaded applications. // // ^SQLite will never invoke xInit() more than once without an intervening // call to xShutdown(). // // [[the xCreate() page cache methods]] // ^SQLite invokes the xCreate() method to construct a new cache instance. // SQLite will typically create one cache instance for each open database file, // though this is not guaranteed. ^The // first parameter, szPage, is the size in bytes of the pages that must // be allocated by the cache. ^szPage will always a power of two. ^The // second parameter szExtra is a number of bytes of extra storage // associated with each page cache entry. ^The szExtra parameter will // a number less than 250. SQLite will use the // extra szExtra bytes on each page to store metadata about the underlying // database page on disk. The value passed into szExtra depends // on the SQLite version, the target platform, and how SQLite was compiled. // ^The third argument to xCreate(), bPurgeable, is true if the cache being // created will be used to cache database pages of a file stored on disk, or // false if it is used for an in-memory database. The cache implementation // does not have to do anything special based with the value of bPurgeable; // it is purely advisory. ^On a cache where bPurgeable is false, SQLite will // never invoke xUnpin() except to deliberately delete a page. // ^In other words, calls to xUnpin() on a cache with bPurgeable set to // false will always have the "discard" flag set to true. // ^Hence, a cache created with bPurgeable false will // never contain any unpinned pages. // // [[the xCachesize() page cache method]] // ^(The xCachesize() method may be called at any time by SQLite to set the // suggested maximum cache-size (number of pages stored by) the cache // instance passed as the first argument. This is the value configured using // the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable // parameter, the implementation is not required to do anything with this // value; it is advisory only. // // [[the xPagecount() page cache methods]] // The xPagecount() method must return the number of pages currently // stored in the cache, both pinned and unpinned. // // [[the xFetch() page cache methods]] // The xFetch() method locates a page in the cache and returns a pointer to // an sqlite3_pcache_page object associated with that page, or a NULL pointer. // The pBuf element of the returned sqlite3_pcache_page object will be a // pointer to a buffer of szPage bytes used to store the content of a // single database page. The pExtra element of sqlite3_pcache_page will be // a pointer to the szExtra bytes of extra storage that SQLite has requested // for each entry in the page cache. // // The page to be fetched is determined by the key. ^The minimum key value // is 1. After it has been retrieved using xFetch, the page is considered // to be "pinned". // // If the requested page is already in the page cache, then the page cache // implementation must return a pointer to the page buffer with its content // intact. If the requested page is not already in the cache, then the // cache implementation should use the value of the createFlag // parameter to help it determined what action to take: // // //
createFlag Behavior when page is not already in cache //
0 Do not allocate a new page. Return NULL. //
1 Allocate a new page if it easy and convenient to do so. // Otherwise return NULL. //
2 Make every effort to allocate a new page. Only return // NULL if allocating a new page is effectively impossible. //
// // ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite // will only use a createFlag of 2 after a prior call with a createFlag of 1 // failed.)^ In between the xFetch() calls, SQLite may // attempt to unpin one or more cache pages by spilling the content of // pinned pages to disk and synching the operating system disk cache. // // [[the xUnpin() page cache method]] // ^xUnpin() is called by SQLite with a pointer to a currently pinned page // as its second argument. If the third parameter, discard, is non-zero, // then the page must be evicted from the cache. // ^If the discard parameter is // zero, then the page may be discarded or retained at the discretion of // page cache implementation. ^The page cache implementation // may choose to evict unpinned pages at any time. // // The cache must not perform any reference counting. A single // call to xUnpin() unpins the page regardless of the number of prior calls // to xFetch(). // // [[the xRekey() page cache methods]] // The xRekey() method is used to change the key value associated with the // page passed as the second argument. If the cache // previously contains an entry associated with newKey, it must be // discarded. ^Any prior cache entry associated with newKey is guaranteed not // to be pinned. // // When SQLite calls the xTruncate() method, the cache must discard all // existing cache entries with page numbers (keys) greater than or equal // to the value of the iLimit parameter passed to xTruncate(). If any // of these pages are pinned, they are implicitly unpinned, meaning that // they can be safely discarded. // // [[the xDestroy() page cache method]] // ^The xDestroy() method is used to delete a cache allocated by xCreate(). // All resources associated with the specified cache should be freed. ^After // calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] // handle invalid, and will not use it with any other sqlite3_pcache_methods2 // functions. // // [[the xShrink() page cache method]] // ^SQLite invokes the xShrink() method when it wants the page cache to // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. type sqlite3_pcache_methods21 = struct { FiVersion int32 _ [4]byte FpArg uintptr FxInit uintptr FxShutdown uintptr FxCreate uintptr FxCachesize uintptr FxPagecount uintptr FxFetch uintptr FxUnpin uintptr FxRekey uintptr FxTruncate uintptr FxDestroy uintptr FxShrink uintptr } /* sqlite3.h:8509:9 */ // CAPI3REF: Application Defined Page Cache. // KEYWORDS: {page cache} // // ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can // register an alternative page cache implementation by passing in an // instance of the sqlite3_pcache_methods2 structure.)^ // In many applications, most of the heap memory allocated by // SQLite is used for the page cache. // By implementing a // custom page cache using this API, an application can better control // the amount of memory consumed by SQLite, the way in which // that memory is allocated and released, and the policies used to // determine exactly which parts of a database file are cached and for // how long. // // The alternative page cache mechanism is an // extreme measure that is only needed by the most demanding applications. // The built-in page cache is recommended for most uses. // // ^(The contents of the sqlite3_pcache_methods2 structure are copied to an // internal buffer by SQLite within the call to [sqlite3_config]. Hence // the application may discard the parameter after the call to // [sqlite3_config()] returns.)^ // // [[the xInit() page cache method]] // ^(The xInit() method is called once for each effective // call to [sqlite3_initialize()])^ // (usually only once during the lifetime of the process). ^(The xInit() // method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^ // The intent of the xInit() method is to set up global data structures // required by the custom page cache implementation. // ^(If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined // page cache.)^ // // [[the xShutdown() page cache method]] // ^The xShutdown() method is called by [sqlite3_shutdown()]. // It can be used to clean up // any outstanding resources before process shutdown, if required. // ^The xShutdown() method may be NULL. // // ^SQLite automatically serializes calls to the xInit method, // so the xInit method need not be threadsafe. ^The // xShutdown method is only called from [sqlite3_shutdown()] so it does // not need to be threadsafe either. All other methods must be threadsafe // in multithreaded applications. // // ^SQLite will never invoke xInit() more than once without an intervening // call to xShutdown(). // // [[the xCreate() page cache methods]] // ^SQLite invokes the xCreate() method to construct a new cache instance. // SQLite will typically create one cache instance for each open database file, // though this is not guaranteed. ^The // first parameter, szPage, is the size in bytes of the pages that must // be allocated by the cache. ^szPage will always a power of two. ^The // second parameter szExtra is a number of bytes of extra storage // associated with each page cache entry. ^The szExtra parameter will // a number less than 250. SQLite will use the // extra szExtra bytes on each page to store metadata about the underlying // database page on disk. The value passed into szExtra depends // on the SQLite version, the target platform, and how SQLite was compiled. // ^The third argument to xCreate(), bPurgeable, is true if the cache being // created will be used to cache database pages of a file stored on disk, or // false if it is used for an in-memory database. The cache implementation // does not have to do anything special based with the value of bPurgeable; // it is purely advisory. ^On a cache where bPurgeable is false, SQLite will // never invoke xUnpin() except to deliberately delete a page. // ^In other words, calls to xUnpin() on a cache with bPurgeable set to // false will always have the "discard" flag set to true. // ^Hence, a cache created with bPurgeable false will // never contain any unpinned pages. // // [[the xCachesize() page cache method]] // ^(The xCachesize() method may be called at any time by SQLite to set the // suggested maximum cache-size (number of pages stored by) the cache // instance passed as the first argument. This is the value configured using // the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable // parameter, the implementation is not required to do anything with this // value; it is advisory only. // // [[the xPagecount() page cache methods]] // The xPagecount() method must return the number of pages currently // stored in the cache, both pinned and unpinned. // // [[the xFetch() page cache methods]] // The xFetch() method locates a page in the cache and returns a pointer to // an sqlite3_pcache_page object associated with that page, or a NULL pointer. // The pBuf element of the returned sqlite3_pcache_page object will be a // pointer to a buffer of szPage bytes used to store the content of a // single database page. The pExtra element of sqlite3_pcache_page will be // a pointer to the szExtra bytes of extra storage that SQLite has requested // for each entry in the page cache. // // The page to be fetched is determined by the key. ^The minimum key value // is 1. After it has been retrieved using xFetch, the page is considered // to be "pinned". // // If the requested page is already in the page cache, then the page cache // implementation must return a pointer to the page buffer with its content // intact. If the requested page is not already in the cache, then the // cache implementation should use the value of the createFlag // parameter to help it determined what action to take: // // //
createFlag Behavior when page is not already in cache //
0 Do not allocate a new page. Return NULL. //
1 Allocate a new page if it easy and convenient to do so. // Otherwise return NULL. //
2 Make every effort to allocate a new page. Only return // NULL if allocating a new page is effectively impossible. //
// // ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite // will only use a createFlag of 2 after a prior call with a createFlag of 1 // failed.)^ In between the xFetch() calls, SQLite may // attempt to unpin one or more cache pages by spilling the content of // pinned pages to disk and synching the operating system disk cache. // // [[the xUnpin() page cache method]] // ^xUnpin() is called by SQLite with a pointer to a currently pinned page // as its second argument. If the third parameter, discard, is non-zero, // then the page must be evicted from the cache. // ^If the discard parameter is // zero, then the page may be discarded or retained at the discretion of // page cache implementation. ^The page cache implementation // may choose to evict unpinned pages at any time. // // The cache must not perform any reference counting. A single // call to xUnpin() unpins the page regardless of the number of prior calls // to xFetch(). // // [[the xRekey() page cache methods]] // The xRekey() method is used to change the key value associated with the // page passed as the second argument. If the cache // previously contains an entry associated with newKey, it must be // discarded. ^Any prior cache entry associated with newKey is guaranteed not // to be pinned. // // When SQLite calls the xTruncate() method, the cache must discard all // existing cache entries with page numbers (keys) greater than or equal // to the value of the iLimit parameter passed to xTruncate(). If any // of these pages are pinned, they are implicitly unpinned, meaning that // they can be safely discarded. // // [[the xDestroy() page cache method]] // ^The xDestroy() method is used to delete a cache allocated by xCreate(). // All resources associated with the specified cache should be freed. ^After // calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] // handle invalid, and will not use it with any other sqlite3_pcache_methods2 // functions. // // [[the xShrink() page cache method]] // ^SQLite invokes the xShrink() method when it wants the page cache to // free up as much of heap memory as possible. The page cache implementation // is not obligated to free any memory, but well-behaved implementations should // do their best. type sqlite3_pcache_methods2 = sqlite3_pcache_methods21 /* sqlite3.h:8509:40 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. type sqlite3_pcache_methods1 = struct { FpArg uintptr FxInit uintptr FxShutdown uintptr FxCreate uintptr FxCachesize uintptr FxPagecount uintptr FxFetch uintptr FxUnpin uintptr FxRekey uintptr FxTruncate uintptr FxDestroy uintptr } /* sqlite3.h:8532:9 */ // This is the obsolete pcache_methods object that has now been replaced // by sqlite3_pcache_methods2. This object is not used by SQLite. It is // retained in the header file for backwards compatibility only. type sqlite3_pcache_methods = sqlite3_pcache_methods1 /* sqlite3.h:8532:39 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} // // An instance of the snapshot object records the state of a [WAL mode] // database for some specific point in history. // // In [WAL mode], multiple [database connections] that are open on the // same database file can each be reading a different historical version // of the database file. When a [database connection] begins a read // transaction, that connection sees an unchanging copy of the database // as it existed for the point in time when the transaction first started. // Subsequent changes to the database from other connections are not seen // by the reader until a new read transaction is started. // // The sqlite3_snapshot object records state information about an historical // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. type sqlite3_snapshot1 = struct{ Fhidden [48]uint8 } /* sqlite3.h:9589:9 */ // CAPI3REF: Database Snapshot // KEYWORDS: {snapshot} {sqlite3_snapshot} // // An instance of the snapshot object records the state of a [WAL mode] // database for some specific point in history. // // In [WAL mode], multiple [database connections] that are open on the // same database file can each be reading a different historical version // of the database file. When a [database connection] begins a read // transaction, that connection sees an unchanging copy of the database // as it existed for the point in time when the transaction first started. // Subsequent changes to the database from other connections are not seen // by the reader until a new read transaction is started. // // The sqlite3_snapshot object records state information about an historical // version of the database file so that it is possible to later open a new read // transaction that sees that historical version of the database rather than // the most recent version. type sqlite3_snapshot = sqlite3_snapshot1 /* sqlite3.h:9591:3 */ // CAPI3REF: Flags for sqlite3_deserialize() // // The following are allowed values for 6th argument (the F argument) to // the [sqlite3_deserialize(D,S,P,N,M,F)] interface. // // The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization // in the P argument is held in memory obtained from [sqlite3_malloc64()] // and that SQLite should take ownership of this memory and automatically // free it when it has finished using it. Without this flag, the caller // is responsible for freeing any dynamically allocated memory. // // The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to // grow the size of the database using calls to [sqlite3_realloc64()]. This // flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used. // Without this flag, the deserialized database cannot increase in size beyond // the number of bytes specified by the M parameter. // // The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database // should be treated as read-only. // Undo the hack that converts floating point types to integer for // builds on processors without floating point support. //******* Begin file sqlite3rtree.h ******** // 2010 August 30 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // type sqlite3_rtree_geometry1 = struct { FpContext uintptr FnParam int32 _ [4]byte FaParam uintptr FpUser uintptr FxDelUser uintptr } /* sqlite3.h:9916:9 */ // CAPI3REF: Flags for sqlite3_deserialize() // // The following are allowed values for 6th argument (the F argument) to // the [sqlite3_deserialize(D,S,P,N,M,F)] interface. // // The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization // in the P argument is held in memory obtained from [sqlite3_malloc64()] // and that SQLite should take ownership of this memory and automatically // free it when it has finished using it. Without this flag, the caller // is responsible for freeing any dynamically allocated memory. // // The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to // grow the size of the database using calls to [sqlite3_realloc64()]. This // flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used. // Without this flag, the deserialized database cannot increase in size beyond // the number of bytes specified by the M parameter. // // The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database // should be treated as read-only. // Undo the hack that converts floating point types to integer for // builds on processors without floating point support. //******* Begin file sqlite3rtree.h ******** // 2010 August 30 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // type sqlite3_rtree_geometry = sqlite3_rtree_geometry1 /* sqlite3.h:9916:39 */ type sqlite3_rtree_query_info1 = struct { FpContext uintptr FnParam int32 _ [4]byte FaParam uintptr FpUser uintptr FxDelUser uintptr FaCoord uintptr FanQueue uintptr FnCoord int32 FiLevel int32 FmxLevel int32 _ [4]byte FiRowid sqlite3_int64 FrParentScore sqlite3_rtree_dbl FeParentWithin int32 FeWithin int32 FrScore sqlite3_rtree_dbl FapSqlParam uintptr } /* sqlite3.h:9917:9 */ type sqlite3_rtree_query_info = sqlite3_rtree_query_info1 /* sqlite3.h:9917:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. type sqlite3_rtree_dbl = float64 /* sqlite3.h:9925:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. //******* End of sqlite3rtree.h ******** //******* Begin file sqlite3session.h ******** //******* End of sqlite3session.h ******** //******* Begin file fts5.h ******** // 2014 May 31 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // // Interfaces to extend FTS5. Using the interfaces defined in this file, // FTS5 may be extended with: // // * custom tokenizers, and // * custom auxiliary functions. // ************************************************************************ // // CUSTOM AUXILIARY FUNCTIONS // // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. type Fts5ExtensionApi1 = struct { FiVersion int32 _ [4]byte FxUserData uintptr FxColumnCount uintptr FxRowCount uintptr FxColumnTotalSize uintptr FxTokenize uintptr FxPhraseCount uintptr FxPhraseSize uintptr FxInstCount uintptr FxInst uintptr FxRowid uintptr FxColumnText uintptr FxColumnSize uintptr FxQueryPhrase uintptr FxSetAuxdata uintptr FxGetAuxdata uintptr FxPhraseFirst uintptr FxPhraseNext uintptr FxPhraseFirstColumn uintptr FxPhraseNextColumn uintptr } /* sqlite3.h:11724:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. //******* End of sqlite3rtree.h ******** //******* Begin file sqlite3session.h ******** //******* End of sqlite3session.h ******** //******* Begin file fts5.h ******** // 2014 May 31 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // // Interfaces to extend FTS5. Using the interfaces defined in this file, // FTS5 may be extended with: // // * custom tokenizers, and // * custom auxiliary functions. // ************************************************************************ // // CUSTOM AUXILIARY FUNCTIONS // // Virtual table implementations may overload SQL functions by implementing // the sqlite3_module.xFindFunction() method. type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.h:11724:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr } /* sqlite3.h:11726:9 */ type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.h:11726:31 */ type fts5_extension_function = uintptr /* sqlite3.h:11728:14 */ type fts5_tokenizer1 = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr } /* sqlite3.h:12187:9 */ type fts5_tokenizer = fts5_tokenizer1 /* sqlite3.h:12187:31 */ // Flags that may be passed as the third argument to xTokenize() // Flags that may be passed by the tokenizer implementation back to FTS5 // as the third argument to the supplied xToken callback. // // END OF CUSTOM TOKENIZERS // // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API type fts5_api1 = struct { FiVersion int32 _ [4]byte FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr } /* sqlite3.h:12223:9 */ // Flags that may be passed as the third argument to xTokenize() // Flags that may be passed by the tokenizer implementation back to FTS5 // as the third argument to the supplied xToken callback. // // END OF CUSTOM TOKENIZERS // // ************************************************************************ // // FTS5 EXTENSION REGISTRATION API type fts5_api = fts5_api1 /* sqlite3.h:12223:25 */ // // END OF REGISTRATION API // //******* End of fts5.h ******** type sqlite3expert1 = struct { FiSample int32 _ [4]byte Fdb uintptr Fdbm uintptr Fdbv uintptr FpTable uintptr FpScan uintptr FpWrite uintptr FpStatement uintptr FbRun int32 _ [4]byte FpzErrmsg uintptr Frc int32 _ [4]byte FhIdx IdxHash FzCandidates uintptr } /* sqlite3expert.h:17:9 */ // // END OF REGISTRATION API // //******* End of fts5.h ******** type sqlite3expert = sqlite3expert1 /* sqlite3expert.h:17:30 */ type ssize_t = int64 /* crtdefs.h:45:35 */ type rsize_t = size_t /* crtdefs.h:52:16 */ type intptr_t = int64 /* crtdefs.h:62:35 */ type uintptr_t = uint64 /* crtdefs.h:75:44 */ type wint_t = uint16 /* crtdefs.h:106:24 */ type wctype_t = uint16 /* crtdefs.h:107:24 */ type errno_t = int32 /* crtdefs.h:113:13 */ type time_t = int64 /* crtdefs.h:138:20 */ type threadlocaleinfostruct = struct { Frefcount int32 Flc_codepage uint32 Flc_collate_cp uint32 Flc_handle [6]uint32 Flc_id [6]LC_ID Flc_category [6]struct { Flocale uintptr Fwlocale uintptr Frefcount uintptr Fwrefcount uintptr } Flc_clike int32 Fmb_cur_max int32 Flconv_intl_refcount uintptr Flconv_num_refcount uintptr Flconv_mon_refcount uintptr Flconv uintptr Fctype1_refcount uintptr Fctype1 uintptr Fpctype uintptr Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr } /* crtdefs.h:422:1 */ type pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ type pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ type localeinfo_struct = struct { Flocinfo pthreadlocinfo Fmbcinfo pthreadmbcinfo } /* crtdefs.h:428:9 */ type _locale_tstruct = localeinfo_struct /* crtdefs.h:431:3 */ type _locale_t = uintptr /* crtdefs.h:431:19 */ type tagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 } /* crtdefs.h:422:1 */ type LC_ID = tagLC_ID /* crtdefs.h:439:3 */ type LPLC_ID = uintptr /* crtdefs.h:439:9 */ type threadlocinfo = threadlocaleinfostruct /* crtdefs.h:468:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Undefine __mingw_ macros. type _iobuf = struct { F_ptr uintptr F_cnt int32 _ [4]byte F_base uintptr F_flag int32 F_file int32 F_charbuf int32 F_bufsiz int32 F_tmpfname uintptr } /* stdio.h:26:3 */ type FILE = _iobuf /* stdio.h:36:25 */ type _off_t = int32 /* _mingw_off_t.h:5:16 */ type off32_t = int32 /* _mingw_off_t.h:7:16 */ type _off64_t = int64 /* _mingw_off_t.h:13:39 */ type off64_t = int64 /* _mingw_off_t.h:15:39 */ type off_t = off64_t /* _mingw_off_t.h:24:17 */ type fpos_t = int64 /* stdio.h:104:37 */ func vsnwprintf(tls *libc.TLS, s uintptr, n size_t, format uintptr, arg va_list) int32 { /* stdio.h:1213:15: */ return libc.X_vsnwprintf(tls, s, n, format, arg) } // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. func vswprintf(tls *libc.TLS, __stream uintptr, __count size_t, __format uintptr, __local_argv uintptr) int32 { /* swprintf.inl:27:5: */ return vsnwprintf(tls, __stream, __count, __format, __local_argv) } // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. type i64 = sqlite3_int64 /* sqlite3expert.c:20:23 */ type u64 = sqlite3_uint64 /* sqlite3expert.c:21:24 */ type IdxColumn1 = struct { FzName uintptr FzColl uintptr FiPk int32 _ [4]byte } /* sqlite3expert.h:17:9 */ type IdxColumn = IdxColumn1 /* sqlite3expert.c:23:26 */ type IdxConstraint1 = struct { FzColl uintptr FbRange int32 FiCol int32 FbFlag int32 FbDesc int32 FpNext uintptr FpLink uintptr } /* sqlite3expert.h:17:9 */ type IdxConstraint = IdxConstraint1 /* sqlite3expert.c:24:30 */ type IdxScan1 = struct { FpTab uintptr FiDb int32 _ [4]byte Fcovering i64 FpOrder uintptr FpEq uintptr FpRange uintptr FpNextScan uintptr } /* sqlite3expert.h:17:9 */ type IdxScan = IdxScan1 /* sqlite3expert.c:25:24 */ type IdxStatement1 = struct { FiId int32 _ [4]byte FzSql uintptr FzIdx uintptr FzEQP uintptr FpNext uintptr } /* sqlite3expert.h:17:9 */ type IdxStatement = IdxStatement1 /* sqlite3expert.c:26:29 */ type IdxTable1 = struct { FnCol int32 _ [4]byte FzName uintptr FaCol uintptr FpNext uintptr } /* sqlite3expert.h:17:9 */ type IdxTable = IdxTable1 /* sqlite3expert.c:27:25 */ type IdxWrite1 = struct { FpTab uintptr FeOp int32 _ [4]byte FpNext uintptr } /* sqlite3expert.h:17:9 */ type IdxWrite = IdxWrite1 /* sqlite3expert.c:28:25 */ // A hash table for storing strings. With space for a payload string // with each entry. Methods are: // // idxHashInit() // idxHashClear() // idxHashAdd() // idxHashSearch() type IdxHashEntry1 = struct { FzKey uintptr FzVal uintptr FzVal2 uintptr FpHashNext uintptr FpNext uintptr } /* sqlite3expert.h:17:9 */ // A hash table for storing strings. With space for a payload string // with each entry. Methods are: // // idxHashInit() // idxHashClear() // idxHashAdd() // idxHashSearch() type IdxHashEntry = IdxHashEntry1 /* sqlite3expert.c:120:29 */ type IdxHash1 = struct { FpFirst uintptr FaHash [1023]uintptr } /* sqlite3expert.h:17:9 */ type IdxHash = IdxHash1 /* sqlite3expert.c:121:24 */ // Allocate and return nByte bytes of zeroed memory using sqlite3_malloc(). // If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. func idxMalloc(tls *libc.TLS, pRc uintptr, nByte int32) uintptr { /* sqlite3expert.c:158:13: */ var pRet uintptr pRet = sqlite3.Xsqlite3_malloc(tls, nByte) if pRet != 0 { libc.Xmemset(tls, pRet, 0, uint64(nByte)) } else { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } return pRet } // Initialize an IdxHash hash table. func idxHashInit(tls *libc.TLS, pHash uintptr) { /* sqlite3expert.c:174:13: */ libc.Xmemset(tls, pHash, 0, uint64(unsafe.Sizeof(IdxHash{}))) } // Reset an IdxHash hash table. func idxHashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3expert.c:181:13: */ var i int32 for i = 0; i < IDX_HASH_SIZE; i++ { var pEntry uintptr var pNext uintptr for pEntry = *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(i)*8)); pEntry != 0; pEntry = pNext { pNext = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpHashNext sqlite3.Xsqlite3_free(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2) sqlite3.Xsqlite3_free(tls, pEntry) } } libc.Xmemset(tls, pHash, 0, uint64(unsafe.Sizeof(IdxHash{}))) } // Return the index of the hash bucket that the string specified by the // arguments to this function belongs. func idxHashString(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3expert.c:199:12: */ var ret uint32 = uint32(0) var i int32 for i = 0; i < n; i++ { ret = ret + ((ret << 3) + uint32((uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))))) } return (int32(ret % uint32(IDX_HASH_SIZE))) } // If zKey is already present in the hash table, return non-zero and do // nothing. Otherwise, add an entry with key zKey and payload string zVal to // the hash table passed as the second argument. func idxHashAdd(tls *libc.TLS, pRc uintptr, pHash uintptr, zKey uintptr, zVal uintptr) int32 { /* sqlite3expert.c:213:12: */ var nKey int32 = int32(libc.Xstrlen(tls, zKey)) var iHash int32 = idxHashString(tls, zKey, nKey) var nVal int32 = func() int32 { if zVal != 0 { return int32(libc.Xstrlen(tls, zVal)) } return 0 }() var pEntry uintptr for pEntry = *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(iHash)*8)); pEntry != 0; pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpHashNext { if (int32(libc.Xstrlen(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) == nKey) && (0 == libc.Xmemcmp(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey, zKey, uint64(nKey))) { return 1 } } pEntry = idxMalloc(tls, pRc, (int32((((uint64(unsafe.Sizeof(IdxHashEntry{})) + uint64(nKey)) + uint64(1)) + uint64(nVal)) + uint64(1)))) if pEntry != 0 { (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey = (pEntry + 1*40) libc.Xmemcpy(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey, zKey, uint64(nKey)) if zVal != 0 { (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal = ((*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey + uintptr((nKey + 1))) libc.Xmemcpy(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal, zVal, uint64(nVal)) } (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpHashNext = *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(iHash)*8)) *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(iHash)*8)) = pEntry (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpNext = (*IdxHash)(unsafe.Pointer(pHash)).FpFirst (*IdxHash)(unsafe.Pointer(pHash)).FpFirst = pEntry } return 0 } // If zKey/nKey is present in the hash table, return a pointer to the // hash-entry object. func idxHashFind(tls *libc.TLS, pHash uintptr, zKey uintptr, nKey int32) uintptr { /* sqlite3expert.c:250:21: */ var iHash int32 var pEntry uintptr if nKey < 0 { nKey = int32(libc.Xstrlen(tls, zKey)) } iHash = idxHashString(tls, zKey, nKey) for pEntry = *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(iHash)*8)); pEntry != 0; pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpHashNext { if (int32(libc.Xstrlen(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) == nKey) && (0 == libc.Xmemcmp(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey, zKey, uint64(nKey))) { return pEntry } } return uintptr(0) } // If the hash table contains an entry with a key equal to the string // passed as the final two arguments to this function, return a pointer // to the payload string. Otherwise, if zKey/nKey is not present in the // hash table, return NULL. func idxHashSearch(tls *libc.TLS, pHash uintptr, zKey uintptr, nKey int32) uintptr { /* sqlite3expert.c:270:19: */ var pEntry uintptr = idxHashFind(tls, pHash, zKey, nKey) if pEntry != 0 { return (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal } return uintptr(0) } // Allocate and return a new IdxConstraint object. Set the IdxConstraint.zColl // variable to point to a copy of nul-terminated string zColl. func idxNewConstraint(tls *libc.TLS, pRc uintptr, zColl uintptr) uintptr { /* sqlite3expert.c:280:22: */ var pNew uintptr var nColl int32 = int32(libc.Xstrlen(tls, zColl)) pNew = idxMalloc(tls, pRc, (int32((uint64(unsafe.Sizeof(IdxConstraint{})) * uint64(nColl)) + uint64(1)))) if pNew != 0 { (*IdxConstraint)(unsafe.Pointer(pNew)).FzColl = (pNew + 1*40) libc.Xmemcpy(tls, (*IdxConstraint)(unsafe.Pointer(pNew)).FzColl, zColl, (uint64(nColl + 1))) } return pNew } // An error associated with database handle db has just occurred. Pass // the error message to callback function xOut. func idxDatabaseError(tls *libc.TLS, db uintptr, pzErrmsg uintptr) { /* sqlite3expert.c:297:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) } // Prepare an SQL statement. func idxPrepareStmt(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3expert.c:307:12: */ var rc int32 = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, ppStmt, uintptr(0)) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) idxDatabaseError(tls, db, pzErrmsg) } return rc } // Prepare an SQL statement using the results of a printf() formatting. func idxPrintfPrepareStmt(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3expert.c:324:12: */ var ap va_list _ = ap var rc int32 var zSql uintptr ap = va zSql = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { rc = idxPrepareStmt(tls, db, ppStmt, pzErrmsg, zSql) sqlite3.Xsqlite3_free(tls, zSql) } _ = ap return rc } // ************************************************************************ // // Beginning of virtual table implementation. type ExpertVtab1 = struct { Fbase sqlite3_vtab FpTab uintptr FpExpert uintptr } /* sqlite3expert.c:350:9 */ // ************************************************************************ // // Beginning of virtual table implementation. type ExpertVtab = ExpertVtab1 /* sqlite3expert.c:350:27 */ type ExpertCsr1 = struct { Fbase sqlite3_vtab_cursor FpData uintptr } /* sqlite3expert.c:357:9 */ type ExpertCsr = ExpertCsr1 /* sqlite3expert.c:357:26 */ func expertDequote(tls *libc.TLS, zIn uintptr) uintptr { /* sqlite3expert.c:363:13: */ var n int32 = int32(libc.Xstrlen(tls, zIn)) var zRet uintptr = sqlite3.Xsqlite3_malloc(tls, n) if zRet != 0 { var iOut int32 = 0 var iIn int32 = 0 for iIn = 1; iIn < (n - 1); iIn++ { if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iIn)))) == '\'' { iIn++ } *(*int8)(unsafe.Pointer(zRet + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) } *(*int8)(unsafe.Pointer(zRet + uintptr(iOut))) = int8(0) } return zRet } // This function is the implementation of both the xConnect and xCreate // methods of the r-tree virtual table. // // argv[0] -> module name // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... func expertConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:395:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pExpert uintptr = pAux var p uintptr = uintptr(0) // var rc int32 at bp, 4 if argc != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3 /* "internal error!" */, 0) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR } else { var zCreateTable uintptr = expertDequote(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) if zCreateTable != 0 { *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3_declare_vtab(tls, db, zCreateTable) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { p = idxMalloc(tls, bp /* &rc */, int32(unsafe.Sizeof(ExpertVtab{}))) } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { (*ExpertVtab)(unsafe.Pointer(p)).FpExpert = pExpert (*ExpertVtab)(unsafe.Pointer(p)).FpTab = (*sqlite3expert)(unsafe.Pointer(pExpert)).FpTable } sqlite3.Xsqlite3_free(tls, zCreateTable) } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_NOMEM } } *(*uintptr)(unsafe.Pointer(ppVtab)) = p return *(*int32)(unsafe.Pointer(bp /* rc */)) } func expertDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3expert.c:431:12: */ var p uintptr = pVtab sqlite3.Xsqlite3_free(tls, p) return SQLITE_OK } func expertBestIndex(tls *libc.TLS, pVtab uintptr, pIdxInfo uintptr) int32 { /* sqlite3expert.c:437:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pVtab *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var n int32 = 0 var pScan uintptr var opmask int32 = ((((SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_GT) | SQLITE_INDEX_CONSTRAINT_LT) | SQLITE_INDEX_CONSTRAINT_GE) | SQLITE_INDEX_CONSTRAINT_LE) pScan = idxMalloc(tls, bp /* &rc */, int32(unsafe.Sizeof(IdxScan{}))) if pScan != 0 { var i int32 // Link the new scan object into the list (*IdxScan)(unsafe.Pointer(pScan)).FpTab = (*ExpertVtab)(unsafe.Pointer(p)).FpTab (*IdxScan)(unsafe.Pointer(pScan)).FpNextScan = (*sqlite3expert)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(p)).FpExpert)).FpScan (*sqlite3expert)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(p)).FpExpert)).FpScan = pScan // Add the constraints to the IdxScan object for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; i++ { var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(i)*12) if ((((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable != 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn >= 0)) && ((*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(p)).FpTab)).FaCol+uintptr((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn)*24)).FiPk == 0)) && ((int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) & opmask) != 0) { var pNew uintptr var zColl uintptr = sqlite3.Xsqlite3_vtab_collation(tls, pIdxInfo, i) pNew = idxNewConstraint(tls, bp /* &rc */, zColl) if pNew != 0 { (*IdxConstraint)(unsafe.Pointer(pNew)).FiCol = (*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn if int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { (*IdxConstraint)(unsafe.Pointer(pNew)).FpNext = (*IdxScan)(unsafe.Pointer(pScan)).FpEq (*IdxScan)(unsafe.Pointer(pScan)).FpEq = pNew } else { (*IdxConstraint)(unsafe.Pointer(pNew)).FbRange = 1 (*IdxConstraint)(unsafe.Pointer(pNew)).FpNext = (*IdxScan)(unsafe.Pointer(pScan)).FpRange (*IdxScan)(unsafe.Pointer(pScan)).FpRange = pNew } } n++ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = n } } // Add the ORDER BY to the IdxScan object for i = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy - 1); i >= 0; i-- { var iCol int32 = (*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy + uintptr(i)*8)).FiColumn if iCol >= 0 { var pNew uintptr = idxNewConstraint(tls, bp /* &rc */, (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(p)).FpTab)).FaCol+uintptr(iCol)*24)).FzColl) if pNew != 0 { (*IdxConstraint)(unsafe.Pointer(pNew)).FiCol = iCol (*IdxConstraint)(unsafe.Pointer(pNew)).FbDesc = int32((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy + uintptr(i)*8)).Fdesc) (*IdxConstraint)(unsafe.Pointer(pNew)).FpNext = (*IdxScan)(unsafe.Pointer(pScan)).FpOrder (*IdxConstraint)(unsafe.Pointer(pNew)).FpLink = (*IdxScan)(unsafe.Pointer(pScan)).FpOrder (*IdxScan)(unsafe.Pointer(pScan)).FpOrder = pNew n++ } } } } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = (1000000.0 / (float64(n + 1))) return *(*int32)(unsafe.Pointer(bp /* rc */)) } func expertUpdate(tls *libc.TLS, pVtab uintptr, nData int32, azData uintptr, pRowid uintptr) int32 { /* sqlite3expert.c:504:12: */ _ = pVtab _ = nData _ = azData _ = pRowid return SQLITE_OK } // Virtual table module xOpen method. func expertOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3expert.c:520:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pCsr uintptr _ = pVTab pCsr = idxMalloc(tls, bp /* &rc */, int32(unsafe.Sizeof(ExpertCsr{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = pCsr return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Virtual table module xClose method. func expertClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3expert.c:532:12: */ var pCsr uintptr = cur sqlite3.Xsqlite3_finalize(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData) sqlite3.Xsqlite3_free(tls, pCsr) return SQLITE_OK } // Virtual table module xEof method. // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. func expertEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3expert.c:545:12: */ var pCsr uintptr = cur return (libc.Bool32((*ExpertCsr)(unsafe.Pointer(pCsr)).FpData == uintptr(0))) } // Virtual table module xNext method. func expertNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3expert.c:553:12: */ var pCsr uintptr = cur var rc int32 = SQLITE_OK rc = sqlite3.Xsqlite3_step(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData) if rc != SQLITE_ROW { rc = sqlite3.Xsqlite3_finalize(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData) (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData = uintptr(0) } else { rc = SQLITE_OK } return rc } // Virtual table module xRowid method. func expertRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3expert.c:572:12: */ _ = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = int64(0) return SQLITE_OK } // Virtual table module xColumn method. func expertColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3expert.c:581:12: */ var pCsr uintptr = cur var pVal uintptr pVal = sqlite3.Xsqlite3_column_value(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData, i) if pVal != 0 { sqlite3.Xsqlite3_result_value(tls, ctx, pVal) } return SQLITE_OK } // Virtual table module xFilter method. func expertFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3expert.c:594:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pCsr uintptr = cur var pVtab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pExpert uintptr = (*ExpertVtab)(unsafe.Pointer(pVtab)).FpExpert var rc int32 _ = idxNum _ = idxStr _ = argc _ = argv rc = sqlite3.Xsqlite3_finalize(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData) (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData = uintptr(0) if rc == SQLITE_OK { rc = idxPrintfPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(pExpert)).Fdb, (pCsr + 8 /* &.pData */), (pVtab /* &.base */ + 16 /* &.zErrMsg */), ts+19 /* "SELECT * FROM ma..." */, libc.VaList(bp, (*IdxTable)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(pVtab)).FpTab)).FzName)) } if rc == SQLITE_OK { rc = expertNext(tls, cur) } return rc } func idxRegisterVtab(tls *libc.TLS, p uintptr) int32 { /* sqlite3expert.c:622:12: */ return sqlite3.Xsqlite3_create_module(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+56 /* "expert" */, uintptr(unsafe.Pointer(&expertModule)), p) } var expertModule = sqlite3_module{ FiVersion: 2, // iVersion FxCreate: 0, // xCreate - create a table FxConnect: 0, // xConnect - connect to an existing table FxBestIndex: 0, // xBestIndex - Determine search strategy FxDisconnect: 0, // xDisconnect - Disconnect from a table FxDestroy: 0, // xDestroy - Drop a table FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xShadowName } /* sqlite3expert.c:623:25 */ // // End of virtual table implementation. // // Finalize SQL statement pStmt. If (*pRc) is SQLITE_OK when this function // is called, set it to the return value of sqlite3_finalize() before // returning. Otherwise, discard the sqlite3_finalize() return value. func idxFinalize(tls *libc.TLS, pRc uintptr, pStmt uintptr) { /* sqlite3expert.c:660:13: */ var rc int32 = sqlite3.Xsqlite3_finalize(tls, pStmt) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = rc } } // Attempt to allocate an IdxTable structure corresponding to table zTab // in the main database of connection db. If successful, set (*ppOut) to // point to the new object and return SQLITE_OK. Otherwise, return an // SQLite error code and set (*ppOut) to NULL. In this case *pzErrmsg may be // set to point to an error string. // // It is the responsibility of the caller to eventually free either the // IdxTable object or error message using sqlite3_free(). func idxGetTableInfo(tls *libc.TLS, db uintptr, zTab uintptr, ppOut uintptr, pzErrmsg uintptr) int32 { /* sqlite3expert.c:675:12: */ bp := tls.Alloc(48) defer tls.Free(48) *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)) = uintptr(0) var nCol int32 = 0 var nTab int32 = int32(libc.Xstrlen(tls, zTab)) var nByte int32 = (int32((uint64(unsafe.Sizeof(IdxTable{})) + uint64(nTab)) + uint64(1))) var pNew uintptr = uintptr(0) // var rc int32 at bp+32, 4 var rc2 int32 var pCsr uintptr = uintptr(0) var nPk int32 = 0 *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxPrintfPrepareStmt(tls, db, bp+16 /* &p1 */, pzErrmsg, ts+63 /* "PRAGMA table_xin..." */, libc.VaList(bp, zTab)) for (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))) { *(*uintptr)(unsafe.Pointer(bp + 24 /* zCol */)) = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), 1) nByte = nByte + (1 + int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* zCol */))))) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = sqlite3.Xsqlite3_table_column_metadata(tls, db, ts+85 /* "main" */, zTab, *(*uintptr)(unsafe.Pointer(bp + 24 /* zCol */)), uintptr(0), bp+24 /* &zCol */, uintptr(0), uintptr(0), uintptr(0)) nByte = nByte + (1 + int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* zCol */))))) nCol++ nPk = nPk + (libc.Bool32(sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), 5) > 0)) } rc2 = sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = rc2 } nByte = int32(uint64(nByte) + (uint64(unsafe.Sizeof(IdxColumn{})) * uint64(nCol))) if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { pNew = idxMalloc(tls, bp+32 /* &rc */, nByte) } if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { (*IdxTable)(unsafe.Pointer(pNew)).FaCol = (pNew + 1*32) (*IdxTable)(unsafe.Pointer(pNew)).FnCol = nCol pCsr = ((*IdxTable)(unsafe.Pointer(pNew)).FaCol + uintptr(nCol)*24) } nCol = 0 for (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))) { *(*uintptr)(unsafe.Pointer(bp + 40 /* zCol */)) = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), 1) var nCopy int32 = (int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zCol */)))) + 1) (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(pNew)).FaCol + uintptr(nCol)*24)).FzName = pCsr (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(pNew)).FaCol + uintptr(nCol)*24)).FiPk = (libc.Bool32((sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), 5) == 1) && (nPk == 1))) libc.Xmemcpy(tls, pCsr, *(*uintptr)(unsafe.Pointer(bp + 40 /* zCol */)), uint64(nCopy)) pCsr += uintptr(nCopy) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = sqlite3.Xsqlite3_table_column_metadata(tls, db, ts+85 /* "main" */, zTab, *(*uintptr)(unsafe.Pointer(bp + 40 /* zCol */)), uintptr(0), bp+40 /* &zCol */, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { nCopy = (int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zCol */)))) + 1) (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(pNew)).FaCol + uintptr(nCol)*24)).FzColl = pCsr libc.Xmemcpy(tls, pCsr, *(*uintptr)(unsafe.Pointer(bp + 40 /* zCol */)), uint64(nCopy)) pCsr += uintptr(nCopy) } nCol++ } idxFinalize(tls, bp+32 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) != SQLITE_OK { sqlite3.Xsqlite3_free(tls, pNew) pNew = uintptr(0) } else { (*IdxTable)(unsafe.Pointer(pNew)).FzName = pCsr libc.Xmemcpy(tls, (*IdxTable)(unsafe.Pointer(pNew)).FzName, zTab, (uint64(nTab + 1))) } *(*uintptr)(unsafe.Pointer(ppOut)) = pNew return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } // This function is a no-op if *pRc is set to anything other than // SQLITE_OK when it is called. // // If *pRc is initially set to SQLITE_OK, then the text specified by // the printf() style arguments is appended to zIn and the result returned // in a buffer allocated by sqlite3_malloc(). sqlite3_free() is called on // zIn before returning. func idxAppendText(tls *libc.TLS, pRc uintptr, zIn uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3expert.c:758:13: */ var ap va_list _ = ap var zAppend uintptr = uintptr(0) var zRet uintptr = uintptr(0) var nIn int32 if zIn != 0 { nIn = int32(libc.Xstrlen(tls, zIn)) } else { nIn = 0 } var nAppend int32 = 0 ap = va if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { zAppend = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) if zAppend != 0 { nAppend = int32(libc.Xstrlen(tls, zAppend)) zRet = sqlite3.Xsqlite3_malloc(tls, ((nIn + nAppend) + 1)) } if (zAppend != 0) && (zRet != 0) { if nIn != 0 { libc.Xmemcpy(tls, zRet, zIn, uint64(nIn)) } libc.Xmemcpy(tls, (zRet + uintptr(nIn)), zAppend, (uint64(nAppend + 1))) } else { sqlite3.Xsqlite3_free(tls, zRet) zRet = uintptr(0) *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } sqlite3.Xsqlite3_free(tls, zAppend) sqlite3.Xsqlite3_free(tls, zIn) } _ = ap return zRet } // Return true if zId must be quoted in order to use it as an SQL // identifier, or false otherwise. func idxIdentifierRequiresQuotes(tls *libc.TLS, zId uintptr) int32 { /* sqlite3expert.c:790:12: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zId + uintptr(i))) != 0; i++ { if ((!(int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) == '_') && !((int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) <= '9'))) && !((int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) >= 'a') && (int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) <= 'z'))) && !((int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) >= 'A') && (int32(*(*int8)(unsafe.Pointer(zId + uintptr(i)))) <= 'Z')) { return 1 } } return 0 } // This function appends an index column definition suitable for constraint // pCons to the string passed as zIn and returns the result. func idxAppendColDefn(tls *libc.TLS, pRc uintptr, zIn uintptr, pTab uintptr, pCons uintptr) uintptr { /* sqlite3expert.c:808:13: */ bp := tls.Alloc(64) defer tls.Free(64) var zRet uintptr = zIn var p uintptr = ((*IdxTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*IdxConstraint)(unsafe.Pointer(pCons)).FiCol)*24) if zRet != 0 { zRet = idxAppendText(tls, pRc, zRet, ts+90 /* ", " */, 0) } if idxIdentifierRequiresQuotes(tls, (*IdxColumn)(unsafe.Pointer(p)).FzName) != 0 { zRet = idxAppendText(tls, pRc, zRet, ts+93 /* "%Q" */, libc.VaList(bp, (*IdxColumn)(unsafe.Pointer(p)).FzName)) } else { zRet = idxAppendText(tls, pRc, zRet, ts /* "%s" */, libc.VaList(bp+16, (*IdxColumn)(unsafe.Pointer(p)).FzName)) } if sqlite3.Xsqlite3_stricmp(tls, (*IdxColumn)(unsafe.Pointer(p)).FzColl, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl) != 0 { if idxIdentifierRequiresQuotes(tls, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl) != 0 { zRet = idxAppendText(tls, pRc, zRet, ts+96 /* " COLLATE %Q" */, libc.VaList(bp+32, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl)) } else { zRet = idxAppendText(tls, pRc, zRet, ts+108 /* " COLLATE %s" */, libc.VaList(bp+48, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl)) } } if (*IdxConstraint)(unsafe.Pointer(pCons)).FbDesc != 0 { zRet = idxAppendText(tls, pRc, zRet, ts+120 /* " DESC" */, 0) } return zRet } // Search database dbm for an index compatible with the one idxCreateFromCons() // would create from arguments pScan, pEq and pTail. If no error occurs and // such an index is found, return non-zero. Or, if no such index is found, // return zero. // // If an error occurs, set *pRc to an SQLite error code and return zero. func idxFindCompatible(tls *libc.TLS, pRc uintptr, dbm uintptr, pScan uintptr, pEq uintptr, pTail uintptr) int32 { /* sqlite3expert.c:846:12: */ bp := tls.Alloc(52) defer tls.Free(52) var zTbl uintptr = (*IdxTable)(unsafe.Pointer((*IdxScan)(unsafe.Pointer(pScan)).FpTab)).FzName *(*uintptr)(unsafe.Pointer(bp + 32 /* pIdxList */)) = uintptr(0) var pIter uintptr var nEq int32 = 0 // Number of elements in pEq // var rc int32 at bp+48, 4 // Count the elements in list pEq for pIter = pEq; pIter != 0; pIter = (*IdxConstraint)(unsafe.Pointer(pIter)).FpLink { nEq++ } *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+32 /* &pIdxList */, uintptr(0), ts+126 /* "PRAGMA index_lis..." */, libc.VaList(bp, zTbl)) for (*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pIdxList */))) == SQLITE_ROW) { var bMatch int32 = 1 var pT uintptr = pTail *(*uintptr)(unsafe.Pointer(bp + 40 /* pInfo */)) = uintptr(0) var zIdx uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pIdxList */)), 1) // Zero the IdxConstraint.bFlag values in the pEq list for pIter = pEq; pIter != 0; pIter = (*IdxConstraint)(unsafe.Pointer(pIter)).FpLink { (*IdxConstraint)(unsafe.Pointer(pIter)).FbFlag = 0 } *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+40 /* &pInfo */, uintptr(0), ts+147 /* "PRAGMA index_xIn..." */, libc.VaList(bp+16, zIdx)) for (*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInfo */))) == SQLITE_ROW) { var iIdx int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInfo */)), 0) var iCol int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInfo */)), 1) var zColl uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInfo */)), 4) if iIdx < nEq { for pIter = pEq; pIter != 0; pIter = (*IdxConstraint)(unsafe.Pointer(pIter)).FpLink { if (*IdxConstraint)(unsafe.Pointer(pIter)).FbFlag != 0 { continue } if (*IdxConstraint)(unsafe.Pointer(pIter)).FiCol != iCol { continue } if sqlite3.Xsqlite3_stricmp(tls, (*IdxConstraint)(unsafe.Pointer(pIter)).FzColl, zColl) != 0 { continue } (*IdxConstraint)(unsafe.Pointer(pIter)).FbFlag = 1 break } if pIter == uintptr(0) { bMatch = 0 break } } else { if pT != 0 { if ((*IdxConstraint)(unsafe.Pointer(pT)).FiCol != iCol) || (sqlite3.Xsqlite3_stricmp(tls, (*IdxConstraint)(unsafe.Pointer(pT)).FzColl, zColl) != 0) { bMatch = 0 break } pT = (*IdxConstraint)(unsafe.Pointer(pT)).FpLink } } } idxFinalize(tls, bp+48 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInfo */))) if (*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK) && (bMatch != 0) { sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pIdxList */))) return 1 } } idxFinalize(tls, bp+48 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 32 /* pIdxList */))) *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) return 0 } func idxCreateFromCons(tls *libc.TLS, p uintptr, pScan uintptr, pEq uintptr, pTail uintptr) int32 { /* sqlite3expert.c:913:12: */ bp := tls.Alloc(60) defer tls.Free(60) var dbm uintptr = (*sqlite3expert)(unsafe.Pointer(p)).Fdbm *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = SQLITE_OK if ((pEq != 0) || (pTail != 0)) && (0 == idxFindCompatible(tls, bp+56 /* &rc */, dbm, pScan, pEq, pTail)) { var pTab uintptr = (*IdxScan)(unsafe.Pointer(pScan)).FpTab var zCols uintptr = uintptr(0) var zIdx uintptr = uintptr(0) var pCons uintptr var h uint32 = uint32(0) var zFmt uintptr for pCons = pEq; pCons != 0; pCons = (*IdxConstraint)(unsafe.Pointer(pCons)).FpLink { zCols = idxAppendColDefn(tls, bp+56 /* &rc */, zCols, pTab, pCons) } for pCons = pTail; pCons != 0; pCons = (*IdxConstraint)(unsafe.Pointer(pCons)).FpLink { zCols = idxAppendColDefn(tls, bp+56 /* &rc */, zCols, pTab, pCons) } if *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) == SQLITE_OK { // Hash the list of columns to come up with a name for the index var zTable uintptr = (*IdxTable)(unsafe.Pointer((*IdxScan)(unsafe.Pointer(pScan)).FpTab)).FzName var zName uintptr // Index name var i int32 for i = 0; *(*int8)(unsafe.Pointer(zCols + uintptr(i))) != 0; i++ { h = h + ((h << 3) + uint32(*(*int8)(unsafe.Pointer(zCols + uintptr(i))))) } zName = sqlite3.Xsqlite3_mprintf(tls, ts+169 /* "%s_idx_%08x" */, libc.VaList(bp, zTable, h)) if zName == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = SQLITE_NOMEM } else { if idxIdentifierRequiresQuotes(tls, zTable) != 0 { zFmt = ts + 181 /* "CREATE INDEX '%q..." */ } else { zFmt = ts + 209 /* "CREATE INDEX %s ..." */ } zIdx = sqlite3.Xsqlite3_mprintf(tls, zFmt, libc.VaList(bp+24, zName, zTable, zCols)) if !(zIdx != 0) { *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = SQLITE_NOMEM } else { *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = sqlite3.Xsqlite3_exec(tls, dbm, zIdx, uintptr(0), uintptr(0), (*sqlite3expert)(unsafe.Pointer(p)).FpzErrmsg) idxHashAdd(tls, bp+56 /* &rc */, (p + 88 /* &.hIdx */), zName, zIdx) } sqlite3.Xsqlite3_free(tls, zName) sqlite3.Xsqlite3_free(tls, zIdx) } } sqlite3.Xsqlite3_free(tls, zCols) } return *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) } // Return true if list pList (linked by IdxConstraint.pLink) contains // a constraint compatible with *p. Otherwise return false. func idxFindConstraint(tls *libc.TLS, pList uintptr, p uintptr) int32 { /* sqlite3expert.c:974:12: */ var pCmp uintptr for pCmp = pList; pCmp != 0; pCmp = (*IdxConstraint)(unsafe.Pointer(pCmp)).FpLink { if (*IdxConstraint)(unsafe.Pointer(p)).FiCol == (*IdxConstraint)(unsafe.Pointer(pCmp)).FiCol { return 1 } } return 0 } func idxCreateFromWhere(tls *libc.TLS, p uintptr, pScan uintptr, pTail uintptr) int32 { /* sqlite3expert.c:982:12: */ var p1 uintptr = uintptr(0) var pCon uintptr var rc int32 // Gather up all the == constraints. for pCon = (*IdxScan)(unsafe.Pointer(pScan)).FpEq; pCon != 0; pCon = (*IdxConstraint)(unsafe.Pointer(pCon)).FpNext { if !(idxFindConstraint(tls, p1, pCon) != 0) && !(idxFindConstraint(tls, pTail, pCon) != 0) { (*IdxConstraint)(unsafe.Pointer(pCon)).FpLink = p1 p1 = pCon } } // Create an index using the == constraints collected above. And the // range constraint/ORDER BY terms passed in by the caller, if any. rc = idxCreateFromCons(tls, p, pScan, p1, pTail) // If no range/ORDER BY passed by the caller, create a version of the // index for each range constraint. if pTail == uintptr(0) { for pCon = (*IdxScan)(unsafe.Pointer(pScan)).FpRange; (rc == SQLITE_OK) && (pCon != 0); pCon = (*IdxConstraint)(unsafe.Pointer(pCon)).FpNext { if !(idxFindConstraint(tls, p1, pCon) != 0) && !(idxFindConstraint(tls, pTail, pCon) != 0) { rc = idxCreateFromCons(tls, p, pScan, p1, pCon) } } } return rc } // Create candidate indexes in database [dbm] based on the data in // linked-list pScan. func idxCreateCandidates(tls *libc.TLS, p uintptr) int32 { /* sqlite3expert.c:1021:12: */ var rc int32 = SQLITE_OK var pIter uintptr for pIter = (*sqlite3expert)(unsafe.Pointer(p)).FpScan; (pIter != 0) && (rc == SQLITE_OK); pIter = (*IdxScan)(unsafe.Pointer(pIter)).FpNextScan { rc = idxCreateFromWhere(tls, p, pIter, uintptr(0)) if (rc == SQLITE_OK) && ((*IdxScan)(unsafe.Pointer(pIter)).FpOrder != 0) { rc = idxCreateFromWhere(tls, p, pIter, (*IdxScan)(unsafe.Pointer(pIter)).FpOrder) } } return rc } // Free all elements of the linked list starting at pConstraint. func idxConstraintFree(tls *libc.TLS, pConstraint uintptr) { /* sqlite3expert.c:1038:13: */ var pNext uintptr var p uintptr for p = pConstraint; p != 0; p = pNext { pNext = (*IdxConstraint)(unsafe.Pointer(p)).FpNext sqlite3.Xsqlite3_free(tls, p) } } // Free all elements of the linked list starting from pScan up until pLast // (pLast is not freed). func idxScanFree(tls *libc.TLS, pScan uintptr, pLast uintptr) { /* sqlite3expert.c:1052:13: */ var p uintptr var pNext uintptr for p = pScan; p != pLast; p = pNext { pNext = (*IdxScan)(unsafe.Pointer(p)).FpNextScan idxConstraintFree(tls, (*IdxScan)(unsafe.Pointer(p)).FpOrder) idxConstraintFree(tls, (*IdxScan)(unsafe.Pointer(p)).FpEq) idxConstraintFree(tls, (*IdxScan)(unsafe.Pointer(p)).FpRange) sqlite3.Xsqlite3_free(tls, p) } } // Free all elements of the linked list starting from pStatement up // until pLast (pLast is not freed). func idxStatementFree(tls *libc.TLS, pStatement uintptr, pLast uintptr) { /* sqlite3expert.c:1068:13: */ var p uintptr var pNext uintptr for p = pStatement; p != pLast; p = pNext { pNext = (*IdxStatement)(unsafe.Pointer(p)).FpNext sqlite3.Xsqlite3_free(tls, (*IdxStatement)(unsafe.Pointer(p)).FzEQP) sqlite3.Xsqlite3_free(tls, (*IdxStatement)(unsafe.Pointer(p)).FzIdx) sqlite3.Xsqlite3_free(tls, p) } } // Free the linked list of IdxTable objects starting at pTab. func idxTableFree(tls *libc.TLS, pTab uintptr) { /* sqlite3expert.c:1082:13: */ var pIter uintptr var pNext uintptr for pIter = pTab; pIter != 0; pIter = pNext { pNext = (*IdxTable)(unsafe.Pointer(pIter)).FpNext sqlite3.Xsqlite3_free(tls, pIter) } } // Free the linked list of IdxWrite objects starting at pTab. func idxWriteFree(tls *libc.TLS, pTab uintptr) { /* sqlite3expert.c:1094:13: */ var pIter uintptr var pNext uintptr for pIter = pTab; pIter != 0; pIter = pNext { pNext = (*IdxWrite)(unsafe.Pointer(pIter)).FpNext sqlite3.Xsqlite3_free(tls, pIter) } } // This function is called after candidate indexes have been created. It // runs all the queries to see which indexes they prefer, and populates // IdxStatement.zIdx and IdxStatement.zEQP with the results. func idxFindIndexes(tls *libc.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1110:5: */ bp := tls.Alloc(8252) defer tls.Free(8252) var pStmt uintptr var dbm uintptr // var rc int32 at bp+8248, 4 // var hIdx IdxHash at bp+48, 8192 var zSql uintptr var nIdx int32 var zIdx uintptr // int iId = sqlite3_column_int(pExplain, 0); // int iParent = sqlite3_column_int(pExplain, 1); // int iNotUsed = sqlite3_column_int(pExplain, 2); var zDetail uintptr var nDetail int32 var i int32 var pEntry uintptr // var pExplain uintptr at bp+8240, 8 dbm = (*sqlite3expert)(unsafe.Pointer(p)).Fdbm *(*int32)(unsafe.Pointer(bp + 8248 /* rc */)) = SQLITE_OK idxHashInit(tls, bp+48 /* &hIdx */) pStmt = (*sqlite3expert)(unsafe.Pointer(p)).FpStatement __1: if !((*(*int32)(unsafe.Pointer(bp + 8248 /* rc */)) == SQLITE_OK) && (pStmt != 0)) { goto __3 } *(*uintptr)(unsafe.Pointer(bp + 8240 /* pExplain */)) = uintptr(0) idxHashClear(tls, bp+48 /* &hIdx */) *(*int32)(unsafe.Pointer(bp + 8248 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+8240 /* &pExplain */, pzErr, ts+235 /* "EXPLAIN QUERY PL..." */, libc.VaList(bp, (*IdxStatement)(unsafe.Pointer(pStmt)).FzSql)) __4: if !((*(*int32)(unsafe.Pointer(bp + 8248 /* rc */)) == SQLITE_OK) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8240 /* pExplain */))) == SQLITE_ROW)) { goto __5 } // int iId = sqlite3_column_int(pExplain, 0); // int iParent = sqlite3_column_int(pExplain, 1); // int iNotUsed = sqlite3_column_int(pExplain, 2); zDetail = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8240 /* pExplain */)), 3) if !(!(zDetail != 0)) { goto __6 } goto __4 __6: ; nDetail = int32(libc.Xstrlen(tls, zDetail)) i = 0 __7: if !(i < nDetail) { goto __9 } zIdx = uintptr(0) if !(((i + 13) < nDetail) && (libc.Xmemcmp(tls, (zDetail+uintptr(i)), ts+257 /* " USING INDEX " */, uint64(13)) == 0)) { goto __10 } zIdx = (zDetail + uintptr((i + 13))) goto __11 __10: if !(((i + 22) < nDetail) && (libc.Xmemcmp(tls, (zDetail+uintptr(i)), ts+271 /* " USING COVERING ..." */, uint64(22)) == 0)) { goto __12 } zIdx = (zDetail + uintptr((i + 22))) __12: ; __11: ; if !(zIdx != 0) { goto __13 } nIdx = 0 __14: if !((int32(*(*int8)(unsafe.Pointer(zIdx + uintptr(nIdx)))) != 0) && ((int32(*(*int8)(unsafe.Pointer(zIdx + uintptr(nIdx)))) != ' ') || (int32(*(*int8)(unsafe.Pointer(zIdx + uintptr((nIdx + 1))))) != '('))) { goto __15 } nIdx++ goto __14 __15: ; zSql = idxHashSearch(tls, (p + 88 /* &.hIdx */), zIdx, nIdx) if !(zSql != 0) { goto __16 } idxHashAdd(tls, bp+8248 /* &rc */, bp+48 /* &hIdx */, zSql, uintptr(0)) if !(*(*int32)(unsafe.Pointer(bp + 8248 /* rc */)) != 0) { goto __17 } goto find_indexes_out __17: ; __16: ; goto __9 __13: ; goto __8 __8: i++ goto __7 goto __9 __9: ; if !(int32(*(*int8)(unsafe.Pointer(zDetail))) != '-') { goto __18 } (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP = idxAppendText(tls, bp+8248 /* &rc */, (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP, ts+294 /* "%s\n" */, libc.VaList(bp+16, zDetail)) __18: ; goto __4 __5: ; pEntry = (*IdxHash)(unsafe.Pointer(bp + 48 /* &hIdx */)).FpFirst __19: if !(pEntry != 0) { goto __21 } (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx = idxAppendText(tls, bp+8248 /* &rc */, (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx, ts+298 /* "%s;\n" */, libc.VaList(bp+32, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) goto __20 __20: pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpNext goto __19 goto __21 __21: ; idxFinalize(tls, bp+8248 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 8240 /* pExplain */))) goto __2 __2: pStmt = (*IdxStatement)(unsafe.Pointer(pStmt)).FpNext goto __1 goto __3 __3: ; find_indexes_out: idxHashClear(tls, bp+48 /* &hIdx */) return *(*int32)(unsafe.Pointer(bp + 8248 /* rc */)) } func idxAuthCallback(tls *libc.TLS, pCtx uintptr, eOp int32, z3 uintptr, z4 uintptr, zDb uintptr, zTrigger uintptr) int32 { /* sqlite3expert.c:1180:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK _ = z4 _ = zTrigger if ((eOp == SQLITE_INSERT) || (eOp == SQLITE_UPDATE)) || (eOp == SQLITE_DELETE) { if sqlite3.Xsqlite3_stricmp(tls, zDb, ts+85 /* "main" */) == 0 { var p uintptr = pCtx var pTab uintptr for pTab = (*sqlite3expert)(unsafe.Pointer(p)).FpTable; pTab != 0; pTab = (*IdxTable)(unsafe.Pointer(pTab)).FpNext { if 0 == sqlite3.Xsqlite3_stricmp(tls, z3, (*IdxTable)(unsafe.Pointer(pTab)).FzName) { break } } if pTab != 0 { var pWrite uintptr for pWrite = (*sqlite3expert)(unsafe.Pointer(p)).FpWrite; pWrite != 0; pWrite = (*IdxWrite)(unsafe.Pointer(pWrite)).FpNext { if ((*IdxWrite)(unsafe.Pointer(pWrite)).FpTab == pTab) && ((*IdxWrite)(unsafe.Pointer(pWrite)).FeOp == eOp) { break } } if pWrite == uintptr(0) { pWrite = idxMalloc(tls, bp /* &rc */, int32(unsafe.Sizeof(IdxWrite{}))) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { (*IdxWrite)(unsafe.Pointer(pWrite)).FpTab = pTab (*IdxWrite)(unsafe.Pointer(pWrite)).FeOp = eOp (*IdxWrite)(unsafe.Pointer(pWrite)).FpNext = (*sqlite3expert)(unsafe.Pointer(p)).FpWrite (*sqlite3expert)(unsafe.Pointer(p)).FpWrite = pWrite } } } } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } func idxProcessOneTrigger(tls *libc.TLS, p uintptr, pWrite uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1218:12: */ bp := tls.Alloc(160) defer tls.Free(160) var pTab uintptr = (*IdxWrite)(unsafe.Pointer(pWrite)).FpTab var zTab uintptr = (*IdxTable)(unsafe.Pointer(pTab)).FzName var zSql uintptr = ts + 303 /* "SELECT 'CREATE T..." */ *(*uintptr)(unsafe.Pointer(bp + 136 /* pSelect */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = SQLITE_OK var zWrite uintptr = uintptr(0) // Create the table and its triggers in the temp schema *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = idxPrintfPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, bp+136 /* &pSelect */, pzErr, zSql, libc.VaList(bp, zTab, zTab)) for (*(*int32)(unsafe.Pointer(bp + 144 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* pSelect */)))) { var zCreate uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* pSelect */)), 0) *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zCreate, uintptr(0), uintptr(0), pzErr) } idxFinalize(tls, bp+144 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 136 /* pSelect */))) // Rename the table in the temp schema to zInt if *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) == SQLITE_OK { var z uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+429 /* "ALTER TABLE temp..." */, libc.VaList(bp+24, zTab, zInt)) if z == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = SQLITE_NOMEM } else { *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, z, uintptr(0), uintptr(0), pzErr) sqlite3.Xsqlite3_free(tls, z) } } switch (*IdxWrite)(unsafe.Pointer(pWrite)).FeOp { case SQLITE_INSERT: { var i int32 zWrite = idxAppendText(tls, bp+144 /* &rc */, zWrite, ts+462 /* "INSERT INTO %Q V..." */, libc.VaList(bp+48, zInt)) for i = 0; i < (*IdxTable)(unsafe.Pointer(pTab)).FnCol; i++ { zWrite = idxAppendText(tls, bp+144 /* &rc */, zWrite, ts+485 /* "%s?" */, libc.VaList(bp+64, func() uintptr { if i == 0 { return ts + 489 /* "" */ } return ts + 90 /* ", " */ }())) } zWrite = idxAppendText(tls, bp+144 /* &rc */, zWrite, ts+490 /* ")" */, 0) break } case SQLITE_UPDATE: { var i int32 zWrite = idxAppendText(tls, bp+144 /* &rc */, zWrite, ts+492 /* "UPDATE %Q SET " */, libc.VaList(bp+80, zInt)) for i = 0; i < (*IdxTable)(unsafe.Pointer(pTab)).FnCol; i++ { zWrite = idxAppendText(tls, bp+144 /* &rc */, zWrite, ts+507 /* "%s%Q=?" */, libc.VaList(bp+96, func() uintptr { if i == 0 { return ts + 489 /* "" */ } return ts + 90 /* ", " */ }(), (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FzName)) } break } default: { if *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) == SQLITE_OK { zWrite = sqlite3.Xsqlite3_mprintf(tls, ts+514 /* "DELETE FROM %Q" */, libc.VaList(bp+120, zInt)) if zWrite == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = SQLITE_NOMEM } } } } if *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 152 /* pX */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = sqlite3.Xsqlite3_prepare_v2(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zWrite, -1, bp+152 /* &pX */, uintptr(0)) idxFinalize(tls, bp+144 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 152 /* pX */))) if *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) != SQLITE_OK { idxDatabaseError(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, pzErr) } } sqlite3.Xsqlite3_free(tls, zWrite) if *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zDrop, uintptr(0), uintptr(0), pzErr) } return *(*int32)(unsafe.Pointer(bp + 144 /* rc */)) } var zInt uintptr = ts + 529 /* "t592690916721053..." */ /* sqlite3expert.c:1223:21 */ var zDrop uintptr = ts + 567 /* "DROP TABLE t5926..." */ /* sqlite3expert.c:1224:21 */ func idxProcessTriggers(tls *libc.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1300:12: */ var rc int32 = SQLITE_OK var pEnd uintptr = uintptr(0) var pFirst uintptr = (*sqlite3expert)(unsafe.Pointer(p)).FpWrite for (rc == SQLITE_OK) && (pFirst != pEnd) { var pIter uintptr for pIter = pFirst; (rc == SQLITE_OK) && (pIter != pEnd); pIter = (*IdxWrite)(unsafe.Pointer(pIter)).FpNext { rc = idxProcessOneTrigger(tls, p, pIter, pzErr) } pEnd = pFirst pFirst = (*sqlite3expert)(unsafe.Pointer(p)).FpWrite } return rc } func idxCreateVtabSchema(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3expert.c:1318:12: */ bp := tls.Alloc(76) defer tls.Free(76) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = idxRegisterVtab(tls, p) *(*uintptr)(unsafe.Pointer(bp + 56 /* pSchema */)) = uintptr(0) // For each table in the main db schema: // // 1) Add an entry to the p->pTable list, and // 2) Create the equivalent virtual table in dbv. *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = idxPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, bp+56 /* &pSchema */, pzErrmsg, ts+616 /* "SELECT type, nam..." */) for (*(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pSchema */)))) { var zType uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pSchema */)), 0) var zName uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pSchema */)), 1) var zSql uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pSchema */)), 2) if (int32(*(*int8)(unsafe.Pointer(zType))) == 'v') || (int32(*(*int8)(unsafe.Pointer(zType + 1))) == 'r') { *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zSql, uintptr(0), uintptr(0), pzErrmsg) } else { // var pTab uintptr at bp+64, 8 *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = idxGetTableInfo(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, zName, bp+64 /* &pTab */, pzErrmsg) if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK { var i int32 var zInner uintptr = uintptr(0) var zOuter uintptr = uintptr(0) (*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* pTab */)))).FpNext = (*sqlite3expert)(unsafe.Pointer(p)).FpTable (*sqlite3expert)(unsafe.Pointer(p)).FpTable = *(*uintptr)(unsafe.Pointer(bp + 64 /* pTab */)) // The statement the vtab will pass to sqlite3_declare_vtab() zInner = idxAppendText(tls, bp+72 /* &rc */, uintptr(0), ts+884 /* "CREATE TABLE x(" */, 0) for i = 0; i < (*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* pTab */)))).FnCol; i++ { zInner = idxAppendText(tls, bp+72 /* &rc */, zInner, ts+900, /* "%s%Q COLLATE %s" */ libc.VaList(bp, func() uintptr { if i == 0 { return ts + 489 /* "" */ } return ts + 90 /* ", " */ }(), (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* pTab */)))).FaCol+uintptr(i)*24)).FzName, (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* pTab */)))).FaCol+uintptr(i)*24)).FzColl)) } zInner = idxAppendText(tls, bp+72 /* &rc */, zInner, ts+490 /* ")" */, 0) // The CVT statement to create the vtab zOuter = idxAppendText(tls, bp+72 /* &rc */, uintptr(0), ts+916 /* "CREATE VIRTUAL T..." */, libc.VaList(bp+32, zName, zInner)) if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zOuter, uintptr(0), uintptr(0), pzErrmsg) } sqlite3.Xsqlite3_free(tls, zInner) sqlite3.Xsqlite3_free(tls, zOuter) } } } idxFinalize(tls, bp+72 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 56 /* pSchema */))) return *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) } type IdxSampleCtx = struct { FiTarget int32 _ [4]byte Ftarget float64 FnRow float64 FnRet float64 } /* sqlite3expert.c:1378:1 */ func idxSampleFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3expert.c:1385:13: */ bp := tls.Alloc(2) defer tls.Free(2) var p uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) var bRet int32 _ = argv if (*IdxSampleCtx)(unsafe.Pointer(p)).FnRow == 0.0 { bRet = 1 } else { bRet = (libc.Bool32(((*IdxSampleCtx)(unsafe.Pointer(p)).FnRet / (*IdxSampleCtx)(unsafe.Pointer(p)).FnRow) <= (*IdxSampleCtx)(unsafe.Pointer(p)).Ftarget)) if bRet == 0 { // var rnd uint16 at bp, 2 sqlite3.Xsqlite3_randomness(tls, 2, bp /* &rnd */) bRet = (libc.Bool32((int32(*(*uint16)(unsafe.Pointer(bp /* rnd */))) % 100) <= (*IdxSampleCtx)(unsafe.Pointer(p)).FiTarget)) } } sqlite3.Xsqlite3_result_int(tls, pCtx, bRet) *(*float64)(unsafe.Pointer(p + 16 /* &.nRow */)) += (1.0) *(*float64)(unsafe.Pointer(p + 24 /* &.nRet */)) += (float64(bRet)) } type IdxRemCtx = struct { FnSlot int32 _ [4]byte FaSlot [1]struct { FeType int32 _ [4]byte FiVal i64 FrVal float64 FnByte int32 Fn int32 Fz uintptr } } /* sqlite3expert.c:1411:1 */ type IdxRemSlot = struct { FeType int32 _ [4]byte FiVal i64 FrVal float64 FnByte int32 Fn int32 Fz uintptr } /* sqlite3expert.c:1411:1 */ // Implementation of scalar function rem(). func idxRemFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3expert.c:1426:13: */ var p uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) var pSlot uintptr var iSlot int32 iSlot = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) pSlot = ((p + 8 /* &.aSlot */) + uintptr(iSlot)*40) switch (*IdxRemSlot)(unsafe.Pointer(pSlot)).FeType { case SQLITE_NULL: // no-op break case SQLITE_INTEGER: sqlite3.Xsqlite3_result_int64(tls, pCtx, (*IdxRemSlot)(unsafe.Pointer(pSlot)).FiVal) break case SQLITE_FLOAT: sqlite3.Xsqlite3_result_double(tls, pCtx, (*IdxRemSlot)(unsafe.Pointer(pSlot)).FrVal) break case SQLITE_BLOB: sqlite3.Xsqlite3_result_blob(tls, pCtx, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fz, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fn, libc.UintptrFromInt32(-1)) break case SQLITE_TEXT: sqlite3.Xsqlite3_result_text(tls, pCtx, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fz, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fn, libc.UintptrFromInt32(-1)) break } (*IdxRemSlot)(unsafe.Pointer(pSlot)).FeType = sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) switch (*IdxRemSlot)(unsafe.Pointer(pSlot)).FeType { case SQLITE_NULL: // no-op break case SQLITE_INTEGER: (*IdxRemSlot)(unsafe.Pointer(pSlot)).FiVal = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) break case SQLITE_FLOAT: (*IdxRemSlot)(unsafe.Pointer(pSlot)).FrVal = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) break case SQLITE_BLOB: fallthrough case SQLITE_TEXT: { var nByte int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if nByte > (*IdxRemSlot)(unsafe.Pointer(pSlot)).FnByte { var zNew uintptr = sqlite3.Xsqlite3_realloc(tls, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fz, (nByte * 2)) if zNew == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) return } (*IdxRemSlot)(unsafe.Pointer(pSlot)).FnByte = (nByte * 2) (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fz = zNew } (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fn = nByte if (*IdxRemSlot)(unsafe.Pointer(pSlot)).FeType == SQLITE_BLOB { libc.Xmemcpy(tls, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fz, sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))), uint64(nByte)) } else { libc.Xmemcpy(tls, (*IdxRemSlot)(unsafe.Pointer(pSlot)).Fz, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))), uint64(nByte)) } break } } } func idxLargestIndex(tls *libc.TLS, db uintptr, pnMax uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1499:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK var zMax uintptr = ts + 957 /* "SELECT max(i.seq..." */ *(*uintptr)(unsafe.Pointer(bp /* pMax */)) = uintptr(0) *(*int32)(unsafe.Pointer(pnMax)) = 0 *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = idxPrepareStmt(tls, db, bp /* &pMax */, pzErr, zMax) if (*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pMax */)))) { *(*int32)(unsafe.Pointer(pnMax)) = (sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp /* pMax */)), 0) + 1) } idxFinalize(tls, bp+8 /* &rc */, *(*uintptr)(unsafe.Pointer(bp /* pMax */))) return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } func idxPopulateOneStat1(tls *libc.TLS, p uintptr, pIndexXInfo uintptr, pWriteStat uintptr, zTab uintptr, zIdx uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1519:12: */ bp := tls.Alloc(176) defer tls.Free(176) var zCols uintptr = uintptr(0) var zOrder uintptr = uintptr(0) var zQuery uintptr = uintptr(0) var nCol int32 = 0 var i int32 *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)) = uintptr(0) var aStat uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) = SQLITE_OK // Formulate the query text sqlite3.Xsqlite3_bind_text(tls, pIndexXInfo, 1, zIdx, -1, uintptr(0)) for (SQLITE_OK == *(*int32)(unsafe.Pointer(bp + 160 /* rc */))) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, pIndexXInfo)) { var zComma uintptr if zCols == uintptr(0) { zComma = ts + 489 /* "" */ } else { zComma = ts + 90 /* ", " */ } var zName uintptr = sqlite3.Xsqlite3_column_text(tls, pIndexXInfo, 0) var zColl uintptr = sqlite3.Xsqlite3_column_text(tls, pIndexXInfo, 1) zCols = idxAppendText(tls, bp+160 /* &rc */, zCols, ts+1094 /* "%sx.%Q IS rem(%d..." */, libc.VaList(bp, zComma, zName, nCol, zName, zColl)) zOrder = idxAppendText(tls, bp+160 /* &rc */, zOrder, ts+1129 /* "%s%d" */, libc.VaList(bp+48, zComma, libc.PreIncInt32(&nCol, 1))) } sqlite3.Xsqlite3_reset(tls, pIndexXInfo) if *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK { if (*sqlite3expert)(unsafe.Pointer(p)).FiSample == 100 { zQuery = sqlite3.Xsqlite3_mprintf(tls, ts+1134 /* "SELECT %s FROM %..." */, libc.VaList(bp+72, zCols, zTab, zOrder)) } else { zQuery = sqlite3.Xsqlite3_mprintf(tls, ts+1166 /* "SELECT %s FROM t..." */, libc.VaList(bp+104, zCols, zOrder)) } } sqlite3.Xsqlite3_free(tls, zCols) sqlite3.Xsqlite3_free(tls, zOrder) // Formulate the query text if *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK { var dbrem uintptr = func() uintptr { if (*sqlite3expert)(unsafe.Pointer(p)).FiSample == 100 { return (*sqlite3expert)(unsafe.Pointer(p)).Fdb } return (*sqlite3expert)(unsafe.Pointer(p)).Fdbv }() *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) = idxPrepareStmt(tls, dbrem, bp+168 /* &pQuery */, pzErr, zQuery) } sqlite3.Xsqlite3_free(tls, zQuery) if *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK { aStat = idxMalloc(tls, bp+160 /* &rc */, (int32(uint64(unsafe.Sizeof(int32(0))) * (uint64(nCol + 1))))) } if (*(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)))) { var pEntry uintptr var zStat uintptr = uintptr(0) for i = 0; i <= nCol; i++ { *(*int32)(unsafe.Pointer(aStat + uintptr(i)*4)) = 1 } for (*(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)))) { *(*int32)(unsafe.Pointer(aStat))++ for i = 0; i < nCol; i++ { if sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), i) == 0 { break } } for ; i < nCol; i++ { *(*int32)(unsafe.Pointer(aStat + uintptr((i+1))*4))++ } } if *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK { var s0 int32 = *(*int32)(unsafe.Pointer(aStat)) zStat = sqlite3.Xsqlite3_mprintf(tls, ts+1238 /* "%d" */, libc.VaList(bp+128, s0)) if zStat == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) = SQLITE_NOMEM } for i = 1; (*(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK) && (i <= nCol); i++ { zStat = idxAppendText(tls, bp+160 /* &rc */, zStat, ts+1241 /* " %d" */, libc.VaList(bp+144, ((s0+(*(*int32)(unsafe.Pointer(aStat + uintptr(i)*4))/2)) / *(*int32)(unsafe.Pointer(aStat + uintptr(i)*4))))) } } if *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_bind_text(tls, pWriteStat, 1, zTab, -1, uintptr(0)) sqlite3.Xsqlite3_bind_text(tls, pWriteStat, 2, zIdx, -1, uintptr(0)) sqlite3.Xsqlite3_bind_text(tls, pWriteStat, 3, zStat, -1, uintptr(0)) sqlite3.Xsqlite3_step(tls, pWriteStat) *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) = sqlite3.Xsqlite3_reset(tls, pWriteStat) } pEntry = idxHashFind(tls, (p + 88 /* &.hIdx */), zIdx, int32(libc.Xstrlen(tls, zIdx))) if pEntry != 0 { (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2 = zStat } else { sqlite3.Xsqlite3_free(tls, zStat) } } sqlite3.Xsqlite3_free(tls, aStat) idxFinalize(tls, bp+160 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) return *(*int32)(unsafe.Pointer(bp + 160 /* rc */)) } func idxBuildSampleTable(tls *libc.TLS, p uintptr, zTab uintptr) int32 { /* sqlite3expert.c:1619:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 var zSql uintptr rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+1245 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { return rc } zSql = sqlite3.Xsqlite3_mprintf(tls, ts+1309 /* "CREATE TABLE tem..." */, libc.VaList(bp, zTab)) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) return rc } // This function is called as part of sqlite3_expert_analyze(). Candidate // indexes have already been created in database sqlite3expert.dbm, this // function populates sqlite_stat1 table in the same database. // // The stat1 data is generated by querying the func idxPopulateStat1(tls *libc.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1643:12: */ bp := tls.Alloc(64) defer tls.Free(64) *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* nMax */)) = 0 var pCtx uintptr = uintptr(0) // var samplectx IdxSampleCtx at bp+8, 32 var i int32 var iPrev i64 = int64(-100000) *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 48 /* pIndexXInfo */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 56 /* pWrite */)) = uintptr(0) var zAllIndex uintptr = ts + 1385 /* "SELECT s.rowid, ..." */ var zIndexXInfo uintptr = ts + 1499 /* "SELECT name, col..." */ var zWrite uintptr = ts + 1554 /* "INSERT INTO sqli..." */ // If iSample==0, no sqlite_stat1 data is required. if (*sqlite3expert)(unsafe.Pointer(p)).FiSample == 0 { return SQLITE_OK } *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = idxLargestIndex(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, bp /* &nMax */, pzErr) if (*(*int32)(unsafe.Pointer(bp /* nMax */)) <= 0) || (*(*int32)(unsafe.Pointer(bp + 4 /* rc */)) != SQLITE_OK) { return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, ts+1595 /* "ANALYZE; PRAGMA ..." */, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { var nByte int32 = (int32(uint64(unsafe.Sizeof(IdxRemCtx{})) + (uint64(unsafe.Sizeof(IdxRemSlot{})) * uint64(*(*int32)(unsafe.Pointer(bp /* nMax */)))))) pCtx = idxMalloc(tls, bp+4 /* &rc */, nByte) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { var dbrem uintptr = func() uintptr { if (*sqlite3expert)(unsafe.Pointer(p)).FiSample == 100 { return (*sqlite3expert)(unsafe.Pointer(p)).Fdb } return (*sqlite3expert)(unsafe.Pointer(p)).Fdbv }() *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_create_function(tls, dbrem, ts+1629 /* "rem" */, 2, SQLITE_UTF8, pCtx, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{idxRemFunc})), uintptr(0), uintptr(0)) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_create_function(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, ts+1633 /* "sample" */, 0, SQLITE_UTF8, bp+8 /* &samplectx */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{idxSampleFunc})), uintptr(0), uintptr(0)) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { (*IdxRemCtx)(unsafe.Pointer(pCtx)).FnSlot = (*(*int32)(unsafe.Pointer(bp /* nMax */)) + 1) *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = idxPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, bp+40 /* &pAllIndex */, pzErr, zAllIndex) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = idxPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, bp+48 /* &pIndexXInfo */, pzErr, zIndexXInfo) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = idxPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, bp+56 /* &pWrite */, pzErr, zWrite) } for (*(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */)))) { var iRowid i64 = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */)), 0) var zTab uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */)), 1) var zIdx uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */)), 2) if ((*sqlite3expert)(unsafe.Pointer(p)).FiSample < 100) && (iPrev != iRowid) { (*IdxSampleCtx)(unsafe.Pointer(bp + 8 /* &samplectx */)).Ftarget = (float64((*sqlite3expert)(unsafe.Pointer(p)).FiSample) / 100.0) (*IdxSampleCtx)(unsafe.Pointer(bp + 8 /* &samplectx */)).FiTarget = (*sqlite3expert)(unsafe.Pointer(p)).FiSample (*IdxSampleCtx)(unsafe.Pointer(bp + 8 /* &samplectx */)).FnRow = 0.0 (*IdxSampleCtx)(unsafe.Pointer(bp + 8 /* &samplectx */)).FnRet = 0.0 *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = idxBuildSampleTable(tls, p, zTab) if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) != SQLITE_OK { break } } *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = idxPopulateOneStat1(tls, p, *(*uintptr)(unsafe.Pointer(bp + 48 /* pIndexXInfo */)), *(*uintptr)(unsafe.Pointer(bp + 56 /* pWrite */)), zTab, zIdx, pzErr) iPrev = iRowid } if (*(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK) && ((*sqlite3expert)(unsafe.Pointer(p)).FiSample < 100) { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+1245 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) } idxFinalize(tls, bp+4 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */))) idxFinalize(tls, bp+4 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 48 /* pIndexXInfo */))) idxFinalize(tls, bp+4 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 56 /* pWrite */))) if pCtx != 0 { for i = 0; i < (*IdxRemCtx)(unsafe.Pointer(pCtx)).FnSlot; i++ { sqlite3.Xsqlite3_free(tls, (*IdxRemSlot)(unsafe.Pointer((pCtx+8 /* &.aSlot */)+uintptr(i)*40)).Fz) } sqlite3.Xsqlite3_free(tls, pCtx) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, ts+1640 /* "ANALYZE sqlite_s..." */, uintptr(0), uintptr(0), uintptr(0)) } sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, ts+1245 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } // Allocate a new sqlite3expert object. func sqlite3_expert_new(tls *libc.TLS, db uintptr, pzErrmsg uintptr) uintptr { /* sqlite3expert.c:1742:15: */ bp := tls.Alloc(40) defer tls.Free(40) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK var pNew uintptr pNew = idxMalloc(tls, bp+24 /* &rc */, int32(unsafe.Sizeof(sqlite3expert{}))) // Open two in-memory databases to work with. The "vtab database" (dbv) // will contain a virtual table corresponding to each real table in // the user database schema, and a copy of each view. It is used to // collect information regarding the WHERE, ORDER BY and other clauses // of the user's query. if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { (*sqlite3expert)(unsafe.Pointer(pNew)).Fdb = db (*sqlite3expert)(unsafe.Pointer(pNew)).FiSample = 100 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3.Xsqlite3_open(tls, ts+1662 /* ":memory:" */, (pNew + 24 /* &.dbv */)) } if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3.Xsqlite3_open(tls, ts+1662 /* ":memory:" */, (pNew + 16 /* &.dbm */)) if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_db_config(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdbm, SQLITE_DBCONFIG_TRIGGER_EQP, libc.VaList(bp, 1, uintptr(0))) } } // Copy the entire schema of database [db] into [dbm]. if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { // var pSql uintptr at bp+32, 8 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = idxPrintfPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdb, bp+32 /* &pSql */, pzErrmsg, ts+1671 /* "SELECT sql FROM ..." */, 0) for (*(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pSql */)))) { var zSql uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pSql */)), 0) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdbm, zSql, uintptr(0), uintptr(0), pzErrmsg) } idxFinalize(tls, bp+24 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 32 /* pSql */))) } // Create the vtab schema if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = idxCreateVtabSchema(tls, pNew, pzErrmsg) } // Register the auth callback with dbv if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_set_authorizer(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdbv, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 }{idxAuthCallback})), pNew) } // If an error has occurred, free the new object and reutrn NULL. Otherwise, // return the new sqlite3expert handle. if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) != SQLITE_OK { sqlite3_expert_destroy(tls, pNew) pNew = uintptr(0) } return pNew } // Configure an sqlite3expert object. func sqlite3_expert_config(tls *libc.TLS, p uintptr, op int32, va uintptr) int32 { /* sqlite3expert.c:1803:5: */ var rc int32 = SQLITE_OK var ap va_list _ = ap ap = va switch op { case EXPERT_CONFIG_SAMPLE: { var iVal int32 = int32(libc.VaInt32(&ap)) if iVal < 0 { iVal = 0 } if iVal > 100 { iVal = 100 } (*sqlite3expert)(unsafe.Pointer(p)).FiSample = iVal break } default: rc = SQLITE_NOTFOUND break } _ = ap return rc } // Add an SQL statement to the analysis. func sqlite3_expert_sql(tls *libc.TLS, p uintptr, zSql uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1827:5: */ bp := tls.Alloc(20) defer tls.Free(20) var pScanOrig uintptr = (*sqlite3expert)(unsafe.Pointer(p)).FpScan var pStmtOrig uintptr = (*sqlite3expert)(unsafe.Pointer(p)).FpStatement *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp + 8 /* zStmt */)) = zSql if (*sqlite3expert)(unsafe.Pointer(p)).FbRun != 0 { return SQLITE_MISUSE } for ((*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK) && (*(*uintptr)(unsafe.Pointer(bp + 8 /* zStmt */)) != 0)) && (*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* zStmt */)))) != 0) { *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3.Xsqlite3_prepare_v2(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, *(*uintptr)(unsafe.Pointer(bp + 8 /* zStmt */)), -1, bp /* &pStmt */, bp+8 /* &zStmt */) if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { if *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) != 0 { var pNew uintptr var z uintptr = sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) var n int32 = int32(libc.Xstrlen(tls, z)) pNew = idxMalloc(tls, bp+16 /* &rc */, (int32((uint64(unsafe.Sizeof(IdxStatement{})) + uint64(n)) + uint64(1)))) if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { (*IdxStatement)(unsafe.Pointer(pNew)).FzSql = (pNew + 1*40) libc.Xmemcpy(tls, (*IdxStatement)(unsafe.Pointer(pNew)).FzSql, z, (uint64(n + 1))) (*IdxStatement)(unsafe.Pointer(pNew)).FpNext = (*sqlite3expert)(unsafe.Pointer(p)).FpStatement if (*sqlite3expert)(unsafe.Pointer(p)).FpStatement != 0 { (*IdxStatement)(unsafe.Pointer(pNew)).FiId = ((*IdxStatement)(unsafe.Pointer((*sqlite3expert)(unsafe.Pointer(p)).FpStatement)).FiId + 1) } (*sqlite3expert)(unsafe.Pointer(p)).FpStatement = pNew } sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) } } else { idxDatabaseError(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, pzErr) } } if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) != SQLITE_OK { idxScanFree(tls, (*sqlite3expert)(unsafe.Pointer(p)).FpScan, pScanOrig) idxStatementFree(tls, (*sqlite3expert)(unsafe.Pointer(p)).FpStatement, pStmtOrig) (*sqlite3expert)(unsafe.Pointer(p)).FpScan = pScanOrig (*sqlite3expert)(unsafe.Pointer(p)).FpStatement = pStmtOrig } return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } func sqlite3_expert_analyze(tls *libc.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1872:5: */ bp := tls.Alloc(36) defer tls.Free(36) // var rc int32 at bp+32, 4 var pEntry uintptr // Do trigger processing to collect any extra IdxScan structures *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxProcessTriggers(tls, p, pzErr) // Create candidate indexes within the in-memory database file if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxCreateCandidates(tls, p) } // Generate the stat1 data if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxPopulateStat1(tls, p, pzErr) } // Formulate the EXPERT_REPORT_CANDIDATES text for pEntry = (*sqlite3expert)(unsafe.Pointer(p)).FhIdx.FpFirst; pEntry != 0; pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpNext { (*sqlite3expert)(unsafe.Pointer(p)).FzCandidates = idxAppendText(tls, bp+32 /* &rc */, (*sqlite3expert)(unsafe.Pointer(p)).FzCandidates, ts+1770 /* "%s;%s%s\n" */, libc.VaList(bp, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal, func() uintptr { if (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2 != 0 { return ts + 1779 /* " -- stat1: " */ } return ts + 489 /* "" */ }(), (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2)) } // Figure out which of the candidate indexes are preferred by the query // planner and report the results to the user. if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxFindIndexes(tls, p, pzErr) } if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { (*sqlite3expert)(unsafe.Pointer(p)).FbRun = 1 } return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } // Return the total number of statements that have been added to this // sqlite3expert using sqlite3_expert_sql(). func sqlite3_expert_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3expert.c:1913:5: */ var nRet int32 = 0 if (*sqlite3expert)(unsafe.Pointer(p)).FpStatement != 0 { nRet = ((*IdxStatement)(unsafe.Pointer((*sqlite3expert)(unsafe.Pointer(p)).FpStatement)).FiId + 1) } return nRet } // Return a component of the report. func sqlite3_expert_report(tls *libc.TLS, p uintptr, iStmt int32, eReport int32) uintptr { /* sqlite3expert.c:1922:12: */ var zRet uintptr = uintptr(0) var pStmt uintptr if (*sqlite3expert)(unsafe.Pointer(p)).FbRun == 0 { return uintptr(0) } for pStmt = (*sqlite3expert)(unsafe.Pointer(p)).FpStatement; (pStmt != 0) && ((*IdxStatement)(unsafe.Pointer(pStmt)).FiId != iStmt); pStmt = (*IdxStatement)(unsafe.Pointer(pStmt)).FpNext { } switch eReport { case EXPERT_REPORT_SQL: if pStmt != 0 { zRet = (*IdxStatement)(unsafe.Pointer(pStmt)).FzSql } break case EXPERT_REPORT_INDEXES: if pStmt != 0 { zRet = (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx } break case EXPERT_REPORT_PLAN: if pStmt != 0 { zRet = (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP } break case EXPERT_REPORT_CANDIDATES: zRet = (*sqlite3expert)(unsafe.Pointer(p)).FzCandidates break } return zRet } // Free an sqlite3expert object. func sqlite3_expert_destroy(tls *libc.TLS, p uintptr) { /* sqlite3expert.c:1948:6: */ if p != 0 { sqlite3.Xsqlite3_close(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm) sqlite3.Xsqlite3_close(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv) idxScanFree(tls, (*sqlite3expert)(unsafe.Pointer(p)).FpScan, uintptr(0)) idxStatementFree(tls, (*sqlite3expert)(unsafe.Pointer(p)).FpStatement, uintptr(0)) idxTableFree(tls, (*sqlite3expert)(unsafe.Pointer(p)).FpTable) idxWriteFree(tls, (*sqlite3expert)(unsafe.Pointer(p)).FpWrite) idxHashClear(tls, (p + 88 /* &.hIdx */)) sqlite3.Xsqlite3_free(tls, (*sqlite3expert)(unsafe.Pointer(p)).FzCandidates) sqlite3.Xsqlite3_free(tls, p) } } // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. //---------------------------------------------------------------------------- // Support for functions with a variable number of arguments. // // The following TCL_VARARGS* macros are to support old extensions // written for older versions of Tcl where the macros permitted // support for the varargs.h system as well as stdarg.h . // // New code should just directly be written to use stdarg.h conventions. // Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with GCC; see the file COPYING. If not, write to // the Free Software Foundation, 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. // As a special exception, if you include this header file into source // files compiled by GCC, this header file does not by itself cause // the resulting executable to be covered by the GNU General Public // License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General // Public License. // ISO C Standard: 7.15 Variable arguments // include mingw stuff // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.15 Variable arguments // Allow a part of Tcl's API to be explicitly marked as deprecated. // // Used to make TIP 330/336 generate moans even if people use the // compatibility macros. Change your code, guys! We won't support you forever. //---------------------------------------------------------------------------- // Macros used to declare a function to be exported by a DLL. Used by Windows, // maps to no-op declarations on non-Windows systems. The default build on // windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be // nonempty. To build a static library, the macro STATIC_BUILD should be // defined. // // Note: when building static but linking dynamically to MSVCRT we must still // correctly decorate the C library imported function. Use CRTIMPORT // for this purpose. _DLL is defined by the compiler when linking to // MSVCRT. // These macros are used to control whether functions are being declared for // import or export. If a function is being declared while it is being built // to be included in a shared library, then it should have the DLLEXPORT // storage class. If is being declared for use by a module that is going to // link against the shared library, then it should have the DLLIMPORT storage // class. If the symbol is beind declared for a static build or for use from a // stub library, then the storage class should be empty. // // The convention is that a macro called BUILD_xxxx, where xxxx is the name of // a library we are building, is set on the compile line for sources that are // to be placed in the library. When this macro is set, the storage class will // be set to DLLEXPORT. At the end of the header file, the storage class will // be reset to DLLIMPORT. // The following _ANSI_ARGS_ macro is to support old extensions // written for older versions of Tcl where it permitted support // for compilers written in the pre-prototype era of C. // // New code should use prototypes. // Definitions that allow this header file to be used either with or without // ANSI C features. // Make sure EXTERN isn't defined elsewhere. //---------------------------------------------------------------------------- // The following code is copied from winnt.h. If we don't replicate it here, // then can't be included after tcl.h, since tcl.h also defines // VOID. This block is skipped under Cygwin and Mingw. type CHAR = int8 /* tcl.h:315:14 */ type SHORT = int16 /* tcl.h:316:15 */ type LONG = int32 /* tcl.h:317:14 */ // Macro to use instead of "void" for arguments that must have type "void *" // in ANSI C; maps them to type "char *" in non-ANSI systems. // Miscellaneous declarations. type ClientData = uintptr /* tcl.h:340:15 */ // Darwin specific configure overrides (to support fat compiles, where // configure runs only once for multiple architectures): // Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define // Tcl_WideUInt to be the unsigned variant of that type (assuming that where // we have one, we can have the other.) // // Also defines the following macros: // TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a // LP64 system such as modern Solaris or Linux ... not including Win64) // Tcl_WideAsLong - forgetful converter from wideInt to long. // Tcl_LongAsWide - sign-extending converter from long to wideInt. // Tcl_WideAsDouble - converter from wideInt to double. // Tcl_DoubleAsWide - converter from double to wideInt. // // The following invariant should hold for any long value 'longVal': // longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal)) // // Note on converting between Tcl_WideInt and strings. This implementation (in // tclObj.c) depends on the function // sprintf(...,"%" TCL_LL_MODIFIER "d",...). type Tcl_WideInt = int64 /* tcl.h:415:28 */ type Tcl_WideUInt = uint64 /* tcl.h:416:36 */ //---------------------------------------------------------------------------- // Data structures defined opaquely in this module. The definitions below just // provide dummy types. A few fields are made visible in Tcl_Interp // structures, namely those used for returning a string result from commands. // Direct access to the result field is discouraged in Tcl 8.0. The // interpreter result is either an object or a string, and the two values are // kept consistent unless some C code sets interp->result directly. // Programmers should use either the function Tcl_GetObjResult() or // Tcl_GetStringResult() to read the interpreter's result. See the SetResult // man page for details. // // Note: any change to the Tcl_Interp definition below must be mirrored in the // "real" definition in tclInt.h. // // Note: Tcl_ObjCmdProc functions do not directly set result and freeProc. // Instead, they set a Tcl_Obj member in the "real" structure that can be // accessed with Tcl_GetObjResult() and Tcl_SetObjResult(). type Tcl_Interp1 = struct { FresultDontUse uintptr FfreeProcDontUse uintptr FerrorLineDontUse int32 _ [4]byte } /* tcl.h:493:9 */ //---------------------------------------------------------------------------- // Data structures defined opaquely in this module. The definitions below just // provide dummy types. A few fields are made visible in Tcl_Interp // structures, namely those used for returning a string result from commands. // Direct access to the result field is discouraged in Tcl 8.0. The // interpreter result is either an object or a string, and the two values are // kept consistent unless some C code sets interp->result directly. // Programmers should use either the function Tcl_GetObjResult() or // Tcl_GetStringResult() to read the interpreter's result. See the SetResult // man page for details. // // Note: any change to the Tcl_Interp definition below must be mirrored in the // "real" definition in tclInt.h. // // Note: Tcl_ObjCmdProc functions do not directly set result and freeProc. // Instead, they set a Tcl_Obj member in the "real" structure that can be // accessed with Tcl_GetObjResult() and Tcl_SetObjResult(). type Tcl_Interp = Tcl_Interp1 /* tcl.h:525:1 */ type Tcl_AsyncHandler = uintptr /* tcl.h:527:34 */ type Tcl_Channel = uintptr /* tcl.h:528:29 */ type Tcl_ChannelTypeVersion = uintptr /* tcl.h:529:40 */ type Tcl_Command = uintptr /* tcl.h:530:29 */ type Tcl_Condition = uintptr /* tcl.h:531:31 */ type Tcl_Dict = uintptr /* tcl.h:532:26 */ type Tcl_EncodingState = uintptr /* tcl.h:533:35 */ type Tcl_Encoding = uintptr /* tcl.h:534:30 */ type Tcl_Event1 = struct { Fproc uintptr FnextPtr uintptr } /* tcl.h:535:9 */ type Tcl_Event = Tcl_Event1 /* tcl.h:535:26 */ type Tcl_InterpState = uintptr /* tcl.h:536:33 */ type Tcl_LoadHandle = uintptr /* tcl.h:537:32 */ type Tcl_Mutex = uintptr /* tcl.h:538:27 */ type Tcl_Pid = uintptr /* tcl.h:539:25 */ type Tcl_RegExp = uintptr /* tcl.h:540:28 */ type Tcl_ThreadDataKey = uintptr /* tcl.h:541:35 */ type Tcl_ThreadId = uintptr /* tcl.h:542:30 */ type Tcl_TimerToken = uintptr /* tcl.h:543:32 */ type Tcl_Trace = uintptr /* tcl.h:544:27 */ type Tcl_Var = uintptr /* tcl.h:545:25 */ type Tcl_ZlibStream = uintptr /* tcl.h:546:32 */ // Threading function return types used for abstracting away platform // differences when writing a Tcl_ThreadCreateProc. See the NewThread function // in generic/tclThreadTest.c for it's usage. // Definition of values for default stacksize and the possible flags to be // given to Tcl_CreateThread. // Flag values passed to Tcl_StringCaseMatch. // Flag values passed to Tcl_GetRegExpFromObj. // Flags values passed to Tcl_RegExpExecObj. // Structures filled in by Tcl_RegExpInfo. Note that all offset values are // relative to the start of the match string, not the beginning of the entire // string. type Tcl_RegExpIndices1 = struct { Fstart int32 Fend int32 } /* tcl.h:623:9 */ // Threading function return types used for abstracting away platform // differences when writing a Tcl_ThreadCreateProc. See the NewThread function // in generic/tclThreadTest.c for it's usage. // Definition of values for default stacksize and the possible flags to be // given to Tcl_CreateThread. // Flag values passed to Tcl_StringCaseMatch. // Flag values passed to Tcl_GetRegExpFromObj. // Flags values passed to Tcl_RegExpExecObj. // Structures filled in by Tcl_RegExpInfo. Note that all offset values are // relative to the start of the match string, not the beginning of the entire // string. type Tcl_RegExpIndices = Tcl_RegExpIndices1 /* tcl.h:628:3 */ type Tcl_RegExpInfo1 = struct { Fnsubs int32 _ [4]byte Fmatches uintptr FextendStart int32 Freserved int32 } /* tcl.h:630:9 */ type Tcl_RegExpInfo = Tcl_RegExpInfo1 /* tcl.h:637:3 */ // Picky compilers complain if this typdef doesn't appear before the struct's // reference in tclDecls.h. type Tcl_Stat_ = uintptr /* tcl.h:644:21 */ type stat = struct { Fst_dev _dev_t Fst_ino _ino_t Fst_mode uint16 Fst_nlink int16 Fst_uid int16 Fst_gid int16 _ [2]byte Fst_rdev _dev_t Fst_size _off_t Fst_atime time_t Fst_mtime time_t Fst_ctime time_t } /* _mingw_stat64.h:40:3 */ type Tcl_OldStat_ = uintptr /* tcl.h:645:21 */ //---------------------------------------------------------------------------- // When a TCL command returns, the interpreter contains a result from the // command. Programmers are strongly encouraged to use one of the functions // Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's // result. See the SetResult man page for details. Besides this result, the // command function returns an integer code, which is one of the following: // // TCL_OK Command completed normally; the interpreter's result // contains the command's result. // TCL_ERROR The command couldn't be completed successfully; the // interpreter's result describes what went wrong. // TCL_RETURN The command requests that the current function return; // the interpreter's result contains the function's // return value. // TCL_BREAK The command requests that the innermost loop be // exited; the interpreter's result is meaningless. // TCL_CONTINUE Go on to the next iteration of the current loop; the // interpreter's result is meaningless. //---------------------------------------------------------------------------- // Flags to control what substitutions are performed by Tcl_SubstObj(): // Argument descriptors for math function callbacks in expressions: type Tcl_ValueType = uint32 /* tcl.h:692:3 */ type Tcl_Value1 = struct { Ftype Tcl_ValueType FintValue int32 FdoubleValue float64 FwideValue Tcl_WideInt } /* tcl.h:694:9 */ type Tcl_Value = Tcl_Value1 /* tcl.h:700:3 */ // Forward declaration of Tcl_Obj to prevent an error when the forward // reference to Tcl_Obj is encountered in the function types declared below. type Tcl_Obj1 = struct { FrefCount int32 _ [4]byte Fbytes uintptr Flength int32 _ [4]byte FtypePtr uintptr FinternalRep struct { _ [0]uint64 FlongValue int32 _ [12]byte } } /* tcl.h:707:1 */ //---------------------------------------------------------------------------- // The following structure represents a type of object, which is a particular // internal representation for an object plus a set of functions that provide // standard operations on objects of that type. type Tcl_ObjType1 = struct { Fname uintptr FfreeIntRepProc uintptr FdupIntRepProc uintptr FupdateStringProc uintptr FsetFromAnyProc uintptr } /* tcl.h:707:1 */ //---------------------------------------------------------------------------- // The following structure represents a type of object, which is a particular // internal representation for an object plus a set of functions that provide // standard operations on objects of that type. type Tcl_ObjType = Tcl_ObjType1 /* tcl.h:796:3 */ // One of the following structures exists for each object in the Tcl system. // An object stores a value as either a string, some internal representation, // or both. type Tcl_Obj = Tcl_Obj1 /* tcl.h:843:3 */ //---------------------------------------------------------------------------- // The following structure contains the state needed by Tcl_SaveResult. No-one // outside of Tcl should access any of these fields. This structure is // typically allocated on the stack. type Tcl_SavedResult1 = struct { Fresult uintptr FfreeProc uintptr FobjResultPtr uintptr FappendResult uintptr FappendAvl int32 FappendUsed int32 FresultSpace [201]int8 _ [7]byte } /* tcl.h:864:9 */ //---------------------------------------------------------------------------- // The following structure contains the state needed by Tcl_SaveResult. No-one // outside of Tcl should access any of these fields. This structure is // typically allocated on the stack. type Tcl_SavedResult = Tcl_SavedResult1 /* tcl.h:872:3 */ //---------------------------------------------------------------------------- // The following definitions support Tcl's namespace facility. Note: the first // five fields must match exactly the fields in a Namespace structure (see // tclInt.h). type Tcl_Namespace1 = struct { Fname uintptr FfullName uintptr FclientData ClientData FdeleteProc uintptr FparentPtr uintptr } /* tcl.h:881:9 */ //---------------------------------------------------------------------------- // The following definitions support Tcl's namespace facility. Note: the first // five fields must match exactly the fields in a Namespace structure (see // tclInt.h). type Tcl_Namespace = Tcl_Namespace1 /* tcl.h:897:3 */ //---------------------------------------------------------------------------- // The following structure represents a call frame, or activation record. A // call frame defines a naming context for a procedure call: its local scope // (for local variables) and its namespace scope (used for non-local // variables; often the global :: namespace). A call frame can also define the // naming context for a namespace eval or namespace inscope command: the // namespace in which the command's code should execute. The Tcl_CallFrame // structures exist only while procedures or namespace eval/inscope's are // being executed, and provide a Tcl call stack. // // A call frame is initialized and pushed using Tcl_PushCallFrame and popped // using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the // Tcl_PushCallFrame caller, and callers typically allocate them on the C call // stack for efficiency. For this reason, Tcl_CallFrame is defined as a // structure and not as an opaque token. However, most Tcl_CallFrame fields // are hidden since applications should not access them directly; others are // declared as "dummyX". // // WARNING!! The structure definition must be kept consistent with the // CallFrame structure in tclInt.h. If you change one, change the other. type Tcl_CallFrame1 = struct { FnsPtr uintptr Fdummy1 int32 Fdummy2 int32 Fdummy3 uintptr Fdummy4 uintptr Fdummy5 uintptr Fdummy6 int32 _ [4]byte Fdummy7 uintptr Fdummy8 uintptr Fdummy9 int32 _ [4]byte Fdummy10 uintptr Fdummy11 uintptr Fdummy12 uintptr Fdummy13 uintptr } /* tcl.h:922:9 */ //---------------------------------------------------------------------------- // The following structure represents a call frame, or activation record. A // call frame defines a naming context for a procedure call: its local scope // (for local variables) and its namespace scope (used for non-local // variables; often the global :: namespace). A call frame can also define the // naming context for a namespace eval or namespace inscope command: the // namespace in which the command's code should execute. The Tcl_CallFrame // structures exist only while procedures or namespace eval/inscope's are // being executed, and provide a Tcl call stack. // // A call frame is initialized and pushed using Tcl_PushCallFrame and popped // using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the // Tcl_PushCallFrame caller, and callers typically allocate them on the C call // stack for efficiency. For this reason, Tcl_CallFrame is defined as a // structure and not as an opaque token. However, most Tcl_CallFrame fields // are hidden since applications should not access them directly; others are // declared as "dummyX". // // WARNING!! The structure definition must be kept consistent with the // CallFrame structure in tclInt.h. If you change one, change the other. type Tcl_CallFrame = Tcl_CallFrame1 /* tcl.h:937:3 */ //---------------------------------------------------------------------------- // Information about commands that is returned by Tcl_GetCommandInfo and // passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command // function while proc is a traditional Tcl argc/argv string-based function. // Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and // proc are non-NULL and can be called to execute the command. However, it may // be faster to call one instead of the other. The member isNativeObjectProc // is set to 1 if an object-based function was registered by // Tcl_CreateObjCommand, and to 0 if a string-based function was registered by // Tcl_CreateCommand. The other function is typically set to a compatibility // wrapper that does string-to-object or object-to-string argument conversions // then calls the other function. type Tcl_CmdInfo1 = struct { FisNativeObjectProc int32 _ [4]byte FobjProc uintptr FobjClientData ClientData Fproc uintptr FclientData ClientData FdeleteProc uintptr FdeleteData ClientData FnamespacePtr uintptr } /* tcl.h:954:9 */ //---------------------------------------------------------------------------- // Information about commands that is returned by Tcl_GetCommandInfo and // passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command // function while proc is a traditional Tcl argc/argv string-based function. // Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and // proc are non-NULL and can be called to execute the command. However, it may // be faster to call one instead of the other. The member isNativeObjectProc // is set to 1 if an object-based function was registered by // Tcl_CreateObjCommand, and to 0 if a string-based function was registered by // Tcl_CreateCommand. The other function is typically set to a compatibility // wrapper that does string-to-object or object-to-string argument conversions // then calls the other function. type Tcl_CmdInfo = Tcl_CmdInfo1 /* tcl.h:973:3 */ //---------------------------------------------------------------------------- // The structure defined below is used to hold dynamic strings. The only // fields that clients should use are string and length, accessible via the // macros Tcl_DStringValue and Tcl_DStringLength. type Tcl_DString1 = struct { Fstring uintptr Flength int32 FspaceAvl int32 FstaticSpace [200]int8 } /* tcl.h:983:9 */ //---------------------------------------------------------------------------- // The structure defined below is used to hold dynamic strings. The only // fields that clients should use are string and length, accessible via the // macros Tcl_DStringValue and Tcl_DStringLength. type Tcl_DString = Tcl_DString1 /* tcl.h:993:3 */ // Definitions for the maximum number of digits of precision that may be // specified in the "tcl_precision" variable, and the number of bytes of // buffer space required by Tcl_PrintDouble. // Definition for a number of bytes of buffer space sufficient to hold the // string representation of an integer in base 10 (assuming the existence of // 64-bit integers). // Flag values passed to Tcl_ConvertElement. // TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to // use backslash quoting instead. // TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It // is safe to leave the hash unquoted when the element is not the first // element of a list, and this flag can be used by the caller to indicate // that condition. // Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow // abbreviated strings. //---------------------------------------------------------------------------- // Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv. // WARNING: these bit choices must not conflict with the bit choices for // evalFlag bits in tclInt.h! // // Meanings: // TCL_NO_EVAL: Just record this command // TCL_EVAL_GLOBAL: Execute script in global namespace // TCL_EVAL_DIRECT: Do not compile this script // TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles // o Run in iPtr->lookupNsPtr or global namespace // o Cut out of error traces // o Don't reset the flags controlling ensemble // error message rewriting. // TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the // stack for the script in progress to be // completely unwound. // TCL_EVAL_NOERR: Do no exception reporting at all, just return // as the caller will report. // Special freeProc values that may be passed to Tcl_SetResult (see the man // page for details): // Flag values passed to variable-related functions. // WARNING: these bit choices must not conflict with the bit choice for // TCL_CANCEL_UNWIND, above. // Required to support old variable/vdelete/vinfo traces. // Indicate the semantics of the result of a trace. // Flag values for ensemble commands. // Flag values passed to command-related functions. // The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now // always parsed whenever the part2 is NULL. (This is to avoid a common error // when converting code to use the new object based APIs and forgetting to // give the flag) // Types for linked variables: //---------------------------------------------------------------------------- // Forward declarations of Tcl_HashTable and related types. type Tcl_HashKeyType1 = struct { Fversion int32 Fflags int32 FhashKeyProc uintptr FcompareKeysProc uintptr FallocEntryProc uintptr FfreeEntryProc uintptr } /* tcl.h:1152:9 */ // Definitions for the maximum number of digits of precision that may be // specified in the "tcl_precision" variable, and the number of bytes of // buffer space required by Tcl_PrintDouble. // Definition for a number of bytes of buffer space sufficient to hold the // string representation of an integer in base 10 (assuming the existence of // 64-bit integers). // Flag values passed to Tcl_ConvertElement. // TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to // use backslash quoting instead. // TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It // is safe to leave the hash unquoted when the element is not the first // element of a list, and this flag can be used by the caller to indicate // that condition. // Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow // abbreviated strings. //---------------------------------------------------------------------------- // Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv. // WARNING: these bit choices must not conflict with the bit choices for // evalFlag bits in tclInt.h! // // Meanings: // TCL_NO_EVAL: Just record this command // TCL_EVAL_GLOBAL: Execute script in global namespace // TCL_EVAL_DIRECT: Do not compile this script // TCL_EVAL_INVOKE: Magical Tcl_EvalObjv mode for aliases/ensembles // o Run in iPtr->lookupNsPtr or global namespace // o Cut out of error traces // o Don't reset the flags controlling ensemble // error message rewriting. // TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the // stack for the script in progress to be // completely unwound. // TCL_EVAL_NOERR: Do no exception reporting at all, just return // as the caller will report. // Special freeProc values that may be passed to Tcl_SetResult (see the man // page for details): // Flag values passed to variable-related functions. // WARNING: these bit choices must not conflict with the bit choice for // TCL_CANCEL_UNWIND, above. // Required to support old variable/vdelete/vinfo traces. // Indicate the semantics of the result of a trace. // Flag values for ensemble commands. // Flag values passed to command-related functions. // The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now // always parsed whenever the part2 is NULL. (This is to avoid a common error // when converting code to use the new object based APIs and forgetting to // give the flag) // Types for linked variables: //---------------------------------------------------------------------------- // Forward declarations of Tcl_HashTable and related types. type Tcl_HashKeyType = Tcl_HashKeyType1 /* tcl.h:1152:32 */ type Tcl_HashTable1 = struct { Fbuckets uintptr FstaticBuckets [4]uintptr FnumBuckets int32 FnumEntries int32 FrebuildSize int32 FdownShift int32 Fmask int32 FkeyType int32 FfindProc uintptr FcreateProc uintptr FtypePtr uintptr } /* tcl.h:1153:9 */ type Tcl_HashTable = Tcl_HashTable1 /* tcl.h:1153:30 */ type Tcl_HashEntry1 = struct { FnextPtr uintptr FtablePtr uintptr Fhash uintptr FclientData ClientData Fkey struct{ FoneWordValue uintptr } } /* tcl.h:1153:9 */ type Tcl_HashEntry = Tcl_HashEntry1 /* tcl.h:1154:30 */ // Structure definition for information used to keep track of searches through // hash tables: type Tcl_HashSearch1 = struct { FtablePtr uintptr FnextIndex int32 _ [4]byte FnextEntryPtr uintptr } /* tcl.h:1308:9 */ // Structure definition for information used to keep track of searches through // hash tables: type Tcl_HashSearch = Tcl_HashSearch1 /* tcl.h:1314:3 */ // Acceptable key types for hash tables: // // TCL_STRING_KEYS: The keys are strings, they are copied into the // entry. // TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored // in the entry. // TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied // into the entry. // TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the // pointer is stored in the entry. // // While maintaining binary compatibility the above have to be distinct values // as they are used to differentiate between old versions of the hash table // which don't have a typePtr and new ones which do. Once binary compatibility // is discarded in favour of making more wide spread changes TCL_STRING_KEYS // can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the // same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is // accessed from the entry and not the behaviour. // Structure definition for information used to keep track of searches through // dictionaries. These fields should not be accessed by code outside // tclDictObj.c type Tcl_DictSearch = struct { Fnext uintptr Fepoch int32 _ [4]byte FdictionaryPtr Tcl_Dict } /* tcl.h:1354:3 */ // Positions to pass to Tcl_QueueEvent: type Tcl_QueuePosition = uint32 /* tcl.h:1389:3 */ // Values to pass to Tcl_SetServiceMode to specify the behavior of notifier // event routines. // The following structure keeps is used to hold a time value, either as an // absolute time (the number of seconds from the epoch) or as an elapsed time. // On Unix systems the epoch is Midnight Jan 1, 1970 GMT. type Tcl_Time1 = struct { Fsec int32 Fusec int32 } /* tcl.h:1405:9 */ // Values to pass to Tcl_SetServiceMode to specify the behavior of notifier // event routines. // The following structure keeps is used to hold a time value, either as an // absolute time (the number of seconds from the epoch) or as an elapsed time. // On Unix systems the epoch is Midnight Jan 1, 1970 GMT. type Tcl_Time = Tcl_Time1 /* tcl.h:1408:3 */ // struct Tcl_ChannelType: // // One such structure exists for each type (kind) of channel. It collects // together in one place all the functions that are part of the specific // channel type. // // It is recommend that the Tcl_Channel* functions are used to access elements // of this structure, instead of direct accessing. type Tcl_ChannelType1 = struct { FtypeName uintptr Fversion Tcl_ChannelTypeVersion FcloseProc uintptr FinputProc uintptr FoutputProc uintptr FseekProc uintptr FsetOptionProc uintptr FgetOptionProc uintptr FwatchProc uintptr FgetHandleProc uintptr Fclose2Proc uintptr FblockModeProc uintptr FflushProc uintptr FhandlerProc uintptr FwideSeekProc uintptr FthreadActionProc uintptr FtruncateProc uintptr } /* tcl.h:1524:9 */ // struct Tcl_ChannelType: // // One such structure exists for each type (kind) of channel. It collects // together in one place all the functions that are part of the specific // channel type. // // It is recommend that the Tcl_Channel* functions are used to access elements // of this structure, instead of direct accessing. type Tcl_ChannelType = Tcl_ChannelType1 /* tcl.h:1592:3 */ // The following flags determine whether the blockModeProc above should set // the channel into blocking or nonblocking mode. They are passed as arguments // to the blockModeProc function in the above structure. //---------------------------------------------------------------------------- // Enum for different types of file paths. type Tcl_PathType = uint32 /* tcl.h:1613:3 */ // The following structure is used to pass glob type data amongst the various // glob routines and Tcl_FSMatchInDirectory. type Tcl_GlobTypeData1 = struct { Ftype int32 Fperm int32 FmacType uintptr FmacCreator uintptr } /* tcl.h:1620:9 */ // The following structure is used to pass glob type data amongst the various // glob routines and Tcl_FSMatchInDirectory. type Tcl_GlobTypeData = Tcl_GlobTypeData1 /* tcl.h:1625:3 */ type Tcl_FSVersion = uintptr /* tcl.h:1700:31 */ //---------------------------------------------------------------------------- // Data structures related to hooking into the filesystem // Filesystem version tag. This was introduced in 8.4. // struct Tcl_Filesystem: // // One such structure exists for each type (kind) of filesystem. It collects // together in one place all the functions that are part of the specific // filesystem. Tcl always accesses the filesystem through one of these // structures. // // Not all entries need be non-NULL; any which are NULL are simply ignored. // However, a complete filesystem should provide all of these functions. The // explanations in the structure show the importance of each function. type Tcl_Filesystem1 = struct { FtypeName uintptr FstructureLength int32 _ [4]byte Fversion Tcl_FSVersion FpathInFilesystemProc uintptr FdupInternalRepProc uintptr FfreeInternalRepProc uintptr FinternalToNormalizedProc uintptr FcreateInternalRepProc uintptr FnormalizePathProc uintptr FfilesystemPathTypeProc uintptr FfilesystemSeparatorProc uintptr FstatProc uintptr FaccessProc uintptr FopenFileChannelProc uintptr FmatchInDirectoryProc uintptr FutimeProc uintptr FlinkProc uintptr FlistVolumesProc uintptr FfileAttrStringsProc uintptr FfileAttrsGetProc uintptr FfileAttrsSetProc uintptr FcreateDirectoryProc uintptr FremoveDirectoryProc uintptr FdeleteFileProc uintptr FcopyFileProc uintptr FrenameFileProc uintptr FcopyDirectoryProc uintptr FlstatProc uintptr FloadFileProc uintptr FgetCwdProc uintptr FchdirProc uintptr } /* tcl.h:1726:9 */ //---------------------------------------------------------------------------- // Data structures related to hooking into the filesystem // Filesystem version tag. This was introduced in 8.4. // struct Tcl_Filesystem: // // One such structure exists for each type (kind) of filesystem. It collects // together in one place all the functions that are part of the specific // filesystem. Tcl always accesses the filesystem through one of these // structures. // // Not all entries need be non-NULL; any which are NULL are simply ignored. // However, a complete filesystem should provide all of these functions. The // explanations in the structure show the importance of each function. type Tcl_Filesystem = Tcl_Filesystem1 /* tcl.h:1873:3 */ // The following definitions are used as values for the 'linkAction' flag to // Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can // be given. For link creation, the linkProc should create a link which // matches any of the types given. // // TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link. // TCL_CREATE_HARD_LINK - Create a hard link. //---------------------------------------------------------------------------- // The following structure represents the Notifier functions that you can // override with the Tcl_SetNotifier call. type Tcl_NotifierProcs1 = struct { FsetTimerProc uintptr FwaitForEventProc uintptr FcreateFileHandlerProc uintptr FdeleteFileHandlerProc uintptr FinitNotifierProc uintptr FfinalizeNotifierProc uintptr FalertNotifierProc uintptr FserviceModeHookProc uintptr } /* tcl.h:1894:9 */ // The following definitions are used as values for the 'linkAction' flag to // Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can // be given. For link creation, the linkProc should create a link which // matches any of the types given. // // TCL_CREATE_SYMBOLIC_LINK - Create a symbolic or soft link. // TCL_CREATE_HARD_LINK - Create a hard link. //---------------------------------------------------------------------------- // The following structure represents the Notifier functions that you can // override with the Tcl_SetNotifier call. type Tcl_NotifierProcs = Tcl_NotifierProcs1 /* tcl.h:1903:3 */ //---------------------------------------------------------------------------- // The following data structures and declarations are for the new Tcl parser. // // For each word of a command, and for each piece of a word such as a variable // reference, one of the following structures is created to describe the // token. type Tcl_Token1 = struct { Ftype int32 _ [4]byte Fstart uintptr Fsize int32 FnumComponents int32 } /* tcl.h:1914:9 */ //---------------------------------------------------------------------------- // The following data structures and declarations are for the new Tcl parser. // // For each word of a command, and for each piece of a word such as a variable // reference, one of the following structures is created to describe the // token. type Tcl_Token = Tcl_Token1 /* tcl.h:1924:3 */ // Type values defined for Tcl_Token structures. These values are defined as // mask bits so that it's easy to check for collections of types. // // TCL_TOKEN_WORD - The token describes one word of a command, // from the first non-blank character of the word // (which may be " or {) up to but not including // the space, semicolon, or bracket that // terminates the word. NumComponents counts the // total number of sub-tokens that make up the // word. This includes, for example, sub-tokens // of TCL_TOKEN_VARIABLE tokens. // TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except // that the word is guaranteed to consist of a // single TCL_TOKEN_TEXT sub-token. // TCL_TOKEN_TEXT - The token describes a range of literal text // that is part of a word. NumComponents is // always 0. // TCL_TOKEN_BS - The token describes a backslash sequence that // must be collapsed. NumComponents is always 0. // TCL_TOKEN_COMMAND - The token describes a command whose result // must be substituted into the word. The token // includes the enclosing brackets. NumComponents // is always 0. // TCL_TOKEN_VARIABLE - The token describes a variable substitution, // including the dollar sign, variable name, and // array index (if there is one) up through the // right parentheses. NumComponents tells how // many additional tokens follow to represent the // variable name. The first token will be a // TCL_TOKEN_TEXT token that describes the // variable name. If the variable is an array // reference then there will be one or more // additional tokens, of type TCL_TOKEN_TEXT, // TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and // TCL_TOKEN_VARIABLE, that describe the array // index; numComponents counts the total number // of nested tokens that make up the variable // reference, including sub-tokens of // TCL_TOKEN_VARIABLE tokens. // TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an // expression, from the first non-blank character // of the subexpression up to but not including // the space, brace, or bracket that terminates // the subexpression. NumComponents counts the // total number of following subtokens that make // up the subexpression; this includes all // subtokens for any nested TCL_TOKEN_SUB_EXPR // tokens. For example, a numeric value used as a // primitive operand is described by a // TCL_TOKEN_SUB_EXPR token followed by a // TCL_TOKEN_TEXT token. A binary subexpression // is described by a TCL_TOKEN_SUB_EXPR token // followed by the TCL_TOKEN_OPERATOR token for // the operator, then TCL_TOKEN_SUB_EXPR tokens // for the left then the right operands. // TCL_TOKEN_OPERATOR - The token describes one expression operator. // An operator might be the name of a math // function such as "abs". A TCL_TOKEN_OPERATOR // token is always preceded by one // TCL_TOKEN_SUB_EXPR token for the operator's // subexpression, and is followed by zero or more // TCL_TOKEN_SUB_EXPR tokens for the operator's // operands. NumComponents is always 0. // TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except // that it marks a word that began with the // literal character prefix "{*}". This word is // marked to be expanded - that is, broken into // words after substitution is complete. // Parsing error types. On any parsing error, one of these values will be // stored in the error field of the Tcl_Parse structure defined below. // A structure of the following type is filled in by Tcl_ParseCommand. It // describes a single command parsed from an input string. type Tcl_Parse1 = struct { FcommentStart uintptr FcommentSize int32 _ [4]byte FcommandStart uintptr FcommandSize int32 FnumWords int32 FtokenPtr uintptr FnumTokens int32 FtokensAvailable int32 FerrorType int32 _ [4]byte Fstring uintptr Fend uintptr Finterp uintptr Fterm uintptr Fincomplete int32 _ [4]byte FstaticTokens [20]Tcl_Token } /* tcl.h:2030:9 */ // Type values defined for Tcl_Token structures. These values are defined as // mask bits so that it's easy to check for collections of types. // // TCL_TOKEN_WORD - The token describes one word of a command, // from the first non-blank character of the word // (which may be " or {) up to but not including // the space, semicolon, or bracket that // terminates the word. NumComponents counts the // total number of sub-tokens that make up the // word. This includes, for example, sub-tokens // of TCL_TOKEN_VARIABLE tokens. // TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD except // that the word is guaranteed to consist of a // single TCL_TOKEN_TEXT sub-token. // TCL_TOKEN_TEXT - The token describes a range of literal text // that is part of a word. NumComponents is // always 0. // TCL_TOKEN_BS - The token describes a backslash sequence that // must be collapsed. NumComponents is always 0. // TCL_TOKEN_COMMAND - The token describes a command whose result // must be substituted into the word. The token // includes the enclosing brackets. NumComponents // is always 0. // TCL_TOKEN_VARIABLE - The token describes a variable substitution, // including the dollar sign, variable name, and // array index (if there is one) up through the // right parentheses. NumComponents tells how // many additional tokens follow to represent the // variable name. The first token will be a // TCL_TOKEN_TEXT token that describes the // variable name. If the variable is an array // reference then there will be one or more // additional tokens, of type TCL_TOKEN_TEXT, // TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and // TCL_TOKEN_VARIABLE, that describe the array // index; numComponents counts the total number // of nested tokens that make up the variable // reference, including sub-tokens of // TCL_TOKEN_VARIABLE tokens. // TCL_TOKEN_SUB_EXPR - The token describes one subexpression of an // expression, from the first non-blank character // of the subexpression up to but not including // the space, brace, or bracket that terminates // the subexpression. NumComponents counts the // total number of following subtokens that make // up the subexpression; this includes all // subtokens for any nested TCL_TOKEN_SUB_EXPR // tokens. For example, a numeric value used as a // primitive operand is described by a // TCL_TOKEN_SUB_EXPR token followed by a // TCL_TOKEN_TEXT token. A binary subexpression // is described by a TCL_TOKEN_SUB_EXPR token // followed by the TCL_TOKEN_OPERATOR token for // the operator, then TCL_TOKEN_SUB_EXPR tokens // for the left then the right operands. // TCL_TOKEN_OPERATOR - The token describes one expression operator. // An operator might be the name of a math // function such as "abs". A TCL_TOKEN_OPERATOR // token is always preceded by one // TCL_TOKEN_SUB_EXPR token for the operator's // subexpression, and is followed by zero or more // TCL_TOKEN_SUB_EXPR tokens for the operator's // operands. NumComponents is always 0. // TCL_TOKEN_EXPAND_WORD - This token is just like TCL_TOKEN_WORD except // that it marks a word that began with the // literal character prefix "{*}". This word is // marked to be expanded - that is, broken into // words after substitution is complete. // Parsing error types. On any parsing error, one of these values will be // stored in the error field of the Tcl_Parse structure defined below. // A structure of the following type is filled in by Tcl_ParseCommand. It // describes a single command parsed from an input string. type Tcl_Parse = Tcl_Parse1 /* tcl.h:2083:3 */ //---------------------------------------------------------------------------- // The following structure represents a user-defined encoding. It collects // together all the functions that are used by the specific encoding. type Tcl_EncodingType1 = struct { FencodingName uintptr FtoUtfProc uintptr FfromUtfProc uintptr FfreeProc uintptr FclientData ClientData FnullSize int32 _ [4]byte } /* tcl.h:2091:9 */ //---------------------------------------------------------------------------- // The following structure represents a user-defined encoding. It collects // together all the functions that are used by the specific encoding. type Tcl_EncodingType = Tcl_EncodingType1 /* tcl.h:2111:3 */ // The following definitions are used as values for the conversion control // flags argument when converting text from one character set to another: // // TCL_ENCODING_START - Signifies that the source buffer is the first // block in a (potentially multi-block) input // stream. Tells the conversion function to reset // to an initial state and perform any // initialization that needs to occur before the // first byte is converted. If the source buffer // contains the entire input stream to be // converted, this flag should be set. // TCL_ENCODING_END - Signifies that the source buffer is the last // block in a (potentially multi-block) input // stream. Tells the conversion routine to // perform any finalization that needs to occur // after the last byte is converted and then to // reset to an initial state. If the source // buffer contains the entire input stream to be // converted, this flag should be set. // TCL_ENCODING_STOPONERROR - If set, then the converter will return // immediately upon encountering an invalid byte // sequence or a source character that has no // mapping in the target encoding. If clear, then // the converter will skip the problem, // substituting one or more "close" characters in // the destination buffer and then continue to // convert the source. // TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf will not append a // terminating NUL byte. Knowing that it will // not need space to do so, it will fill all // dstLen bytes with encoded UTF-8 content, as // other circumstances permit. If clear, the // default behavior is to reserve a byte in // the dst space for NUL termination, and to // append the NUL byte. // TCL_ENCODING_CHAR_LIMIT - If set and dstCharsPtr is not NULL, then // Tcl_ExternalToUtf takes the initial value // of *dstCharsPtr is taken as a limit of the // maximum number of chars to produce in the // encoded UTF-8 content. Otherwise, the // number of chars produced is controlled only // by other limiting factors. // The following definitions are the error codes returned by the conversion // routines: // // TCL_OK - All characters were converted. // TCL_CONVERT_NOSPACE - The output buffer would not have been large // enough for all of the converted data; as many // characters as could fit were converted though. // TCL_CONVERT_MULTIBYTE - The last few bytes in the source string were // the beginning of a multibyte sequence, but // more bytes were needed to complete this // sequence. A subsequent call to the conversion // routine should pass the beginning of this // unconverted sequence plus additional bytes // from the source stream to properly convert the // formerly split-up multibyte sequence. // TCL_CONVERT_SYNTAX - The source stream contained an invalid // character sequence. This may occur if the // input stream has been damaged or if the input // encoding method was misidentified. This error // is reported only if TCL_ENCODING_STOPONERROR // was specified. // TCL_CONVERT_UNKNOWN - The source string contained a character that // could not be represented in the target // encoding. This error is reported only if // TCL_ENCODING_STOPONERROR was specified. // The maximum number of bytes that are necessary to represent a single // Unicode character in UTF-8. The valid values should be 3, 4 or 6 // (or perhaps 1 if we want to support a non-unicode enabled core). If 3 or // 4, then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6, // then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode // is the default and recommended mode. UCS-4 is experimental and not // recommended. It works for the core, but most extensions expect UCS-2. // This represents a Unicode character. Any changes to this should also be // reflected in regcustom.h. type Tcl_UniChar = uint16 /* tcl.h:2228:24 */ //---------------------------------------------------------------------------- // TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to // provide the system with the embedded configuration data. type Tcl_Config1 = struct { Fkey uintptr Fvalue uintptr } /* tcl.h:2237:9 */ //---------------------------------------------------------------------------- // TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to // provide the system with the embedded configuration data. type Tcl_Config = Tcl_Config1 /* tcl.h:2242:3 */ type mp_digit = uint32 /* tcl.h:2268:22 */ //---------------------------------------------------------------------------- // Definitions needed for Tcl_ParseArgvObj routines. // Based on tkArgv.c. // Modifications from the original are copyright (c) Sam Bromley 2006 type Tcl_ArgvInfo = struct { Ftype int32 _ [4]byte FkeyStr uintptr FsrcPtr uintptr FdstPtr uintptr FhelpStr uintptr FclientData ClientData } /* tcl.h:2289:3 */ type TclPlatStubs1 = struct { Fmagic int32 _ [4]byte Fhooks uintptr Ftcl_WinUtfToTChar uintptr Ftcl_WinTCharToUtf uintptr } /* tclDecls.h:1821:11 */ type TclStubHooks = struct { FtclPlatStubs uintptr FtclIntStubs uintptr FtclIntPlatStubs uintptr } /* tclDecls.h:1824:3 */ type TclStubs = struct { Fmagic int32 _ [4]byte Fhooks uintptr Ftcl_PkgProvideEx uintptr Ftcl_PkgRequireEx uintptr Ftcl_Panic uintptr Ftcl_Alloc uintptr Ftcl_Free uintptr Ftcl_Realloc uintptr Ftcl_DbCkalloc uintptr Ftcl_DbCkfree uintptr Ftcl_DbCkrealloc uintptr Freserved9 uintptr Freserved10 uintptr Ftcl_SetTimer uintptr Ftcl_Sleep uintptr Ftcl_WaitForEvent uintptr Ftcl_AppendAllObjTypes uintptr Ftcl_AppendStringsToObj uintptr Ftcl_AppendToObj uintptr Ftcl_ConcatObj uintptr Ftcl_ConvertToType uintptr Ftcl_DbDecrRefCount uintptr Ftcl_DbIncrRefCount uintptr Ftcl_DbIsShared uintptr Ftcl_DbNewBooleanObj uintptr Ftcl_DbNewByteArrayObj uintptr Ftcl_DbNewDoubleObj uintptr Ftcl_DbNewListObj uintptr Ftcl_DbNewLongObj uintptr Ftcl_DbNewObj uintptr Ftcl_DbNewStringObj uintptr Ftcl_DuplicateObj uintptr FtclFreeObj uintptr Ftcl_GetBoolean uintptr Ftcl_GetBooleanFromObj uintptr Ftcl_GetByteArrayFromObj uintptr Ftcl_GetDouble uintptr Ftcl_GetDoubleFromObj uintptr Ftcl_GetIndexFromObj uintptr Ftcl_GetInt uintptr Ftcl_GetIntFromObj uintptr Ftcl_GetLongFromObj uintptr Ftcl_GetObjType uintptr Ftcl_GetStringFromObj uintptr Ftcl_InvalidateStringRep uintptr Ftcl_ListObjAppendList uintptr Ftcl_ListObjAppendElement uintptr Ftcl_ListObjGetElements uintptr Ftcl_ListObjIndex uintptr Ftcl_ListObjLength uintptr Ftcl_ListObjReplace uintptr Ftcl_NewBooleanObj uintptr Ftcl_NewByteArrayObj uintptr Ftcl_NewDoubleObj uintptr Ftcl_NewIntObj uintptr Ftcl_NewListObj uintptr Ftcl_NewLongObj uintptr Ftcl_NewObj uintptr Ftcl_NewStringObj uintptr Ftcl_SetBooleanObj uintptr Ftcl_SetByteArrayLength uintptr Ftcl_SetByteArrayObj uintptr Ftcl_SetDoubleObj uintptr Ftcl_SetIntObj uintptr Ftcl_SetListObj uintptr Ftcl_SetLongObj uintptr Ftcl_SetObjLength uintptr Ftcl_SetStringObj uintptr Ftcl_AddErrorInfo uintptr Ftcl_AddObjErrorInfo uintptr Ftcl_AllowExceptions uintptr Ftcl_AppendElement uintptr Ftcl_AppendResult uintptr Ftcl_AsyncCreate uintptr Ftcl_AsyncDelete uintptr Ftcl_AsyncInvoke uintptr Ftcl_AsyncMark uintptr Ftcl_AsyncReady uintptr Ftcl_BackgroundError uintptr Ftcl_Backslash uintptr Ftcl_BadChannelOption uintptr Ftcl_CallWhenDeleted uintptr Ftcl_CancelIdleCall uintptr Ftcl_Close uintptr Ftcl_CommandComplete uintptr Ftcl_Concat uintptr Ftcl_ConvertElement uintptr Ftcl_ConvertCountedElement uintptr Ftcl_CreateAlias uintptr Ftcl_CreateAliasObj uintptr Ftcl_CreateChannel uintptr Ftcl_CreateChannelHandler uintptr Ftcl_CreateCloseHandler uintptr Ftcl_CreateCommand uintptr Ftcl_CreateEventSource uintptr Ftcl_CreateExitHandler uintptr Ftcl_CreateInterp uintptr Ftcl_CreateMathFunc uintptr Ftcl_CreateObjCommand uintptr Ftcl_CreateSlave uintptr Ftcl_CreateTimerHandler uintptr Ftcl_CreateTrace uintptr Ftcl_DeleteAssocData uintptr Ftcl_DeleteChannelHandler uintptr Ftcl_DeleteCloseHandler uintptr Ftcl_DeleteCommand uintptr Ftcl_DeleteCommandFromToken uintptr Ftcl_DeleteEvents uintptr Ftcl_DeleteEventSource uintptr Ftcl_DeleteExitHandler uintptr Ftcl_DeleteHashEntry uintptr Ftcl_DeleteHashTable uintptr Ftcl_DeleteInterp uintptr Ftcl_DetachPids uintptr Ftcl_DeleteTimerHandler uintptr Ftcl_DeleteTrace uintptr Ftcl_DontCallWhenDeleted uintptr Ftcl_DoOneEvent uintptr Ftcl_DoWhenIdle uintptr Ftcl_DStringAppend uintptr Ftcl_DStringAppendElement uintptr Ftcl_DStringEndSublist uintptr Ftcl_DStringFree uintptr Ftcl_DStringGetResult uintptr Ftcl_DStringInit uintptr Ftcl_DStringResult uintptr Ftcl_DStringSetLength uintptr Ftcl_DStringStartSublist uintptr Ftcl_Eof uintptr Ftcl_ErrnoId uintptr Ftcl_ErrnoMsg uintptr Ftcl_Eval uintptr Ftcl_EvalFile uintptr Ftcl_EvalObj uintptr Ftcl_EventuallyFree uintptr Ftcl_Exit uintptr Ftcl_ExposeCommand uintptr Ftcl_ExprBoolean uintptr Ftcl_ExprBooleanObj uintptr Ftcl_ExprDouble uintptr Ftcl_ExprDoubleObj uintptr Ftcl_ExprLong uintptr Ftcl_ExprLongObj uintptr Ftcl_ExprObj uintptr Ftcl_ExprString uintptr Ftcl_Finalize uintptr Ftcl_FindExecutable uintptr Ftcl_FirstHashEntry uintptr Ftcl_Flush uintptr Ftcl_FreeResult uintptr Ftcl_GetAlias uintptr Ftcl_GetAliasObj uintptr Ftcl_GetAssocData uintptr Ftcl_GetChannel uintptr Ftcl_GetChannelBufferSize uintptr Ftcl_GetChannelHandle uintptr Ftcl_GetChannelInstanceData uintptr Ftcl_GetChannelMode uintptr Ftcl_GetChannelName uintptr Ftcl_GetChannelOption uintptr Ftcl_GetChannelType uintptr Ftcl_GetCommandInfo uintptr Ftcl_GetCommandName uintptr Ftcl_GetErrno uintptr Ftcl_GetHostName uintptr Ftcl_GetInterpPath uintptr Ftcl_GetMaster uintptr Ftcl_GetNameOfExecutable uintptr Ftcl_GetObjResult uintptr Freserved167 uintptr Ftcl_GetPathType uintptr Ftcl_Gets uintptr Ftcl_GetsObj uintptr Ftcl_GetServiceMode uintptr Ftcl_GetSlave uintptr Ftcl_GetStdChannel uintptr Ftcl_GetStringResult uintptr Ftcl_GetVar uintptr Ftcl_GetVar2 uintptr Ftcl_GlobalEval uintptr Ftcl_GlobalEvalObj uintptr Ftcl_HideCommand uintptr Ftcl_Init uintptr Ftcl_InitHashTable uintptr Ftcl_InputBlocked uintptr Ftcl_InputBuffered uintptr Ftcl_InterpDeleted uintptr Ftcl_IsSafe uintptr Ftcl_JoinPath uintptr Ftcl_LinkVar uintptr Freserved188 uintptr Ftcl_MakeFileChannel uintptr Ftcl_MakeSafe uintptr Ftcl_MakeTcpClientChannel uintptr Ftcl_Merge uintptr Ftcl_NextHashEntry uintptr Ftcl_NotifyChannel uintptr Ftcl_ObjGetVar2 uintptr Ftcl_ObjSetVar2 uintptr Ftcl_OpenCommandChannel uintptr Ftcl_OpenFileChannel uintptr Ftcl_OpenTcpClient uintptr Ftcl_OpenTcpServer uintptr Ftcl_Preserve uintptr Ftcl_PrintDouble uintptr Ftcl_PutEnv uintptr Ftcl_PosixError uintptr Ftcl_QueueEvent uintptr Ftcl_Read uintptr Ftcl_ReapDetachedProcs uintptr Ftcl_RecordAndEval uintptr Ftcl_RecordAndEvalObj uintptr Ftcl_RegisterChannel uintptr Ftcl_RegisterObjType uintptr Ftcl_RegExpCompile uintptr Ftcl_RegExpExec uintptr Ftcl_RegExpMatch uintptr Ftcl_RegExpRange uintptr Ftcl_Release uintptr Ftcl_ResetResult uintptr Ftcl_ScanElement uintptr Ftcl_ScanCountedElement uintptr Ftcl_SeekOld uintptr Ftcl_ServiceAll uintptr Ftcl_ServiceEvent uintptr Ftcl_SetAssocData uintptr Ftcl_SetChannelBufferSize uintptr Ftcl_SetChannelOption uintptr Ftcl_SetCommandInfo uintptr Ftcl_SetErrno uintptr Ftcl_SetErrorCode uintptr Ftcl_SetMaxBlockTime uintptr Ftcl_SetPanicProc uintptr Ftcl_SetRecursionLimit uintptr Ftcl_SetResult uintptr Ftcl_SetServiceMode uintptr Ftcl_SetObjErrorCode uintptr Ftcl_SetObjResult uintptr Ftcl_SetStdChannel uintptr Ftcl_SetVar uintptr Ftcl_SetVar2 uintptr Ftcl_SignalId uintptr Ftcl_SignalMsg uintptr Ftcl_SourceRCFile uintptr Ftcl_SplitList uintptr Ftcl_SplitPath uintptr Ftcl_StaticPackage uintptr Ftcl_StringMatch uintptr Ftcl_TellOld uintptr Ftcl_TraceVar uintptr Ftcl_TraceVar2 uintptr Ftcl_TranslateFileName uintptr Ftcl_Ungets uintptr Ftcl_UnlinkVar uintptr Ftcl_UnregisterChannel uintptr Ftcl_UnsetVar uintptr Ftcl_UnsetVar2 uintptr Ftcl_UntraceVar uintptr Ftcl_UntraceVar2 uintptr Ftcl_UpdateLinkedVar uintptr Ftcl_UpVar uintptr Ftcl_UpVar2 uintptr Ftcl_VarEval uintptr Ftcl_VarTraceInfo uintptr Ftcl_VarTraceInfo2 uintptr Ftcl_Write uintptr Ftcl_WrongNumArgs uintptr Ftcl_DumpActiveMemory uintptr Ftcl_ValidateAllMemory uintptr Ftcl_AppendResultVA uintptr Ftcl_AppendStringsToObjVA uintptr Ftcl_HashStats uintptr Ftcl_ParseVar uintptr Ftcl_PkgPresent uintptr Ftcl_PkgPresentEx uintptr Ftcl_PkgProvide uintptr Ftcl_PkgRequire uintptr Ftcl_SetErrorCodeVA uintptr Ftcl_VarEvalVA uintptr Ftcl_WaitPid uintptr Ftcl_PanicVA uintptr Ftcl_GetVersion uintptr Ftcl_InitMemory uintptr Ftcl_StackChannel uintptr Ftcl_UnstackChannel uintptr Ftcl_GetStackedChannel uintptr Ftcl_SetMainLoop uintptr Freserved285 uintptr Ftcl_AppendObjToObj uintptr Ftcl_CreateEncoding uintptr Ftcl_CreateThreadExitHandler uintptr Ftcl_DeleteThreadExitHandler uintptr Ftcl_DiscardResult uintptr Ftcl_EvalEx uintptr Ftcl_EvalObjv uintptr Ftcl_EvalObjEx uintptr Ftcl_ExitThread uintptr Ftcl_ExternalToUtf uintptr Ftcl_ExternalToUtfDString uintptr Ftcl_FinalizeThread uintptr Ftcl_FinalizeNotifier uintptr Ftcl_FreeEncoding uintptr Ftcl_GetCurrentThread uintptr Ftcl_GetEncoding uintptr Ftcl_GetEncodingName uintptr Ftcl_GetEncodingNames uintptr Ftcl_GetIndexFromObjStruct uintptr Ftcl_GetThreadData uintptr Ftcl_GetVar2Ex uintptr Ftcl_InitNotifier uintptr Ftcl_MutexLock uintptr Ftcl_MutexUnlock uintptr Ftcl_ConditionNotify uintptr Ftcl_ConditionWait uintptr Ftcl_NumUtfChars uintptr Ftcl_ReadChars uintptr Ftcl_RestoreResult uintptr Ftcl_SaveResult uintptr Ftcl_SetSystemEncoding uintptr Ftcl_SetVar2Ex uintptr Ftcl_ThreadAlert uintptr Ftcl_ThreadQueueEvent uintptr Ftcl_UniCharAtIndex uintptr Ftcl_UniCharToLower uintptr Ftcl_UniCharToTitle uintptr Ftcl_UniCharToUpper uintptr Ftcl_UniCharToUtf uintptr Ftcl_UtfAtIndex uintptr Ftcl_UtfCharComplete uintptr Ftcl_UtfBackslash uintptr Ftcl_UtfFindFirst uintptr Ftcl_UtfFindLast uintptr Ftcl_UtfNext uintptr Ftcl_UtfPrev uintptr Ftcl_UtfToExternal uintptr Ftcl_UtfToExternalDString uintptr Ftcl_UtfToLower uintptr Ftcl_UtfToTitle uintptr Ftcl_UtfToUniChar uintptr Ftcl_UtfToUpper uintptr Ftcl_WriteChars uintptr Ftcl_WriteObj uintptr Ftcl_GetString uintptr Ftcl_GetDefaultEncodingDir uintptr Ftcl_SetDefaultEncodingDir uintptr Ftcl_AlertNotifier uintptr Ftcl_ServiceModeHook uintptr Ftcl_UniCharIsAlnum uintptr Ftcl_UniCharIsAlpha uintptr Ftcl_UniCharIsDigit uintptr Ftcl_UniCharIsLower uintptr Ftcl_UniCharIsSpace uintptr Ftcl_UniCharIsUpper uintptr Ftcl_UniCharIsWordChar uintptr Ftcl_UniCharLen uintptr Ftcl_UniCharNcmp uintptr Ftcl_UniCharToUtfDString uintptr Ftcl_UtfToUniCharDString uintptr Ftcl_GetRegExpFromObj uintptr Ftcl_EvalTokens uintptr Ftcl_FreeParse uintptr Ftcl_LogCommandInfo uintptr Ftcl_ParseBraces uintptr Ftcl_ParseCommand uintptr Ftcl_ParseExpr uintptr Ftcl_ParseQuotedString uintptr Ftcl_ParseVarName uintptr Ftcl_GetCwd uintptr Ftcl_Chdir uintptr Ftcl_Access uintptr Ftcl_Stat uintptr Ftcl_UtfNcmp uintptr Ftcl_UtfNcasecmp uintptr Ftcl_StringCaseMatch uintptr Ftcl_UniCharIsControl uintptr Ftcl_UniCharIsGraph uintptr Ftcl_UniCharIsPrint uintptr Ftcl_UniCharIsPunct uintptr Ftcl_RegExpExecObj uintptr Ftcl_RegExpGetInfo uintptr Ftcl_NewUnicodeObj uintptr Ftcl_SetUnicodeObj uintptr Ftcl_GetCharLength uintptr Ftcl_GetUniChar uintptr Ftcl_GetUnicode uintptr Ftcl_GetRange uintptr Ftcl_AppendUnicodeToObj uintptr Ftcl_RegExpMatchObj uintptr Ftcl_SetNotifier uintptr Ftcl_GetAllocMutex uintptr Ftcl_GetChannelNames uintptr Ftcl_GetChannelNamesEx uintptr Ftcl_ProcObjCmd uintptr Ftcl_ConditionFinalize uintptr Ftcl_MutexFinalize uintptr Ftcl_CreateThread uintptr Ftcl_ReadRaw uintptr Ftcl_WriteRaw uintptr Ftcl_GetTopChannel uintptr Ftcl_ChannelBuffered uintptr Ftcl_ChannelName uintptr Ftcl_ChannelVersion uintptr Ftcl_ChannelBlockModeProc uintptr Ftcl_ChannelCloseProc uintptr Ftcl_ChannelClose2Proc uintptr Ftcl_ChannelInputProc uintptr Ftcl_ChannelOutputProc uintptr Ftcl_ChannelSeekProc uintptr Ftcl_ChannelSetOptionProc uintptr Ftcl_ChannelGetOptionProc uintptr Ftcl_ChannelWatchProc uintptr Ftcl_ChannelGetHandleProc uintptr Ftcl_ChannelFlushProc uintptr Ftcl_ChannelHandlerProc uintptr Ftcl_JoinThread uintptr Ftcl_IsChannelShared uintptr Ftcl_IsChannelRegistered uintptr Ftcl_CutChannel uintptr Ftcl_SpliceChannel uintptr Ftcl_ClearChannelHandlers uintptr Ftcl_IsChannelExisting uintptr Ftcl_UniCharNcasecmp uintptr Ftcl_UniCharCaseMatch uintptr Ftcl_FindHashEntry uintptr Ftcl_CreateHashEntry uintptr Ftcl_InitCustomHashTable uintptr Ftcl_InitObjHashTable uintptr Ftcl_CommandTraceInfo uintptr Ftcl_TraceCommand uintptr Ftcl_UntraceCommand uintptr Ftcl_AttemptAlloc uintptr Ftcl_AttemptDbCkalloc uintptr Ftcl_AttemptRealloc uintptr Ftcl_AttemptDbCkrealloc uintptr Ftcl_AttemptSetObjLength uintptr Ftcl_GetChannelThread uintptr Ftcl_GetUnicodeFromObj uintptr Ftcl_GetMathFuncInfo uintptr Ftcl_ListMathFuncs uintptr Ftcl_SubstObj uintptr Ftcl_DetachChannel uintptr Ftcl_IsStandardChannel uintptr Ftcl_FSCopyFile uintptr Ftcl_FSCopyDirectory uintptr Ftcl_FSCreateDirectory uintptr Ftcl_FSDeleteFile uintptr Ftcl_FSLoadFile uintptr Ftcl_FSMatchInDirectory uintptr Ftcl_FSLink uintptr Ftcl_FSRemoveDirectory uintptr Ftcl_FSRenameFile uintptr Ftcl_FSLstat uintptr Ftcl_FSUtime uintptr Ftcl_FSFileAttrsGet uintptr Ftcl_FSFileAttrsSet uintptr Ftcl_FSFileAttrStrings uintptr Ftcl_FSStat uintptr Ftcl_FSAccess uintptr Ftcl_FSOpenFileChannel uintptr Ftcl_FSGetCwd uintptr Ftcl_FSChdir uintptr Ftcl_FSConvertToPathType uintptr Ftcl_FSJoinPath uintptr Ftcl_FSSplitPath uintptr Ftcl_FSEqualPaths uintptr Ftcl_FSGetNormalizedPath uintptr Ftcl_FSJoinToPath uintptr Ftcl_FSGetInternalRep uintptr Ftcl_FSGetTranslatedPath uintptr Ftcl_FSEvalFile uintptr Ftcl_FSNewNativePath uintptr Ftcl_FSGetNativePath uintptr Ftcl_FSFileSystemInfo uintptr Ftcl_FSPathSeparator uintptr Ftcl_FSListVolumes uintptr Ftcl_FSRegister uintptr Ftcl_FSUnregister uintptr Ftcl_FSData uintptr Ftcl_FSGetTranslatedStringPath uintptr Ftcl_FSGetFileSystemForPath uintptr Ftcl_FSGetPathType uintptr Ftcl_OutputBuffered uintptr Ftcl_FSMountsChanged uintptr Ftcl_EvalTokensStandard uintptr Ftcl_GetTime uintptr Ftcl_CreateObjTrace uintptr Ftcl_GetCommandInfoFromToken uintptr Ftcl_SetCommandInfoFromToken uintptr Ftcl_DbNewWideIntObj uintptr Ftcl_GetWideIntFromObj uintptr Ftcl_NewWideIntObj uintptr Ftcl_SetWideIntObj uintptr Ftcl_AllocStatBuf uintptr Ftcl_Seek uintptr Ftcl_Tell uintptr Ftcl_ChannelWideSeekProc uintptr Ftcl_DictObjPut uintptr Ftcl_DictObjGet uintptr Ftcl_DictObjRemove uintptr Ftcl_DictObjSize uintptr Ftcl_DictObjFirst uintptr Ftcl_DictObjNext uintptr Ftcl_DictObjDone uintptr Ftcl_DictObjPutKeyList uintptr Ftcl_DictObjRemoveKeyList uintptr Ftcl_NewDictObj uintptr Ftcl_DbNewDictObj uintptr Ftcl_RegisterConfig uintptr Ftcl_CreateNamespace uintptr Ftcl_DeleteNamespace uintptr Ftcl_AppendExportList uintptr Ftcl_Export uintptr Ftcl_Import uintptr Ftcl_ForgetImport uintptr Ftcl_GetCurrentNamespace uintptr Ftcl_GetGlobalNamespace uintptr Ftcl_FindNamespace uintptr Ftcl_FindCommand uintptr Ftcl_GetCommandFromObj uintptr Ftcl_GetCommandFullName uintptr Ftcl_FSEvalFileEx uintptr Ftcl_SetExitProc uintptr Ftcl_LimitAddHandler uintptr Ftcl_LimitRemoveHandler uintptr Ftcl_LimitReady uintptr Ftcl_LimitCheck uintptr Ftcl_LimitExceeded uintptr Ftcl_LimitSetCommands uintptr Ftcl_LimitSetTime uintptr Ftcl_LimitSetGranularity uintptr Ftcl_LimitTypeEnabled uintptr Ftcl_LimitTypeExceeded uintptr Ftcl_LimitTypeSet uintptr Ftcl_LimitTypeReset uintptr Ftcl_LimitGetCommands uintptr Ftcl_LimitGetTime uintptr Ftcl_LimitGetGranularity uintptr Ftcl_SaveInterpState uintptr Ftcl_RestoreInterpState uintptr Ftcl_DiscardInterpState uintptr Ftcl_SetReturnOptions uintptr Ftcl_GetReturnOptions uintptr Ftcl_IsEnsemble uintptr Ftcl_CreateEnsemble uintptr Ftcl_FindEnsemble uintptr Ftcl_SetEnsembleSubcommandList uintptr Ftcl_SetEnsembleMappingDict uintptr Ftcl_SetEnsembleUnknownHandler uintptr Ftcl_SetEnsembleFlags uintptr Ftcl_GetEnsembleSubcommandList uintptr Ftcl_GetEnsembleMappingDict uintptr Ftcl_GetEnsembleUnknownHandler uintptr Ftcl_GetEnsembleFlags uintptr Ftcl_GetEnsembleNamespace uintptr Ftcl_SetTimeProc uintptr Ftcl_QueryTimeProc uintptr Ftcl_ChannelThreadActionProc uintptr Ftcl_NewBignumObj uintptr Ftcl_DbNewBignumObj uintptr Ftcl_SetBignumObj uintptr Ftcl_GetBignumFromObj uintptr Ftcl_TakeBignumFromObj uintptr Ftcl_TruncateChannel uintptr Ftcl_ChannelTruncateProc uintptr Ftcl_SetChannelErrorInterp uintptr Ftcl_GetChannelErrorInterp uintptr Ftcl_SetChannelError uintptr Ftcl_GetChannelError uintptr Ftcl_InitBignumFromDouble uintptr Ftcl_GetNamespaceUnknownHandler uintptr Ftcl_SetNamespaceUnknownHandler uintptr Ftcl_GetEncodingFromObj uintptr Ftcl_GetEncodingSearchPath uintptr Ftcl_SetEncodingSearchPath uintptr Ftcl_GetEncodingNameFromEnvironment uintptr Ftcl_PkgRequireProc uintptr Ftcl_AppendObjToErrorInfo uintptr Ftcl_AppendLimitedToObj uintptr Ftcl_Format uintptr Ftcl_AppendFormatToObj uintptr Ftcl_ObjPrintf uintptr Ftcl_AppendPrintfToObj uintptr Ftcl_CancelEval uintptr Ftcl_Canceled uintptr Ftcl_CreatePipe uintptr Ftcl_NRCreateCommand uintptr Ftcl_NREvalObj uintptr Ftcl_NREvalObjv uintptr Ftcl_NRCmdSwap uintptr Ftcl_NRAddCallback uintptr Ftcl_NRCallObjProc uintptr Ftcl_GetFSDeviceFromStat uintptr Ftcl_GetFSInodeFromStat uintptr Ftcl_GetModeFromStat uintptr Ftcl_GetLinkCountFromStat uintptr Ftcl_GetUserIdFromStat uintptr Ftcl_GetGroupIdFromStat uintptr Ftcl_GetDeviceTypeFromStat uintptr Ftcl_GetAccessTimeFromStat uintptr Ftcl_GetModificationTimeFromStat uintptr Ftcl_GetChangeTimeFromStat uintptr Ftcl_GetSizeFromStat uintptr Ftcl_GetBlocksFromStat uintptr Ftcl_GetBlockSizeFromStat uintptr Ftcl_SetEnsembleParameterList uintptr Ftcl_GetEnsembleParameterList uintptr Ftcl_ParseArgsObjv uintptr Ftcl_GetErrorLine uintptr Ftcl_SetErrorLine uintptr Ftcl_TransferResult uintptr Ftcl_InterpActive uintptr Ftcl_BackgroundException uintptr Ftcl_ZlibDeflate uintptr Ftcl_ZlibInflate uintptr Ftcl_ZlibCRC32 uintptr Ftcl_ZlibAdler32 uintptr Ftcl_ZlibStreamInit uintptr Ftcl_ZlibStreamGetCommandName uintptr Ftcl_ZlibStreamEof uintptr Ftcl_ZlibStreamChecksum uintptr Ftcl_ZlibStreamPut uintptr Ftcl_ZlibStreamGet uintptr Ftcl_ZlibStreamClose uintptr Ftcl_ZlibStreamReset uintptr Ftcl_SetStartupScript uintptr Ftcl_GetStartupScript uintptr Ftcl_CloseEx uintptr Ftcl_NRExprObj uintptr Ftcl_NRSubstObj uintptr Ftcl_LoadFile uintptr Ftcl_FindSymbol uintptr Ftcl_FSUnloadFile uintptr Ftcl_ZlibStreamSetCompressionDictionary uintptr } /* tclDecls.h:2485:3 */ // !END!: Do not edit above this line. // Deprecated Tcl procedures: // Include platform specific public function declarations that are accessible // via the stubs table. Make all TclOO symbols MODULE_SCOPE (which only // has effect on building it as a shared library). See ticket [3010352]. // tclPlatDecls.h -- // // Declarations of platform specific Tcl APIs. // // Copyright (c) 1998-1999 by Scriptics Corporation. // All rights reserved. // WARNING: This file is automatically generated by the tools/genStubs.tcl // script. Any modifications to the function declarations below should be made // in the generic/tcl.decls script. // TCHAR is needed here for win32, so if it is not defined yet do it here. // This way, we don't need to include just for one define. type TCHAR = int8 /* tclPlatDecls.h:38:15 */ type TclPlatStubs = TclPlatStubs1 /* tclPlatDecls.h:86:3 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // Extract an sqlite3* db handle from the object passed as the second // argument. If successful, set *pDb to point to the db handle and return // TCL_OK. Otherwise, return TCL_ERROR. func dbHandleFromObj(tls *libc.TLS, interp uintptr, pObj uintptr, pDb uintptr) int32 { /* test_expert.c:36:12: */ bp := tls.Alloc(96) defer tls.Free(96) // var info Tcl_CmdInfo at bp+32, 64 if 0 == tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, pObj), bp+32 /* &info */) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+1791 /* "no such handle: " */, tcl.XTcl_GetString(tls, pObj), 0)) return TCL_ERROR } *(*uintptr)(unsafe.Pointer(pDb)) = *(*uintptr)(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 32 /* &info */)).FobjClientData)) return TCL_OK } // Tclcmd: $expert sql SQL // $expert analyze // $expert count // $expert report STMT EREPORT // $expert destroy func testExpertCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_expert.c:55:26: */ bp := tls.Alloc(212) defer tls.Free(212) var pExpert uintptr = clientData *(*[6]Subcmd)(unsafe.Pointer(bp /* aSub */)) = [6]Subcmd{ {FzSub: ts + 1808 /* "sql" */, FnArg: 1, FzMsg: ts + 1812 /* "TABLE" */}, // 0 {FzSub: ts + 1818 /* "analyze" */, FzMsg: ts + 489 /* "" */}, // 1 {FzSub: ts + 1826 /* "count" */, FzMsg: ts + 489 /* "" */}, // 2 {FzSub: ts + 1832 /* "report" */, FnArg: 2, FzMsg: ts + 1839 /* "STMT EREPORT" */}, // 3 {FzSub: ts + 1852 /* "destroy" */, FzMsg: ts + 489 /* "" */}, // 4 {}, } // var iSub int32 at bp+144, 4 var rc int32 = TCL_OK *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = uintptr(0) if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1860 /* "SUBCOMMAND ..." */) return TCL_ERROR } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(Subcmd{})), ts+1875 /* "sub-command" */, 0, bp+144 /* &iSub */) if rc != TCL_OK { return rc } if objc != (2 + (*Subcmd)(unsafe.Pointer(bp /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 144 /* iSub */)))*24)).FnArg) { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, (*Subcmd)(unsafe.Pointer(bp /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 144 /* iSub */)))*24)).FzMsg) return TCL_ERROR } switch *(*int32)(unsafe.Pointer(bp + 144 /* iSub */)) { case 0: { // sql var zArg uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = sqlite3_expert_sql(tls, pExpert, zArg, bp+152 /* &zErr */) break } case 1: { // analyze rc = sqlite3_expert_analyze(tls, pExpert, bp+152 /* &zErr */) break } case 2: { // count var n int32 = sqlite3_expert_count(tls, pExpert) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, n)) break } case 3: { // report *(*[5]uintptr)(unsafe.Pointer(bp + 168 /* aEnum */)) = [5]uintptr{ ts + 1808 /* "sql" */, ts + 1887 /* "indexes" */, ts + 1895 /* "plan" */, ts + 1900 /* "candidates" */, uintptr(0), } // var iEnum int32 at bp+208, 4 // var iStmt int32 at bp+160, 4 var zReport uintptr if (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+160 /* &iStmt */) != 0) || (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+168 /* &aEnum[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+1832 /* "report" */, 0, bp+208 /* &iEnum */) != 0) { return TCL_ERROR } zReport = sqlite3_expert_report(tls, pExpert, *(*int32)(unsafe.Pointer(bp + 160 /* iStmt */)), (1 + *(*int32)(unsafe.Pointer(bp + 208 /* iEnum */)))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, zReport, -1)) break } default: // destroy tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))) break } if rc != TCL_OK { if *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) != 0 { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)), -1)) } else { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) } } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */))) return rc } type Subcmd = struct { FzSub uintptr FnArg int32 _ [4]byte FzMsg uintptr } /* test_expert.c:62:3 */ func testExpertDel(tls *libc.TLS, clientData uintptr) { /* test_expert.c:150:27: */ var pExpert uintptr = clientData sqlite3_expert_destroy(tls, pExpert) } // sqlite3_expert_new DB func test_sqlite3_expert_new(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_expert.c:158:26: */ bp := tls.Alloc(80) defer tls.Free(80) // var db uintptr at bp+64, 8 var zCmd uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 72 /* zErr */)) = uintptr(0) var pExpert uintptr var rc int32 = TCL_OK if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if dbHandleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+64 /* &db */) != 0 { return TCL_ERROR } zCmd = sqlite3.Xsqlite3_mprintf(tls, ts+1914 /* "sqlite3expert%d" */, libc.VaList(bp, libc.PreIncInt32(&iCmd, 1))) if zCmd == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+16, ts+1930 /* "out of memory" */, uintptr(0))) return TCL_ERROR } pExpert = sqlite3_expert_new(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), bp+72 /* &zErr */) if pExpert == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErr */)), uintptr(0))) rc = TCL_ERROR } else { var p uintptr = pExpert tcl.XTcl_CreateObjCommand(tls, interp, zCmd, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{testExpertCmd})), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testExpertDel}))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, zCmd, -1)) } sqlite3.Xsqlite3_free(tls, zCmd) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErr */))) return rc } var iCmd int32 = 0 /* test_expert.c:164:14 */ func TestExpert_Init(tls *libc.TLS, interp uintptr) int32 { /* test_expert.c:202:5: */ bp := tls.Alloc(16) defer tls.Free(16) *(*[1]struct { FzCmd uintptr FxProc uintptr })(unsafe.Pointer(bp /* aCmd */)) = [1]struct { FzCmd uintptr FxProc uintptr }{ {FzCmd: ts + 1944 /* "sqlite3_expert_n..." */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_sqlite3_expert_new}))}, } var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof([1]struct { FzCmd uintptr FxProc uintptr }{})) / uint64(unsafe.Sizeof(struct { FzCmd uintptr FxProc uintptr }{}))); i++ { var p uintptr = (bp /* &aCmd */ + uintptr(i)*16) tcl.XTcl_CreateObjCommand(tls, interp, (*struct { FzCmd uintptr FxProc uintptr })(unsafe.Pointer(p)).FzCmd, (*struct { FzCmd uintptr FxProc uintptr })(unsafe.Pointer(p)).FxProc, uintptr(0), uintptr(0)) } return TCL_OK } // 2011 Jan 27 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // // This file is not part of the production FTS code. It is only used for // testing. It contains a virtual table implementation that provides direct // access to the full-text index of an FTS table. // 2009 Nov 12 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // // FTS3/FTS4 require virtual tables // FTS4 is really an extension for FTS3. It is enabled using the // SQLITE_ENABLE_FTS3 macro. But to avoid confusion we also all // the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3. // Static assertion. Requires support in the compiler. // Decode a pointer to an sqlite3 object. func f5tDbPointer(tls *libc.TLS, interp uintptr, pObj uintptr, ppDb uintptr) int32 { /* fts5_tcl.c:52:12: */ bp := tls.Alloc(64) defer tls.Free(64) var p uintptr // var cmdInfo Tcl_CmdInfo at bp, 64 var z uintptr = tcl.XTcl_GetString(tls, pObj) if tcl.XTcl_GetCommandInfo(tls, interp, z, bp /* &cmdInfo */) != 0 { p = (*Tcl_CmdInfo)(unsafe.Pointer(bp /* &cmdInfo */)).FobjClientData *(*uintptr)(unsafe.Pointer(ppDb)) = (*struct{ Fdb uintptr })(unsafe.Pointer(p)).Fdb return TCL_OK } return TCL_ERROR } // End of code that accesses the SqliteDb struct. // func f5tResultToErrorCode(tls *libc.TLS, zRes uintptr) int32 { /* fts5_tcl.c:67:12: */ bp := tls.Alloc(64) defer tls.Free(64) *(*[4]ErrorCode)(unsafe.Pointer(bp /* aErr */)) = [4]ErrorCode{ {Frc: SQLITE_DONE, FzError: ts + 1963 /* "SQLITE_DONE" */}, {Frc: SQLITE_ERROR, FzError: ts + 1975 /* "SQLITE_ERROR" */}, {FzError: ts + 1988 /* "SQLITE_OK" */}, {FzError: ts + 489 /* "" */}, } var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof([4]ErrorCode{})) / uint64(unsafe.Sizeof(ErrorCode{}))); i++ { if 0 == sqlite3.Xsqlite3_stricmp(tls, zRes, (*ErrorCode)(unsafe.Pointer(bp /* &aErr */ +uintptr(i)*16)).FzError) { return (*ErrorCode)(unsafe.Pointer(bp /* &aErr */ + uintptr(i)*16)).Frc } } return SQLITE_ERROR } type ErrorCode = struct { Frc int32 _ [4]byte FzError uintptr } /* fts5_tcl.c:68:3 */ func f5tDbAndApi(tls *libc.TLS, interp uintptr, pObj uintptr, ppDb uintptr, ppApi uintptr) int32 { /* fts5_tcl.c:88:26: */ bp := tls.Alloc(88) defer tls.Free(88) *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)) = uintptr(0) var rc int32 = f5tDbPointer(tls, interp, pObj, bp+64 /* &db */) if rc != TCL_OK { return TCL_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 80 /* pApi */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), ts+1998 /* "SELECT fts5(?1)" */, -1, bp+72 /* &pStmt */, uintptr(0)) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+2014 /* "error: " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))), 0)) return TCL_ERROR } sqlite3.Xsqlite3_bind_pointer(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)), 1, bp+80 /* &pApi */, ts+2022 /* "fts5_api_ptr" */, uintptr(0)) sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) if sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+2014 /* "error: " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))), 0)) return TCL_ERROR } *(*uintptr)(unsafe.Pointer(ppDb)) = *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)) *(*uintptr)(unsafe.Pointer(ppApi)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* pApi */)) } return TCL_OK } type F5tFunction1 = struct { Finterp uintptr FpScript uintptr } /* fts5_tcl.c:122:9 */ type F5tFunction = F5tFunction1 /* fts5_tcl.c:122:28 */ type F5tApi1 = struct { FpApi uintptr FpFts uintptr } /* fts5_tcl.c:128:9 */ type F5tApi = F5tApi1 /* fts5_tcl.c:128:23 */ // An object of this type is used with the xSetAuxdata() and xGetAuxdata() // API test wrappers. The tcl interface allows a single tcl value to be // saved using xSetAuxdata(). Instead of simply storing a pointer to the // tcl object, the code in this file wraps it in an sqlite3_malloc'd // instance of the following struct so that if the destructor is not // correctly invoked it will be reported as an SQLite memory leak. type F5tAuxData1 = struct{ FpObj uintptr } /* fts5_tcl.c:142:9 */ // An object of this type is used with the xSetAuxdata() and xGetAuxdata() // API test wrappers. The tcl interface allows a single tcl value to be // saved using xSetAuxdata(). Instead of simply storing a pointer to the // tcl object, the code in this file wraps it in an sqlite3_malloc'd // instance of the following struct so that if the destructor is not // correctly invoked it will be reported as an SQLite memory leak. type F5tAuxData = F5tAuxData1 /* fts5_tcl.c:142:27 */ func xTokenizeCb(tls *libc.TLS, pCtx uintptr, tflags int32, zToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* fts5_tcl.c:147:12: */ var p uintptr = pCtx var pEval uintptr = tcl.XTcl_DuplicateObj(tls, (*F5tFunction)(unsafe.Pointer(p)).FpScript) var rc int32 (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, zToken, nToken)) tcl.XTcl_ListObjAppendElement(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewIntObj(tls, iStart)) tcl.XTcl_ListObjAppendElement(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewIntObj(tls, iEnd)) rc = tcl.XTcl_EvalObjEx(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if rc == TCL_OK { rc = f5tResultToErrorCode(tls, tcl.XTcl_GetStringResult(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp)) } return rc } func xQueryPhraseCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr) int32 { /* fts5_tcl.c:173:12: */ bp := tls.Alloc(96) defer tls.Free(96) var p uintptr = pCtx var pEval uintptr var rc int32 // var zCmd [64]int8 at bp+16, 64 // var sApi F5tApi at bp+80, 16 (*F5tApi)(unsafe.Pointer(bp + 80 /* &sApi */)).FpApi = pApi (*F5tApi)(unsafe.Pointer(bp + 80 /* &sApi */)).FpFts = pFts libc.Xsprintf(tls, bp+16 /* &zCmd[0] */, ts+2035 /* "f5t_2_%lld" */, libc.VaList(bp, libc.PostIncInt64(&iCmd1, 1))) tcl.XTcl_CreateObjCommand(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, bp+16 /* &zCmd[0] */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{xF5tApi})), bp+80 /* &sApi */, uintptr(0)) pEval = tcl.XTcl_DuplicateObj(tls, (*F5tFunction)(unsafe.Pointer(p)).FpScript) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, bp+16 /* &zCmd[0] */, -1)) rc = tcl.XTcl_EvalObjEx(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_DeleteCommand(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, bp+16 /* &zCmd[0] */) if rc == TCL_OK { rc = f5tResultToErrorCode(tls, tcl.XTcl_GetStringResult(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp)) } return rc } var iCmd1 sqlite3_int64 = int64(0) /* fts5_tcl.c:179:24 */ func xSetAuxdataDestructor(tls *libc.TLS, p uintptr) { /* fts5_tcl.c:205:13: */ var pData uintptr = p for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*F5tAuxData)(unsafe.Pointer(pData)).FpObj if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } sqlite3.Xsqlite3_free(tls, pData) } // api sub-command... // // Description... func xF5tApi(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:216:26: */ bp := tls.Alloc(700) defer tls.Free(700) *(*[19]Sub)(unsafe.Pointer(bp + 48 /* aSub */)) = [19]Sub{ {FzName: ts + 2046 /* "xColumnCount" */, FzMsg: ts + 489 /* "" */}, // 0 {FzName: ts + 2059 /* "xRowCount" */, FzMsg: ts + 489 /* "" */}, // 1 {FzName: ts + 2069 /* "xColumnTotalSize" */, FnArg: 1, FzMsg: ts + 2086 /* "COL" */}, // 2 {FzName: ts + 2090 /* "xTokenize" */, FnArg: 2, FzMsg: ts + 2100 /* "TEXT SCRIPT" */}, // 3 {FzName: ts + 2112 /* "xPhraseCount" */, FzMsg: ts + 489 /* "" */}, // 4 {FzName: ts + 2125 /* "xPhraseSize" */, FnArg: 1, FzMsg: ts + 2137 /* "PHRASE" */}, // 5 {FzName: ts + 2144 /* "xInstCount" */, FzMsg: ts + 489 /* "" */}, // 6 {FzName: ts + 2155 /* "xInst" */, FnArg: 1, FzMsg: ts + 2161 /* "IDX" */}, // 7 {FzName: ts + 2165 /* "xRowid" */, FzMsg: ts + 489 /* "" */}, // 8 {FzName: ts + 2172 /* "xColumnText" */, FnArg: 1, FzMsg: ts + 2086 /* "COL" */}, // 9 {FzName: ts + 2184 /* "xColumnSize" */, FnArg: 1, FzMsg: ts + 2086 /* "COL" */}, // 10 {FzName: ts + 2196 /* "xQueryPhrase" */, FnArg: 2, FzMsg: ts + 2209 /* "PHRASE SCRIPT" */}, // 11 {FzName: ts + 2223 /* "xSetAuxdata" */, FnArg: 1, FzMsg: ts + 2235 /* "VALUE" */}, // 12 {FzName: ts + 2241 /* "xGetAuxdata" */, FnArg: 1, FzMsg: ts + 2253 /* "CLEAR" */}, // 13 {FzName: ts + 2259 /* "xSetAuxdataInt" */, FnArg: 1, FzMsg: ts + 2274 /* "INTEGER" */}, // 14 {FzName: ts + 2282 /* "xGetAuxdataInt" */, FnArg: 1, FzMsg: ts + 2253 /* "CLEAR" */}, // 15 {FzName: ts + 2297 /* "xPhraseForeach" */, FnArg: 4, FzMsg: ts + 2312 /* "IPHRASE COLVAR O..." */}, // 16 {FzName: ts + 2341 /* "xPhraseColumnFor..." */, FnArg: 3, FzMsg: ts + 2362 /* "IPHRASE COLVAR S..." */}, // 17 {}, } var rc int32 *(*int32)(unsafe.Pointer(bp + 504 /* iSub */)) = 0 var p uintptr = clientData if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2384 /* "SUB-COMMAND" */) return TCL_ERROR } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48 /* &aSub[0] */, int32(unsafe.Sizeof(Sub{})), ts+2384 /* "SUB-COMMAND" */, 0, bp+504 /* &iSub */) if rc != TCL_OK { return rc } if (*Sub)(unsafe.Pointer(bp+48 /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 504 /* iSub */)))*24)).FnArg != (objc - 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, (*Sub)(unsafe.Pointer(bp+48 /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 504 /* iSub */)))*24)).FzMsg) return TCL_ERROR } switch *(*int32)(unsafe.Pointer(bp + 504 /* iSub */)) { case 0: { var nCol int32 nCol = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 16 /* &.xColumnCount */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nCol)) } break } case 1: { // var nRow sqlite3_int64 at bp+512, 8 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 24 /* &.xRowCount */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, bp+512 /* &nRow */) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, *(*sqlite3_int64)(unsafe.Pointer(bp + 512 /* nRow */)))) } break } case 2: { // var iCol int32 at bp+520, 4 // var nSize sqlite3_int64 at bp+528, 8 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+520 /* &iCol */) != 0 { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 32 /* &.xColumnTotalSize */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 520 /* iCol */)), bp+528 /* &nSize */) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, *(*sqlite3_int64)(unsafe.Pointer(bp + 528 /* nSize */)))) } break } case 3: { // var nText int32 at bp+536, 4 var zText uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+536 /* &nText */) // var ctx F5tFunction at bp+544, 16 (*F5tFunction)(unsafe.Pointer(bp + 544 /* &ctx */)).Finterp = interp (*F5tFunction)(unsafe.Pointer(bp + 544 /* &ctx */)).FpScript = *(*uintptr)(unsafe.Pointer(objv + 3*8)) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 40 /* &.xTokenize */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, zText, *(*int32)(unsafe.Pointer(bp + 536 /* nText */)), bp+544 /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{xTokenizeCb}))) if rc == SQLITE_OK { tcl.XTcl_ResetResult(tls, interp) } return rc } case 4: { var nPhrase int32 nPhrase = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 48 /* &.xPhraseCount */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nPhrase)) } break } case 5: { // var iPhrase int32 at bp+560, 4 var sz int32 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+560 /* &iPhrase */) != 0 { return TCL_ERROR } sz = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 56 /* &.xPhraseSize */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 560 /* iPhrase */))) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sz)) } break } case 6: { // var nInst int32 at bp+564, 4 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 64 /* &.xInstCount */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, bp+564 /* &nInst */) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 564 /* nInst */)))) } break } case 7: { // var iIdx int32 at bp+568, 4 // var ip int32 at bp+572, 4 // var ic int32 at bp+576, 4 // var io int32 at bp+580, 4 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+568 /* &iIdx */) != 0 { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 72 /* &.xInst */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 568 /* iIdx */)), bp+572 /* &ip */, bp+576 /* &ic */, bp+580 /* &io */) if rc == SQLITE_OK { var pList uintptr = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 572 /* ip */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 576 /* ic */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 580 /* io */)))) tcl.XTcl_SetObjResult(tls, interp, pList) } break } case 8: { var iRowid sqlite3_int64 = (*(*func(*libc.TLS, uintptr) sqlite3_int64)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 80 /* &.xRowid */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, iRowid)) break } case 9: { *(*uintptr)(unsafe.Pointer(bp + 592 /* z */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 600 /* n */)) = 0 // var iCol int32 at bp+584, 4 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+584 /* &iCol */) != 0 { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 88 /* &.xColumnText */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 584 /* iCol */)), bp+592 /* &z */, bp+600 /* &n */) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 592 /* z */)), *(*int32)(unsafe.Pointer(bp + 600 /* n */)))) } break } case 10: { *(*int32)(unsafe.Pointer(bp + 608 /* n */)) = 0 // var iCol int32 at bp+604, 4 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+604 /* &iCol */) != 0 { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 96 /* &.xColumnSize */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 604 /* iCol */)), bp+608 /* &n */) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 608 /* n */)))) } break } case 11: { // var iPhrase int32 at bp+612, 4 // var ctx F5tFunction at bp+616, 16 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+612 /* &iPhrase */) != 0 { return TCL_ERROR } (*F5tFunction)(unsafe.Pointer(bp + 616 /* &ctx */)).Finterp = interp (*F5tFunction)(unsafe.Pointer(bp + 616 /* &ctx */)).FpScript = *(*uintptr)(unsafe.Pointer(objv + 3*8)) rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 104 /* &.xQueryPhrase */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 612 /* iPhrase */)), bp+616 /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{xQueryPhraseCb}))) if rc == SQLITE_OK { tcl.XTcl_ResetResult(tls, interp) } break } case 12: { var pData uintptr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(F5tAuxData{}))) if pData == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+1930 /* "out of memory" */, 0)) return TCL_ERROR } (*F5tAuxData)(unsafe.Pointer(pData)).FpObj = *(*uintptr)(unsafe.Pointer(objv + 2*8)) (*Tcl_Obj)(unsafe.Pointer((*F5tAuxData)(unsafe.Pointer(pData)).FpObj)).FrefCount++ rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 112 /* &.xSetAuxdata */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, pData, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{xSetAuxdataDestructor}))) break } case 13: { var pData uintptr // var bClear int32 at bp+632, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+632 /* &bClear */) != 0 { return TCL_ERROR } pData = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 120 /* &.xGetAuxdata */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 632 /* bClear */))) if pData == uintptr(0) { tcl.XTcl_ResetResult(tls, interp) } else { tcl.XTcl_SetObjResult(tls, interp, (*F5tAuxData)(unsafe.Pointer(pData)).FpObj) if *(*int32)(unsafe.Pointer(bp + 632 /* bClear */)) != 0 { xSetAuxdataDestructor(tls, pData) } } break } // These two - xSetAuxdataInt and xGetAuxdataInt - are similar to the // xSetAuxdata and xGetAuxdata methods implemented above. The difference // is that they may only save an integer value as auxiliary data, and // do not specify a destructor function. case 14: { // var iVal int32 at bp+636, 4 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+636 /* &iVal */) != 0 { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 112 /* &.xSetAuxdata */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, (uintptr(0) + uintptr(*(*int32)(unsafe.Pointer(bp + 636 /* iVal */)))), uintptr(0)) break } case 15: { var iVal int32 // var bClear int32 at bp+640, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+640 /* &bClear */) != 0 { return TCL_ERROR } iVal = (int32((int64((*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 120 /* &.xGetAuxdata */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 640 /* bClear */)))) - int64(uintptr(0))) / 1)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, iVal)) break } case 16: { // var iPhrase int32 at bp+644, 4 // var iCol int32 at bp+664, 4 // var iOff int32 at bp+668, 4 var zColvar uintptr var zOffvar uintptr var pScript uintptr = *(*uintptr)(unsafe.Pointer(objv + 5*8)) // var iter Fts5PhraseIter at bp+648, 16 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+644 /* &iPhrase */) != 0 { return TCL_ERROR } zColvar = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) zOffvar = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 128 /* &.xPhraseFirst */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 644 /* iPhrase */)), bp+648 /* &iter */, bp+664 /* &iCol */, bp+668 /* &iOff */) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } for ; *(*int32)(unsafe.Pointer(bp + 664 /* iCol */)) >= 0; (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 136 /* &.xPhraseNext */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, bp+648 /* &iter */, bp+664 /* &iCol */, bp+668 /* &iOff */) { tcl.XTcl_SetVar2Ex(tls, interp, zColvar, uintptr(0), tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 664 /* iCol */))), 0) tcl.XTcl_SetVar2Ex(tls, interp, zOffvar, uintptr(0), tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 668 /* iOff */))), 0) rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, 0) if rc == TCL_CONTINUE { rc = TCL_OK } if rc != TCL_OK { if rc == TCL_BREAK { rc = TCL_OK } break } } break } case 17: { // var iPhrase int32 at bp+672, 4 // var iCol int32 at bp+696, 4 var zColvar uintptr var pScript uintptr = *(*uintptr)(unsafe.Pointer(objv + 4*8)) // var iter Fts5PhraseIter at bp+680, 16 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+672 /* &iPhrase */) != 0 { return TCL_ERROR } zColvar = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 144 /* &.xPhraseFirstColumn */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, *(*int32)(unsafe.Pointer(bp + 672 /* iPhrase */)), bp+680 /* &iter */, bp+696 /* &iCol */) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_ERROR } for ; *(*int32)(unsafe.Pointer(bp + 696 /* iCol */)) >= 0; (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(((*F5tApi)(unsafe.Pointer(p)).FpApi + 152 /* &.xPhraseNextColumn */))))(tls, (*F5tApi)(unsafe.Pointer(p)).FpFts, bp+680 /* &iter */, bp+696 /* &iCol */) { tcl.XTcl_SetVar2Ex(tls, interp, zColvar, uintptr(0), tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 696 /* iCol */))), 0) rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, 0) if rc == TCL_CONTINUE { rc = TCL_OK } if rc != TCL_OK { if rc == TCL_BREAK { rc = TCL_OK } break } } break } default: break } if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_ERROR } return TCL_OK } type Sub = struct { FzName uintptr FnArg int32 _ [4]byte FzMsg uintptr } /* fts5_tcl.c:222:3 */ func xF5tFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* fts5_tcl.c:515:13: */ bp := tls.Alloc(120) defer tls.Free(120) var p uintptr = (*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer((pApi + 8 /* &.xUserData */))))(tls, pFts) var pEval uintptr // Script to evaluate var i int32 var rc int32 // var zCmd [64]int8 at bp+16, 64 // var sApi F5tApi at bp+80, 16 (*F5tApi)(unsafe.Pointer(bp + 80 /* &sApi */)).FpApi = pApi (*F5tApi)(unsafe.Pointer(bp + 80 /* &sApi */)).FpFts = pFts libc.Xsprintf(tls, bp+16 /* &zCmd[0] */, ts+2396 /* "f5t_%lld" */, libc.VaList(bp, libc.PostIncInt64(&iCmd2, 1))) tcl.XTcl_CreateObjCommand(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, bp+16 /* &zCmd[0] */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{xF5tApi})), bp+80 /* &sApi */, uintptr(0)) pEval = tcl.XTcl_DuplicateObj(tls, (*F5tFunction)(unsafe.Pointer(p)).FpScript) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, bp+16 /* &zCmd[0] */, -1)) for i = 0; i < nVal; i++ { var pObj uintptr = uintptr(0) switch sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) { case SQLITE_TEXT: pObj = tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))), -1) break case SQLITE_BLOB: pObj = tcl.XTcl_NewByteArrayObj(tls, sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))), sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)))) break case SQLITE_INTEGER: pObj = tcl.XTcl_NewWideIntObj(tls, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)))) break case SQLITE_FLOAT: pObj = tcl.XTcl_NewDoubleObj(tls, sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)))) break default: pObj = tcl.XTcl_NewObj(tls) break } tcl.XTcl_ListObjAppendElement(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, pObj) } rc = tcl.XTcl_EvalObjEx(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, pEval, TCL_GLOBAL_ONLY) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_DeleteCommand(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp, bp+16 /* &zCmd[0] */) if rc != TCL_OK { sqlite3.Xsqlite3_result_error(tls, pCtx, tcl.XTcl_GetStringResult(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp), -1) } else { var pVar uintptr = tcl.XTcl_GetObjResult(tls, (*F5tFunction)(unsafe.Pointer(p)).Finterp) // var n int32 at bp+96, 4 var zType uintptr = func() uintptr { if (*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr != 0 { return (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr)).Fname } return ts + 489 /* "" */ }() var c int8 = *(*int8)(unsafe.Pointer(zType)) if ((int32(c) == 'b') && (libc.Xstrcmp(tls, zType, ts+2405 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0)) { // Only return a BLOB type if the Tcl variable is a bytearray and // has no string representation. var data uintptr = tcl.XTcl_GetByteArrayFromObj(tls, pVar, bp+96 /* &n */) sqlite3.Xsqlite3_result_blob(tls, pCtx, data, *(*int32)(unsafe.Pointer(bp + 96 /* n */)), libc.UintptrFromInt32(-1)) } else if (int32(c) == 'b') && (libc.Xstrcmp(tls, zType, ts+2415 /* "boolean" */) == 0) { tcl.XTcl_GetIntFromObj(tls, uintptr(0), pVar, bp+96 /* &n */) sqlite3.Xsqlite3_result_int(tls, pCtx, *(*int32)(unsafe.Pointer(bp + 96 /* n */))) } else if (int32(c) == 'd') && (libc.Xstrcmp(tls, zType, ts+2423 /* "double" */) == 0) { // var r float64 at bp+104, 8 tcl.XTcl_GetDoubleFromObj(tls, uintptr(0), pVar, bp+104 /* &r */) sqlite3.Xsqlite3_result_double(tls, pCtx, *(*float64)(unsafe.Pointer(bp + 104 /* r */))) } else if ((int32(c) == 'w') && (libc.Xstrcmp(tls, zType, ts+2430 /* "wideInt" */) == 0)) || ((int32(c) == 'i') && (libc.Xstrcmp(tls, zType, ts+2438 /* "int" */) == 0)) { // var v Tcl_WideInt at bp+112, 8 tcl.XTcl_GetWideIntFromObj(tls, uintptr(0), pVar, bp+112 /* &v */) sqlite3.Xsqlite3_result_int64(tls, pCtx, *(*Tcl_WideInt)(unsafe.Pointer(bp + 112 /* v */))) } else { var data uintptr = tcl.XTcl_GetStringFromObj(tls, pVar, bp+96 /* &n */) sqlite3.Xsqlite3_result_text(tls, pCtx, data, *(*int32)(unsafe.Pointer(bp + 96 /* n */)), libc.UintptrFromInt32(-1)) } } } var iCmd2 sqlite3_int64 = int64(0) /* fts5_tcl.c:527:24 */ func xF5tDestroy(tls *libc.TLS, pCtx uintptr) { /* fts5_tcl.c:598:13: */ var p uintptr = pCtx for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*F5tFunction)(unsafe.Pointer(p)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_Free(tls, p) } // sqlite3_fts5_create_function DB NAME SCRIPT // // Description... func f5tCreateFunction(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:609:26: */ bp := tls.Alloc(48) defer tls.Free(48) var zName uintptr var pScript uintptr *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40 /* pApi */)) = uintptr(0) var pCtx uintptr = uintptr(0) var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2442 /* "DB NAME SCRIPT" */) return TCL_ERROR } if f5tDbAndApi(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+32 /* &db */, bp+40 /* &pApi */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) pScript = *(*uintptr)(unsafe.Pointer(objv + 3*8)) pCtx = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(F5tFunction{}))) (*F5tFunction)(unsafe.Pointer(pCtx)).Finterp = interp (*F5tFunction)(unsafe.Pointer(pCtx)).FpScript = pScript (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, fts5_extension_function, uintptr) int32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 40 /* pApi */)) + 24 /* &.xCreateFunction */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pApi */)), zName, pCtx, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{xF5tFunction})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{xF5tDestroy}))) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+2014 /* "error: " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))), 0)) return TCL_ERROR } return TCL_OK } type F5tTokenizeCtx1 = struct { FpRet uintptr FbSubst int32 _ [4]byte FzInput uintptr } /* fts5_tcl.c:646:9 */ type F5tTokenizeCtx = F5tTokenizeCtx1 /* fts5_tcl.c:646:31 */ func xTokenizeCb2(tls *libc.TLS, pCtx uintptr, tflags int32, zToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* fts5_tcl.c:653:12: */ var p uintptr = pCtx if (*F5tTokenizeCtx)(unsafe.Pointer(p)).FbSubst != 0 { tcl.XTcl_ListObjAppendElement(tls, uintptr(0), (*F5tTokenizeCtx)(unsafe.Pointer(p)).FpRet, tcl.XTcl_NewStringObj(tls, zToken, nToken)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), (*F5tTokenizeCtx)(unsafe.Pointer(p)).FpRet, tcl.XTcl_NewStringObj(tls, ((*F5tTokenizeCtx)(unsafe.Pointer(p)).FzInput+uintptr(iStart)), (iEnd-iStart))) } else { tcl.XTcl_ListObjAppendElement(tls, uintptr(0), (*F5tTokenizeCtx)(unsafe.Pointer(p)).FpRet, tcl.XTcl_NewStringObj(tls, zToken, nToken)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), (*F5tTokenizeCtx)(unsafe.Pointer(p)).FpRet, tcl.XTcl_NewIntObj(tls, iStart)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), (*F5tTokenizeCtx)(unsafe.Pointer(p)).FpRet, tcl.XTcl_NewIntObj(tls, iEnd)) } return SQLITE_OK } // sqlite3_fts5_tokenize DB TOKENIZER TEXT // // Description... func f5tTokenize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:679:26: */ bp := tls.Alloc(240) defer tls.Free(240) var zText uintptr // var nText int32 at bp+168, 4 *(*uintptr)(unsafe.Pointer(bp + 136 /* db */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 144 /* pApi */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 208 /* pTok */)) = uintptr(0) // var tokenizer fts5_tokenizer at bp+184, 24 var pRet uintptr = uintptr(0) // var pUserdata uintptr at bp+176, 8 var rc int32 // var nArg int32 at bp+152, 4 // var azArg uintptr at bp+160, 8 // var ctx F5tTokenizeCtx at bp+216, 24 if (objc != 4) && (objc != 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2457 /* "?-subst? DB NAME..." */) return TCL_ERROR } if objc == 5 { var zOpt uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if libc.Xstrcmp(tls, ts+2479 /* "-subst" */, zOpt) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+2486 /* "unrecognized opt..." */, zOpt, 0)) return TCL_ERROR } } if f5tDbAndApi(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8)), bp+136 /* &db */, bp+144 /* &pApi */) != 0 { return TCL_ERROR } if tcl.XTcl_SplitList(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8))), bp+152 /* &nArg */, bp+160 /* &azArg */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 152 /* nArg */)) == 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+2508 /* "no such tokenize..." */, 0)) tcl.XTcl_Free(tls, *(*uintptr)(unsafe.Pointer(bp + 160 /* azArg */))) return TCL_ERROR } zText = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)), bp+168 /* &nText */) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 144 /* pApi */)) + 16 /* &.xFindTokenizer */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 144 /* pApi */)), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 160 /* azArg */)))), bp+176 /* &pUserdata */, bp+184 /* &tokenizer */) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, ts+2508 /* "no such tokenize..." */, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 160 /* azArg */)))), 0)) return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((bp + 184 /* &tokenizer */ /* &.xCreate */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pUserdata */)), (*(*uintptr)(unsafe.Pointer(bp + 160 /* azArg */)) + 1*8), (*(*int32)(unsafe.Pointer(bp + 152 /* nArg */)) - 1), bp+208 /* &pTok */) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+88, ts+2528 /* "error in tokeniz..." */, 0)) return TCL_ERROR } pRet = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pRet)).FrefCount++ (*F5tTokenizeCtx)(unsafe.Pointer(bp + 216 /* &ctx */)).FbSubst = (libc.Bool32(objc == 5)) (*F5tTokenizeCtx)(unsafe.Pointer(bp + 216 /* &ctx */)).FpRet = pRet (*F5tTokenizeCtx)(unsafe.Pointer(bp + 216 /* &ctx */)).FzInput = zText rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer((bp + 184 /* &tokenizer */ + 16 /* &.xTokenize */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 208 /* pTok */)), bp+216 /* &ctx */, FTS5_TOKENIZE_DOCUMENT, zText, *(*int32)(unsafe.Pointer(bp + 168 /* nText */)), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{xTokenizeCb2}))) (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((bp + 184 /* &tokenizer */ + 8 /* &.xDelete */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 208 /* pTok */))) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+112, ts+2557 /* "error in tokeniz..." */, 0)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pRet if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return TCL_ERROR } tcl.XTcl_Free(tls, *(*uintptr)(unsafe.Pointer(bp + 160 /* azArg */))) tcl.XTcl_SetObjResult(tls, interp, pRet) for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pRet if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return TCL_OK } // ************************************************************************ // // Start of tokenizer wrapper. type F5tTokenizerContext1 = struct { FpCtx uintptr FxToken uintptr } /* fts5_tcl.c:759:9 */ // ************************************************************************ // // Start of tokenizer wrapper. type F5tTokenizerContext = F5tTokenizerContext1 /* fts5_tcl.c:759:36 */ type F5tTokenizerModule1 = struct { Finterp uintptr FpScript uintptr FpContext uintptr } /* fts5_tcl.c:761:9 */ type F5tTokenizerModule = F5tTokenizerModule1 /* fts5_tcl.c:761:35 */ type F5tTokenizerInstance1 = struct { Finterp uintptr FpScript uintptr FpContext uintptr } /* fts5_tcl.c:762:9 */ type F5tTokenizerInstance = F5tTokenizerInstance1 /* fts5_tcl.c:762:37 */ func f5tTokenizerCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* fts5_tcl.c:781:12: */ var pMod uintptr = pCtx var pEval uintptr var rc int32 = TCL_OK var i int32 pEval = tcl.XTcl_DuplicateObj(tls, (*F5tTokenizerModule)(unsafe.Pointer(pMod)).FpScript) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ for i = 0; (rc == TCL_OK) && (i < nArg); i++ { var pObj uintptr = tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), -1) rc = tcl.XTcl_ListObjAppendElement(tls, (*F5tTokenizerModule)(unsafe.Pointer(pMod)).Finterp, pEval, pObj) } if rc == TCL_OK { rc = tcl.XTcl_EvalObjEx(tls, (*F5tTokenizerModule)(unsafe.Pointer(pMod)).Finterp, pEval, TCL_GLOBAL_ONLY) } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if rc == TCL_OK { var pInst uintptr pInst = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(F5tTokenizerInstance{}))) libc.Xmemset(tls, pInst, 0, uint64(unsafe.Sizeof(F5tTokenizerInstance{}))) (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).Finterp = (*F5tTokenizerModule)(unsafe.Pointer(pMod)).Finterp (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpScript = tcl.XTcl_GetObjResult(tls, (*F5tTokenizerModule)(unsafe.Pointer(pMod)).Finterp) (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext = (*F5tTokenizerModule)(unsafe.Pointer(pMod)).FpContext (*Tcl_Obj)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpScript)).FrefCount++ *(*uintptr)(unsafe.Pointer(ppOut)) = pInst } return rc } func f5tTokenizerDelete(tls *libc.TLS, p uintptr) { /* fts5_tcl.c:819:13: */ var pInst uintptr = p for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_Free(tls, pInst) } func f5tTokenizerTokenize(tls *libc.TLS, p uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* fts5_tcl.c:825:12: */ var pInst uintptr = p var pOldCtx uintptr var xOldToken uintptr var pEval uintptr var rc int32 var zFlags uintptr pOldCtx = (*F5tTokenizerContext)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext)).FpCtx xOldToken = (*F5tTokenizerContext)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext)).FxToken (*F5tTokenizerContext)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext)).FpCtx = pCtx (*F5tTokenizerContext)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext)).FxToken = xToken pEval = tcl.XTcl_DuplicateObj(tls, (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpScript) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ switch flags { case FTS5_TOKENIZE_DOCUMENT: zFlags = ts + 2588 /* "document" */ break case FTS5_TOKENIZE_AUX: zFlags = ts + 2597 /* "aux" */ break case FTS5_TOKENIZE_QUERY: zFlags = ts + 2601 /* "query" */ break case (FTS5_TOKENIZE_PREFIX | FTS5_TOKENIZE_QUERY): zFlags = ts + 2607 /* "prefixquery" */ break default: zFlags = ts + 2619 /* "invalid" */ break } tcl.XTcl_ListObjAppendElement(tls, (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, zFlags, -1)) tcl.XTcl_ListObjAppendElement(tls, (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, pText, nText)) rc = tcl.XTcl_EvalObjEx(tls, (*F5tTokenizerInstance)(unsafe.Pointer(pInst)).Finterp, pEval, TCL_GLOBAL_ONLY) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*F5tTokenizerContext)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext)).FpCtx = pOldCtx (*F5tTokenizerContext)(unsafe.Pointer((*F5tTokenizerInstance)(unsafe.Pointer(pInst)).FpContext)).FxToken = xOldToken return rc } // sqlite3_fts5_token ?-colocated? TEXT START END func f5tTokenizerReturn(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:885:26: */ bp := tls.Alloc(40) defer tls.Free(40) var p uintptr // var iStart int32 at bp+32, 4 // var iEnd int32 at bp+36, 4 // var nToken int32 at bp+28, 4 var tflags int32 var zToken uintptr var rc int32 // var nArg int32 at bp+24, 4 var zArg uintptr p = clientData tflags = 0 if !(objc == 5) { goto __1 } zArg = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &nArg */) if !(((*(*int32)(unsafe.Pointer(bp + 24 /* nArg */)) <= 10) && (*(*int32)(unsafe.Pointer(bp + 24 /* nArg */)) >= 2)) && (libc.Xmemcmp(tls, ts+2627 /* "-colocated" */, zArg, uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nArg */)))) == 0)) { goto __3 } tflags = tflags | (FTS5_TOKEN_COLOCATED) goto __4 __3: goto usage __4: ; goto __2 __1: if !(objc != 4) { goto __5 } goto usage __5: ; __2: ; zToken = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8)), bp+28 /* &nToken */) if !((tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8)), bp+32 /* &iStart */) != 0) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)), bp+36 /* &iEnd */) != 0)) { goto __6 } return TCL_ERROR __6: ; if !((*F5tTokenizerContext)(unsafe.Pointer(p)).FxToken == uintptr(0)) { goto __7 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+2638 /* "sqlite3_fts5_tok..." */, 0)) return TCL_ERROR __7: ; rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32)(unsafe.Pointer((p + 8 /* &.xToken */))))(tls, (*F5tTokenizerContext)(unsafe.Pointer(p)).FpCtx, tflags, zToken, *(*int32)(unsafe.Pointer(bp + 28 /* nToken */)), *(*int32)(unsafe.Pointer(bp + 32 /* iStart */)), *(*int32)(unsafe.Pointer(bp + 36 /* iEnd */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR usage: tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2696 /* "?-colocated? TEX..." */) return TCL_ERROR } func f5tDelTokenizer(tls *libc.TLS, pCtx uintptr) { /* fts5_tcl.c:934:13: */ var pMod uintptr = pCtx for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*F5tTokenizerModule)(unsafe.Pointer(pMod)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_Free(tls, pMod) } // sqlite3_fts5_create_tokenizer DB NAME SCRIPT // // Register a tokenizer named NAME implemented by script SCRIPT. When // a tokenizer instance is created (fts5_tokenizer.xCreate), any tokenizer // arguments are appended to SCRIPT and the result executed. // // The value returned by (SCRIPT + args) is itself a tcl script. This // script - call it SCRIPT2 - is executed to tokenize text using the // tokenizer instance "returned" by SCRIPT. Specifically, to tokenize // text SCRIPT2 is invoked with a single argument appended to it - the // text to tokenize. // // SCRIPT2 should invoke the [sqlite3_fts5_token] command once for each // token within the tokenized text. func f5tCreateTokenizer(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:956:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pContext uintptr = clientData // var db uintptr at bp+24, 8 // var pApi uintptr at bp+32, 8 var zName uintptr var pScript uintptr // var t fts5_tokenizer at bp+40, 24 var pMod uintptr var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2442 /* "DB NAME SCRIPT" */) return TCL_ERROR } if f5tDbAndApi(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &db */, bp+32 /* &pApi */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) pScript = *(*uintptr)(unsafe.Pointer(objv + 3*8)) (*fts5_tokenizer)(unsafe.Pointer(bp + 40 /* &t */)).FxCreate = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{f5tTokenizerCreate})) (*fts5_tokenizer)(unsafe.Pointer(bp + 40 /* &t */)).FxTokenize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{f5tTokenizerTokenize})) (*fts5_tokenizer)(unsafe.Pointer(bp + 40 /* &t */)).FxDelete = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{f5tTokenizerDelete})) pMod = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(F5tTokenizerModule{}))) (*F5tTokenizerModule)(unsafe.Pointer(pMod)).Finterp = interp (*F5tTokenizerModule)(unsafe.Pointer(pMod)).FpScript = pScript (*F5tTokenizerModule)(unsafe.Pointer(pMod)).FpContext = pContext (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 32 /* pApi */)) + 8 /* &.xCreateTokenizer */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pApi */)), zName, pMod, bp+40 /* &t */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{f5tDelTokenizer}))) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+2724 /* "error in fts5_ap..." */, 0)) return TCL_ERROR } return TCL_OK } func xF5tFree(tls *libc.TLS, clientData ClientData) { /* fts5_tcl.c:999:27: */ tcl.XTcl_Free(tls, clientData) } // sqlite3_fts5_may_be_corrupt BOOLEAN // // Set or clear the global "may-be-corrupt" flag. Return the old value. func f5tMayBeCorrupt(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:1008:26: */ bp := tls.Alloc(4) defer tls.Free(4) var bOld int32 = sqlite3.Xsqlite3_fts5_may_be_corrupt if (objc != 2) && (objc != 1) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2761 /* "?BOOLEAN?" */) return TCL_ERROR } if objc == 2 { // var bNew int32 at bp, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &bNew */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_fts5_may_be_corrupt = *(*int32)(unsafe.Pointer(bp /* bNew */)) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, bOld)) return TCL_OK } func f5t_fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* fts5_tcl.c:1031:21: */ var i int32 var h uint32 = uint32(13) for i = (n - 1); i >= 0; i-- { h = (((h << 3) ^ h) ^ uint32(*(*int8)(unsafe.Pointer(p + uintptr(i))))) } return (h % uint32(nSlot)) } func f5tTokenHash(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:1040:26: */ bp := tls.Alloc(8) defer tls.Free(8) var z uintptr // var n int32 at bp+4, 4 var iVal uint32 // var nSlot int32 at bp, 4 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2771 /* "NSLOT TOKEN" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &nSlot */) != 0 { return TCL_ERROR } z = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4 /* &n */) iVal = f5t_fts5HashKey(tls, *(*int32)(unsafe.Pointer(bp /* nSlot */)), z, *(*int32)(unsafe.Pointer(bp + 4 /* n */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, int32(iVal))) return TCL_OK } func f5tRegisterMatchinfo(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:1065:26: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 *(*uintptr)(unsafe.Pointer(bp /* db */)) = uintptr(0) if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if f5tDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3Fts5TestRegisterMatchinfo(tls, *(*uintptr)(unsafe.Pointer(bp /* db */))) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_ERROR } return TCL_OK } func f5tRegisterTok(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* fts5_tcl.c:1090:26: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 *(*uintptr)(unsafe.Pointer(bp /* db */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pApi */)) = uintptr(0) if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if f5tDbAndApi(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &db */, bp+8 /* &pApi */) != 0 { return TCL_ERROR } rc = sqlite3Fts5TestRegisterTok(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* pApi */))) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_ERROR } return TCL_OK } // Entry point. func Fts5tcl_Init(tls *libc.TLS, interp uintptr) int32 { /* fts5_tcl.c:1119:5: */ var i int32 var pContext uintptr pContext = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(F5tTokenizerContext{}))) libc.Xmemset(tls, pContext, 0, uint64(unsafe.Sizeof(F5tTokenizerContext{}))) for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FbTokenizeCtx int32 _ [4]byte }{}))); i++ { var p uintptr = (uintptr(unsafe.Pointer(&aCmd)) + uintptr(i)*24) var pCtx uintptr = uintptr(0) if (*struct { FzName uintptr FxProc uintptr FbTokenizeCtx int32 _ [4]byte })(unsafe.Pointer(p)).FbTokenizeCtx != 0 { pCtx = pContext } tcl.XTcl_CreateObjCommand(tls, interp, (*struct { FzName uintptr FxProc uintptr FbTokenizeCtx int32 _ [4]byte })(unsafe.Pointer(p)).FzName, (*struct { FzName uintptr FxProc uintptr FbTokenizeCtx int32 _ [4]byte })(unsafe.Pointer(p)).FxProc, pCtx, func() uintptr { if i != 0 { return uintptr(0) } return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{xF5tFree})) }()) } return TCL_OK } var aCmd = [8]struct { FzName uintptr FxProc uintptr FbTokenizeCtx int32 _ [4]byte }{ {FzName: ts + 2783 /* "sqlite3_fts5_cre..." */, FxProc: 0, FbTokenizeCtx: 1}, {FzName: ts + 2813 /* "sqlite3_fts5_tok..." */, FxProc: 0, FbTokenizeCtx: 1}, {FzName: ts + 2832 /* "sqlite3_fts5_tok..." */, FxProc: 0}, {FzName: ts + 2854 /* "sqlite3_fts5_cre..." */, FxProc: 0}, {FzName: ts + 2883 /* "sqlite3_fts5_may..." */, FxProc: 0}, {FzName: ts + 2911 /* "sqlite3_fts5_tok..." */, FxProc: 0}, {FzName: ts + 2935 /* "sqlite3_fts5_reg..." */, FxProc: 0}, {FzName: ts + 2967 /* "sqlite3_fts5_reg..." */, FxProc: 0}, } /* fts5_tcl.c:1124:5 */ type Fts5MatchinfoCtx1 = struct { FnCol int32 FnPhrase int32 FzArg uintptr FnRet int32 _ [4]byte FaRet uintptr } /* fts5_test_mi.c:50:9 */ type Fts5MatchinfoCtx = Fts5MatchinfoCtx1 /* fts5_test_mi.c:50:33 */ type u32 = uint32 /* fts5_test_mi.c:53:22 */ // Return a pointer to the fts5_api pointer for database connection db. // If an error occurs, return NULL and leave an error in the database // handle (accessible using sqlite3_errcode()/errmsg()). func fts5_api_from_db(tls *libc.TLS, db uintptr, ppApi uintptr) int32 { /* fts5_test_mi.c:71:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) var rc int32 *(*uintptr)(unsafe.Pointer(ppApi)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare(tls, db, ts+1998 /* "SELECT fts5(?1)" */, -1, bp /* &pStmt */, uintptr(0)) if rc == SQLITE_OK { sqlite3.Xsqlite3_bind_pointer(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 1, ppApi, ts+2022 /* "fts5_api_ptr" */, uintptr(0)) sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) } return rc } // Argument f should be a flag accepted by matchinfo() (a valid character // in the string passed as the second argument). If it is not, -1 is // returned. Otherwise, if f is a valid matchinfo flag, the value returned // is the number of 32-bit integers added to the output array if the // table has nCol columns and the query nPhrase phrases. func fts5MatchinfoFlagsize(tls *libc.TLS, nCol int32, nPhrase int32, f int8) int32 { /* fts5_test_mi.c:94:12: */ var ret int32 = -1 switch int32(f) { case 'p': ret = 1 break case 'c': ret = 1 break case 'x': ret = ((3 * nCol) * nPhrase) break case 'y': ret = (nCol * nPhrase) break case 'b': ret = (((nCol + 31) / 32) * nPhrase) break case 'n': ret = 1 break case 'a': ret = nCol break case 'l': ret = nCol break case 's': ret = nCol break } return ret } func fts5MatchinfoIter(tls *libc.TLS, pApi uintptr, pFts uintptr, p uintptr, x uintptr) int32 { /* fts5_test_mi.c:110:12: */ var i int32 var n int32 = 0 var rc int32 = SQLITE_OK var f int8 for i = 0; libc.AssignInt8(&f, *(*int8)(unsafe.Pointer((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FzArg + uintptr(i)))) != 0; i++ { rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int8, uintptr) int32)(unsafe.Pointer(&x)))(tls, pApi, pFts, p, f, ((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FaRet + uintptr(n)*4)) if rc != SQLITE_OK { break } n = n + (fts5MatchinfoFlagsize(tls, (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol, (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase, f)) } return rc } func fts5MatchinfoXCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* fts5_test_mi.c:128:12: */ bp := tls.Alloc(24) defer tls.Free(24) // var iter Fts5PhraseIter at bp, 16 // var iCol int32 at bp+16, 4 // var iOff int32 at bp+20, 4 var aOut uintptr = pUserData var iPrev int32 = -1 for (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 128 /* &.xPhraseFirst */))))(tls, pFts, 0, bp /* &iter */, bp+16 /* &iCol */, bp+20 /* &iOff */); *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) >= 0; (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer((pApi + 136 /* &.xPhraseNext */))))(tls, pFts, bp /* &iter */, bp+16 /* &iCol */, bp+20 /* &iOff */) { *(*u32)(unsafe.Pointer(aOut + uintptr(((*(*int32)(unsafe.Pointer(bp + 16 /* iCol */))*3)+1))*4))++ if *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) != iPrev { *(*u32)(unsafe.Pointer(aOut + uintptr(((*(*int32)(unsafe.Pointer(bp + 16 /* iCol */))*3)+2))*4))++ } iPrev = *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) } return SQLITE_OK } func fts5MatchinfoGlobalCb(tls *libc.TLS, pApi uintptr, pFts uintptr, p uintptr, f int8, aOut uintptr) int32 { /* fts5_test_mi.c:150:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 = SQLITE_OK switch int32(f) { case 'p': *(*u32)(unsafe.Pointer(aOut)) = u32((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase) break case 'c': *(*u32)(unsafe.Pointer(aOut)) = u32((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol) break case 'x': { var i int32 for i = 0; (i < (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase) && (rc == SQLITE_OK); i++ { var pPtr uintptr = (aOut + uintptr(((i*(*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol)*3))*4) rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 104 /* &.xQueryPhrase */))))(tls, pFts, i, pPtr, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{fts5MatchinfoXCb}))) } break } case 'n': { // var nRow sqlite3_int64 at bp, 8 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 24 /* &.xRowCount */))))(tls, pFts, bp /* &nRow */) *(*u32)(unsafe.Pointer(aOut)) = u32(*(*sqlite3_int64)(unsafe.Pointer(bp /* nRow */))) break } case 'a': { *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* nRow */)) = int64(0) rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 24 /* &.xRowCount */))))(tls, pFts, bp+8 /* &nRow */) if *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* nRow */)) == int64(0) { libc.Xmemset(tls, aOut, 0, (uint64(unsafe.Sizeof(u32(0))) * uint64((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol))) } else { var i int32 for i = 0; (rc == SQLITE_OK) && (i < (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol); i++ { // var nToken sqlite3_int64 at bp+16, 8 rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pApi + 32 /* &.xColumnTotalSize */))))(tls, pFts, i, bp+16 /* &nToken */) if rc == SQLITE_OK { *(*u32)(unsafe.Pointer(aOut + uintptr(i)*4)) = (u32(((int64(2) * *(*sqlite3_int64)(unsafe.Pointer(bp + 16 /* nToken */))) + *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* nRow */))) / (int64(2) * *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* nRow */))))) } } } break } } return rc } func fts5MatchinfoLocalCb(tls *libc.TLS, pApi uintptr, pFts uintptr, p uintptr, f int8, aOut uintptr) int32 { /* fts5_test_mi.c:205:12: */ bp := tls.Alloc(80) defer tls.Free(80) var i int32 var rc int32 = SQLITE_OK switch int32(f) { case 'b': { var iPhrase int32 var nInt int32 = ((((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol + 31) / 32) * (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase) for i = 0; i < nInt; i++ { *(*u32)(unsafe.Pointer(aOut + uintptr(i)*4)) = u32(0) } for iPhrase = 0; iPhrase < (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase; iPhrase++ { // var iter Fts5PhraseIter at bp, 16 // var iCol int32 at bp+16, 4 for (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 144 /* &.xPhraseFirstColumn */))))(tls, pFts, iPhrase, bp /* &iter */, bp+16 /* &iCol */); *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) >= 0; (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pApi + 152 /* &.xPhraseNextColumn */))))(tls, pFts, bp /* &iter */, bp+16 /* &iCol */) { *(*u32)(unsafe.Pointer(aOut + uintptr(((iPhrase*(((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol+31)/32))+(*(*int32)(unsafe.Pointer(bp + 16 /* iCol */))/32)))*4)) |= (u32(u32(1)) << (*(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) % 32)) } } break } case 'x': fallthrough case 'y': { var nMul int32 = func() int32 { if int32(f) == 'x' { return 3 } return 1 }() var iPhrase int32 for i = 0; i < ((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol * (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase); i++ { *(*u32)(unsafe.Pointer(aOut + uintptr((i*nMul))*4)) = u32(0) } for iPhrase = 0; iPhrase < (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase; iPhrase++ { // var iter Fts5PhraseIter at bp+24, 16 // var iOff int32 at bp+44, 4 // var iCol int32 at bp+40, 4 for (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 128 /* &.xPhraseFirst */))))(tls, pFts, iPhrase, bp+24 /* &iter */, bp+40 /* &iCol */, bp+44 /* &iOff */); *(*int32)(unsafe.Pointer(bp + 44 /* iOff */)) >= 0; (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer((pApi + 136 /* &.xPhraseNext */))))(tls, pFts, bp+24 /* &iter */, bp+40 /* &iCol */, bp+44 /* &iOff */) { *(*u32)(unsafe.Pointer(aOut + uintptr((nMul*(*(*int32)(unsafe.Pointer(bp + 40 /* iCol */))+(iPhrase*(*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol))))*4))++ } } break } case 'l': { for i = 0; (rc == SQLITE_OK) && (i < (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol); i++ { // var nToken int32 at bp+48, 4 rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pApi + 96 /* &.xColumnSize */))))(tls, pFts, i, bp+48 /* &nToken */) *(*u32)(unsafe.Pointer(aOut + uintptr(i)*4)) = u32(*(*int32)(unsafe.Pointer(bp + 48 /* nToken */))) } break } case 's': { // var nInst int32 at bp+52, 4 libc.Xmemset(tls, aOut, 0, (uint64(unsafe.Sizeof(u32(0))) * uint64((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol))) rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 64 /* &.xInstCount */))))(tls, pFts, bp+52 /* &nInst */) for i = 0; (rc == SQLITE_OK) && (i < *(*int32)(unsafe.Pointer(bp + 52 /* nInst */))); i++ { // var iPhrase int32 at bp+56, 4 // var iOff int32 at bp+64, 4 *(*int32)(unsafe.Pointer(bp + 60 /* iCol */)) = 0 var iNextPhrase int32 var iNextOff int32 var nSeq u32 = u32(1) var j int32 rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 72 /* &.xInst */))))(tls, pFts, i, bp+56 /* &iPhrase */, bp+60 /* &iCol */, bp+64 /* &iOff */) iNextPhrase = (*(*int32)(unsafe.Pointer(bp + 56 /* iPhrase */)) + 1) iNextOff = (*(*int32)(unsafe.Pointer(bp + 64 /* iOff */)) + (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pApi + 56 /* &.xPhraseSize */))))(tls, pFts, 0)) for j = (i + 1); (rc == SQLITE_OK) && (j < *(*int32)(unsafe.Pointer(bp + 52 /* nInst */))); j++ { // var ip int32 at bp+68, 4 // var ic int32 at bp+72, 4 // var io int32 at bp+76, 4 rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 72 /* &.xInst */))))(tls, pFts, j, bp+68 /* &ip */, bp+72 /* &ic */, bp+76 /* &io */) if (*(*int32)(unsafe.Pointer(bp + 72 /* ic */)) != *(*int32)(unsafe.Pointer(bp + 60 /* iCol */))) || (*(*int32)(unsafe.Pointer(bp + 76 /* io */)) > iNextOff) { break } if (*(*int32)(unsafe.Pointer(bp + 68 /* ip */)) == iNextPhrase) && (*(*int32)(unsafe.Pointer(bp + 76 /* io */)) == iNextOff) { nSeq++ iNextPhrase = (*(*int32)(unsafe.Pointer(bp + 68 /* ip */)) + 1) iNextOff = (*(*int32)(unsafe.Pointer(bp + 76 /* io */)) + (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pApi + 56 /* &.xPhraseSize */))))(tls, pFts, *(*int32)(unsafe.Pointer(bp + 68 /* ip */)))) } } if nSeq > *(*u32)(unsafe.Pointer(aOut + uintptr(*(*int32)(unsafe.Pointer(bp + 60 /* iCol */)))*4)) { *(*u32)(unsafe.Pointer(aOut + uintptr(*(*int32)(unsafe.Pointer(bp + 60 /* iCol */)))*4)) = nSeq } } break } } return rc } func fts5MatchinfoNew(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, zArg uintptr) uintptr { /* fts5_test_mi.c:301:25: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr var nCol int32 var nPhrase int32 var i int32 var nInt int32 var nByte sqlite3_int64 var rc int32 nCol = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pApi + 16 /* &.xColumnCount */))))(tls, pFts) nPhrase = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pApi + 48 /* &.xPhraseCount */))))(tls, pFts) nInt = 0 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { var n int32 = fts5MatchinfoFlagsize(tls, nCol, nPhrase, *(*int8)(unsafe.Pointer(zArg + uintptr(i)))) if n < 0 { var zErr uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+3002 /* "unrecognized mat..." */, libc.VaList(bp, int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))))) sqlite3.Xsqlite3_result_error(tls, pCtx, zErr, -1) sqlite3.Xsqlite3_free(tls, zErr) return uintptr(0) } nInt = nInt + (n) } nByte = (sqlite3_int64((uint64(unsafe.Sizeof(Fts5MatchinfoCtx{})) + // The struct itself (uint64(unsafe.Sizeof(u32(0))) * uint64(nInt))) + // The p->aRet[] array (uint64(i + 1)))) // The p->zArg string p = sqlite3.Xsqlite3_malloc64(tls, uint64(nByte)) if p == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) return uintptr(0) } libc.Xmemset(tls, p, 0, uint64(nByte)) (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnCol = nCol (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnPhrase = nPhrase (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FaRet = (p + 1*32) (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnRet = nInt (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FzArg = ((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FaRet + uintptr(nInt)*4) libc.Xmemcpy(tls, (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FzArg, zArg, uint64(i)) rc = fts5MatchinfoIter(tls, pApi, pFts, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int8, uintptr) int32 }{fts5MatchinfoGlobalCb}))) if rc != SQLITE_OK { sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) sqlite3.Xsqlite3_free(tls, p) p = uintptr(0) } return p } func fts5MatchinfoFunc(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* fts5_test_mi.c:357:13: */ var zArg uintptr var p uintptr var rc int32 = SQLITE_OK if nVal > 0 { zArg = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))) } else { zArg = ts + 3034 /* "pcx" */ } p = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((pApi + 120 /* &.xGetAuxdata */))))(tls, pFts, 0) if (p == uintptr(0)) || (sqlite3.Xsqlite3_stricmp(tls, zArg, (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FzArg) != 0) { p = fts5MatchinfoNew(tls, pApi, pFts, pCtx, zArg) if p == uintptr(0) { rc = SQLITE_NOMEM } else { rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 112 /* &.xSetAuxdata */))))(tls, pFts, p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } if rc == SQLITE_OK { rc = fts5MatchinfoIter(tls, pApi, pFts, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int8, uintptr) int32 }{fts5MatchinfoLocalCb}))) } if rc != SQLITE_OK { sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) } else { // No errors has occured, so return a copy of the array of integers. var nByte int32 = (int32(uint64((*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FnRet) * uint64(unsafe.Sizeof(u32(0))))) sqlite3.Xsqlite3_result_blob(tls, pCtx, (*Fts5MatchinfoCtx)(unsafe.Pointer(p)).FaRet, nByte, libc.UintptrFromInt32(-1)) } } func sqlite3Fts5TestRegisterMatchinfo(tls *libc.TLS, db uintptr) int32 { /* fts5_test_mi.c:396:5: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // Return code // var pApi uintptr at bp, 8 // FTS5 API functions // Extract the FTS5 API pointer from the database handle. The // fts5_api_from_db() function above is copied verbatim from the // FTS5 documentation. Refer there for details. rc = fts5_api_from_db(tls, db, bp /* &pApi */) if rc != SQLITE_OK { return rc } /* If fts5_api_from_db() returns NULL, then either FTS5 is not registered ** with this database handle, or an error (OOM perhaps?) has occurred. ** ** Also check that the fts5_api object is version 2 or newer. */ if (*(*uintptr)(unsafe.Pointer(bp /* pApi */)) == uintptr(0)) || ((*fts5_api)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pApi */)))).FiVersion < 2) { return SQLITE_ERROR } // Register the implementation of matchinfo() rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, fts5_extension_function, uintptr) int32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp /* pApi */)) + 24 /* &.xCreateFunction */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* pApi */)), ts+3038 /* "matchinfo" */, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5MatchinfoFunc})), uintptr(0)) return rc } // Static assertion. Requires support in the compiler. type Fts5tokTable1 = struct { Fbase sqlite3_vtab Ftok fts5_tokenizer FpTok uintptr } /* fts5_test_tok.c:47:9 */ // Static assertion. Requires support in the compiler. type Fts5tokTable = Fts5tokTable1 /* fts5_test_tok.c:47:29 */ type Fts5tokCursor1 = struct { Fbase sqlite3_vtab_cursor FiRowid int32 _ [4]byte FzInput uintptr FnRow int32 _ [4]byte FaRow uintptr } /* fts5_test_tok.c:48:9 */ type Fts5tokCursor = Fts5tokCursor1 /* fts5_test_tok.c:48:30 */ type Fts5tokRow1 = struct { FzToken uintptr FiStart int32 FiEnd int32 FiPos int32 _ [4]byte } /* fts5_test_tok.c:48:9 */ type Fts5tokRow = Fts5tokRow1 /* fts5_test_tok.c:49:27 */ func fts5tokDequote(tls *libc.TLS, z uintptr) { /* fts5_test_tok.c:81:13: */ var q int8 = *(*int8)(unsafe.Pointer(z)) if (((int32(q) == '[') || (int32(q) == '\'')) || (int32(q) == '"')) || (int32(q) == '`') { var iIn int32 = 1 var iOut int32 = 0 if int32(q) == '[' { q = int8(']') } for *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { if int32(*(*int8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) { if int32(*(*int8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(q) { // Character iIn was the close quote. iIn++ break } else { // Character iIn and iIn+1 form an escaped quote character. Skip // the input cursor past both and copy a single quote character // to the output buffer. iIn = iIn + (2) *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = q } } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1)))) } } *(*int8)(unsafe.Pointer(z + uintptr(iOut))) = int8(0) } } // The second argument, argv[], is an array of pointers to nul-terminated // strings. This function makes a copy of the array and strings into a // single block of memory. It then dequotes any of the strings that appear // to be quoted. // // If successful, output parameter *pazDequote is set to point at the // array of dequoted strings and SQLITE_OK is returned. The caller is // responsible for eventually calling sqlite3_free() to free the array // in this case. Or, if an error occurs, an SQLite error code is returned. // The final value of *pazDequote is undefined in this case. func fts5tokDequoteArray(tls *libc.TLS, argc int32, argv uintptr, pazDequote uintptr) int32 { /* fts5_test_tok.c:123:12: */ var rc int32 = SQLITE_OK // Return code if argc == 0 { *(*uintptr)(unsafe.Pointer(pazDequote)) = uintptr(0) } else { var i int32 var nByte int32 = 0 var azDequote uintptr for i = 0; i < argc; i++ { nByte = nByte + (int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + uint64(1))) } *(*uintptr)(unsafe.Pointer(pazDequote)) = libc.AssignUintptr(&azDequote, sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(uintptr(0)))*uint64(argc))+uint64(nByte)))) if azDequote == uintptr(0) { rc = SQLITE_NOMEM } else { var pSpace uintptr = (azDequote + uintptr(argc)*8) for i = 0; i < argc; i++ { var n int32 = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) *(*uintptr)(unsafe.Pointer(azDequote + uintptr(i)*8)) = pSpace libc.Xmemcpy(tls, pSpace, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (uint64(n + 1))) fts5tokDequote(tls, pSpace) pSpace += (uintptr(n + 1)) } } } return rc } // Schema of the tokenizer table. // This function does all the work for both the xConnect and xCreate methods. // These tables have no persistent representation of their own, so xConnect // and xCreate are identical operations. // // argv[0]: module name // argv[1]: database name // argv[2]: table name // argv[3]: first argument (tokenizer name) func fts5tokConnectMethod(tls *libc.TLS, db uintptr, pCtx uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* fts5_test_tok.c:173:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pApi uintptr = pCtx var pTab uintptr = uintptr(0) var rc int32 *(*uintptr)(unsafe.Pointer(bp /* azDequote */)) = uintptr(0) var nDequote int32 = 0 rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+3048 /* "CREATE TABLE x(i..." */) if rc == SQLITE_OK { nDequote = (argc - 3) rc = fts5tokDequoteArray(tls, nDequote, (argv + 3*8), bp /* &azDequote */) } if rc == SQLITE_OK { pTab = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Fts5tokTable{}))) if pTab == uintptr(0) { rc = SQLITE_NOMEM } else { libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(Fts5tokTable{}))) } } if rc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 8 /* pTokCtx */)) = uintptr(0) var zModule uintptr = uintptr(0) if nDequote > 0 { zModule = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* azDequote */)))) } rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 16 /* &.xFindTokenizer */))))(tls, pApi, zModule, bp+8 /* &pTokCtx */, (pTab + 24 /* &.tok */)) if rc == SQLITE_OK { var azArg uintptr = func() uintptr { if nDequote > 1 { return (*(*uintptr)(unsafe.Pointer(bp /* azDequote */)) + 1*8) } return uintptr(0) }() var nArg int32 if nDequote > 0 { nArg = (nDequote - 1) } else { nArg = 0 } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pTab + 24 /* &.tok */ /* &.xCreate */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pTokCtx */)), azArg, nArg, (pTab + 48 /* &.pTok */)) } } if rc != SQLITE_OK { sqlite3.Xsqlite3_free(tls, pTab) pTab = uintptr(0) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* azDequote */))) return rc } // This function does the work for both the xDisconnect and xDestroy methods. // These tables have no persistent representation of their own, so xDisconnect // and xDestroy are identical operations. func fts5tokDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* fts5_test_tok.c:235:12: */ var pTab uintptr = pVtab if (*Fts5tokTable)(unsafe.Pointer(pTab)).FpTok != 0 { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pTab + 24 /* &.tok */ + 8 /* &.xDelete */))))(tls, (*Fts5tokTable)(unsafe.Pointer(pTab)).FpTok) } sqlite3.Xsqlite3_free(tls, pTab) return SQLITE_OK } // xBestIndex - Analyze a WHERE and ORDER BY clause. func fts5tokBestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* fts5_test_tok.c:247:12: */ var i int32 for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint; i++ { if (((*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraint+uintptr(i)*12)).Fusable != 0) && ((*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraint+uintptr(i)*12)).FiColumn == 0)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraint+uintptr(i)*12)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { (*sqlite3_index_info)(unsafe.Pointer(pInfo)).FidxNum = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = float64(1) return SQLITE_OK } } (*sqlite3_index_info)(unsafe.Pointer(pInfo)).FidxNum = 0 return SQLITE_OK } // xOpen - Open a cursor. func fts5tokOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* fts5_test_tok.c:275:12: */ var pCsr uintptr pCsr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Fts5tokCursor{}))) if pCsr == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(Fts5tokCursor{}))) *(*uintptr)(unsafe.Pointer(ppCsr)) = pCsr return SQLITE_OK } // Reset the tokenizer cursor passed as the only argument. As if it had // just been returned by fts5tokOpenMethod(). func fts5tokResetCursor(tls *libc.TLS, pCsr uintptr) { /* fts5_test_tok.c:292:13: */ var i int32 for i = 0; i < (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow; i++ { sqlite3.Xsqlite3_free(tls, (*Fts5tokRow)(unsafe.Pointer((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow+uintptr(i)*24)).FzToken) } sqlite3.Xsqlite3_free(tls, (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput) sqlite3.Xsqlite3_free(tls, (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow) (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput = uintptr(0) (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow = uintptr(0) (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow = 0 (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FiRowid = 0 } // xClose - Close a cursor. func fts5tokCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* fts5_test_tok.c:308:12: */ var pCsr uintptr = pCursor fts5tokResetCursor(tls, pCsr) sqlite3.Xsqlite3_free(tls, pCsr) return SQLITE_OK } // xNext - Advance the cursor to the next row, if any. func fts5tokNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* fts5_test_tok.c:318:12: */ var pCsr uintptr = pCursor (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FiRowid++ return SQLITE_OK } func fts5tokCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* fts5_test_tok.c:324:12: */ var pCsr uintptr = pCtx var pRow uintptr if ((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow & ((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow - 1)) == 0 { var nNew int32 if (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow != 0 { nNew = ((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow * 2) } else { nNew = 32 } var aNew uintptr aNew = sqlite3.Xsqlite3_realloc64(tls, (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow, (uint64(nNew) * uint64(unsafe.Sizeof(Fts5tokRow{})))) if aNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, (aNew + uintptr((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow)*24), 0, (uint64(unsafe.Sizeof(Fts5tokRow{})) * (uint64(nNew - (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow)))) (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow = aNew } pRow = ((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow + uintptr((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow)*24) (*Fts5tokRow)(unsafe.Pointer(pRow)).FiStart = iStart (*Fts5tokRow)(unsafe.Pointer(pRow)).FiEnd = iEnd if (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow != 0 { (*Fts5tokRow)(unsafe.Pointer(pRow)).FiPos = ((*Fts5tokRow)(unsafe.Pointer(pRow+libc.UintptrFromInt32(-1)*24)).FiPos + (func() int32 { if (tflags & FTS5_TOKEN_COLOCATED) != 0 { return 0 } return 1 }())) } (*Fts5tokRow)(unsafe.Pointer(pRow)).FzToken = sqlite3.Xsqlite3_malloc(tls, (nToken + 1)) if (*Fts5tokRow)(unsafe.Pointer(pRow)).FzToken == uintptr(0) { return SQLITE_NOMEM } libc.Xmemcpy(tls, (*Fts5tokRow)(unsafe.Pointer(pRow)).FzToken, pToken, uint64(nToken)) *(*int8)(unsafe.Pointer((*Fts5tokRow)(unsafe.Pointer(pRow)).FzToken + uintptr(nToken))) = int8(0) (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow++ return SQLITE_OK } // xFilter - Initialize a cursor to point at the start of its data. func fts5tokFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* fts5_test_tok.c:362:12: */ var rc int32 = SQLITE_ERROR var pCsr uintptr = pCursor var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab fts5tokResetCursor(tls, pCsr) if idxNum == 1 { var zByte uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))) var nByte int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal))) (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput = sqlite3.Xsqlite3_malloc(tls, (nByte + 1)) if (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput == uintptr(0) { rc = SQLITE_NOMEM } else { if nByte > 0 { libc.Xmemcpy(tls, (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput, zByte, uint64(nByte)) } *(*int8)(unsafe.Pointer((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput + uintptr(nByte))) = int8(0) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer((pTab + 24 /* &.tok */ + 16 /* &.xTokenize */))))(tls, (*Fts5tokTable)(unsafe.Pointer(pTab)).FpTok, pCsr, 0, zByte, nByte, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5tokCb}))) } } if rc != SQLITE_OK { return rc } return fts5tokNextMethod(tls, pCursor) } // xEof - Return true if the cursor is at EOF, or false otherwise. func fts5tokEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* fts5_test_tok.c:396:12: */ var pCsr uintptr = pCursor return (libc.Bool32((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FiRowid > (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FnRow)) } // xColumn - Return a column value. func fts5tokColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* fts5_test_tok.c:404:12: */ var pCsr uintptr = pCursor var pRow uintptr = ((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FaRow + uintptr(((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FiRowid-1))*24) // CREATE TABLE x(input, token, start, end, position) switch iCol { case 0: sqlite3.Xsqlite3_result_text(tls, pCtx, (*Fts5tokCursor)(unsafe.Pointer(pCsr)).FzInput, -1, libc.UintptrFromInt32(-1)) break case 1: sqlite3.Xsqlite3_result_text(tls, pCtx, (*Fts5tokRow)(unsafe.Pointer(pRow)).FzToken, -1, libc.UintptrFromInt32(-1)) break case 2: sqlite3.Xsqlite3_result_int(tls, pCtx, (*Fts5tokRow)(unsafe.Pointer(pRow)).FiStart) break case 3: sqlite3.Xsqlite3_result_int(tls, pCtx, (*Fts5tokRow)(unsafe.Pointer(pRow)).FiEnd) break default: sqlite3.Xsqlite3_result_int(tls, pCtx, (*Fts5tokRow)(unsafe.Pointer(pRow)).FiPos) break } return SQLITE_OK } // xRowid - Return the current rowid for the cursor. func fts5tokRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* fts5_test_tok.c:437:12: */ var pCsr uintptr = pCursor *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3_int64((*Fts5tokCursor)(unsafe.Pointer(pCsr)).FiRowid) return SQLITE_OK } // Register the fts5tok module with database connection db. Return SQLITE_OK // if successful or an error code if sqlite3_create_module() fails. func sqlite3Fts5TestRegisterTok(tls *libc.TLS, db uintptr, pApi uintptr) int32 { /* fts5_test_tok.c:450:5: */ var rc int32 // Return code rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3106 /* "fts5tokenize" */, uintptr(unsafe.Pointer(&fts5tok_module)), pApi) return rc } var fts5tok_module = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen FxClose: 0, // xClose FxFilter: 0, // xFilter FxNext: 0, // xNext FxEof: 0, // xEof FxColumn: 0, // xColumn FxRowid: 0, // xShadowName } /* fts5_test_tok.c:451:31 */ // CAPI3REF: Loadable Extension Thunk // // A pointer to the opaque sqlite3_api_routines structure is passed as // the third parameter to entry points of [loadable extensions]. This // structure must be typedefed in order to work around compiler warnings // on some platforms. type sqlite3_api_routines = sqlite3_api_routines1 /* sqlite3.h:1197:37 */ // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". type sqlite3_loadext_entry = uintptr /* sqlite3ext.h:346:13 */ // Static assertion. Requires support in the compiler. // The append mark at the end of the database is: // // Start-Of-SQLite3-NNNNNNNN // 123456789 123456789 12345 // // The NNNNNNNN represents a 64-bit big-endian unsigned integer which is // the offset to page 1, and also the length of the prefix content. // Maximum size of the combined prefix + database + append-mark. This // must be less than 0x40000000 to avoid locking issues on Windows. // Try to align the database to an even multiple of APND_ROUNDUP bytes. // Forward declaration of objects used by this utility type ApndVfs = sqlite3_vfs1 /* appendvfs.c:85:28 */ type ApndFile1 = struct { Fbase sqlite3_file FiPgOne sqlite3_int64 FiMark sqlite3_int64 } /* appendvfs.c:86:9 */ type ApndFile = ApndFile1 /* appendvfs.c:86:25 */ var apnd_vfs = sqlite3_vfs{ FiVersion: 3, // szOsFile (set when registered) FmxPathname: 1024, // pNext FzName: ts + 3119, /* "apndvfs" */ /* pAppData (set when registered) */ FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xCurrentTimeInt64 FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall } /* appendvfs.c:177:20 */ var apnd_io_methods = sqlite3_io_methods{ FiVersion: 3, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch } /* appendvfs.c:202:33 */ // Close an apnd-file. func apndClose(tls *libc.TLS, pFile uintptr) int32 { /* appendvfs.c:227:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 8 /* &.xClose */))))(tls, pFile) } // Read data from an apnd-file. func apndRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* appendvfs.c:235:12: */ var paf uintptr = pFile pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 16 /* &.xRead */))))(tls, pFile, zBuf, iAmt, ((*ApndFile)(unsafe.Pointer(paf)).FiPgOne + iOfst)) } // Add the append-mark onto what should become the end of the file. // If and only if this succeeds, internal ApndFile.iMark is updated. // Parameter iWriteEnd is the appendvfs-relative offset of the new mark. func apndWriteMark(tls *libc.TLS, paf uintptr, pFile uintptr, iWriteEnd sqlite_int64) int32 { /* appendvfs.c:251:12: */ bp := tls.Alloc(25) defer tls.Free(25) var iPgOne sqlite_int64 = (*ApndFile)(unsafe.Pointer(paf)).FiPgOne // var a [25]uint8 at bp, 25 var i int32 = APND_MARK_FOS_SZ var rc int32 libc.Xmemcpy(tls, bp /* &a[0] */, ts+3127 /* "Start-Of-SQLite3..." */, uint64(APND_MARK_PREFIX_SZ)) for libc.PreDecInt32(&i, 1) >= 0 { *(*uint8)(unsafe.Pointer(bp /* &a[0] */ + uintptr((APND_MARK_PREFIX_SZ + i)))) = (uint8(iPgOne & int64(0xff))) iPgOne >>= 8 } iWriteEnd = iWriteEnd + ((*ApndFile)(unsafe.Pointer(paf)).FiPgOne) if SQLITE_OK == (libc.AssignInt32(&rc, (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 24 /* &.xWrite */))))(tls, pFile, bp /* &a[0] */, (APND_MARK_PREFIX_SZ+APND_MARK_FOS_SZ), iWriteEnd))) { (*ApndFile)(unsafe.Pointer(paf)).FiMark = iWriteEnd } return rc } // Write data to an apnd-file. func apndWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* appendvfs.c:277:12: */ var paf uintptr = pFile var iWriteEnd sqlite_int64 = (iOfst + sqlite_int64(iAmt)) if iWriteEnd >= (int64(0x40000000)) { return SQLITE_FULL } pFile = ((pFile) + uintptr(1)*24) // If append-mark is absent or will be overwritten, write it. if ((*ApndFile)(unsafe.Pointer(paf)).FiMark < int64(0)) || (((*ApndFile)(unsafe.Pointer(paf)).FiPgOne + iWriteEnd) > (*ApndFile)(unsafe.Pointer(paf)).FiMark) { var rc int32 = apndWriteMark(tls, paf, pFile, iWriteEnd) if SQLITE_OK != rc { return rc } } return (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 24 /* &.xWrite */))))(tls, pFile, zBuf, iAmt, ((*ApndFile)(unsafe.Pointer(paf)).FiPgOne + iOfst)) } // Truncate an apnd-file. func apndTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* appendvfs.c:298:12: */ var paf uintptr = pFile pFile = ((pFile) + uintptr(1)*24) // The append mark goes out first so truncate failure does not lose it. if SQLITE_OK != apndWriteMark(tls, paf, pFile, size) { return SQLITE_IOERR } // Truncate underlying file just past append mark return (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 32 /* &.xTruncate */))))(tls, pFile, ((*ApndFile)(unsafe.Pointer(paf)).FiMark + (int64(APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ)))) } // Sync an apnd-file. func apndSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* appendvfs.c:310:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 40 /* &.xSync */))))(tls, pFile, flags) } // Return the current file-size of an apnd-file. // If the append mark is not yet there, the file-size is 0. func apndFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* appendvfs.c:319:12: */ var paf uintptr = pFile *(*sqlite_int64)(unsafe.Pointer(pSize)) = func() int64 { if (*ApndFile)(unsafe.Pointer(paf)).FiMark >= int64(0) { return ((*ApndFile)(unsafe.Pointer(paf)).FiMark - (*ApndFile)(unsafe.Pointer(paf)).FiPgOne) } return int64(0) }() return SQLITE_OK } // Lock an apnd-file. func apndLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* appendvfs.c:328:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 56 /* &.xLock */))))(tls, pFile, eLock) } // Unlock an apnd-file. func apndUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* appendvfs.c:336:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 64 /* &.xUnlock */))))(tls, pFile, eLock) } // Check if another file-handle holds a RESERVED lock on an apnd-file. func apndCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* appendvfs.c:344:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, pFile, pResOut) } // File control method. For custom operations on an apnd-file. func apndFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* appendvfs.c:352:12: */ bp := tls.Alloc(24) defer tls.Free(24) var paf uintptr = pFile var rc int32 pFile = ((pFile) + uintptr(1)*24) if op == SQLITE_FCNTL_SIZE_HINT { *(*sqlite3_int64)(unsafe.Pointer(pArg)) += ((*ApndFile)(unsafe.Pointer(paf)).FiPgOne) } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 80 /* &.xFileControl */))))(tls, pFile, op, pArg) if (rc == SQLITE_OK) && (op == SQLITE_FCNTL_VFSNAME) { *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+3145 /* "apnd(%lld)/%z" */, libc.VaList(bp, (*ApndFile)(unsafe.Pointer(paf)).FiPgOne, *(*uintptr)(unsafe.Pointer(pArg)))) } return rc } // Return the sector-size in bytes for an apnd-file. func apndSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* appendvfs.c:367:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 88 /* &.xSectorSize */))))(tls, pFile) } // Return the device characteristic flags supported by an apnd-file. func apndDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* appendvfs.c:375:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, pFile) } // Create a shared memory file mapping func apndShmMap(tls *libc.TLS, pFile uintptr, iPg int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* appendvfs.c:381:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 104 /* &.xShmMap */))))(tls, pFile, iPg, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // Perform locking on a shared-memory segment func apndShmLock(tls *libc.TLS, pFile uintptr, offset int32, n int32, flags int32) int32 { /* appendvfs.c:393:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 112 /* &.xShmLock */))))(tls, pFile, offset, n, flags) } // Memory barrier operation on shared memory func apndShmBarrier(tls *libc.TLS, pFile uintptr) { /* appendvfs.c:399:13: */ pFile = ((pFile) + uintptr(1)*24) (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 120 /* &.xShmBarrier */))))(tls, pFile) } // Unmap a shared memory segment func apndShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* appendvfs.c:405:12: */ pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 128 /* &.xShmUnmap */))))(tls, pFile, deleteFlag) } // Fetch a page of a memory-mapped file func apndFetch(tls *libc.TLS, pFile uintptr, iOfst sqlite3_int64, iAmt int32, pp uintptr) int32 { /* appendvfs.c:411:12: */ var p uintptr = pFile if ((*ApndFile)(unsafe.Pointer(p)).FiMark < int64(0)) || ((iOfst + sqlite3_int64(iAmt)) > (*ApndFile)(unsafe.Pointer(p)).FiMark) { return SQLITE_IOERR // Cannot read what is not yet there. } pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 136 /* &.xFetch */))))(tls, pFile, (iOfst + (*ApndFile)(unsafe.Pointer(p)).FiPgOne), iAmt, pp) } // Release a memory-mapped page func apndUnfetch(tls *libc.TLS, pFile uintptr, iOfst sqlite3_int64, pPage uintptr) int32 { /* appendvfs.c:426:12: */ var p uintptr = pFile pFile = ((pFile) + uintptr(1)*24) return (*(*func(*libc.TLS, uintptr, sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 144 /* &.xUnfetch */))))(tls, pFile, (iOfst + (*ApndFile)(unsafe.Pointer(p)).FiPgOne), pPage) } // Try to read the append-mark off the end of a file. Return the // start of the appended database if the append-mark is present. // If there is no valid append-mark, return -1; // // An append-mark is only valid if the NNNNNNNN start-of-database offset // indicates that the appended database contains at least one page. The // start-of-database value must be a multiple of 512. func apndReadMark(tls *libc.TLS, sz sqlite3_int64, pFile uintptr) sqlite3_int64 { /* appendvfs.c:441:22: */ bp := tls.Alloc(25) defer tls.Free(25) var rc int32 var i int32 var iMark sqlite3_int64 var msbs int32 = (8 * (APND_MARK_FOS_SZ - 1)) // var a [25]uint8 at bp, 25 if (int64(APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ)) != (sz & int64(0x1ff)) { return int64(-1) } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 16 /* &.xRead */))))(tls, pFile, bp /* &a[0] */, (APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ), (sz - (int64(APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ)))) if rc != 0 { return int64(-1) } if libc.Xmemcmp(tls, bp /* &a[0] */, ts+3127 /* "Start-Of-SQLite3..." */, uint64(APND_MARK_PREFIX_SZ)) != 0 { return int64(-1) } iMark = ((sqlite3_int64(int32(*(*uint8)(unsafe.Pointer(bp /* &a[0] */ + 17))) & 0x7f)) << msbs) for i = 1; i < 8; i++ { msbs = msbs - (8) iMark = iMark | (sqlite3_int64(*(*uint8)(unsafe.Pointer(bp /* &a[0] */ + uintptr((APND_MARK_PREFIX_SZ + i))))) << msbs) } if iMark > ((sz - (int64(APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ))) - int64(512)) { return int64(-1) } if (iMark & int64(0x1ff)) != 0 { return int64(-1) } return iMark } var apvfsSqliteHdr = *(*[16]int8)(unsafe.Pointer(ts + 3159 /* "SQLite format 3" */)) /* appendvfs.c:461:19 */ // Check to see if the file is an appendvfs SQLite database file. // Return true iff it is such. Parameter sz is the file's size. func apndIsAppendvfsDatabase(tls *libc.TLS, sz sqlite3_int64, pFile uintptr) int32 { /* appendvfs.c:466:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // var zHdr [16]int8 at bp, 16 var iMark sqlite3_int64 = apndReadMark(tls, sz, pFile) if iMark >= int64(0) { // If file has the correct end-marker, the expected odd size, and the // SQLite DB type marker where the end-marker puts it, then it // is an appendvfs database. rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 16 /* &.xRead */))))(tls, pFile, bp /* &zHdr[0] */, int32(unsafe.Sizeof([16]int8{})), iMark) if (((SQLITE_OK == rc) && (libc.Xmemcmp(tls, bp /* &zHdr[0] */, uintptr(unsafe.Pointer(&apvfsSqliteHdr)), uint64(unsafe.Sizeof([16]int8{}))) == 0)) && ((sz & int64(0x1ff)) == (int64(APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ)))) && (sz >= (int64(512 + (APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ)))) { return 1 // It's an appendvfs database } } return 0 } // Check to see if the file is an ordinary SQLite database file. // Return true iff so. Parameter sz is the file's size. func apndIsOrdinaryDatabaseFile(tls *libc.TLS, sz sqlite3_int64, pFile uintptr) int32 { /* appendvfs.c:491:12: */ bp := tls.Alloc(16) defer tls.Free(16) // var zHdr [16]int8 at bp, 16 if (((apndIsAppendvfsDatabase(tls, sz, pFile) != 0) || // rule 2 ((sz & int64(0x1ff)) != int64(0))) || (SQLITE_OK != (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 16 /* &.xRead */))))(tls, pFile, bp /* &zHdr[0] */, int32(unsafe.Sizeof([16]int8{})), int64(0)))) || (libc.Xmemcmp(tls, bp /* &zHdr[0] */, uintptr(unsafe.Pointer(&apvfsSqliteHdr)), uint64(unsafe.Sizeof([16]int8{}))) != 0) { return 0 } else { return 1 } return int32(0) } // Open an apnd file handle. func apndOpen(tls *libc.TLS, pApndVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* appendvfs.c:507:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pApndFile uintptr = pFile var pBaseFile uintptr = ((pFile) + uintptr(1)*24) var pBaseVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pApndVfs)).FpAppData var rc int32 *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0) if (flags & SQLITE_OPEN_MAIN_DB) == 0 { // The appendvfs is not to be used for transient or temporary databases. // Just use the base VFS open to initialize the given file object and // open the underlying file. (Appendvfs is then unused for this file.) return (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pBaseVfs + 40 /* &.xOpen */))))(tls, pBaseVfs, zName, pFile, flags, pOutFlags) } libc.Xmemset(tls, pApndFile, 0, uint64(unsafe.Sizeof(ApndFile{}))) (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&apnd_io_methods)) (*ApndFile)(unsafe.Pointer(pApndFile)).FiMark = int64(-1) // Append mark not yet written rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pBaseVfs + 40 /* &.xOpen */))))(tls, pBaseVfs, zName, pBaseFile, flags, pOutFlags) if rc == SQLITE_OK { rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pBaseFile)).FpMethods + 48 /* &.xFileSize */))))(tls, pBaseFile, bp /* &sz */) } if rc != 0 { (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pBaseFile)).FpMethods + 8 /* &.xClose */))))(tls, pBaseFile) (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(0) return rc } if apndIsOrdinaryDatabaseFile(tls, *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)), pBaseFile) != 0 { // The file being opened appears to be just an ordinary DB. Copy // the base dispatch-table so this instance mimics the base VFS. libc.Xmemmove(tls, pApndFile, pBaseFile, uint64((*sqlite3_vfs)(unsafe.Pointer(pBaseVfs)).FszOsFile)) return SQLITE_OK } (*ApndFile)(unsafe.Pointer(pApndFile)).FiPgOne = apndReadMark(tls, *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)), pFile) if (*ApndFile)(unsafe.Pointer(pApndFile)).FiPgOne >= int64(0) { (*ApndFile)(unsafe.Pointer(pApndFile)).FiMark = (*(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) - (int64(APND_MARK_PREFIX_SZ + APND_MARK_FOS_SZ))) // Append mark found return SQLITE_OK } if (flags & SQLITE_OPEN_CREATE) == 0 { (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pBaseFile)).FpMethods + 8 /* &.xClose */))))(tls, pBaseFile) rc = SQLITE_CANTOPEN (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(0) } else { // Round newly added appendvfs location to #define'd page boundary. // Note that nothing has yet been written to the underlying file. // The append mark will be written along with first content write. // Until then, paf->iMark value indicates it is not yet written. (*ApndFile)(unsafe.Pointer(pApndFile)).FiPgOne = (((*(*sqlite3_int64)(unsafe.Pointer(bp /* sz */))) + (int64(APND_ROUNDUP - 1))) & libc.CplInt64((int64(APND_ROUNDUP - 1)))) } return rc } // Delete an apnd file. // For an appendvfs, this could mean delete the appendvfs portion, // leaving the appendee as it was before it gained an appendvfs. // For now, this code deletes the underlying file too. func apndDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* appendvfs.c:572:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 48 /* &.xDelete */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath, dirSync) } // All other VFS methods are pass-thrus. func apndAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* appendvfs.c:579:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 56 /* &.xAccess */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath, flags, pResOut) } func apndFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* appendvfs.c:587:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 64 /* &.xFullPathname */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath, nOut, zOut) } func apndDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* appendvfs.c:595:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 72 /* &.xDlOpen */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) } func apndDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* appendvfs.c:598:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 80 /* &.xDlError */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } func apndDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* appendvfs.c:601:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 88 /* &.xDlSym */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } func apndDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* appendvfs.c:604:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 96 /* &.xDlClose */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) } func apndRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* appendvfs.c:607:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 104 /* &.xRandomness */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) } func apndSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* appendvfs.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 112 /* &.xSleep */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } func apndCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* appendvfs.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 120 /* &.xCurrentTime */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pTimeOut) } func apndGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* appendvfs.c:616:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 128 /* &.xGetLastError */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } func apndCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* appendvfs.c:619:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 136 /* &.xCurrentTimeInt64 */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } func apndSetSystemCall(tls *libc.TLS, pVfs uintptr, zName uintptr, pCall sqlite3_syscall_ptr) int32 { /* appendvfs.c:622:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 144 /* &.xSetSystemCall */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName, pCall) } func apndGetSystemCall(tls *libc.TLS, pVfs uintptr, zName uintptr) sqlite3_syscall_ptr { /* appendvfs.c:629:28: */ return (*(*func(*libc.TLS, uintptr, uintptr) sqlite3_syscall_ptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 152 /* &.xGetSystemCall */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName) } func apndNextSystemCall(tls *libc.TLS, pVfs uintptr, zName uintptr) uintptr { /* appendvfs.c:635:19: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 160 /* &.xNextSystemCall */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName) } func sqlite3_appendvfs_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* appendvfs.c:647:5: */ var rc int32 = SQLITE_OK var pOrig uintptr _ = pApi _ = pzErrMsg _ = db pOrig = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) apnd_vfs.FiVersion = (*sqlite3_vfs)(unsafe.Pointer(pOrig)).FiVersion apnd_vfs.FpAppData = pOrig apnd_vfs.FszOsFile = (int32(uint64((*sqlite3_vfs)(unsafe.Pointer(pOrig)).FszOsFile) + uint64(unsafe.Sizeof(ApndFile{})))) rc = sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&apnd_vfs)), 0) if rc == SQLITE_OK { rc = (SQLITE_OK | (int32(1) << 8)) } return rc } // Copyright (C) 1992-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation; either version 3, or (at your option) any later // version. // // GCC is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // This administrivia gets added to the beginning of limits.h // if the system has its own version of limits.h. // We use _GCC_LIMITS_H_ because we want this not to match // any macros that the system's limits.h uses for its own purposes. // Use "..." so that we find syslimits.h only in this same directory. // syslimits.h stands for the system's own limits.h file. // If we can use it ok unmodified, then we install this text. // If fixincludes fixes it, then the fixed version is installed // instead of this text. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // File system limits // // NOTE: Apparently the actual size of PATH_MAX is 260, but a space is // required for the NUL. TODO: Test? // NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. // Copyright (C) 1991-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation; either version 3, or (at your option) any later // version. // // GCC is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // Number of bits in a `char'. // Maximum length of a multibyte character. // Minimum and maximum values a `signed char' can hold. // Maximum value an `unsigned char' can hold. (Minimum is 0). // Minimum and maximum values a `char' can hold. // Minimum and maximum values a `signed short int' can hold. // Maximum value an `unsigned short int' can hold. (Minimum is 0). // Minimum and maximum values a `signed int' can hold. // Maximum value an `unsigned int' can hold. (Minimum is 0). // Minimum and maximum values a `signed long int' can hold. // (Same as `int'). // Maximum value an `unsigned long int' can hold. (Minimum is 0). // Minimum and maximum values a `signed long long int' can hold. // Maximum value an `unsigned long long int' can hold. (Minimum is 0). // Minimum and maximum values a `signed long long int' can hold. // Maximum value an `unsigned long long int' can hold. (Minimum is 0). // This administrivia gets added to the end of limits.h // if the system has its own version of limits.h. type _onexit_t = uintptr /* stdlib.h:49:15 */ type _div_t = struct { Fquot int32 Frem int32 } /* stdlib.h:59:11 */ type div_t = _div_t /* stdlib.h:62:5 */ type _ldiv_t = struct { Fquot int32 Frem int32 } /* stdlib.h:64:11 */ type ldiv_t = _ldiv_t /* stdlib.h:67:5 */ type _LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:76:5 */ type _CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:83:5 */ type _CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:87:5 */ type _LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:94:5 */ type _LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:101:5 */ type _purecall_handler = uintptr /* stdlib.h:142:16 */ type _invalid_parameter_handler = uintptr /* stdlib.h:147:16 */ type lldiv_t = struct { Fquot int64 Frem int64 } /* stdlib.h:699:61 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Return codes for _heapwalk() // Values for _heapinfo.useflag // The structure used to walk through the heap with _heapwalk. type _heapinfo = struct { F_pentry uintptr F_size size_t F_useflag int32 _ [4]byte } /* malloc.h:46:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Return codes for _heapwalk() // Values for _heapinfo.useflag // The structure used to walk through the heap with _heapwalk. type _HEAPINFO = _heapinfo /* malloc.h:50:5 */ // Forward declaration of objects used by this implementation type amatch_vtab1 = struct { Fbase sqlite3_vtab FzClassName uintptr FzDb uintptr FzSelf uintptr FzCostTab uintptr FzVocabTab uintptr FzVocabWord uintptr FzVocabLang uintptr FpRule uintptr FrIns amatch_cost FrDel amatch_cost FrSub amatch_cost _ [4]byte Fdb uintptr FpVCheck uintptr FnCursor int32 _ [4]byte } /* amatch.c:172:9 */ // Forward declaration of objects used by this implementation type amatch_vtab = amatch_vtab1 /* amatch.c:172:28 */ type amatch_cursor1 = struct { Fbase sqlite3_vtab_cursor FiRowid sqlite3_int64 FiLang amatch_langid FrLimit amatch_cost FnBuf int32 FoomErr int32 FnWord int32 _ [4]byte FzBuf uintptr FzInput uintptr FpVtab uintptr FpAllWords uintptr FpCurrent uintptr FpCost uintptr FpWord uintptr } /* amatch.c:173:9 */ type amatch_cursor = amatch_cursor1 /* amatch.c:173:30 */ type amatch_rule1 = struct { FpNext uintptr FzFrom uintptr FrCost amatch_cost FiLang amatch_langid FnFrom amatch_len FnTo amatch_len FzTo [4]int8 _ [2]byte } /* amatch.c:172:9 */ type amatch_rule = amatch_rule1 /* amatch.c:174:28 */ type amatch_word1 = struct { FpNext uintptr FsCost amatch_avl FsWord amatch_avl FrCost amatch_cost FiSeq int32 FzCost [10]int8 FnMatch int16 FzWord [4]int8 } /* amatch.c:173:9 */ type amatch_word = amatch_word1 /* amatch.c:175:28 */ type amatch_avl1 = struct { FpWord uintptr FzKey uintptr FpBefore uintptr FpAfter uintptr FpUp uintptr Fheight int16 Fimbalance int16 _ [4]byte } /* amatch.c:173:9 */ type amatch_avl = amatch_avl1 /* amatch.c:176:27 */ // Recompute the amatch_avl.height and amatch_avl.imbalance fields for p. // Assume that the children of p have correct heights. func amatchAvlRecomputeHeight(tls *libc.TLS, p uintptr) { /* amatch.c:199:13: */ var hBefore int16 if (*amatch_avl)(unsafe.Pointer(p)).FpBefore != 0 { hBefore = (*amatch_avl)(unsafe.Pointer((*amatch_avl)(unsafe.Pointer(p)).FpBefore)).Fheight } else { hBefore = int16(0) } var hAfter int16 if (*amatch_avl)(unsafe.Pointer(p)).FpAfter != 0 { hAfter = (*amatch_avl)(unsafe.Pointer((*amatch_avl)(unsafe.Pointer(p)).FpAfter)).Fheight } else { hAfter = int16(0) } (*amatch_avl)(unsafe.Pointer(p)).Fimbalance = (int16(int32(hBefore) - int32(hAfter))) // -: pAfter higher. +: pBefore higher (*amatch_avl)(unsafe.Pointer(p)).Fheight = (int16((func() int32 { if int32(hBefore) > int32(hAfter) { return int32(hBefore) } return int32(hAfter) }()) + 1)) } // P B // / \ / ** B Z ==> X P // / \ / ** X Y Y Z // func amatchAvlRotateBefore(tls *libc.TLS, pP uintptr) uintptr { /* amatch.c:214:19: */ var pB uintptr = (*amatch_avl)(unsafe.Pointer(pP)).FpBefore var pY uintptr = (*amatch_avl)(unsafe.Pointer(pB)).FpAfter (*amatch_avl)(unsafe.Pointer(pB)).FpUp = (*amatch_avl)(unsafe.Pointer(pP)).FpUp (*amatch_avl)(unsafe.Pointer(pB)).FpAfter = pP (*amatch_avl)(unsafe.Pointer(pP)).FpUp = pB (*amatch_avl)(unsafe.Pointer(pP)).FpBefore = pY if pY != 0 { (*amatch_avl)(unsafe.Pointer(pY)).FpUp = pP } amatchAvlRecomputeHeight(tls, pP) amatchAvlRecomputeHeight(tls, pB) return pB } // P A // / \ / ** X A ==> P Z // / \ / ** Y Z X Y // func amatchAvlRotateAfter(tls *libc.TLS, pP uintptr) uintptr { /* amatch.c:235:19: */ var pA uintptr = (*amatch_avl)(unsafe.Pointer(pP)).FpAfter var pY uintptr = (*amatch_avl)(unsafe.Pointer(pA)).FpBefore (*amatch_avl)(unsafe.Pointer(pA)).FpUp = (*amatch_avl)(unsafe.Pointer(pP)).FpUp (*amatch_avl)(unsafe.Pointer(pA)).FpBefore = pP (*amatch_avl)(unsafe.Pointer(pP)).FpUp = pA (*amatch_avl)(unsafe.Pointer(pP)).FpAfter = pY if pY != 0 { (*amatch_avl)(unsafe.Pointer(pY)).FpUp = pP } amatchAvlRecomputeHeight(tls, pP) amatchAvlRecomputeHeight(tls, pA) return pA } // Return a pointer to the pBefore or pAfter pointer in the parent // of p that points to p. Or if p is the root node, return pp. func amatchAvlFromPtr(tls *libc.TLS, p uintptr, pp uintptr) uintptr { /* amatch.c:252:19: */ var pUp uintptr = (*amatch_avl)(unsafe.Pointer(p)).FpUp if pUp == uintptr(0) { return pp } if (*amatch_avl)(unsafe.Pointer(pUp)).FpAfter == p { return (pUp + 24 /* &.pAfter */) } return (pUp + 16 /* &.pBefore */) } // Rebalance all nodes starting with p and working up to the root. // Return the new root. func amatchAvlBalance(tls *libc.TLS, p uintptr) uintptr { /* amatch.c:263:19: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = p var pTop uintptr = *(*uintptr)(unsafe.Pointer(bp /* p */)) var pp uintptr for *(*uintptr)(unsafe.Pointer(bp /* p */)) != 0 { amatchAvlRecomputeHeight(tls, *(*uintptr)(unsafe.Pointer(bp /* p */))) if int32((*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fimbalance) >= 2 { var pB uintptr = (*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpBefore if int32((*amatch_avl)(unsafe.Pointer(pB)).Fimbalance) < 0 { (*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpBefore = amatchAvlRotateAfter(tls, pB) } pp = amatchAvlFromPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)), bp /* &p */) *(*uintptr)(unsafe.Pointer(bp /* p */)) = libc.AssignPtrUintptr(pp, amatchAvlRotateBefore(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)))) } else if int32((*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fimbalance) <= (-2) { var pA uintptr = (*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpAfter if int32((*amatch_avl)(unsafe.Pointer(pA)).Fimbalance) > 0 { (*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpAfter = amatchAvlRotateBefore(tls, pA) } pp = amatchAvlFromPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)), bp /* &p */) *(*uintptr)(unsafe.Pointer(bp /* p */)) = libc.AssignPtrUintptr(pp, amatchAvlRotateAfter(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)))) } pTop = *(*uintptr)(unsafe.Pointer(bp /* p */)) *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*amatch_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpUp } return pTop } // Search the tree rooted at p for an entry with zKey. Return a pointer // to the entry or return NULL. func amatchAvlSearch(tls *libc.TLS, p uintptr, zKey uintptr) uintptr { /* amatch.c:288:19: */ var c int32 for (p != 0) && ((libc.AssignInt32(&c, libc.Xstrcmp(tls, zKey, (*amatch_avl)(unsafe.Pointer(p)).FzKey))) != 0) { if c < 0 { p = (*amatch_avl)(unsafe.Pointer(p)).FpBefore } else { p = (*amatch_avl)(unsafe.Pointer(p)).FpAfter } } return p } // Find the first node (the one with the smallest key). func amatchAvlFirst(tls *libc.TLS, p uintptr) uintptr { /* amatch.c:298:19: */ if p != 0 { for (*amatch_avl)(unsafe.Pointer(p)).FpBefore != 0 { p = (*amatch_avl)(unsafe.Pointer(p)).FpBefore } } return p } // Insert a new node pNew. Return NULL on success. If the key is not // unique, then do not perform the insert but instead leave pNew unchanged // and return a pointer to an existing node with the same key. func amatchAvlInsert(tls *libc.TLS, ppHead uintptr, pNew uintptr) uintptr { /* amatch.c:356:19: */ var c int32 var p uintptr = *(*uintptr)(unsafe.Pointer(ppHead)) if p == uintptr(0) { p = pNew (*amatch_avl)(unsafe.Pointer(pNew)).FpUp = uintptr(0) } else { for p != 0 { c = libc.Xstrcmp(tls, (*amatch_avl)(unsafe.Pointer(pNew)).FzKey, (*amatch_avl)(unsafe.Pointer(p)).FzKey) if c < 0 { if (*amatch_avl)(unsafe.Pointer(p)).FpBefore != 0 { p = (*amatch_avl)(unsafe.Pointer(p)).FpBefore } else { (*amatch_avl)(unsafe.Pointer(p)).FpBefore = pNew (*amatch_avl)(unsafe.Pointer(pNew)).FpUp = p break } } else if c > 0 { if (*amatch_avl)(unsafe.Pointer(p)).FpAfter != 0 { p = (*amatch_avl)(unsafe.Pointer(p)).FpAfter } else { (*amatch_avl)(unsafe.Pointer(p)).FpAfter = pNew (*amatch_avl)(unsafe.Pointer(pNew)).FpUp = p break } } else { return p } } } (*amatch_avl)(unsafe.Pointer(pNew)).FpBefore = uintptr(0) (*amatch_avl)(unsafe.Pointer(pNew)).FpAfter = uintptr(0) (*amatch_avl)(unsafe.Pointer(pNew)).Fheight = int16(1) (*amatch_avl)(unsafe.Pointer(pNew)).Fimbalance = int16(0) *(*uintptr)(unsafe.Pointer(ppHead)) = amatchAvlBalance(tls, p) // assert( amatchAvlIntegrity(*ppHead) ); // assert( amatchAvlIntegrity2(*ppHead) ); return uintptr(0) } // Remove node pOld from the tree. pOld must be an element of the tree or // the AVL tree will become corrupt. func amatchAvlRemove(tls *libc.TLS, ppHead uintptr, pOld uintptr) { /* amatch.c:399:13: */ var ppParent uintptr var pBalance uintptr = uintptr(0) // assert( amatchAvlSearch(*ppHead, pOld->zKey)==pOld ); ppParent = amatchAvlFromPtr(tls, pOld, ppHead) if ((*amatch_avl)(unsafe.Pointer(pOld)).FpBefore == uintptr(0)) && ((*amatch_avl)(unsafe.Pointer(pOld)).FpAfter == uintptr(0)) { *(*uintptr)(unsafe.Pointer(ppParent)) = uintptr(0) pBalance = (*amatch_avl)(unsafe.Pointer(pOld)).FpUp } else if ((*amatch_avl)(unsafe.Pointer(pOld)).FpBefore != 0) && ((*amatch_avl)(unsafe.Pointer(pOld)).FpAfter != 0) { var pX uintptr var pY uintptr pX = amatchAvlFirst(tls, (*amatch_avl)(unsafe.Pointer(pOld)).FpAfter) *(*uintptr)(unsafe.Pointer(amatchAvlFromPtr(tls, pX, uintptr(0)))) = (*amatch_avl)(unsafe.Pointer(pX)).FpAfter if (*amatch_avl)(unsafe.Pointer(pX)).FpAfter != 0 { (*amatch_avl)(unsafe.Pointer((*amatch_avl)(unsafe.Pointer(pX)).FpAfter)).FpUp = (*amatch_avl)(unsafe.Pointer(pX)).FpUp } pBalance = (*amatch_avl)(unsafe.Pointer(pX)).FpUp (*amatch_avl)(unsafe.Pointer(pX)).FpAfter = (*amatch_avl)(unsafe.Pointer(pOld)).FpAfter if (*amatch_avl)(unsafe.Pointer(pX)).FpAfter != 0 { (*amatch_avl)(unsafe.Pointer((*amatch_avl)(unsafe.Pointer(pX)).FpAfter)).FpUp = pX } else { pBalance = pX } (*amatch_avl)(unsafe.Pointer(pX)).FpBefore = libc.AssignUintptr(&pY, (*amatch_avl)(unsafe.Pointer(pOld)).FpBefore) if pY != 0 { (*amatch_avl)(unsafe.Pointer(pY)).FpUp = pX } (*amatch_avl)(unsafe.Pointer(pX)).FpUp = (*amatch_avl)(unsafe.Pointer(pOld)).FpUp *(*uintptr)(unsafe.Pointer(ppParent)) = pX } else if (*amatch_avl)(unsafe.Pointer(pOld)).FpBefore == uintptr(0) { *(*uintptr)(unsafe.Pointer(ppParent)) = libc.AssignUintptr(&pBalance, (*amatch_avl)(unsafe.Pointer(pOld)).FpAfter) (*amatch_avl)(unsafe.Pointer(pBalance)).FpUp = (*amatch_avl)(unsafe.Pointer(pOld)).FpUp } else if (*amatch_avl)(unsafe.Pointer(pOld)).FpAfter == uintptr(0) { *(*uintptr)(unsafe.Pointer(ppParent)) = libc.AssignUintptr(&pBalance, (*amatch_avl)(unsafe.Pointer(pOld)).FpBefore) (*amatch_avl)(unsafe.Pointer(pBalance)).FpUp = (*amatch_avl)(unsafe.Pointer(pOld)).FpUp } *(*uintptr)(unsafe.Pointer(ppHead)) = amatchAvlBalance(tls, pBalance) (*amatch_avl)(unsafe.Pointer(pOld)).FpUp = uintptr(0) (*amatch_avl)(unsafe.Pointer(pOld)).FpBefore = uintptr(0) (*amatch_avl)(unsafe.Pointer(pOld)).FpAfter = uintptr(0) // assert( amatchAvlIntegrity(*ppHead) ); // assert( amatchAvlIntegrity2(*ppHead) ); } // // End of the AVL Tree implementation // // Various types. // // amatch_cost is the "cost" of an edit operation. // // amatch_len is the length of a matching string. // // amatch_langid is an ruleset identifier. type amatch_cost = int32 /* amatch.c:452:13 */ type amatch_len = int8 /* amatch.c:453:21 */ type amatch_langid = int32 /* amatch.c:454:13 */ // The two input rule lists are both sorted in order of increasing // cost. Merge them together into a single list, sorted by cost, and // return a pointer to the head of that list. func amatchMergeRules(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* amatch.c:534:20: */ bp := tls.Alloc(32) defer tls.Free(32) // var head amatch_rule at bp, 32 var pTail uintptr pTail = bp /* &head */ for (pA != 0) && (pB != 0) { if (*amatch_rule)(unsafe.Pointer(pA)).FrCost <= (*amatch_rule)(unsafe.Pointer(pB)).FrCost { (*amatch_rule)(unsafe.Pointer(pTail)).FpNext = pA pTail = pA pA = (*amatch_rule)(unsafe.Pointer(pA)).FpNext } else { (*amatch_rule)(unsafe.Pointer(pTail)).FpNext = pB pTail = pB pB = (*amatch_rule)(unsafe.Pointer(pB)).FpNext } } if pA == uintptr(0) { (*amatch_rule)(unsafe.Pointer(pTail)).FpNext = pB } else { (*amatch_rule)(unsafe.Pointer(pTail)).FpNext = pA } return (*amatch_rule)(unsafe.Pointer(bp /* &head */)).FpNext } // Statement pStmt currently points to a row in the amatch data table. This // function allocates and populates a amatch_rule structure according to // the content of the row. // // If successful, *ppRule is set to point to the new object and SQLITE_OK // is returned. Otherwise, *ppRule is zeroed, *pzErr may be set to point // to an error message and an SQLite error code returned. func amatchLoadOneRule(tls *libc.TLS, p uintptr, pStmt uintptr, ppRule uintptr, pzErr uintptr) int32 { /* amatch.c:567:12: */ bp := tls.Alloc(72) defer tls.Free(72) var iLang sqlite3_int64 = sqlite3.Xsqlite3_column_int64(tls, pStmt, 0) var zFrom uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 1) var zTo uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 2) var rCost amatch_cost = sqlite3.Xsqlite3_column_int(tls, pStmt, 3) var rc int32 = SQLITE_OK // Return code var nFrom int32 // Size of string zFrom, in bytes var nTo int32 // Size of string zTo, in bytes var pRule uintptr = uintptr(0) // New rule object to return if zFrom == uintptr(0) { zFrom = ts + 489 /* "" */ } if zTo == uintptr(0) { zTo = ts + 489 /* "" */ } nFrom = int32(libc.Xstrlen(tls, zFrom)) nTo = int32(libc.Xstrlen(tls, zTo)) // Silently ignore null transformations if libc.Xstrcmp(tls, zFrom, zTo) == 0 { if (int32(*(*int8)(unsafe.Pointer(zFrom))) == '?') && (int32(*(*int8)(unsafe.Pointer(zFrom + 1))) == 0) { if ((*amatch_vtab)(unsafe.Pointer(p)).FrSub == 0) || ((*amatch_vtab)(unsafe.Pointer(p)).FrSub > rCost) { (*amatch_vtab)(unsafe.Pointer(p)).FrSub = rCost } } *(*uintptr)(unsafe.Pointer(ppRule)) = uintptr(0) return SQLITE_OK } if (rCost <= 0) || (rCost > AMATCH_MX_COST) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3175, /* "%s: cost must be..." */ libc.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, AMATCH_MX_COST)) rc = SQLITE_ERROR } else if (nFrom > AMATCH_MX_LENGTH) || (nTo > AMATCH_MX_LENGTH) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3209, /* "%s: maximum stri..." */ libc.VaList(bp+24, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, AMATCH_MX_LENGTH)) rc = SQLITE_ERROR } else if (iLang < int64(0)) || (iLang > int64(AMATCH_MX_LANGID)) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3241, /* "%s: iLang must b..." */ libc.VaList(bp+48, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, AMATCH_MX_LANGID)) rc = SQLITE_ERROR } else if (libc.Xstrcmp(tls, zFrom, ts+489 /* "" */) == 0) && (libc.Xstrcmp(tls, zTo, ts+3276 /* "?" */) == 0) { if ((*amatch_vtab)(unsafe.Pointer(p)).FrIns == 0) || ((*amatch_vtab)(unsafe.Pointer(p)).FrIns > rCost) { (*amatch_vtab)(unsafe.Pointer(p)).FrIns = rCost } } else if (libc.Xstrcmp(tls, zFrom, ts+3276 /* "?" */) == 0) && (libc.Xstrcmp(tls, zTo, ts+489 /* "" */) == 0) { if ((*amatch_vtab)(unsafe.Pointer(p)).FrDel == 0) || ((*amatch_vtab)(unsafe.Pointer(p)).FrDel > rCost) { (*amatch_vtab)(unsafe.Pointer(p)).FrDel = rCost } } else { pRule = sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(amatch_rule{})) + uint64(nFrom)) + uint64(nTo))) if pRule == uintptr(0) { rc = SQLITE_NOMEM } else { libc.Xmemset(tls, pRule, 0, uint64(unsafe.Sizeof(amatch_rule{}))) (*amatch_rule)(unsafe.Pointer(pRule)).FzFrom = ((pRule + 26 /* &.zTo */) + uintptr((nTo + 1))) (*amatch_rule)(unsafe.Pointer(pRule)).FnFrom = amatch_len(nFrom) libc.Xmemcpy(tls, (*amatch_rule)(unsafe.Pointer(pRule)).FzFrom, zFrom, (uint64(nFrom + 1))) libc.Xmemcpy(tls, pRule+26 /* &.zTo */, zTo, (uint64(nTo + 1))) (*amatch_rule)(unsafe.Pointer(pRule)).FnTo = amatch_len(nTo) (*amatch_rule)(unsafe.Pointer(pRule)).FrCost = rCost (*amatch_rule)(unsafe.Pointer(pRule)).FiLang = int32(iLang) } } *(*uintptr)(unsafe.Pointer(ppRule)) = pRule return rc } // Free all the content in the edit-cost-table func amatchFreeRules(tls *libc.TLS, p uintptr) { /* amatch.c:644:13: */ for (*amatch_vtab)(unsafe.Pointer(p)).FpRule != 0 { var pRule uintptr = (*amatch_vtab)(unsafe.Pointer(p)).FpRule (*amatch_vtab)(unsafe.Pointer(p)).FpRule = (*amatch_rule)(unsafe.Pointer(pRule)).FpNext sqlite3.Xsqlite3_free(tls, pRule) } (*amatch_vtab)(unsafe.Pointer(p)).FpRule = uintptr(0) } // Load the content of the amatch data table into memory. func amatchLoadRules(tls *libc.TLS, db uintptr, p uintptr, pzErr uintptr) int32 { /* amatch.c:656:12: */ bp := tls.Alloc(216) defer tls.Free(216) var rc int32 = SQLITE_OK // Return code var zSql uintptr // SELECT used to read from rules table var pHead uintptr = uintptr(0) zSql = sqlite3.Xsqlite3_mprintf(tls, ts+3278 /* "SELECT * FROM %Q..." */, libc.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzDb, (*amatch_vtab)(unsafe.Pointer(p)).FzCostTab)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { var rc2 int32 // finalize() return code *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+80 /* &pStmt */, uintptr(0)) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3298 /* "%s: %s" */, libc.VaList(bp+24, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, sqlite3.Xsqlite3_errmsg(tls, db))) } else if sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3305, /* "%s: %s has %d co..." */ libc.VaList(bp+48, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, (*amatch_vtab)(unsafe.Pointer(p)).FzCostTab, sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))))) rc = SQLITE_ERROR } else { for (rc == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)))) { *(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)) = uintptr(0) rc = amatchLoadOneRule(tls, p, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), bp+88 /* &pRule */, pzErr) if *(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)) != 0 { (*amatch_rule)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)))).FpNext = pHead pHead = *(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)) } } } rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) if rc == SQLITE_OK { rc = rc2 } } sqlite3.Xsqlite3_free(tls, zSql) // All rules are now in a singly linked list starting at pHead. This // block sorts them by cost and then sets amatch_vtab.pRule to point to // point to the head of the sorted list. if rc == SQLITE_OK { var i uint32 var pX uintptr // var a [15]uintptr at bp+96, 120 for i = uint32(0); uint64(i) < (uint64(unsafe.Sizeof([15]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))); i++ { *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) = uintptr(0) } for (libc.AssignUintptr(&pX, pHead)) != uintptr(0) { pHead = (*amatch_rule)(unsafe.Pointer(pX)).FpNext (*amatch_rule)(unsafe.Pointer(pX)).FpNext = uintptr(0) for i = uint32(0); (*(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) != 0) && (uint64(i) < ((uint64(unsafe.Sizeof([15]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))) - uint64(1))); i++ { pX = amatchMergeRules(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)), pX) *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) = uintptr(0) } *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) = amatchMergeRules(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)), pX) } pX = *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */)) i = uint32(1) for ; uint64(i) < (uint64(unsafe.Sizeof([15]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))); i++ { pX = amatchMergeRules(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)), pX) } (*amatch_vtab)(unsafe.Pointer(p)).FpRule = amatchMergeRules(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpRule, pX) } else { // An error has occurred. Setting p->pRule to point to the head of the // allocated list ensures that the list will be cleaned up in this case. (*amatch_vtab)(unsafe.Pointer(p)).FpRule = pHead } return rc } // This function converts an SQL quoted string into an unquoted string // and returns a pointer to a buffer allocated using sqlite3_malloc() // containing the result. The caller should eventually free this buffer // using sqlite3_free. // // Examples: // // "abc" becomes abc // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno func amatchDequote(tls *libc.TLS, zIn uintptr) uintptr { /* amatch.c:740:13: */ var nIn sqlite3_int64 // Size of input string, in bytes var zOut uintptr // Output (dequoted) string nIn = sqlite3_int64(libc.Xstrlen(tls, zIn)) zOut = sqlite3.Xsqlite3_malloc64(tls, (uint64(nIn + int64(1)))) if zOut != 0 { var q int8 = *(*int8)(unsafe.Pointer(zIn)) // Quote character (if any ) if (((int32(q) != '[') && (int32(q) != '\'')) && (int32(q) != '"')) && (int32(q) != '`') { libc.Xmemcpy(tls, zOut, zIn, (size_t(nIn + int64(1)))) } else { var iOut int32 = 0 // Index of next byte to write to output var iIn int32 // Index of next byte to read from input if int32(q) == '[' { q = int8(']') } for iIn = 1; sqlite3_int64(iIn) < nIn; iIn++ { if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iIn)))) == int32(q) { iIn++ } *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) } } } return zOut } // Deallocate the pVCheck prepared statement. func amatchVCheckClear(tls *libc.TLS, p uintptr) { /* amatch.c:769:13: */ if (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck != 0 { sqlite3.Xsqlite3_finalize(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck) (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck = uintptr(0) } } // Deallocate an amatch_vtab object func amatchFree(tls *libc.TLS, p uintptr) { /* amatch.c:779:13: */ if p != 0 { amatchFreeRules(tls, p) amatchVCheckClear(tls, p) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzDb) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzCostTab) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabTab) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang) sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(amatch_vtab{}))) sqlite3.Xsqlite3_free(tls, p) } } // xDisconnect/xDestroy method for the amatch module. func amatchDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* amatch.c:798:12: */ var p uintptr = pVtab amatchFree(tls, p) return SQLITE_OK } // Check to see if the argument is of the form: // // KEY = VALUE // // If it is, return a pointer to the first character of VALUE. // If not, return NULL. Spaces around the = are ignored. func amatchValueOfKey(tls *libc.TLS, zKey uintptr, zStr uintptr) uintptr { /* amatch.c:813:19: */ var nKey int32 = int32(libc.Xstrlen(tls, zKey)) var nStr int32 = int32(libc.Xstrlen(tls, zStr)) var i int32 if nStr < (nKey + 1) { return uintptr(0) } if libc.Xmemcmp(tls, zStr, zKey, uint64(nKey)) != 0 { return uintptr(0) } for i = nKey; libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))))) != 0; i++ { } if int32(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))) != '=' { return uintptr(0) } i++ for libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))))) != 0 { i++ } return (zStr + uintptr(i)) } // xConnect/xCreate method for the amatch module. Arguments are: // // argv[0] -> module name ("approximate_match") // argv[1] -> database name // argv[2] -> table name // argv[3...] -> arguments func amatchConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* amatch.c:834:12: */ bp := tls.Alloc(64) defer tls.Free(64) var rc int32 // Return code var pNew uintptr // New virtual table var zModule uintptr var zDb uintptr var zVal uintptr var i int32 rc = SQLITE_OK pNew = uintptr(0) zModule = *(*uintptr)(unsafe.Pointer(argv)) zDb = *(*uintptr)(unsafe.Pointer(argv + 1*8)) _ = pAux *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(amatch_vtab{}))) if !(pNew == uintptr(0)) { goto __1 } return SQLITE_NOMEM __1: ; rc = SQLITE_NOMEM libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(amatch_vtab{}))) (*amatch_vtab)(unsafe.Pointer(pNew)).Fdb = db (*amatch_vtab)(unsafe.Pointer(pNew)).FzClassName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zModule)) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzClassName == uintptr(0)) { goto __2 } goto amatchConnectError __2: ; (*amatch_vtab)(unsafe.Pointer(pNew)).FzDb = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, zDb)) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzDb == uintptr(0)) { goto __3 } goto amatchConnectError __3: ; (*amatch_vtab)(unsafe.Pointer(pNew)).FzSelf = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzSelf == uintptr(0)) { goto __4 } goto amatchConnectError __4: ; i = 3 __5: if !(i < argc) { goto __7 } zVal = amatchValueOfKey(tls, ts+3339 /* "vocabulary_table" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __8 } sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabTab) (*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabTab = amatchDequote(tls, zVal) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabTab == uintptr(0)) { goto __9 } goto amatchConnectError __9: ; goto __6 __8: ; zVal = amatchValueOfKey(tls, ts+3356 /* "vocabulary_word" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __10 } sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabWord) (*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabWord = amatchDequote(tls, zVal) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabWord == uintptr(0)) { goto __11 } goto amatchConnectError __11: ; goto __6 __10: ; zVal = amatchValueOfKey(tls, ts+3372 /* "vocabulary_langu..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __12 } sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabLang) (*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabLang = amatchDequote(tls, zVal) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzVocabLang == uintptr(0)) { goto __13 } goto amatchConnectError __13: ; goto __6 __12: ; zVal = amatchValueOfKey(tls, ts+3392 /* "edit_distances" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __14 } sqlite3.Xsqlite3_free(tls, (*amatch_vtab)(unsafe.Pointer(pNew)).FzCostTab) (*amatch_vtab)(unsafe.Pointer(pNew)).FzCostTab = amatchDequote(tls, zVal) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzCostTab == uintptr(0)) { goto __15 } goto amatchConnectError __15: ; goto __6 __14: ; *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3407 /* "unrecognized arg..." */, libc.VaList(bp+48, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) amatchFree(tls, pNew) *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) return SQLITE_ERROR goto __6 __6: i++ goto __5 goto __7 __7: ; rc = SQLITE_OK if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzCostTab == uintptr(0)) { goto __16 } *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3436 /* "no edit_distance..." */, 0) rc = SQLITE_ERROR goto __17 __16: rc = amatchLoadRules(tls, db, pNew, pzErr) __17: ; if !(rc == SQLITE_OK) { goto __18 } sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+3470 /* "CREATE TABLE x(w..." */) __18: ; if !(rc != SQLITE_OK) { goto __19 } amatchFree(tls, pNew) __19: ; *(*uintptr)(unsafe.Pointer(ppVtab)) = (pNew /* &.base */) return rc amatchConnectError: amatchFree(tls, pNew) return rc } // Open a new amatch cursor. func amatchOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* amatch.c:928:12: */ var p uintptr = pVTab var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(amatch_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(amatch_cursor{}))) (*amatch_cursor)(unsafe.Pointer(pCur)).FpVtab = p *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) (*amatch_vtab)(unsafe.Pointer(p)).FnCursor++ return SQLITE_OK } // Free up all the memory allocated by a cursor. Set it rLimit to 0 // to indicate that it is at EOF. func amatchClearCursor(tls *libc.TLS, pCur uintptr) { /* amatch.c:944:13: */ var pWord uintptr var pNextWord uintptr for pWord = (*amatch_cursor)(unsafe.Pointer(pCur)).FpAllWords; pWord != 0; pWord = pNextWord { pNextWord = (*amatch_word)(unsafe.Pointer(pWord)).FpNext sqlite3.Xsqlite3_free(tls, pWord) } (*amatch_cursor)(unsafe.Pointer(pCur)).FpAllWords = uintptr(0) sqlite3.Xsqlite3_free(tls, (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput) (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput = uintptr(0) sqlite3.Xsqlite3_free(tls, (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf) (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf = uintptr(0) (*amatch_cursor)(unsafe.Pointer(pCur)).FnBuf = 0 (*amatch_cursor)(unsafe.Pointer(pCur)).FpCost = uintptr(0) (*amatch_cursor)(unsafe.Pointer(pCur)).FpWord = uintptr(0) (*amatch_cursor)(unsafe.Pointer(pCur)).FpCurrent = uintptr(0) (*amatch_cursor)(unsafe.Pointer(pCur)).FrLimit = 1000000 (*amatch_cursor)(unsafe.Pointer(pCur)).FiLang = 0 (*amatch_cursor)(unsafe.Pointer(pCur)).FnWord = 0 } // Close a amatch cursor. func amatchClose(tls *libc.TLS, cur uintptr) int32 { /* amatch.c:967:12: */ var pCur uintptr = cur amatchClearCursor(tls, pCur) (*amatch_vtab)(unsafe.Pointer((*amatch_cursor)(unsafe.Pointer(pCur)).FpVtab)).FnCursor-- sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Render a 24-bit unsigned integer as a 4-byte base-64 number. func amatchEncodeInt(tls *libc.TLS, x int32, z uintptr) { /* amatch.c:978:13: */ *(*int8)(unsafe.Pointer(z)) = a[((x >> 18) & 0x3f)] *(*int8)(unsafe.Pointer(z + 1)) = a[((x >> 12) & 0x3f)] *(*int8)(unsafe.Pointer(z + 2)) = a[((x >> 6) & 0x3f)] *(*int8)(unsafe.Pointer(z + 3)) = a[(x & 0x3f)] } var a = *(*[65]int8)(unsafe.Pointer(ts + 3537 /* "0123456789ABCDEF..." */)) /* amatch.c:979:21 */ // Write the zCost[] field for a amatch_word object func amatchWriteCost(tls *libc.TLS, pWord uintptr) { /* amatch.c:996:13: */ amatchEncodeInt(tls, (*amatch_word)(unsafe.Pointer(pWord)).FrCost, pWord+112 /* &.zCost */) amatchEncodeInt(tls, (*amatch_word)(unsafe.Pointer(pWord)).FiSeq, ((pWord + 112 /* &.zCost */) + uintptr(4))) *(*int8)(unsafe.Pointer((pWord + 112 /* &.zCost */) + 8)) = int8(0) } // Circumvent compiler warnings about the use of strcpy() by supplying // our own implementation. func amatchStrcpy(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1005:13: */ for (int32(libc.AssignPtrInt8(libc.PostIncUintptr(&dest, 1), *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))))) != 0 { } } func amatchStrcat(tls *libc.TLS, dest uintptr, src uintptr) { /* amatch.c:1008:13: */ for *(*int8)(unsafe.Pointer(dest)) != 0 { dest++ } amatchStrcpy(tls, dest, src) } // Add a new amatch_word object to the queue. // // If a prior amatch_word object with the same zWord, and nMatch // already exists, update its rCost (if the new rCost is less) but // otherwise leave it unchanged. Do not add a duplicate. // // Do nothing if the cost exceeds threshold. func amatchAddWord(tls *libc.TLS, pCur uintptr, rCost amatch_cost, nMatch int32, zWordBase uintptr, zWordTail uintptr) { /* amatch.c:1022:13: */ bp := tls.Alloc(4) defer tls.Free(4) var pWord uintptr var pNode uintptr var pOther uintptr _ = pOther var nBase int32 var nTail int32 // var zBuf [4]int8 at bp, 4 if rCost > (*amatch_cursor)(unsafe.Pointer(pCur)).FrLimit { return } nBase = int32(libc.Xstrlen(tls, zWordBase)) nTail = int32(libc.Xstrlen(tls, zWordTail)) if ((nBase + nTail) + 3) > (*amatch_cursor)(unsafe.Pointer(pCur)).FnBuf { (*amatch_cursor)(unsafe.Pointer(pCur)).FnBuf = ((nBase + nTail) + 100) (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf = sqlite3.Xsqlite3_realloc(tls, (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf, (*amatch_cursor)(unsafe.Pointer(pCur)).FnBuf) if (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf == uintptr(0) { (*amatch_cursor)(unsafe.Pointer(pCur)).FnBuf = 0 return } } amatchEncodeInt(tls, nMatch, bp /* &zBuf[0] */) libc.Xmemcpy(tls, (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf, (bp /* &zBuf[0] */ + uintptr(2)), uint64(2)) libc.Xmemcpy(tls, ((*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf + uintptr(2)), zWordBase, uint64(nBase)) libc.Xmemcpy(tls, (((*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf + uintptr(2)) + uintptr(nBase)), zWordTail, (uint64(nTail + 1))) pNode = amatchAvlSearch(tls, (*amatch_cursor)(unsafe.Pointer(pCur)).FpWord, (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf) if pNode != 0 { pWord = (*amatch_avl)(unsafe.Pointer(pNode)).FpWord if (*amatch_word)(unsafe.Pointer(pWord)).FrCost > rCost { amatchAvlRemove(tls, (pCur + 80 /* &.pCost */), (pWord + 8 /* &.sCost */)) (*amatch_word)(unsafe.Pointer(pWord)).FrCost = rCost amatchWriteCost(tls, pWord) pOther = amatchAvlInsert(tls, (pCur + 80 /* &.pCost */), (pWord + 8 /* &.sCost */)) _ = pOther } return } pWord = sqlite3.Xsqlite3_malloc64(tls, (((uint64(unsafe.Sizeof(amatch_word{})) + uint64(nBase)) + uint64(nTail)) - uint64(1))) if pWord == uintptr(0) { return } libc.Xmemset(tls, pWord, 0, uint64(unsafe.Sizeof(amatch_word{}))) (*amatch_word)(unsafe.Pointer(pWord)).FrCost = rCost (*amatch_word)(unsafe.Pointer(pWord)).FiSeq = libc.PostIncInt32(&(*amatch_cursor)(unsafe.Pointer(pCur)).FnWord, 1) amatchWriteCost(tls, pWord) (*amatch_word)(unsafe.Pointer(pWord)).FnMatch = int16(nMatch) (*amatch_word)(unsafe.Pointer(pWord)).FpNext = (*amatch_cursor)(unsafe.Pointer(pCur)).FpAllWords (*amatch_cursor)(unsafe.Pointer(pCur)).FpAllWords = pWord (*amatch_word)(unsafe.Pointer(pWord)).FsCost.FzKey = pWord + 112 /* &.zCost */ (*amatch_word)(unsafe.Pointer(pWord)).FsCost.FpWord = pWord pOther = amatchAvlInsert(tls, (pCur + 80 /* &.pCost */), (pWord + 8 /* &.sCost */)) _ = pOther (*amatch_word)(unsafe.Pointer(pWord)).FsWord.FzKey = pWord + 124 /* &.zWord */ (*amatch_word)(unsafe.Pointer(pWord)).FsWord.FpWord = pWord amatchStrcpy(tls, pWord+124 /* &.zWord */, (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf) pOther = amatchAvlInsert(tls, (pCur + 88 /* &.pWord */), (pWord + 56 /* &.sWord */)) _ = pOther } // Advance a cursor to its next row of output func amatchNext(tls *libc.TLS, cur uintptr) int32 { /* amatch.c:1102:12: */ bp := tls.Alloc(96) defer tls.Free(96) var pCur uintptr = cur var pWord uintptr = uintptr(0) var pNode uintptr var isMatch int32 = 0 var p uintptr = (*amatch_cursor)(unsafe.Pointer(pCur)).FpVtab var nWord int32 var rc int32 var i int32 var zW uintptr var pRule uintptr var zBuf uintptr = uintptr(0) var nBuf int8 = int8(0) // var zNext [8]int8 at bp+80, 8 // var zNextIn [8]int8 at bp+88, 8 var nNextIn int32 if (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck == uintptr(0) { var zSql uintptr if ((*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang != 0) && (*(*int8)(unsafe.Pointer((*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang)) != 0) { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+3602, /* "SELECT \"%w\" FROM..." */ libc.VaList(bp, ts+3624, /* " WHERE \"%w\">=?1 ..." */ (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabTab, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang)) } else { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+3663, /* "SELECT \"%w\" FROM..." */ libc.VaList(bp+48, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabTab, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord)) } rc = sqlite3.Xsqlite3_prepare_v2(tls, (*amatch_vtab)(unsafe.Pointer(p)).Fdb, zSql, -1, (p + 112 /* &.pVCheck */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc != 0 { return rc } } sqlite3.Xsqlite3_bind_int(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck, 2, (*amatch_cursor)(unsafe.Pointer(pCur)).FiLang) for ok := true; ok; ok = !(isMatch != 0) { pNode = amatchAvlFirst(tls, (*amatch_cursor)(unsafe.Pointer(pCur)).FpCost) if pNode == uintptr(0) { pWord = uintptr(0) break } pWord = (*amatch_avl)(unsafe.Pointer(pNode)).FpWord amatchAvlRemove(tls, (pCur + 80 /* &.pCost */), (pWord + 8 /* &.sCost */)) nWord = int32(libc.Xstrlen(tls, ((pWord + 124 /* &.zWord */) + uintptr(2)))) if (nWord + 20) > int32(nBuf) { nBuf = (int8(nWord + 100)) zBuf = sqlite3.Xsqlite3_realloc(tls, zBuf, int32(nBuf)) if zBuf == uintptr(0) { return SQLITE_NOMEM } } amatchStrcpy(tls, zBuf, ((pWord + 124 /* &.zWord */) + uintptr(2))) *(*int8)(unsafe.Pointer(bp + 80 /* &zNext[0] */)) = int8(0) *(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */)) = *(*int8)(unsafe.Pointer((*amatch_cursor)(unsafe.Pointer(pCur)).FzInput + uintptr((*amatch_word)(unsafe.Pointer(pWord)).FnMatch))) if *(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */)) != 0 { for i = 1; (i <= 4) && ((int32(*(*int8)(unsafe.Pointer((*amatch_cursor)(unsafe.Pointer(pCur)).FzInput + uintptr((int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + i))))) & 0xc0) == 0x80); i++ { *(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */ + uintptr(i))) = *(*int8)(unsafe.Pointer((*amatch_cursor)(unsafe.Pointer(pCur)).FzInput + uintptr((int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + i)))) } *(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */ + uintptr(i))) = int8(0) nNextIn = i } else { nNextIn = 0 } if (*(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */)) != 0) && (int32(*(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */))) != '*') { sqlite3.Xsqlite3_reset(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck) amatchStrcat(tls, zBuf, bp+88 /* &zNextIn[0] */) sqlite3.Xsqlite3_bind_text(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck, 1, zBuf, (nWord + nNextIn), uintptr(0)) rc = sqlite3.Xsqlite3_step(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck) if rc == SQLITE_ROW { zW = sqlite3.Xsqlite3_column_text(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck, 0) if libc.Xstrncmp(tls, zBuf, zW, (uint64(nWord+nNextIn))) == 0 { amatchAddWord(tls, pCur, (*amatch_word)(unsafe.Pointer(pWord)).FrCost, (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + nNextIn), zBuf, ts+489 /* "" */) } } *(*int8)(unsafe.Pointer(zBuf + uintptr(nWord))) = int8(0) } for 1 != 0 { amatchStrcpy(tls, (zBuf + uintptr(nWord)), bp+80 /* &zNext[0] */) sqlite3.Xsqlite3_reset(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck) sqlite3.Xsqlite3_bind_text(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck, 1, zBuf, -1, libc.UintptrFromInt32(-1)) rc = sqlite3.Xsqlite3_step(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck) if rc != SQLITE_ROW { break } zW = sqlite3.Xsqlite3_column_text(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck, 0) amatchStrcpy(tls, (zBuf + uintptr(nWord)), bp+80 /* &zNext[0] */) if libc.Xstrncmp(tls, zW, zBuf, uint64(nWord)) != 0 { break } if ((int32(*(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */))) == '*') && (int32(*(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */ + 1))) == 0)) || ((int32(*(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */))) == 0) && (int32(*(*int8)(unsafe.Pointer(zW + uintptr(nWord)))) == 0)) { isMatch = 1 *(*int8)(unsafe.Pointer(bp + 88 /* &zNextIn[0] */)) = int8(0) nNextIn = 0 break } *(*int8)(unsafe.Pointer(bp + 80 /* &zNext[0] */)) = *(*int8)(unsafe.Pointer(zW + uintptr(nWord))) for i = 1; (i <= 4) && ((int32(*(*int8)(unsafe.Pointer(zW + uintptr((nWord + i))))) & 0xc0) == 0x80); i++ { *(*int8)(unsafe.Pointer(bp + 80 /* &zNext[0] */ + uintptr(i))) = *(*int8)(unsafe.Pointer(zW + uintptr((nWord + i)))) } *(*int8)(unsafe.Pointer(bp + 80 /* &zNext[0] */ + uintptr(i))) = int8(0) *(*int8)(unsafe.Pointer(zBuf + uintptr(nWord))) = int8(0) if (*amatch_vtab)(unsafe.Pointer(p)).FrIns > 0 { amatchAddWord(tls, pCur, ((*amatch_word)(unsafe.Pointer(pWord)).FrCost + (*amatch_vtab)(unsafe.Pointer(p)).FrIns), int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch), zBuf, bp+80 /* &zNext[0] */) } if (*amatch_vtab)(unsafe.Pointer(p)).FrSub > 0 { amatchAddWord(tls, pCur, ((*amatch_word)(unsafe.Pointer(pWord)).FrCost + (*amatch_vtab)(unsafe.Pointer(p)).FrSub), (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + nNextIn), zBuf, bp+80 /* &zNext[0] */) } if ((*amatch_vtab)(unsafe.Pointer(p)).FrIns < 0) && ((*amatch_vtab)(unsafe.Pointer(p)).FrSub < 0) { break } *(*int8)(unsafe.Pointer(bp + 80 /* &zNext[0] */ + uintptr((i - 1))))++ // FIX ME } sqlite3.Xsqlite3_reset(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck) if (*amatch_vtab)(unsafe.Pointer(p)).FrDel > 0 { *(*int8)(unsafe.Pointer(zBuf + uintptr(nWord))) = int8(0) amatchAddWord(tls, pCur, ((*amatch_word)(unsafe.Pointer(pWord)).FrCost + (*amatch_vtab)(unsafe.Pointer(p)).FrDel), (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + nNextIn), zBuf, ts+489 /* "" */) } for pRule = (*amatch_vtab)(unsafe.Pointer(p)).FpRule; pRule != 0; pRule = (*amatch_rule)(unsafe.Pointer(pRule)).FpNext { if (*amatch_rule)(unsafe.Pointer(pRule)).FiLang != (*amatch_cursor)(unsafe.Pointer(pCur)).FiLang { continue } if libc.Xstrncmp(tls, (*amatch_rule)(unsafe.Pointer(pRule)).FzFrom, ((*amatch_cursor)(unsafe.Pointer(pCur)).FzInput+uintptr((*amatch_word)(unsafe.Pointer(pWord)).FnMatch)), uint64((*amatch_rule)(unsafe.Pointer(pRule)).FnFrom)) == 0 { amatchAddWord(tls, pCur, ((*amatch_word)(unsafe.Pointer(pWord)).FrCost + (*amatch_rule)(unsafe.Pointer(pRule)).FrCost), (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + int32((*amatch_rule)(unsafe.Pointer(pRule)).FnFrom)), ((pWord + 124 /* &.zWord */) + uintptr(2)), pRule+26 /* &.zTo */) } } } (*amatch_cursor)(unsafe.Pointer(pCur)).FpCurrent = pWord sqlite3.Xsqlite3_free(tls, zBuf) return SQLITE_OK } // Called to "rewind" a cursor back to the beginning so that // it starts its output over again. Always called at least once // prior to any amatchColumn, amatchRowid, or amatchEof call. func amatchFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* amatch.c:1251:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pCur uintptr = pVtabCursor var zWord uintptr = ts + 3711 /* "*" */ var idx int32 amatchClearCursor(tls, pCur) idx = 0 if (idxNum & 1) != 0 { zWord = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) idx++ } if (idxNum & 2) != 0 { (*amatch_cursor)(unsafe.Pointer(pCur)).FrLimit = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(idx)*8))) idx++ } if (idxNum & 4) != 0 { (*amatch_cursor)(unsafe.Pointer(pCur)).FiLang = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(idx)*8))) idx++ } (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zWord)) if (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput == uintptr(0) { return SQLITE_NOMEM } amatchAddWord(tls, pCur, 0, 0, ts+489 /* "" */, ts+489 /* "" */) amatchNext(tls, pVtabCursor) return SQLITE_OK } // Only the word and distance columns have values. All other columns // return NULL func amatchColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* amatch.c:1286:12: */ var pCur uintptr = cur switch i { case AMATCH_COL_WORD: { sqlite3.Xsqlite3_result_text(tls, ctx, (((*amatch_cursor)(unsafe.Pointer(pCur)).FpCurrent + 124 /* &.zWord */) + uintptr(2)), -1, uintptr(0)) break } case AMATCH_COL_DISTANCE: { sqlite3.Xsqlite3_result_int(tls, ctx, (*amatch_word)(unsafe.Pointer((*amatch_cursor)(unsafe.Pointer(pCur)).FpCurrent)).FrCost) break } case AMATCH_COL_LANGUAGE: { sqlite3.Xsqlite3_result_int(tls, ctx, (*amatch_cursor)(unsafe.Pointer(pCur)).FiLang) break } case AMATCH_COL_NWORD: { sqlite3.Xsqlite3_result_int(tls, ctx, (*amatch_cursor)(unsafe.Pointer(pCur)).FnWord) break } default: { sqlite3.Xsqlite3_result_null(tls, ctx) break } } return SQLITE_OK } // The rowid. func amatchRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* amatch.c:1316:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*amatch_cursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // EOF indicator func amatchEof(tls *libc.TLS, cur uintptr) int32 { /* amatch.c:1325:12: */ var pCur uintptr = cur return (libc.Bool32((*amatch_cursor)(unsafe.Pointer(pCur)).FpCurrent == uintptr(0))) } // Search for terms of these forms: // // (A) word MATCH $str // (B1) distance < $value // (B2) distance <= $value // (C) language == $language // // The distance< and distance<= are both treated as distance<=. // The query plan number is a bit vector: // // bit 1: Term of the form (A) found // bit 2: Term like (B1) or (B2) found // bit 3: Term like (C) found // // If bit-1 is set, $str is always in filter.argv[0]. If bit-2 is set // then $value is in filter.argv[0] if bit-1 is clear and is in // filter.argv[1] if bit-1 is set. If bit-3 is set, then $ruleid is // in filter.argv[0] if bit-1 and bit-2 are both zero, is in // filter.argv[1] if exactly one of bit-1 and bit-2 are set, and is in // filter.argv[2] if both bit-1 and bit-2 are set. func amatchBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* amatch.c:1352:12: */ var iPlan int32 = 0 var iDistTerm int32 = -1 var iLangTerm int32 = -1 var i int32 var pConstraint uintptr _ = tab pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { goto __2 } if (((iPlan & 1) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 0)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH) { iPlan = iPlan | (1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) } if (((iPlan & 2) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 1)) && ((int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LE)) { iPlan = iPlan | (2) iDistTerm = i } if (((iPlan & 4) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 2)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (4) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) iLangTerm = i } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if (iPlan & 2) != 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iDistTerm)*8)).FargvIndex = (1 + (libc.Bool32((iPlan & 1) != 0))) } if (iPlan & 4) != 0 { var idx int32 = 1 if (iPlan & 1) != 0 { idx++ } if (iPlan & 2) != 0 { idx++ } (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iLangTerm)*8)).FargvIndex = idx } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = iPlan if (((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1) && ((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn == 1)) && (int32((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc) == 0) { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(10000) return SQLITE_OK } // The xUpdate() method. // // This implementation disallows DELETE and UPDATE. The only thing // allowed is INSERT into the "command" column. func amatchUpdate(tls *libc.TLS, pVTab uintptr, argc int32, argv uintptr, pRowid uintptr) int32 { /* amatch.c:1418:12: */ bp := tls.Alloc(48) defer tls.Free(48) var p uintptr = pVTab var zCmd uintptr _ = pRowid if argc == 1 { (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+3713, /* "DELETE from %s i..." */ libc.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) return SQLITE_ERROR } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) != SQLITE_NULL { (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+3743, /* "UPDATE of %s is ..." */ libc.VaList(bp+16, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) return SQLITE_ERROR } if ((sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) != SQLITE_NULL) || (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) != SQLITE_NULL)) || (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) != SQLITE_NULL) { (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+3771 /* "INSERT INTO %s a..." */, libc.VaList(bp+32, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) return SQLITE_ERROR } zCmd = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) if zCmd == uintptr(0) { return SQLITE_OK } return SQLITE_OK } // A virtual table module that implements the "approximate_match". var amatchModule = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xShadowName } /* amatch.c:1454:23 */ // Register the amatch virtual table func sqlite3_amatch_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* amatch.c:1489:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Not used rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3820 /* "approximate_matc..." */, uintptr(unsafe.Pointer(&amatchModule)), uintptr(0)) return rc } // Allowed values for the mFlags parameter to sqlite3_carray_bind(). // Must exactly match the definitions in carray.h. // Names of allowed datatypes var azType = [4]uintptr{ts + 3838 /* "int32" */, ts + 3844 /* "int64" */, ts + 2423 /* "double" */, ts + 3850 /* "char*" */} /* carray.c:73:19 */ // Structure used to hold the sqlite3_carray_bind() information type carray_bind1 = struct { FaData uintptr FnData int32 FmFlags int32 FxDel uintptr } /* carray.c:78:9 */ // Structure used to hold the sqlite3_carray_bind() information type carray_bind = carray_bind1 /* carray.c:78:28 */ // carray_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result type carray_cursor1 = struct { Fbase sqlite3_vtab_cursor FiRowid sqlite3_int64 FpPtr uintptr FiCnt sqlite3_int64 FeType uint8 _ [7]byte } /* carray.c:91:9 */ // carray_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result type carray_cursor = carray_cursor1 /* carray.c:91:30 */ // The carrayConnect() method is invoked to create a new // carray_vtab that describes the carray virtual table. // // Think of this routine as the constructor for carray_vtab objects. // // All this routine needs to do is: // // (1) Allocate the carray_vtab object and initialize all fields. // // (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the // result set of queries against carray will look like. func carrayConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* carray.c:113:12: */ var pNew uintptr var rc int32 // Column numbers rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+3856 /* "CREATE TABLE x(v..." */) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vtab{})))) if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(sqlite3_vtab{}))) } return rc } // This method is the destructor for carray_cursor objects. func carrayDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* carray.c:142:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // Constructor for a new carray_cursor object. func carrayOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* carray.c:150:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(carray_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(carray_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Destructor for a carray_cursor. func carrayClose(tls *libc.TLS, cur uintptr) int32 { /* carray.c:162:12: */ sqlite3.Xsqlite3_free(tls, cur) return SQLITE_OK } // Advance a carray_cursor to its next row of output. func carrayNext(tls *libc.TLS, cur uintptr) int32 { /* carray.c:171:12: */ var pCur uintptr = cur (*carray_cursor)(unsafe.Pointer(pCur)).FiRowid++ return SQLITE_OK } // Return values of columns for the row at which the carray_cursor // is currently pointing. func carrayColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* carray.c:181:12: */ var pCur uintptr = cur var x sqlite3_int64 = int64(0) switch i { case CARRAY_COLUMN_POINTER: return SQLITE_OK case CARRAY_COLUMN_COUNT: x = (*carray_cursor)(unsafe.Pointer(pCur)).FiCnt break case CARRAY_COLUMN_CTYPE: { sqlite3.Xsqlite3_result_text(tls, ctx, azType[(*carray_cursor)(unsafe.Pointer(pCur)).FeType], -1, uintptr(0)) return SQLITE_OK } default: { switch int32((*carray_cursor)(unsafe.Pointer(pCur)).FeType) { case CARRAY_INT32: { var p uintptr = (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr sqlite3.Xsqlite3_result_int(tls, ctx, *(*int32)(unsafe.Pointer(p + uintptr(((*carray_cursor)(unsafe.Pointer(pCur)).FiRowid-int64(1)))*4))) return SQLITE_OK } case CARRAY_INT64: { var p uintptr = (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr sqlite3.Xsqlite3_result_int64(tls, ctx, *(*sqlite3_int64)(unsafe.Pointer(p + uintptr(((*carray_cursor)(unsafe.Pointer(pCur)).FiRowid-int64(1)))*8))) return SQLITE_OK } case CARRAY_DOUBLE: { var p uintptr = (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr sqlite3.Xsqlite3_result_double(tls, ctx, *(*float64)(unsafe.Pointer(p + uintptr(((*carray_cursor)(unsafe.Pointer(pCur)).FiRowid-int64(1)))*8))) return SQLITE_OK } case CARRAY_TEXT: { var p uintptr = (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr sqlite3.Xsqlite3_result_text(tls, ctx, *(*uintptr)(unsafe.Pointer(p + uintptr(((*carray_cursor)(unsafe.Pointer(pCur)).FiRowid-int64(1)))*8)), -1, libc.UintptrFromInt32(-1)) return SQLITE_OK } } } } sqlite3.Xsqlite3_result_int64(tls, ctx, x) return SQLITE_OK } // Return the rowid for the current row. In this implementation, the // rowid is the same as the output value. func carrayRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* carray.c:228:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*carray_cursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // Return TRUE if the cursor has been moved off of the last // row of output. func carrayEof(tls *libc.TLS, cur uintptr) int32 { /* carray.c:238:12: */ var pCur uintptr = cur return (libc.Bool32((*carray_cursor)(unsafe.Pointer(pCur)).FiRowid > (*carray_cursor)(unsafe.Pointer(pCur)).FiCnt)) } // This method is called to "rewind" the carray_cursor object back // to the first row of output. func carrayFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* carray.c:247:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pCur uintptr = pVtabCursor (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr = uintptr(0) (*carray_cursor)(unsafe.Pointer(pCur)).FiCnt = int64(0) switch idxNum { case 1: { var pBind uintptr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+3919 /* "carray-bind" */) if pBind == uintptr(0) { break } (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr = (*carray_bind)(unsafe.Pointer(pBind)).FaData (*carray_cursor)(unsafe.Pointer(pCur)).FiCnt = sqlite3_int64((*carray_bind)(unsafe.Pointer(pBind)).FnData) (*carray_cursor)(unsafe.Pointer(pCur)).FeType = (uint8((*carray_bind)(unsafe.Pointer(pBind)).FmFlags & 0x03)) break } case 2: fallthrough case 3: { (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+3931 /* "carray" */) (*carray_cursor)(unsafe.Pointer(pCur)).FiCnt = func() int64 { if (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr != 0 { return sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) } return int64(0) }() if idxNum < 3 { (*carray_cursor)(unsafe.Pointer(pCur)).FeType = uint8(CARRAY_INT32) } else { var i uint8 var zType uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) for i = uint8(0); uint64(i) < (uint64(unsafe.Sizeof(azType)) / uint64(unsafe.Sizeof(uintptr(0)))); i++ { if sqlite3.Xsqlite3_stricmp(tls, zType, azType[i]) == 0 { break } } if uint64(i) >= (uint64(unsafe.Sizeof(azType)) / uint64(unsafe.Sizeof(uintptr(0)))) { (*sqlite3_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+3938 /* "unknown datatype..." */, libc.VaList(bp, zType)) return SQLITE_ERROR } else { (*carray_cursor)(unsafe.Pointer(pCur)).FeType = i } } break } } (*carray_cursor)(unsafe.Pointer(pCur)).FiRowid = int64(1) return SQLITE_OK } // SQLite will invoke this method one or more times while planning a query // that uses the carray virtual table. This routine needs to create // a query plan for each invocation and compute an estimated cost for that // plan. // // In this implementation idxNum is used to represent the // query plan. idxStr is unused. // // idxNum is: // // 1 If only the pointer= constraint exists. In this case, the // parameter must be bound using sqlite3_carray_bind(). // // 2 if the pointer= and count= constraints exist. // // 3 if the ctype= constraint also exists. // // idxNum is 0 otherwise and carray becomes an empty table. func carrayBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* carray.c:311:12: */ var i int32 // Loop over constraints var ptrIdx int32 = -1 // Index of the pointer= constraint, or -1 if none var cntIdx int32 = -1 // Index of the count= constraint, or -1 if none var ctypeIdx int32 = -1 // Index of the ctype= constraint, or -1 if none var pConstraint uintptr pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { goto __2 } if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) != SQLITE_INDEX_CONSTRAINT_EQ { goto __2 } switch (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn { case CARRAY_COLUMN_POINTER: ptrIdx = i break case CARRAY_COLUMN_COUNT: cntIdx = i break case CARRAY_COLUMN_CTYPE: ctypeIdx = i break } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if ptrIdx >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ptrIdx)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ptrIdx)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 if cntIdx >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(cntIdx)*8)).FargvIndex = 2 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(cntIdx)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 if ctypeIdx >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ctypeIdx)*8)).FargvIndex = 3 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ctypeIdx)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 3 } } } else { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(2147483647) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(2147483647) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 0 } return SQLITE_OK } // This following structure defines all the methods for the // carray virtual table. var carrayModule = sqlite3_module{ // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* carray.c:365:23 */ // Destructor for the carray_bind object func carrayBindDel(tls *libc.TLS, pPtr uintptr) { /* carray.c:391:13: */ var p uintptr = pPtr if (*carray_bind)(unsafe.Pointer(p)).FxDel != (uintptr(0)) { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((p + 16 /* &.xDel */))))(tls, (*carray_bind)(unsafe.Pointer(p)).FaData) } sqlite3.Xsqlite3_free(tls, p) } // Invoke this interface in order to bind to the single-argument // version of CARRAY(). func sqlite3_carray_bind(tls *libc.TLS, pStmt uintptr, idx int32, aData uintptr, nData int32, mFlags int32, xDestroy uintptr) int32 { /* carray.c:406:5: */ var pNew uintptr var i int32 pNew = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(carray_bind{}))) if pNew == uintptr(0) { if (xDestroy != (uintptr(0))) && (xDestroy != (libc.UintptrFromInt32(-1))) { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDestroy)))(tls, aData) } return SQLITE_NOMEM } (*carray_bind)(unsafe.Pointer(pNew)).FnData = nData (*carray_bind)(unsafe.Pointer(pNew)).FmFlags = mFlags if xDestroy == (libc.UintptrFromInt32(-1)) { var sz sqlite3_int64 = sqlite3_int64(nData) switch mFlags & 0x03 { case CARRAY_INT32: sz = sz * (int64(4)) break fallthrough case CARRAY_INT64: sz = sz * (int64(8)) break fallthrough case CARRAY_DOUBLE: sz = sz * (int64(8)) break fallthrough case CARRAY_TEXT: sz = int64(uint64(sz) * (uint64(unsafe.Sizeof(uintptr(0))))) break } if (mFlags & 0x03) == CARRAY_TEXT { for i = 0; i < nData; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((aData) + uintptr(i)*8)) if z != 0 { sz = sqlite3_int64(size_t(sz) + (libc.Xstrlen(tls, z) + uint64(1))) } } } (*carray_bind)(unsafe.Pointer(pNew)).FaData = sqlite3.Xsqlite3_malloc64(tls, uint64(sz)) if (*carray_bind)(unsafe.Pointer(pNew)).FaData == uintptr(0) { sqlite3.Xsqlite3_free(tls, pNew) return SQLITE_NOMEM } if (mFlags & 0x03) == CARRAY_TEXT { var az uintptr = (*carray_bind)(unsafe.Pointer(pNew)).FaData var z uintptr = (az + uintptr(nData)*8) for i = 0; i < nData; i++ { var zData uintptr = *(*uintptr)(unsafe.Pointer((aData) + uintptr(i)*8)) var n sqlite3_int64 if zData == uintptr(0) { *(*uintptr)(unsafe.Pointer(az + uintptr(i)*8)) = uintptr(0) continue } *(*uintptr)(unsafe.Pointer(az + uintptr(i)*8)) = z n = sqlite3_int64(libc.Xstrlen(tls, zData)) libc.Xmemcpy(tls, z, zData, (uint64(n + int64(1)))) z += (uintptr(n + int64(1))) } } else { libc.Xmemcpy(tls, (*carray_bind)(unsafe.Pointer(pNew)).FaData, aData, (uint64(sz * sqlite3_int64(nData)))) } (*carray_bind)(unsafe.Pointer(pNew)).FxDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free})) } else { (*carray_bind)(unsafe.Pointer(pNew)).FaData = aData (*carray_bind)(unsafe.Pointer(pNew)).FxDel = xDestroy } return sqlite3.Xsqlite3_bind_pointer(tls, pStmt, idx, pNew, ts+3919 /* "carray-bind" */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{carrayBindDel}))) } // For testing purpose in the TCL test harness, we need a method for // setting the pointer value. The inttoptr(X) SQL function accomplishes // this. Tcl script will bind an integer to X and the inttoptr() SQL // function will use sqlite3_result_pointer() to convert that integer into // a pointer. // // This is for testing on TCL only. func inttoptrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* carray.c:481:13: */ bp := tls.Alloc(20) defer tls.Free(20) // var p uintptr at bp, 8 // var i64 sqlite3_int64 at bp+8, 8 *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* i64 */)) = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if uint64(unsafe.Sizeof(sqlite3_int64(0))) == uint64(unsafe.Sizeof(uintptr(0))) { libc.Xmemcpy(tls, bp /* &p */, bp+8 /* &i64 */, uint64(unsafe.Sizeof(uintptr(0)))) } else { *(*int32)(unsafe.Pointer(bp + 16 /* i32 */)) = (int32(*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* i64 */)) & int64(0xffffffff))) libc.Xmemcpy(tls, bp /* &p */, bp+16 /* &i32 */, uint64(unsafe.Sizeof(uintptr(0)))) } sqlite3.Xsqlite3_result_pointer(tls, context, *(*uintptr)(unsafe.Pointer(bp /* p */)), ts+3931 /* "carray" */, uintptr(0)) } func sqlite3_carray_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* carray.c:504:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3931 /* "carray" */, uintptr(unsafe.Pointer(&carrayModule)), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3959 /* "inttoptr" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{inttoptrFunc})), uintptr(0), uintptr(0)) } return rc } // Static assertion. Requires support in the compiler. // Forward declaration of objects used by this utility type CksmVfs = sqlite3_vfs1 /* cksumvfs.c:176:28 */ type CksmFile1 = struct { Fbase sqlite3_file FzFName uintptr FcomputeCksm int8 FverifyCksm int8 FisWal int8 FinCkpt int8 _ [4]byte FpPartner uintptr } /* cksumvfs.c:177:9 */ type CksmFile = CksmFile1 /* cksumvfs.c:177:25 */ // Useful datatype abbreviations type u8 = uint8 /* cksumvfs.c:183:25 */ var cksm_vfs = sqlite3_vfs{ FiVersion: 3, // szOsFile (set when registered) FmxPathname: 1024, // pNext FzName: ts + 3968, /* "cksmvfs" */ /* pAppData (set when registered) */ FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xCurrentTimeInt64 FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall } /* cksumvfs.c:247:20 */ var cksm_io_methods = sqlite3_io_methods{ FiVersion: 3, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch } /* cksumvfs.c:272:33 */ // Do byte swapping on a unsigned 32-bit integer // Compute a checksum on a buffer func cksmCompute(tls *libc.TLS, a uintptr, nByte int32, aOut uintptr) { /* cksumvfs.c:301:13: */ bp := tls.Alloc(12) defer tls.Free(12) *(*u32)(unsafe.Pointer(bp + 4 /* s1 */)) = u32(0) *(*u32)(unsafe.Pointer(bp + 8 /* s2 */)) = u32(0) var aData uintptr = a var aEnd uintptr = (a + uintptr(nByte)) *(*u32)(unsafe.Pointer(bp /* x */)) = u32(1) if 1 == int32(*(*u8)(unsafe.Pointer(bp /* &x */))) { // Little-endian for ok := true; ok; ok = (aData < aEnd) { *(*u32)(unsafe.Pointer(bp + 4 /* s1 */)) += (*(*u32)(unsafe.Pointer(libc.PostIncUintptr(&aData, 4))) + *(*u32)(unsafe.Pointer(bp + 8 /* s2 */))) *(*u32)(unsafe.Pointer(bp + 8 /* s2 */)) += (*(*u32)(unsafe.Pointer(libc.PostIncUintptr(&aData, 4))) + *(*u32)(unsafe.Pointer(bp + 4 /* s1 */))) } } else { // Big-endian for ok1 := true; ok1; ok1 = (aData < aEnd) { *(*u32)(unsafe.Pointer(bp + 4 /* s1 */)) += (((((((*(*u32)(unsafe.Pointer(aData))) & u32(0x000000FF)) << 24) + (((*(*u32)(unsafe.Pointer(aData))) & u32(0x0000FF00)) << 8)) + (((*(*u32)(unsafe.Pointer(aData))) & u32(0x00FF0000)) >> 8)) + (((*(*u32)(unsafe.Pointer(aData))) & 0xFF000000) >> 24)) + *(*u32)(unsafe.Pointer(bp + 8 /* s2 */))) *(*u32)(unsafe.Pointer(bp + 8 /* s2 */)) += (((((((*(*u32)(unsafe.Pointer(aData + 1*4))) & u32(0x000000FF)) << 24) + (((*(*u32)(unsafe.Pointer(aData + 1*4))) & u32(0x0000FF00)) << 8)) + (((*(*u32)(unsafe.Pointer(aData + 1*4))) & u32(0x00FF0000)) >> 8)) + (((*(*u32)(unsafe.Pointer(aData + 1*4))) & 0xFF000000) >> 24)) + *(*u32)(unsafe.Pointer(bp + 4 /* s1 */))) aData += 4 * (uintptr(2)) } *(*u32)(unsafe.Pointer(bp + 4 /* s1 */)) = ((((((*(*u32)(unsafe.Pointer(bp + 4 /* s1 */))) & u32(0x000000FF)) << 24) + (((*(*u32)(unsafe.Pointer(bp + 4 /* s1 */))) & u32(0x0000FF00)) << 8)) + (((*(*u32)(unsafe.Pointer(bp + 4 /* s1 */))) & u32(0x00FF0000)) >> 8)) + (((*(*u32)(unsafe.Pointer(bp + 4 /* s1 */))) & 0xFF000000) >> 24)) *(*u32)(unsafe.Pointer(bp + 8 /* s2 */)) = ((((((*(*u32)(unsafe.Pointer(bp + 8 /* s2 */))) & u32(0x000000FF)) << 24) + (((*(*u32)(unsafe.Pointer(bp + 8 /* s2 */))) & u32(0x0000FF00)) << 8)) + (((*(*u32)(unsafe.Pointer(bp + 8 /* s2 */))) & u32(0x00FF0000)) >> 8)) + (((*(*u32)(unsafe.Pointer(bp + 8 /* s2 */))) & 0xFF000000) >> 24)) } libc.Xmemcpy(tls, aOut, bp+4 /* &s1 */, uint64(4)) libc.Xmemcpy(tls, (aOut + uintptr(4)), bp+8 /* &s2 */, uint64(4)) } // SQL function: verify_checksum(BLOB) // // Return 0 or 1 if the checksum is invalid or valid. Or return // NULL if the input is not a BLOB that is the right size for a // database page. func cksmVerifyFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* cksumvfs.c:342:13: */ bp := tls.Alloc(8) defer tls.Free(8) var nByte int32 var data uintptr // var cksum [8]u8 at bp, 8 data = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) if data == uintptr(0) { return } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) != SQLITE_BLOB { return } nByte = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if ((nByte < 512) || (nByte > 65536)) || ((nByte & (nByte - 1)) != 0) { return } cksmCompute(tls, data, (nByte - 8), bp /* &cksum[0] */) sqlite3.Xsqlite3_result_int(tls, context, (libc.Bool32(libc.Xmemcmp(tls, ((data+uintptr(nByte))-uintptr(8)), bp /* &cksum[0] */, uint64(8)) == 0))) } // Close a cksm-file. func cksmClose(tls *libc.TLS, pFile uintptr) int32 { /* cksumvfs.c:397:12: */ var p uintptr = pFile if (*CksmFile)(unsafe.Pointer(p)).FpPartner != 0 { (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FpPartner = uintptr(0) (*CksmFile)(unsafe.Pointer(p)).FpPartner = uintptr(0) } pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 8 /* &.xClose */))))(tls, pFile) } // Set the computeCkSm and verifyCksm flags, if they need to be // changed. func cksmSetFlags(tls *libc.TLS, p uintptr, hasCorrectReserveSize int32) { /* cksumvfs.c:412:13: */ if hasCorrectReserveSize != int32((*CksmFile)(unsafe.Pointer(p)).FcomputeCksm) { (*CksmFile)(unsafe.Pointer(p)).FcomputeCksm = libc.AssignPtrInt8(p+17 /* &.verifyCksm */, int8(hasCorrectReserveSize)) if (*CksmFile)(unsafe.Pointer(p)).FpPartner != 0 { (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FverifyCksm = int8(hasCorrectReserveSize) (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FcomputeCksm = int8(hasCorrectReserveSize) } } } // Read data from a cksm-file. func cksmRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* cksumvfs.c:425:12: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 var p uintptr = pFile pFile = ((pFile) + uintptr(1)*32) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 16 /* &.xRead */))))(tls, pFile, zBuf, iAmt, iOfst) if rc == SQLITE_OK { if ((iOfst == int64(0)) && (iAmt >= 100)) && ((libc.Xmemcmp(tls, zBuf, ts+3159 /* "SQLite format 3" */, uint64(16)) == 0) || (libc.Xmemcmp(tls, zBuf, ts+3976 /* "ZV-" */, uint64(3)) == 0)) { var d uintptr = zBuf var hasCorrectReserveSize int8 = (int8(libc.Bool32(int32(*(*u8)(unsafe.Pointer(d + 20))) == 8))) cksmSetFlags(tls, p, int32(hasCorrectReserveSize)) } // Verify the checksum if // (1) the size indicates that we are dealing with a complete // database page // (2) checksum verification is enabled // (3) we are not in the middle of checkpoint if ((iAmt >= 512) && // (1) ((*CksmFile)(unsafe.Pointer(p)).FverifyCksm != 0)) && // (2) !(int32((*CksmFile)(unsafe.Pointer(p)).FinCkpt) != 0) { // var cksum [8]u8 at bp+24, 8 cksmCompute(tls, zBuf, (iAmt - 8), bp+24 /* &cksum[0] */) if libc.Xmemcmp(tls, ((zBuf+uintptr(iAmt))-uintptr(8)), bp+24 /* &cksum[0] */, uint64(8)) != 0 { sqlite3.Xsqlite3_log(tls, (SQLITE_IOERR | (int32(32) << 8)), ts+3980, /* "checksum fault o..." */ libc.VaList(bp, iOfst, (*CksmFile)(unsafe.Pointer(p)).FzFName)) rc = (SQLITE_IOERR | (int32(32) << 8)) } } } return rc } // Write data to a cksm-file. func cksmWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* cksumvfs.c:469:12: */ var p uintptr = pFile pFile = ((pFile) + uintptr(1)*32) if ((iOfst == int64(0)) && (iAmt >= 100)) && ((libc.Xmemcmp(tls, zBuf, ts+3159 /* "SQLite format 3" */, uint64(16)) == 0) || (libc.Xmemcmp(tls, zBuf, ts+3976 /* "ZV-" */, uint64(3)) == 0)) { var d uintptr = zBuf var hasCorrectReserveSize int8 = (int8(libc.Bool32(int32(*(*u8)(unsafe.Pointer(d + 20))) == 8))) cksmSetFlags(tls, p, int32(hasCorrectReserveSize)) } // If the write size is appropriate for a database page and if // checksums where ever enabled, then it will be safe to compute // the checksums. The reserve byte size might have increased, but // it will never decrease. And because it cannot decrease, the // checksum will not overwrite anything. if ((iAmt >= 512) && ((*CksmFile)(unsafe.Pointer(p)).FcomputeCksm != 0)) && !(int32((*CksmFile)(unsafe.Pointer(p)).FinCkpt) != 0) { cksmCompute(tls, zBuf, (iAmt - 8), (((zBuf) + uintptr(iAmt)) - uintptr(8))) } return (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 24 /* &.xWrite */))))(tls, pFile, zBuf, iAmt, iOfst) } // Truncate a cksm-file. func cksmTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* cksumvfs.c:502:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 32 /* &.xTruncate */))))(tls, pFile, size) } // Sync a cksm-file. func cksmSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* cksumvfs.c:510:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 40 /* &.xSync */))))(tls, pFile, flags) } // Return the current file-size of a cksm-file. func cksmFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* cksumvfs.c:518:12: */ var p uintptr = pFile pFile = ((p) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 48 /* &.xFileSize */))))(tls, pFile, pSize) } // Lock a cksm-file. func cksmLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* cksumvfs.c:527:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 56 /* &.xLock */))))(tls, pFile, eLock) } // Unlock a cksm-file. func cksmUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* cksumvfs.c:535:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 64 /* &.xUnlock */))))(tls, pFile, eLock) } // Check if another file-handle holds a RESERVED lock on a cksm-file. func cksmCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* cksumvfs.c:543:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, pFile, pResOut) } // File control method. For custom operations on a cksm-file. func cksmFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* cksumvfs.c:551:12: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 var p uintptr = pFile pFile = ((pFile) + uintptr(1)*32) if op == SQLITE_FCNTL_PRAGMA { var azArg uintptr = pArg if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + 1*8)), ts+4015 /* "checksum_verific..." */) == 0 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + 2*8)) if zArg != uintptr(0) { if ((((int32(*(*int8)(unsafe.Pointer(zArg))) >= '1') && (int32(*(*int8)(unsafe.Pointer(zArg))) <= '9')) || (sqlite3.Xsqlite3_strlike(tls, ts+4037 /* "enable%" */, zArg, uint32(0)) == 0)) || (sqlite3.Xsqlite3_stricmp(tls, ts+4045 /* "yes" */, zArg) == 0)) || (sqlite3.Xsqlite3_stricmp(tls, ts+4049 /* "on" */, zArg) == 0) { (*CksmFile)(unsafe.Pointer(p)).FverifyCksm = (*CksmFile)(unsafe.Pointer(p)).FcomputeCksm } else { (*CksmFile)(unsafe.Pointer(p)).FverifyCksm = int8(0) } if (*CksmFile)(unsafe.Pointer(p)).FpPartner != 0 { (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FverifyCksm = (*CksmFile)(unsafe.Pointer(p)).FverifyCksm } } *(*uintptr)(unsafe.Pointer(azArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+1238 /* "%d" */, libc.VaList(bp, int32((*CksmFile)(unsafe.Pointer(p)).FverifyCksm))) return SQLITE_OK } else if (((*CksmFile)(unsafe.Pointer(p)).FcomputeCksm != 0) && (*(*uintptr)(unsafe.Pointer(azArg + 2*8)) != uintptr(0))) && (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + 1*8)), ts+4052 /* "page_size" */) == 0) { // Do not allow page size changes on a checksum database return SQLITE_OK } } else if (op == SQLITE_FCNTL_CKPT_START) || (op == SQLITE_FCNTL_CKPT_DONE) { (*CksmFile)(unsafe.Pointer(p)).FinCkpt = (int8(libc.Bool32(op == SQLITE_FCNTL_CKPT_START))) if (*CksmFile)(unsafe.Pointer(p)).FpPartner != 0 { (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FinCkpt = (*CksmFile)(unsafe.Pointer(p)).FinCkpt } } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 80 /* &.xFileControl */))))(tls, pFile, op, pArg) if (rc == SQLITE_OK) && (op == SQLITE_FCNTL_VFSNAME) { *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+4062 /* "cksm/%z" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pArg)))) } return rc } // Return the sector-size in bytes for a cksm-file. func cksmSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* cksumvfs.c:593:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 88 /* &.xSectorSize */))))(tls, pFile) } // Return the device characteristic flags supported by a cksm-file. func cksmDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* cksumvfs.c:601:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, pFile) } // Create a shared memory file mapping func cksmShmMap(tls *libc.TLS, pFile uintptr, iPg int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* cksumvfs.c:607:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 104 /* &.xShmMap */))))(tls, pFile, iPg, pgsz, bExtend, libc.AtomicLoadUintptr(&pp)) } // Perform locking on a shared-memory segment func cksmShmLock(tls *libc.TLS, pFile uintptr, offset int32, n int32, flags int32) int32 { /* cksumvfs.c:619:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 112 /* &.xShmLock */))))(tls, pFile, offset, n, flags) } // Memory barrier operation on shared memory func cksmShmBarrier(tls *libc.TLS, pFile uintptr) { /* cksumvfs.c:625:13: */ pFile = ((pFile) + uintptr(1)*32) (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 120 /* &.xShmBarrier */))))(tls, pFile) } // Unmap a shared memory segment func cksmShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* cksumvfs.c:631:12: */ pFile = ((pFile) + uintptr(1)*32) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 128 /* &.xShmUnmap */))))(tls, pFile, deleteFlag) } // Fetch a page of a memory-mapped file func cksmFetch(tls *libc.TLS, pFile uintptr, iOfst sqlite3_int64, iAmt int32, pp uintptr) int32 { /* cksumvfs.c:637:12: */ var p uintptr = pFile if (*CksmFile)(unsafe.Pointer(p)).FcomputeCksm != 0 { *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) return SQLITE_OK } pFile = ((pFile) + uintptr(1)*32) if ((*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods)).FiVersion > 2) && ((*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods)).FxFetch != 0) { return (*(*func(*libc.TLS, uintptr, sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 136 /* &.xFetch */))))(tls, pFile, iOfst, iAmt, pp) } *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) return SQLITE_OK } // Release a memory-mapped page func cksmUnfetch(tls *libc.TLS, pFile uintptr, iOfst sqlite3_int64, pPage uintptr) int32 { /* cksumvfs.c:657:12: */ pFile = ((pFile) + uintptr(1)*32) if ((*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods)).FiVersion > 2) && ((*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods)).FxUnfetch != 0) { return (*(*func(*libc.TLS, uintptr, sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods + 144 /* &.xUnfetch */))))(tls, pFile, iOfst, pPage) } return SQLITE_OK } // Open a cksm file handle. func cksmOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* cksumvfs.c:668:12: */ var p uintptr var pSubFile uintptr var pSubVfs uintptr var rc int32 var pDb uintptr pSubVfs = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData if !((flags & (SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_WAL)) == 0) { goto __1 } return (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pSubVfs + 40 /* &.xOpen */))))(tls, pSubVfs, zName, pFile, flags, pOutFlags) __1: ; p = pFile libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(CksmFile{}))) pSubFile = ((pFile) + uintptr(1)*32) (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&cksm_io_methods)) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pSubVfs + 40 /* &.xOpen */))))(tls, pSubVfs, zName, pSubFile, flags, pOutFlags) if !(rc != 0) { goto __2 } goto cksm_open_done __2: ; if !((flags & SQLITE_OPEN_WAL) != 0) { goto __3 } pDb = sqlite3.Xsqlite3_database_file_object(tls, zName) (*CksmFile)(unsafe.Pointer(p)).FpPartner = pDb (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FpPartner = p (*CksmFile)(unsafe.Pointer(p)).FisWal = int8(1) (*CksmFile)(unsafe.Pointer(p)).FcomputeCksm = (*CksmFile)(unsafe.Pointer((*CksmFile)(unsafe.Pointer(p)).FpPartner)).FcomputeCksm goto __4 __3: (*CksmFile)(unsafe.Pointer(p)).FisWal = int8(0) (*CksmFile)(unsafe.Pointer(p)).FcomputeCksm = int8(0) __4: ; (*CksmFile)(unsafe.Pointer(p)).FzFName = zName cksm_open_done: if !(rc != 0) { goto __5 } (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(0) __5: ; return rc } // All other VFS methods are pass-thrus. func cksmDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* cksumvfs.c:709:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 48 /* &.xDelete */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath, dirSync) } func cksmAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* cksumvfs.c:712:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 56 /* &.xAccess */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath, flags, pResOut) } func cksmFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* cksumvfs.c:720:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 64 /* &.xFullPathname */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath, nOut, zOut) } func cksmDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* cksumvfs.c:728:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 72 /* &.xDlOpen */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) } func cksmDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* cksumvfs.c:731:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 80 /* &.xDlError */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } func cksmDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* cksumvfs.c:734:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 88 /* &.xDlSym */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } func cksmDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* cksumvfs.c:737:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 96 /* &.xDlClose */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) } func cksmRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* cksumvfs.c:740:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 104 /* &.xRandomness */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) } func cksmSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* cksumvfs.c:743:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 112 /* &.xSleep */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } func cksmCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* cksumvfs.c:746:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 120 /* &.xCurrentTime */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pTimeOut) } func cksmGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* cksumvfs.c:749:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 128 /* &.xGetLastError */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } func cksmCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* cksumvfs.c:752:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pOrig uintptr = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData var rc int32 if (*sqlite3_vfs)(unsafe.Pointer(pOrig)).FxCurrentTimeInt64 != 0 { rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pOrig + 136 /* &.xCurrentTimeInt64 */))))(tls, pOrig, p) } else { // var r float64 at bp, 8 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pOrig + 120 /* &.xCurrentTime */))))(tls, pOrig, bp /* &r */) *(*sqlite3_int64)(unsafe.Pointer(p)) = (sqlite3_int64(*(*float64)(unsafe.Pointer(bp /* r */)) * 86400000.0)) } return rc } func cksmSetSystemCall(tls *libc.TLS, pVfs uintptr, zName uintptr, pCall sqlite3_syscall_ptr) int32 { /* cksumvfs.c:765:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 144 /* &.xSetSystemCall */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName, pCall) } func cksmGetSystemCall(tls *libc.TLS, pVfs uintptr, zName uintptr) sqlite3_syscall_ptr { /* cksumvfs.c:772:28: */ return (*(*func(*libc.TLS, uintptr, uintptr) sqlite3_syscall_ptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 152 /* &.xGetSystemCall */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName) } func cksmNextSystemCall(tls *libc.TLS, pVfs uintptr, zName uintptr) uintptr { /* cksumvfs.c:778:19: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData + 160 /* &.xNextSystemCall */))))(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName) } // Register the verify_checksum() SQL function. func cksmRegisterFunc(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* cksumvfs.c:784:12: */ var rc int32 if db == uintptr(0) { return SQLITE_OK } rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4070 /* "verify_checksum" */, 1, ((SQLITE_UTF8 | SQLITE_INNOCUOUS) | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{cksmVerifyFunc})), uintptr(0), uintptr(0)) return rc } // Register the cksum VFS as the default VFS for the system. // Also make arrangements to automatically register the "verify_checksum()" // SQL function on each new database connection. func cksmRegisterVfs(tls *libc.TLS) int32 { /* cksumvfs.c:807:12: */ var rc int32 = SQLITE_OK var pOrig uintptr if sqlite3.Xsqlite3_vfs_find(tls, ts+3968 /* "cksmvfs" */) != uintptr(0) { return SQLITE_OK } pOrig = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) cksm_vfs.FiVersion = (*sqlite3_vfs)(unsafe.Pointer(pOrig)).FiVersion cksm_vfs.FpAppData = pOrig cksm_vfs.FszOsFile = (int32(uint64((*sqlite3_vfs)(unsafe.Pointer(pOrig)).FszOsFile) + uint64(unsafe.Sizeof(CksmFile{})))) rc = sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&cksm_vfs)), 1) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{cksmRegisterFunc}))) } return rc } // This variant of the initializer runs when the extension is // statically linked. func sqlite3_register_cksumvfs(tls *libc.TLS, NotUsed uintptr) int32 { /* cksumvfs.c:826:5: */ _ = NotUsed return cksmRegisterVfs(tls) } func sqlite3_unregister_cksumvfs(tls *libc.TLS) int32 { /* cksumvfs.c:830:5: */ if sqlite3.Xsqlite3_vfs_find(tls, ts+3968 /* "cksmvfs" */) != 0 { sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(unsafe.Pointer(&cksm_vfs))) sqlite3.Xsqlite3_cancel_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{cksmRegisterFunc}))) } return SQLITE_OK } // Forward declaration of objects used by this implementation type closure_vtab1 = struct { Fbase sqlite3_vtab FzDb uintptr FzSelf uintptr FzTableName uintptr FzIdColumn uintptr FzParentColumn uintptr Fdb uintptr FnCursor int32 _ [4]byte } /* closure.c:156:9 */ // Forward declaration of objects used by this implementation type closure_vtab = closure_vtab1 /* closure.c:156:29 */ type closure_cursor1 = struct { Fbase sqlite3_vtab_cursor FpVtab uintptr FzTableName uintptr FzIdColumn uintptr FzParentColumn uintptr FpCurrent uintptr FpClosure uintptr } /* closure.c:157:9 */ type closure_cursor = closure_cursor1 /* closure.c:157:31 */ type closure_queue1 = struct { FpFirst uintptr FpLast uintptr } /* closure.c:158:9 */ type closure_queue = closure_queue1 /* closure.c:158:30 */ type closure_avl1 = struct { Fid sqlite3_int64 FiGeneration int32 _ [4]byte FpList uintptr FpBefore uintptr FpAfter uintptr FpUp uintptr Fheight int16 Fimbalance int16 _ [4]byte } /* closure.c:157:9 */ type closure_avl = closure_avl1 /* closure.c:159:28 */ // Recompute the closure_avl.height and closure_avl.imbalance fields for p. // Assume that the children of p have correct heights. func closureAvlRecomputeHeight(tls *libc.TLS, p uintptr) { /* closure.c:182:13: */ var hBefore int16 if (*closure_avl)(unsafe.Pointer(p)).FpBefore != 0 { hBefore = (*closure_avl)(unsafe.Pointer((*closure_avl)(unsafe.Pointer(p)).FpBefore)).Fheight } else { hBefore = int16(0) } var hAfter int16 if (*closure_avl)(unsafe.Pointer(p)).FpAfter != 0 { hAfter = (*closure_avl)(unsafe.Pointer((*closure_avl)(unsafe.Pointer(p)).FpAfter)).Fheight } else { hAfter = int16(0) } (*closure_avl)(unsafe.Pointer(p)).Fimbalance = (int16(int32(hBefore) - int32(hAfter))) // -: pAfter higher. +: pBefore higher (*closure_avl)(unsafe.Pointer(p)).Fheight = (int16((func() int32 { if int32(hBefore) > int32(hAfter) { return int32(hBefore) } return int32(hAfter) }()) + 1)) } // P B // / \ / ** B Z ==> X P // / \ / ** X Y Y Z // func closureAvlRotateBefore(tls *libc.TLS, pP uintptr) uintptr { /* closure.c:197:20: */ var pB uintptr = (*closure_avl)(unsafe.Pointer(pP)).FpBefore var pY uintptr = (*closure_avl)(unsafe.Pointer(pB)).FpAfter (*closure_avl)(unsafe.Pointer(pB)).FpUp = (*closure_avl)(unsafe.Pointer(pP)).FpUp (*closure_avl)(unsafe.Pointer(pB)).FpAfter = pP (*closure_avl)(unsafe.Pointer(pP)).FpUp = pB (*closure_avl)(unsafe.Pointer(pP)).FpBefore = pY if pY != 0 { (*closure_avl)(unsafe.Pointer(pY)).FpUp = pP } closureAvlRecomputeHeight(tls, pP) closureAvlRecomputeHeight(tls, pB) return pB } // P A // / \ / ** X A ==> P Z // / \ / ** Y Z X Y // func closureAvlRotateAfter(tls *libc.TLS, pP uintptr) uintptr { /* closure.c:218:20: */ var pA uintptr = (*closure_avl)(unsafe.Pointer(pP)).FpAfter var pY uintptr = (*closure_avl)(unsafe.Pointer(pA)).FpBefore (*closure_avl)(unsafe.Pointer(pA)).FpUp = (*closure_avl)(unsafe.Pointer(pP)).FpUp (*closure_avl)(unsafe.Pointer(pA)).FpBefore = pP (*closure_avl)(unsafe.Pointer(pP)).FpUp = pA (*closure_avl)(unsafe.Pointer(pP)).FpAfter = pY if pY != 0 { (*closure_avl)(unsafe.Pointer(pY)).FpUp = pP } closureAvlRecomputeHeight(tls, pP) closureAvlRecomputeHeight(tls, pA) return pA } // Return a pointer to the pBefore or pAfter pointer in the parent // of p that points to p. Or if p is the root node, return pp. func closureAvlFromPtr(tls *libc.TLS, p uintptr, pp uintptr) uintptr { /* closure.c:235:20: */ var pUp uintptr = (*closure_avl)(unsafe.Pointer(p)).FpUp if pUp == uintptr(0) { return pp } if (*closure_avl)(unsafe.Pointer(pUp)).FpAfter == p { return (pUp + 32 /* &.pAfter */) } return (pUp + 24 /* &.pBefore */) } // Rebalance all nodes starting with p and working up to the root. // Return the new root. func closureAvlBalance(tls *libc.TLS, p uintptr) uintptr { /* closure.c:246:20: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = p var pTop uintptr = *(*uintptr)(unsafe.Pointer(bp /* p */)) var pp uintptr for *(*uintptr)(unsafe.Pointer(bp /* p */)) != 0 { closureAvlRecomputeHeight(tls, *(*uintptr)(unsafe.Pointer(bp /* p */))) if int32((*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fimbalance) >= 2 { var pB uintptr = (*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpBefore if int32((*closure_avl)(unsafe.Pointer(pB)).Fimbalance) < 0 { (*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpBefore = closureAvlRotateAfter(tls, pB) } pp = closureAvlFromPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)), bp /* &p */) *(*uintptr)(unsafe.Pointer(bp /* p */)) = libc.AssignPtrUintptr(pp, closureAvlRotateBefore(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)))) } else if int32((*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fimbalance) <= (-2) { var pA uintptr = (*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpAfter if int32((*closure_avl)(unsafe.Pointer(pA)).Fimbalance) > 0 { (*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpAfter = closureAvlRotateBefore(tls, pA) } pp = closureAvlFromPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)), bp /* &p */) *(*uintptr)(unsafe.Pointer(bp /* p */)) = libc.AssignPtrUintptr(pp, closureAvlRotateAfter(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)))) } pTop = *(*uintptr)(unsafe.Pointer(bp /* p */)) *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*closure_avl)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpUp } return pTop } // Search the tree rooted at p for an entry with id. Return a pointer // to the entry or return NULL. func closureAvlSearch(tls *libc.TLS, p uintptr, id sqlite3_int64) uintptr { /* closure.c:271:20: */ for (p != 0) && (id != (*closure_avl)(unsafe.Pointer(p)).Fid) { if id < (*closure_avl)(unsafe.Pointer(p)).Fid { p = (*closure_avl)(unsafe.Pointer(p)).FpBefore } else { p = (*closure_avl)(unsafe.Pointer(p)).FpAfter } } return p } // Find the first node (the one with the smallest key). func closureAvlFirst(tls *libc.TLS, p uintptr) uintptr { /* closure.c:280:20: */ if p != 0 { for (*closure_avl)(unsafe.Pointer(p)).FpBefore != 0 { p = (*closure_avl)(unsafe.Pointer(p)).FpBefore } } return p } // Return the node with the next larger key after p. func closureAvlNext(tls *libc.TLS, p uintptr) uintptr { /* closure.c:287:13: */ var pPrev uintptr = uintptr(0) for (p != 0) && ((*closure_avl)(unsafe.Pointer(p)).FpAfter == pPrev) { pPrev = p p = (*closure_avl)(unsafe.Pointer(p)).FpUp } if (p != 0) && (pPrev == uintptr(0)) { p = closureAvlFirst(tls, (*closure_avl)(unsafe.Pointer(p)).FpAfter) } return p } // Insert a new node pNew. Return NULL on success. If the key is not // unique, then do not perform the insert but instead leave pNew unchanged // and return a pointer to an existing node with the same key. func closureAvlInsert(tls *libc.TLS, ppHead uintptr, pNew uintptr) uintptr { /* closure.c:303:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(ppHead)) if p == uintptr(0) { p = pNew (*closure_avl)(unsafe.Pointer(pNew)).FpUp = uintptr(0) } else { for p != 0 { if (*closure_avl)(unsafe.Pointer(pNew)).Fid < (*closure_avl)(unsafe.Pointer(p)).Fid { if (*closure_avl)(unsafe.Pointer(p)).FpBefore != 0 { p = (*closure_avl)(unsafe.Pointer(p)).FpBefore } else { (*closure_avl)(unsafe.Pointer(p)).FpBefore = pNew (*closure_avl)(unsafe.Pointer(pNew)).FpUp = p break } } else if (*closure_avl)(unsafe.Pointer(pNew)).Fid > (*closure_avl)(unsafe.Pointer(p)).Fid { if (*closure_avl)(unsafe.Pointer(p)).FpAfter != 0 { p = (*closure_avl)(unsafe.Pointer(p)).FpAfter } else { (*closure_avl)(unsafe.Pointer(p)).FpAfter = pNew (*closure_avl)(unsafe.Pointer(pNew)).FpUp = p break } } else { return p } } } (*closure_avl)(unsafe.Pointer(pNew)).FpBefore = uintptr(0) (*closure_avl)(unsafe.Pointer(pNew)).FpAfter = uintptr(0) (*closure_avl)(unsafe.Pointer(pNew)).Fheight = int16(1) (*closure_avl)(unsafe.Pointer(pNew)).Fimbalance = int16(0) *(*uintptr)(unsafe.Pointer(ppHead)) = closureAvlBalance(tls, p) return uintptr(0) } // Walk the tree can call xDestroy on each node func closureAvlDestroy(tls *libc.TLS, p uintptr, xDestroy uintptr) { /* closure.c:344:13: */ if p != 0 { closureAvlDestroy(tls, (*closure_avl)(unsafe.Pointer(p)).FpBefore, xDestroy) closureAvlDestroy(tls, (*closure_avl)(unsafe.Pointer(p)).FpAfter, xDestroy) (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDestroy)))(tls, p) } } // Add a node to the end of the queue func queuePush(tls *libc.TLS, pQueue uintptr, pNode uintptr) { /* closure.c:389:13: */ (*closure_avl)(unsafe.Pointer(pNode)).FpList = uintptr(0) if (*closure_queue)(unsafe.Pointer(pQueue)).FpLast != 0 { (*closure_avl)(unsafe.Pointer((*closure_queue)(unsafe.Pointer(pQueue)).FpLast)).FpList = pNode } else { (*closure_queue)(unsafe.Pointer(pQueue)).FpFirst = pNode } (*closure_queue)(unsafe.Pointer(pQueue)).FpLast = pNode } // Extract the oldest element (the front element) from the queue. func queuePull(tls *libc.TLS, pQueue uintptr) uintptr { /* closure.c:402:20: */ var p uintptr = (*closure_queue)(unsafe.Pointer(pQueue)).FpFirst if p != 0 { (*closure_queue)(unsafe.Pointer(pQueue)).FpFirst = (*closure_avl)(unsafe.Pointer(p)).FpList if (*closure_queue)(unsafe.Pointer(pQueue)).FpFirst == uintptr(0) { (*closure_queue)(unsafe.Pointer(pQueue)).FpLast = uintptr(0) } } return p } // This function converts an SQL quoted string into an unquoted string // and returns a pointer to a buffer allocated using sqlite3_malloc() // containing the result. The caller should eventually free this buffer // using sqlite3_free. // // Examples: // // "abc" becomes abc // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno func closureDequote(tls *libc.TLS, zIn uintptr) uintptr { /* closure.c:424:13: */ var nIn sqlite3_int64 // Size of input string, in bytes var zOut uintptr // Output (dequoted) string nIn = sqlite3_int64(libc.Xstrlen(tls, zIn)) zOut = sqlite3.Xsqlite3_malloc64(tls, (uint64(nIn + int64(1)))) if zOut != 0 { var q int8 = *(*int8)(unsafe.Pointer(zIn)) // Quote character (if any ) if (((int32(q) != '[') && (int32(q) != '\'')) && (int32(q) != '"')) && (int32(q) != '`') { libc.Xmemcpy(tls, zOut, zIn, (size_t(nIn + int64(1)))) } else { var iOut int32 = 0 // Index of next byte to write to output var iIn int32 // Index of next byte to read from input if int32(q) == '[' { q = int8(']') } for iIn = 1; sqlite3_int64(iIn) < nIn; iIn++ { if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iIn)))) == int32(q) { iIn++ } *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) } } } return zOut } // Deallocate an closure_vtab object func closureFree(tls *libc.TLS, p uintptr) { /* closure.c:453:13: */ if p != 0 { sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(p)).FzDb) sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(p)).FzSelf) sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(p)).FzTableName) sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(p)).FzIdColumn) sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(p)).FzParentColumn) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(closure_vtab{}))) sqlite3.Xsqlite3_free(tls, p) } } // xDisconnect/xDestroy method for the closure module. func closureDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* closure.c:468:12: */ var p uintptr = pVtab closureFree(tls, p) return SQLITE_OK } // Check to see if the argument is of the form: // // KEY = VALUE // // If it is, return a pointer to the first character of VALUE. // If not, return NULL. Spaces around the = are ignored. func closureValueOfKey(tls *libc.TLS, zKey uintptr, zStr uintptr) uintptr { /* closure.c:483:19: */ var nKey int32 = int32(libc.Xstrlen(tls, zKey)) var nStr int32 = int32(libc.Xstrlen(tls, zStr)) var i int32 if nStr < (nKey + 1) { return uintptr(0) } if libc.Xmemcmp(tls, zStr, zKey, uint64(nKey)) != 0 { return uintptr(0) } for i = nKey; libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))))) != 0; i++ { } if int32(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))) != '=' { return uintptr(0) } i++ for libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))))) != 0 { i++ } return (zStr + uintptr(i)) } // xConnect/xCreate method for the closure module. Arguments are: // // argv[0] -> module name ("transitive_closure") // argv[1] -> database name // argv[2] -> table name // argv[3...] -> arguments func closureConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* closure.c:504:12: */ bp := tls.Alloc(48) defer tls.Free(48) var rc int32 // Return code var pNew uintptr // New virtual table var zDb uintptr var zVal uintptr var i int32 rc = SQLITE_OK pNew = uintptr(0) zDb = *(*uintptr)(unsafe.Pointer(argv + 1*8)) _ = pAux *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(closure_vtab{}))) if !(pNew == uintptr(0)) { goto __1 } return SQLITE_NOMEM __1: ; rc = SQLITE_NOMEM libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(closure_vtab{}))) (*closure_vtab)(unsafe.Pointer(pNew)).Fdb = db (*closure_vtab)(unsafe.Pointer(pNew)).FzDb = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zDb)) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzDb == uintptr(0)) { goto __2 } goto closureConnectError __2: ; (*closure_vtab)(unsafe.Pointer(pNew)).FzSelf = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzSelf == uintptr(0)) { goto __3 } goto closureConnectError __3: ; i = 3 __4: if !(i < argc) { goto __6 } zVal = closureValueOfKey(tls, ts+4086 /* "tablename" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __7 } sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(pNew)).FzTableName) (*closure_vtab)(unsafe.Pointer(pNew)).FzTableName = closureDequote(tls, zVal) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzTableName == uintptr(0)) { goto __8 } goto closureConnectError __8: ; goto __5 __7: ; zVal = closureValueOfKey(tls, ts+4096 /* "idcolumn" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __9 } sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(pNew)).FzIdColumn) (*closure_vtab)(unsafe.Pointer(pNew)).FzIdColumn = closureDequote(tls, zVal) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzIdColumn == uintptr(0)) { goto __10 } goto closureConnectError __10: ; goto __5 __9: ; zVal = closureValueOfKey(tls, ts+4105 /* "parentcolumn" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __11 } sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(pNew)).FzParentColumn) (*closure_vtab)(unsafe.Pointer(pNew)).FzParentColumn = closureDequote(tls, zVal) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzParentColumn == uintptr(0)) { goto __12 } goto closureConnectError __12: ; goto __5 __11: ; *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3407 /* "unrecognized arg..." */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) closureFree(tls, pNew) *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) return SQLITE_ERROR goto __5 __5: i++ goto __4 goto __6 __6: ; rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+4118 /* "CREATE TABLE x(i..." */) if !(rc != SQLITE_OK) { goto __13 } closureFree(tls, pNew) __13: ; *(*uintptr)(unsafe.Pointer(ppVtab)) = (pNew /* &.base */) return rc closureConnectError: closureFree(tls, pNew) return rc } // Open a new closure cursor. func closureOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* closure.c:579:12: */ var p uintptr = pVTab var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(closure_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(closure_cursor{}))) (*closure_cursor)(unsafe.Pointer(pCur)).FpVtab = p *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) (*closure_vtab)(unsafe.Pointer(p)).FnCursor++ return SQLITE_OK } // Free up all the memory allocated by a cursor. Set it rLimit to 0 // to indicate that it is at EOF. func closureClearCursor(tls *libc.TLS, pCur uintptr) { /* closure.c:595:13: */ closureAvlDestroy(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FpClosure, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) sqlite3.Xsqlite3_free(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName) sqlite3.Xsqlite3_free(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn) sqlite3.Xsqlite3_free(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn) (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName = uintptr(0) (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn = uintptr(0) (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn = uintptr(0) (*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent = uintptr(0) (*closure_cursor)(unsafe.Pointer(pCur)).FpClosure = uintptr(0) } // Close a closure cursor. func closureClose(tls *libc.TLS, cur uintptr) int32 { /* closure.c:610:12: */ var pCur uintptr = cur closureClearCursor(tls, pCur) (*closure_vtab)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpVtab)).FnCursor-- sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Advance a cursor to its next row of output func closureNext(tls *libc.TLS, cur uintptr) int32 { /* closure.c:621:12: */ var pCur uintptr = cur (*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent = closureAvlNext(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent) return SQLITE_OK } // Allocate and insert a node func closureInsertNode(tls *libc.TLS, pQueue uintptr, pCur uintptr, id sqlite3_int64, iGeneration int32) int32 { /* closure.c:630:12: */ var pNew uintptr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(closure_avl{}))) if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(closure_avl{}))) (*closure_avl)(unsafe.Pointer(pNew)).Fid = id (*closure_avl)(unsafe.Pointer(pNew)).FiGeneration = iGeneration closureAvlInsert(tls, (pCur + 48 /* &.pClosure */), pNew) queuePush(tls, pQueue, pNew) return SQLITE_OK } // Called to "rewind" a cursor back to the beginning so that // it starts its output over again. Always called at least once // prior to any closureColumn, closureRowid, or closureEof call. // // This routine actually computes the closure. // // See the comment at the beginning of closureBestIndex() for a // description of the meaning of idxNum. The idxStr parameter is // not used. func closureFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* closure.c:657:12: */ bp := tls.Alloc(136) defer tls.Free(136) var pCur uintptr = pVtabCursor var pVtab uintptr = (*closure_cursor)(unsafe.Pointer(pCur)).FpVtab var iRoot sqlite3_int64 var mxGen int32 = 999999999 var zSql uintptr // var pStmt uintptr at bp+128, 8 var pAvl uintptr var rc int32 = SQLITE_OK var zTableName uintptr = (*closure_vtab)(unsafe.Pointer(pVtab)).FzTableName var zIdColumn uintptr = (*closure_vtab)(unsafe.Pointer(pVtab)).FzIdColumn var zParentColumn uintptr = (*closure_vtab)(unsafe.Pointer(pVtab)).FzParentColumn // var sQueue closure_queue at bp+112, 16 _ = idxStr // Unused parameter _ = argc // Unused parameter closureClearCursor(tls, pCur) libc.Xmemset(tls, bp+112 /* &sQueue */, 0, uint64(unsafe.Sizeof(closure_queue{}))) if (idxNum & 1) == 0 { // No root=$root in the WHERE clause. Return an empty set return SQLITE_OK } iRoot = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if (idxNum & 0x000f0) != 0 { mxGen = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>4)&0x0f))*8))) if (idxNum & 0x00002) != 0 { mxGen-- } } if (idxNum & 0x00f00) != 0 { zTableName = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>8)&0x0f))*8))) (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zTableName)) } if (idxNum & 0x0f000) != 0 { zIdColumn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>12)&0x0f))*8))) (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, zIdColumn)) } if (idxNum & 0x0f0000) != 0 { zParentColumn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>16)&0x0f))*8))) (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+32, zParentColumn)) } zSql = sqlite3.Xsqlite3_mprintf(tls, ts+4208, /* "SELECT \"%w\".\"%w\"..." */ libc.VaList(bp+48, zTableName, zIdColumn, zTableName, zTableName, zParentColumn)) if zSql == uintptr(0) { return SQLITE_NOMEM } else { rc = sqlite3.Xsqlite3_prepare_v2(tls, (*closure_vtab)(unsafe.Pointer(pVtab)).Fdb, zSql, -1, bp+128 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc != 0 { sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(pVtab)).Fbase.FzErrMsg) (*closure_vtab)(unsafe.Pointer(pVtab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+96, sqlite3.Xsqlite3_errmsg(tls, (*closure_vtab)(unsafe.Pointer(pVtab)).Fdb))) return rc } } if rc == SQLITE_OK { rc = closureInsertNode(tls, bp+112 /* &sQueue */, pCur, iRoot, 0) } for (libc.AssignUintptr(&pAvl, queuePull(tls, bp+112 /* &sQueue */))) != uintptr(0) { if (*closure_avl)(unsafe.Pointer(pAvl)).FiGeneration >= mxGen { continue } sqlite3.Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */)), 1, (*closure_avl)(unsafe.Pointer(pAvl)).Fid) for (rc == SQLITE_OK) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */))) == SQLITE_ROW) { if sqlite3.Xsqlite3_column_type(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */)), 0) == SQLITE_INTEGER { var iNew sqlite3_int64 = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */)), 0) if closureAvlSearch(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FpClosure, iNew) == uintptr(0) { rc = closureInsertNode(tls, bp+112 /* &sQueue */, pCur, iNew, ((*closure_avl)(unsafe.Pointer(pAvl)).FiGeneration + 1)) } } } sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */))) } sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */))) if rc == SQLITE_OK { (*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent = closureAvlFirst(tls, (*closure_cursor)(unsafe.Pointer(pCur)).FpClosure) } return rc } // Only the word and distance columns have values. All other columns // return NULL func closureColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* closure.c:743:12: */ var pCur uintptr = cur switch i { case CLOSURE_COL_ID: { sqlite3.Xsqlite3_result_int64(tls, ctx, (*closure_avl)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent)).Fid) break } case CLOSURE_COL_DEPTH: { sqlite3.Xsqlite3_result_int(tls, ctx, (*closure_avl)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent)).FiGeneration) break } case CLOSURE_COL_ROOT: { sqlite3.Xsqlite3_result_null(tls, ctx) break } case CLOSURE_COL_TABLENAME: { sqlite3.Xsqlite3_result_text(tls, ctx, func() uintptr { if (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName != 0 { return (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName } return (*closure_vtab)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpVtab)).FzTableName }(), -1, libc.UintptrFromInt32(-1)) break } case CLOSURE_COL_IDCOLUMN: { sqlite3.Xsqlite3_result_text(tls, ctx, func() uintptr { if (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn != 0 { return (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn } return (*closure_vtab)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpVtab)).FzIdColumn }(), -1, libc.UintptrFromInt32(-1)) break } case CLOSURE_COL_PARENTCOLUMN: { sqlite3.Xsqlite3_result_text(tls, ctx, func() uintptr { if (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn != 0 { return (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn } return (*closure_vtab)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpVtab)).FzParentColumn }(), -1, libc.UintptrFromInt32(-1)) break } } return SQLITE_OK } // The rowid. For the closure table, this is the same as the "id" column. func closureRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* closure.c:783:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*closure_avl)(unsafe.Pointer((*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent)).Fid return SQLITE_OK } // EOF indicator func closureEof(tls *libc.TLS, cur uintptr) int32 { /* closure.c:792:12: */ var pCur uintptr = cur return (libc.Bool32((*closure_cursor)(unsafe.Pointer(pCur)).FpCurrent == uintptr(0))) } // Search for terms of these forms: // // (A) root = $root // (B1) depth < $depth // (B2) depth <= $depth // (B3) depth = $depth // (C) tablename = $tablename // (D) idcolumn = $idcolumn // (E) parentcolumn = $parentcolumn // // // // idxNum meaning // ---------- ------------------------------------------------------ // 0x00000001 Term of the form (A) found // 0x00000002 The term of bit-2 is like (B1) // 0x000000f0 Index in filter.argv[] of $depth. 0 if not used. // 0x00000f00 Index in filter.argv[] of $tablename. 0 if not used. // 0x0000f000 Index in filter.argv[] of $idcolumn. 0 if not used // 0x000f0000 Index in filter.argv[] of $parentcolumn. 0 if not used. // // There must be a term of type (A). If there is not, then the index type // is 0 and the query will return an empty set. func closureBestIndex(tls *libc.TLS, pTab uintptr, pIdxInfo uintptr) int32 { /* closure.c:822:12: */ var iPlan int32 = 0 var i int32 var idx int32 = 1 var pConstraint uintptr var pVtab uintptr = pTab var rCost float64 = 10000000.0 pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { goto __2 } if (((iPlan & 1) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == CLOSURE_COL_ROOT)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) rCost = rCost / (100.0) } if (((iPlan & 0x0000f0) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == CLOSURE_COL_DEPTH)) && (((int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LE)) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ)) { iPlan = iPlan | (idx << 4) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&idx, 1) if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT { iPlan = iPlan | (0x000002) } rCost = rCost / (5.0) } if (((iPlan & 0x000f00) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == CLOSURE_COL_TABLENAME)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (idx << 8) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) rCost = rCost / (5.0) } if (((iPlan & 0x00f000) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == CLOSURE_COL_IDCOLUMN)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (idx << 12) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) } if (((iPlan & 0x0f0000) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == CLOSURE_COL_PARENTCOLUMN)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (idx << 16) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if ((((*closure_vtab)(unsafe.Pointer(pVtab)).FzTableName == uintptr(0)) && ((iPlan & 0x000f00) == 0)) || (((*closure_vtab)(unsafe.Pointer(pVtab)).FzIdColumn == uintptr(0)) && ((iPlan & 0x00f000) == 0))) || (((*closure_vtab)(unsafe.Pointer(pVtab)).FzParentColumn == uintptr(0)) && ((iPlan & 0x0f0000) == 0)) { // All of tablename, idcolumn, and parentcolumn must be specified // in either the CREATE VIRTUAL TABLE or in the WHERE clause constraints // or else the result is an empty set. iPlan = 0 } if (iPlan & 1) == 0 { // If there is no usable "root=?" term, then set the index-type to 0. // Also clear any argvIndex variables already set. This is necessary // to prevent the core from throwing an "xBestIndex malfunction error" // error (because the argvIndex values are not contiguously assigned // starting from 1). rCost = rCost * (1e30) i = 0 __4: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __6 } { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 0 } goto __5 __5: i++ pConstraint += 12 goto __4 goto __6 __6: ; iPlan = 0 } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = iPlan if (((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1) && ((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn == CLOSURE_COL_ID)) && (int32((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc) == 0) { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = rCost return SQLITE_OK } // A virtual table module that implements the "transitive_closure". var closureModule = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName } /* closure.c:918:23 */ // Register the closure virtual table func sqlite3_closure_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* closure.c:953:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4254 /* "transitive_closu..." */, uintptr(unsafe.Pointer(&closureModule)), uintptr(0)) return rc } // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. // A macro to hint to the compiler that a function should not be // inlined. // Max size of the error message in a CsvReader // Size of the CsvReader input buffer // A context object used when read a CSV file. type CsvReader1 = struct { Fin uintptr Fz uintptr Fn int32 FnAlloc int32 FnLine int32 FbNotFirst int32 FcTerm int32 _ [4]byte FiIn size_t FnIn size_t FzIn uintptr FzErr [200]int8 } /* csv.c:73:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. // A macro to hint to the compiler that a function should not be // inlined. // Max size of the error message in a CsvReader // Size of the CsvReader input buffer // A context object used when read a CSV file. type CsvReader = CsvReader1 /* csv.c:73:26 */ // Initialize a CsvReader object func csv_reader_init(tls *libc.TLS, p uintptr) { /* csv.c:89:13: */ (*CsvReader)(unsafe.Pointer(p)).Fin = uintptr(0) (*CsvReader)(unsafe.Pointer(p)).Fz = uintptr(0) (*CsvReader)(unsafe.Pointer(p)).Fn = 0 (*CsvReader)(unsafe.Pointer(p)).FnAlloc = 0 (*CsvReader)(unsafe.Pointer(p)).FnLine = 0 (*CsvReader)(unsafe.Pointer(p)).FbNotFirst = 0 (*CsvReader)(unsafe.Pointer(p)).FnIn = uint64(0) (*CsvReader)(unsafe.Pointer(p)).FzIn = uintptr(0) *(*int8)(unsafe.Pointer((p + 64 /* &.zErr */))) = int8(0) } // Close and reset a CsvReader object func csv_reader_reset(tls *libc.TLS, p uintptr) { /* csv.c:102:13: */ if (*CsvReader)(unsafe.Pointer(p)).Fin != 0 { libc.Xfclose(tls, (*CsvReader)(unsafe.Pointer(p)).Fin) sqlite3.Xsqlite3_free(tls, (*CsvReader)(unsafe.Pointer(p)).FzIn) } sqlite3.Xsqlite3_free(tls, (*CsvReader)(unsafe.Pointer(p)).Fz) csv_reader_init(tls, p) } // Report an error on a CsvReader func csv_errmsg(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* csv.c:112:13: */ var ap va_list _ = ap ap = va sqlite3.Xsqlite3_vsnprintf(tls, CSV_MXERR, p+64 /* &.zErr */, zFormat, ap) _ = ap } // Open the file associated with a CsvReader // Return the number of errors. func csv_reader_open(tls *libc.TLS, p uintptr, zFilename uintptr, zData uintptr) int32 { /* csv.c:122:12: */ bp := tls.Alloc(16) defer tls.Free(16) if zFilename != 0 { (*CsvReader)(unsafe.Pointer(p)).FzIn = sqlite3.Xsqlite3_malloc(tls, CSV_INBUFSZ) if (*CsvReader)(unsafe.Pointer(p)).FzIn == uintptr(0) { csv_errmsg(tls, p, ts+1930 /* "out of memory" */, 0) return 1 } (*CsvReader)(unsafe.Pointer(p)).Fin = libc.Xfopen(tls, zFilename, ts+4273 /* "rb" */) if (*CsvReader)(unsafe.Pointer(p)).Fin == uintptr(0) { sqlite3.Xsqlite3_free(tls, (*CsvReader)(unsafe.Pointer(p)).FzIn) csv_reader_reset(tls, p) csv_errmsg(tls, p, ts+4276 /* "cannot open '%s'..." */, libc.VaList(bp, zFilename)) return 1 } } else { (*CsvReader)(unsafe.Pointer(p)).FzIn = zData (*CsvReader)(unsafe.Pointer(p)).FnIn = libc.Xstrlen(tls, zData) } return 0 } // The input buffer has overflowed. Refill the input buffer, then // return the next character func csv_getc_refill(tls *libc.TLS, p uintptr) int32 { /* csv.c:151:25: */ var got size_t // Only called on an empty input buffer // Only called if reading froma file got = libc.Xfread(tls, (*CsvReader)(unsafe.Pointer(p)).FzIn, uint64(1), uint64(CSV_INBUFSZ), (*CsvReader)(unsafe.Pointer(p)).Fin) if got == uint64(0) { return -1 } (*CsvReader)(unsafe.Pointer(p)).FnIn = got (*CsvReader)(unsafe.Pointer(p)).FiIn = uint64(1) return int32(*(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).FzIn))) } // Return the next character of input. Return EOF at end of input. func csv_getc(tls *libc.TLS, p uintptr) int32 { /* csv.c:165:12: */ if (*CsvReader)(unsafe.Pointer(p)).FiIn >= (*CsvReader)(unsafe.Pointer(p)).FnIn { if (*CsvReader)(unsafe.Pointer(p)).Fin != uintptr(0) { return csv_getc_refill(tls, p) } return -1 } return int32(*(*uint8)(unsafe.Pointer(((*CsvReader)(unsafe.Pointer(p)).FzIn) + uintptr(libc.PostIncUint64(&(*CsvReader)(unsafe.Pointer(p)).FiIn, 1))))) } // Increase the size of p->z and append character c to the end. // Return 0 on success and non-zero if there is an OOM error func csv_resize_and_append(tls *libc.TLS, p uintptr, c int8) int32 { /* csv.c:175:25: */ var zNew uintptr var nNew int32 = (((*CsvReader)(unsafe.Pointer(p)).FnAlloc * 2) + 100) zNew = sqlite3.Xsqlite3_realloc64(tls, (*CsvReader)(unsafe.Pointer(p)).Fz, uint64(nNew)) if zNew != 0 { (*CsvReader)(unsafe.Pointer(p)).Fz = zNew (*CsvReader)(unsafe.Pointer(p)).FnAlloc = nNew *(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).Fz + uintptr(libc.PostIncInt32(&(*CsvReader)(unsafe.Pointer(p)).Fn, 1)))) = c return 0 } else { csv_errmsg(tls, p, ts+1930 /* "out of memory" */, 0) return 1 } return int32(0) } // Append a single character to the CsvReader.z[] array. // Return 0 on success and non-zero if there is an OOM error func csv_append(tls *libc.TLS, p uintptr, c int8) int32 { /* csv.c:192:12: */ if (*CsvReader)(unsafe.Pointer(p)).Fn >= ((*CsvReader)(unsafe.Pointer(p)).FnAlloc - 1) { return csv_resize_and_append(tls, p, c) } *(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).Fz + uintptr(libc.PostIncInt32(&(*CsvReader)(unsafe.Pointer(p)).Fn, 1)))) = c return 0 } // Read a single field of CSV text. Compatible with rfc4180 and extended // with the option of having a separator other than ",". // // + Input comes from p->in. // + Store results in p->z of length p->n. Space to hold p->z comes // from sqlite3_malloc64(). // + Keep track of the line number in p->nLine. // + Store the character that terminates the field in p->cTerm. Store // EOF on end-of-file. // // Return 0 at EOF or on OOM. On EOF, the p->cTerm character will have // been set to EOF. func csv_read_one_field(tls *libc.TLS, p uintptr) uintptr { /* csv.c:211:13: */ bp := tls.Alloc(48) defer tls.Free(48) var c int32 (*CsvReader)(unsafe.Pointer(p)).Fn = 0 c = csv_getc(tls, p) if c == (-1) { (*CsvReader)(unsafe.Pointer(p)).FcTerm = -1 return uintptr(0) } if c == '"' { var pc int32 var ppc int32 var startLine int32 = (*CsvReader)(unsafe.Pointer(p)).FnLine pc = libc.AssignInt32(&ppc, 0) for 1 != 0 { c = csv_getc(tls, p) if (c <= '"') || (pc == '"') { if c == '\n' { (*CsvReader)(unsafe.Pointer(p)).FnLine++ } if c == '"' { if pc == '"' { pc = 0 continue } } if ((((c == ',') && (pc == '"')) || ((c == '\n') && (pc == '"'))) || (((c == '\n') && (pc == '\r')) && (ppc == '"'))) || ((c == (-1)) && (pc == '"')) { for ok := true; ok; ok = (int32(*(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).Fz + uintptr((*CsvReader)(unsafe.Pointer(p)).Fn)))) != '"') { (*CsvReader)(unsafe.Pointer(p)).Fn-- } (*CsvReader)(unsafe.Pointer(p)).FcTerm = int32(int8(c)) break } if (pc == '"') && (c != '\r') { csv_errmsg(tls, p, ts+4305 /* "line %d: unescap..." */, libc.VaList(bp, (*CsvReader)(unsafe.Pointer(p)).FnLine, '"')) break } if c == (-1) { csv_errmsg(tls, p, ts+4337, /* "line %d: untermi..." */ libc.VaList(bp+24, startLine, '"')) (*CsvReader)(unsafe.Pointer(p)).FcTerm = int32(int8(c)) break } } if csv_append(tls, p, int8(c)) != 0 { return uintptr(0) } ppc = pc pc = c } } else { // If this is the first field being parsed and it begins with the // UTF-8 BOM (0xEF BB BF) then skip the BOM if ((c & 0xff) == 0xef) && ((*CsvReader)(unsafe.Pointer(p)).FbNotFirst == 0) { csv_append(tls, p, int8(c)) c = csv_getc(tls, p) if (c & 0xff) == 0xbb { csv_append(tls, p, int8(c)) c = csv_getc(tls, p) if (c & 0xff) == 0xbf { (*CsvReader)(unsafe.Pointer(p)).FbNotFirst = 1 (*CsvReader)(unsafe.Pointer(p)).Fn = 0 return csv_read_one_field(tls, p) } } } for (c > ',') || (((c != (-1)) && (c != ',')) && (c != '\n')) { if csv_append(tls, p, int8(c)) != 0 { return uintptr(0) } c = csv_getc(tls, p) } if c == '\n' { (*CsvReader)(unsafe.Pointer(p)).FnLine++ if ((*CsvReader)(unsafe.Pointer(p)).Fn > 0) && (int32(*(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).Fz + uintptr(((*CsvReader)(unsafe.Pointer(p)).Fn - 1))))) == '\r') { (*CsvReader)(unsafe.Pointer(p)).Fn-- } } (*CsvReader)(unsafe.Pointer(p)).FcTerm = int32(int8(c)) } if (*CsvReader)(unsafe.Pointer(p)).Fz != 0 { *(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).Fz + uintptr((*CsvReader)(unsafe.Pointer(p)).Fn))) = int8(0) } (*CsvReader)(unsafe.Pointer(p)).FbNotFirst = 1 return (*CsvReader)(unsafe.Pointer(p)).Fz } // An instance of the CSV virtual table type CsvTable1 = struct { Fbase sqlite3_vtab FzFilename uintptr FzData uintptr FiStart int32 FnCol int32 FtstFlags uint32 _ [4]byte } /* csv.c:307:9 */ // An instance of the CSV virtual table type CsvTable = CsvTable1 /* csv.c:314:3 */ // Allowed values for tstFlags // A cursor for the CSV virtual table type CsvCursor1 = struct { Fbase sqlite3_vtab_cursor Frdr CsvReader FazVal uintptr FaLen uintptr FiRowid sqlite3_int64 } /* csv.c:320:9 */ // Allowed values for tstFlags // A cursor for the CSV virtual table type CsvCursor = CsvCursor1 /* csv.c:326:3 */ // Transfer error message text from a reader into a CsvTable func csv_xfer_error(tls *libc.TLS, pTab uintptr, pRdr uintptr) { /* csv.c:329:13: */ bp := tls.Alloc(16) defer tls.Free(16) sqlite3.Xsqlite3_free(tls, (*CsvTable)(unsafe.Pointer(pTab)).Fbase.FzErrMsg) (*CsvTable)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, pRdr+64 /* &.zErr */)) } // This method is the destructor fo a CsvTable object. func csvtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* csv.c:337:12: */ var p uintptr = pVtab sqlite3.Xsqlite3_free(tls, (*CsvTable)(unsafe.Pointer(p)).FzFilename) sqlite3.Xsqlite3_free(tls, (*CsvTable)(unsafe.Pointer(p)).FzData) sqlite3.Xsqlite3_free(tls, p) return SQLITE_OK } // Skip leading whitespace. Return a pointer to the first non-whitespace // character, or to the zero terminator if the string has only whitespace func csv_skip_whitespace(tls *libc.TLS, z uintptr) uintptr { /* csv.c:347:19: */ for libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z))))) != 0 { z++ } return z } // Remove trailing whitespace from the end of string z[] func csv_trim_whitespace(tls *libc.TLS, z uintptr) { /* csv.c:353:13: */ var n size_t = libc.Xstrlen(tls, z) for (n > uint64(0)) && (libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr(n)))))) != 0) { n-- } *(*int8)(unsafe.Pointer(z + uintptr(n))) = int8(0) } // Dequote the string func csv_dequote(tls *libc.TLS, z uintptr) { /* csv.c:360:13: */ var j int32 var cQuote int8 = *(*int8)(unsafe.Pointer(z)) var i size_t var n size_t if (int32(cQuote) != '\'') && (int32(cQuote) != '"') { return } n = libc.Xstrlen(tls, z) if (n < uint64(2)) || (int32(*(*int8)(unsafe.Pointer(z + uintptr((n - uint64(1)))))) != int32(*(*int8)(unsafe.Pointer(z)))) { return } i = uint64(1) j = 0 for ; i < (n - uint64(1)); i++ { if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32(cQuote)) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((i + uint64(1)))))) == int32(cQuote)) { i++ } *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(i))) } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } // Check to see if the string is of the form: "TAG = VALUE" with optional // whitespace before and around tokens. If it is, return a pointer to the // first character of VALUE. If it is not, return NULL. func csv_parameter(tls *libc.TLS, zTag uintptr, nTag int32, z uintptr) uintptr { /* csv.c:379:19: */ z = csv_skip_whitespace(tls, z) if libc.Xstrncmp(tls, zTag, z, uint64(nTag)) != 0 { return uintptr(0) } z = csv_skip_whitespace(tls, (z + uintptr(nTag))) if int32(*(*int8)(unsafe.Pointer(z))) != '=' { return uintptr(0) } return csv_skip_whitespace(tls, (z + uintptr(1))) } // Decode a parameter that requires a dequoted string. // // Return 1 if the parameter is seen, or 0 if not. 1 is returned // even if there is an error. If an error occurs, then an error message // is left in p->zErr. If there are no errors, p->zErr[0]==0. func csv_string_parameter(tls *libc.TLS, p uintptr, zParam uintptr, zArg uintptr, pzVal uintptr) int32 { /* csv.c:393:12: */ bp := tls.Alloc(32) defer tls.Free(32) var zValue uintptr zValue = csv_parameter(tls, zParam, int32(libc.Xstrlen(tls, zParam)), zArg) if zValue == uintptr(0) { return 0 } *(*int8)(unsafe.Pointer((p + 64 /* &.zErr */))) = int8(0) if *(*uintptr)(unsafe.Pointer(pzVal)) != 0 { csv_errmsg(tls, p, ts+4376 /* "more than one '%..." */, libc.VaList(bp, zParam)) return 1 } *(*uintptr)(unsafe.Pointer(pzVal)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, zValue)) if *(*uintptr)(unsafe.Pointer(pzVal)) == uintptr(0) { csv_errmsg(tls, p, ts+1930 /* "out of memory" */, 0) return 1 } csv_trim_whitespace(tls, *(*uintptr)(unsafe.Pointer(pzVal))) csv_dequote(tls, *(*uintptr)(unsafe.Pointer(pzVal))) return 1 } // Return 0 if the argument is false and 1 if it is true. Return -1 if // we cannot really tell. func csv_boolean(tls *libc.TLS, z uintptr) int32 { /* csv.c:421:12: */ if (((sqlite3.Xsqlite3_stricmp(tls, ts+4045 /* "yes" */, z) == 0) || (sqlite3.Xsqlite3_stricmp(tls, ts+4049 /* "on" */, z) == 0)) || (sqlite3.Xsqlite3_stricmp(tls, ts+4405 /* "true" */, z) == 0)) || ((int32(*(*int8)(unsafe.Pointer(z))) == '1') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == 0)) { return 1 } if (((sqlite3.Xsqlite3_stricmp(tls, ts+4410 /* "no" */, z) == 0) || (sqlite3.Xsqlite3_stricmp(tls, ts+4413 /* "off" */, z) == 0)) || (sqlite3.Xsqlite3_stricmp(tls, ts+4417 /* "false" */, z) == 0)) || ((int32(*(*int8)(unsafe.Pointer(z))) == '0') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == 0)) { return 0 } return -1 } // Check to see if the string is of the form: "TAG = BOOLEAN" or just "TAG". // If it is, set *pValue to be the value of the boolean ("true" if there is // not "= BOOLEAN" component) and return non-zero. If the input string // does not begin with TAG, return zero. func csv_boolean_parameter(tls *libc.TLS, zTag uintptr, nTag int32, z uintptr, pValue uintptr) int32 { /* csv.c:444:12: */ var b int32 z = csv_skip_whitespace(tls, z) if libc.Xstrncmp(tls, zTag, z, uint64(nTag)) != 0 { return 0 } z = csv_skip_whitespace(tls, (z + uintptr(nTag))) if int32(*(*int8)(unsafe.Pointer(z))) == 0 { *(*int32)(unsafe.Pointer(pValue)) = 1 return 1 } if int32(*(*int8)(unsafe.Pointer(z))) != '=' { return 0 } z = csv_skip_whitespace(tls, (z + uintptr(1))) b = csv_boolean(tls, z) if b >= 0 { *(*int32)(unsafe.Pointer(pValue)) = b return 1 } return 0 } // Parameters: // filename=FILENAME Name of file containing CSV content // data=TEXT Direct CSV content. // schema=SCHEMA Alternative CSV schema. // header=YES|NO First row of CSV defines the names of // columns if "yes". Default "no". // columns=N Assume the CSV file contains N columns. // // Only available if compiled with SQLITE_TEST: // // testflags=N Bitmask of test flags. Optional // // If schema= is omitted, then the columns are named "c0", "c1", "c2", // and so forth. If columns=N is omitted, then the file is opened and // the number of columns in the first row is counted to determine the // column count. If header=YES, then the first row is skipped. func csvtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* csv.c:486:12: */ bp := tls.Alloc(420) defer tls.Free(420) var pNew uintptr // The CsvTable object to construct var bHeader int32 // header= flags. -1 means not seen yet var rc int32 // Result code from this routine var i int32 var j int32 // Loop counters var tstFlags int32 // Value for testflags=N parameter // var b int32 at bp+416, 4 // Value of a boolean parameter var nCol int32 // Value of the columns= parameter // var sRdr CsvReader at bp+128, 264 // var azPValue [3]uintptr at bp+392, 24 var z uintptr var zValue uintptr var z1 uintptr var pStr uintptr var zSep uintptr var iCol int32 pNew = uintptr(0) bHeader = -1 rc = SQLITE_OK tstFlags = 0 nCol = -99 // Parameter values libc.Xmemset(tls, bp+128 /* &sRdr */, 0, uint64(unsafe.Sizeof(CsvReader{}))) libc.Xmemset(tls, bp+392 /* &azPValue[0] */, 0, uint64(unsafe.Sizeof([3]uintptr{}))) i = 3 __1: if !(i < argc) { goto __3 } z = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) j = 0 __4: if !(uint64(j) < (uint64(unsafe.Sizeof(azParam)) / uint64(unsafe.Sizeof(uintptr(0))))) { goto __6 } if !(csv_string_parameter(tls, bp+128 /* &sRdr */, azParam[j], z, (bp+392 /* &azPValue */ +uintptr(j)*8)) != 0) { goto __7 } goto __6 __7: ; goto __5 __5: j++ goto __4 goto __6 __6: ; if !(uint64(j) < (uint64(unsafe.Sizeof(azParam)) / uint64(unsafe.Sizeof(uintptr(0))))) { goto __8 } if !(*(*int8)(unsafe.Pointer((bp + 128 /* &sRdr */ + 64 /* &.zErr */))) != 0) { goto __10 } goto csvtab_connect_error __10: ; goto __9 __8: if !(csv_boolean_parameter(tls, ts+4423 /* "header" */, 6, z, bp+416 /* &b */) != 0) { goto __11 } if !(bHeader >= 0) { goto __13 } csv_errmsg(tls, bp+128 /* &sRdr */, ts+4430 /* "more than one 'h..." */, 0) goto csvtab_connect_error __13: ; bHeader = *(*int32)(unsafe.Pointer(bp + 416 /* b */)) goto __12 __11: if !((libc.AssignUintptr(&zValue, csv_parameter(tls, ts+4463 /* "testflags" */, 9, z))) != uintptr(0)) { goto __14 } tstFlags = int32(uint32(libc.Xatoi(tls, zValue))) goto __15 __14: if !((libc.AssignUintptr(&zValue, csv_parameter(tls, ts+4473 /* "columns" */, 7, z))) != uintptr(0)) { goto __16 } if !(nCol > 0) { goto __18 } csv_errmsg(tls, bp+128 /* &sRdr */, ts+4481 /* "more than one 'c..." */, 0) goto csvtab_connect_error __18: ; nCol = libc.Xatoi(tls, zValue) if !(nCol <= 0) { goto __19 } csv_errmsg(tls, bp+128 /* &sRdr */, ts+4515 /* "column= value mu..." */, 0) goto csvtab_connect_error __19: ; goto __17 __16: csv_errmsg(tls, bp+128 /* &sRdr */, ts+4546 /* "bad parameter: '..." */, libc.VaList(bp, z)) goto csvtab_connect_error __17: ; __15: ; __12: ; __9: ; goto __2 __2: i++ goto __1 goto __3 __3: ; if !((libc.Bool32((*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */))) == uintptr(0))) == (libc.Bool32((*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 1*8))) == uintptr(0)))) { goto __20 } csv_errmsg(tls, bp+128 /* &sRdr */, ts+4566 /* "must specify eit..." */, 0) goto csvtab_connect_error __20: ; if !(((nCol <= 0) || (bHeader == 1)) && (csv_reader_open(tls, bp+128 /* &sRdr */, *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */)), *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 1*8))) != 0)) { goto __21 } goto csvtab_connect_error __21: ; pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(CsvTable{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew if !(pNew == uintptr(0)) { goto __22 } goto csvtab_connect_oom __22: ; libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(CsvTable{}))) if !((*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 2*8))) == uintptr(0)) { goto __23 } pStr = sqlite3.Xsqlite3_str_new(tls, uintptr(0)) zSep = ts + 489 /* "" */ iCol = 0 sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+884 /* "CREATE TABLE x(" */, 0) if !((nCol < 0) && (bHeader < 1)) { goto __25 } nCol = 0 __26: csv_read_one_field(tls, bp+128 /* &sRdr */) nCol++ goto __27 __27: if (*CsvReader)(unsafe.Pointer(bp+128 /* &sRdr */)).FcTerm == ',' { goto __26 } goto __28 __28: ; __25: ; if !((nCol > 0) && (bHeader < 1)) { goto __29 } iCol = 0 __31: if !(iCol < nCol) { goto __33 } sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+4618 /* "%sc%d TEXT" */, libc.VaList(bp+16, zSep, iCol)) zSep = ts + 4629 /* "," */ goto __32 __32: iCol++ goto __31 goto __33 __33: ; goto __30 __29: __34: z1 = csv_read_one_field(tls, bp+128 /* &sRdr */) if !(((nCol > 0) && (iCol < nCol)) || ((nCol < 0) && (bHeader != 0))) { goto __37 } sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+4631 /* "%s\"%w\" TEXT" */, libc.VaList(bp+40, zSep, z1)) zSep = ts + 4629 /* "," */ iCol++ __37: ; goto __35 __35: if (*CsvReader)(unsafe.Pointer(bp+128 /* &sRdr */)).FcTerm == ',' { goto __34 } goto __36 __36: ; if !(nCol < 0) { goto __38 } nCol = iCol goto __39 __38: __40: if !(iCol < nCol) { goto __41 } sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+4618 /* "%sc%d TEXT" */, libc.VaList(bp+64, zSep, libc.PreIncInt32(&iCol, 1))) zSep = ts + 4629 /* "," */ goto __40 __41: ; __39: ; __30: ; (*CsvTable)(unsafe.Pointer(pNew)).FnCol = nCol sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+490 /* ")" */, 0) (*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 2*8))) = sqlite3.Xsqlite3_str_finish(tls, pStr) if !((*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 2*8))) == uintptr(0)) { goto __42 } goto csvtab_connect_oom __42: ; goto __24 __23: if !(nCol < 0) { goto __43 } __45: csv_read_one_field(tls, bp+128 /* &sRdr */) (*CsvTable)(unsafe.Pointer(pNew)).FnCol++ goto __46 __46: if (*CsvReader)(unsafe.Pointer(bp+128 /* &sRdr */)).FcTerm == ',' { goto __45 } goto __47 __47: ; goto __44 __43: (*CsvTable)(unsafe.Pointer(pNew)).FnCol = nCol __44: ; __24: ; (*CsvTable)(unsafe.Pointer(pNew)).FzFilename = *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */)) (*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */))) = uintptr(0) (*CsvTable)(unsafe.Pointer(pNew)).FzData = *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 1*8)) (*(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 1*8))) = uintptr(0) (*CsvTable)(unsafe.Pointer(pNew)).FtstFlags = uint32(tstFlags) if !(bHeader != 1) { goto __48 } (*CsvTable)(unsafe.Pointer(pNew)).FiStart = 0 goto __49 __48: if !((*CsvTable)(unsafe.Pointer(pNew)).FzData != 0) { goto __50 } (*CsvTable)(unsafe.Pointer(pNew)).FiStart = int32(int32((*CsvReader)(unsafe.Pointer(bp + 128 /* &sRdr */)).FiIn)) goto __51 __50: (*CsvTable)(unsafe.Pointer(pNew)).FiStart = int32((int32((size_t(libc.Xftell(tls, (*CsvReader)(unsafe.Pointer(bp+128 /* &sRdr */)).Fin)) - (*CsvReader)(unsafe.Pointer(bp+128 /* &sRdr */)).FnIn) + (*CsvReader)(unsafe.Pointer(bp+128 /* &sRdr */)).FiIn))) __51: ; __49: ; csv_reader_reset(tls, bp+128 /* &sRdr */) rc = sqlite3.Xsqlite3_declare_vtab(tls, db, *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 2*8))) if !(rc != 0) { goto __52 } csv_errmsg(tls, bp+128 /* &sRdr */, ts+4643 /* "bad schema: '%s'..." */, libc.VaList(bp+88, *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + 2*8)), sqlite3.Xsqlite3_errmsg(tls, db))) goto csvtab_connect_error __52: ; i = 0 __53: if !(uint64(i) < (uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) { goto __55 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + uintptr(i)*8))) goto __54 __54: i++ goto __53 goto __55 __55: ; // Rationale for DIRECTONLY: // An attacker who controls a database schema could use this vtab // to exfiltrate sensitive data from other files in the filesystem. // And, recommended practice is to put all CSV virtual tables in the // TEMP namespace, so they should still be usable from within TEMP // views, so there shouldn't be a serious loss of functionality by // prohibiting the use of this vtab from persistent triggers and views. sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_DIRECTONLY, 0) return SQLITE_OK csvtab_connect_oom: rc = SQLITE_NOMEM csv_errmsg(tls, bp+128 /* &sRdr */, ts+1930 /* "out of memory" */, 0) csvtab_connect_error: if !(pNew != 0) { goto __56 } csvtabDisconnect(tls, (pNew /* &.base */)) __56: ; i = 0 __57: if !(uint64(i) < (uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) { goto __59 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 392 /* &azPValue[0] */ + uintptr(i)*8))) goto __58 __58: i++ goto __57 goto __59 __59: ; if !(*(*int8)(unsafe.Pointer((bp + 128 /* &sRdr */ + 64 /* &.zErr */))) != 0) { goto __60 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErr))) *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+112, bp+128 /* &sRdr */ +64 /* &.zErr */)) __60: ; csv_reader_reset(tls, bp+128 /* &sRdr */) if !(rc == SQLITE_OK) { goto __61 } rc = SQLITE_ERROR __61: ; return rc } var azParam = [3]uintptr{ ts + 4665 /* "filename" */, ts + 4674 /* "data" */, ts + 4679, /* "schema" */ } /* csv.c:504:21 */ // Reset the current row content held by a CsvCursor. func csvtabCursorRowReset(tls *libc.TLS, pCur uintptr) { /* csv.c:667:13: */ var pTab uintptr = (*CsvCursor)(unsafe.Pointer(pCur)).Fbase.FpVtab var i int32 for i = 0; i < (*CsvTable)(unsafe.Pointer(pTab)).FnCol; i++ { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)) = uintptr(0) *(*int32)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FaLen + uintptr(i)*4)) = 0 } } // The xConnect and xCreate methods do the same thing, but they must be // different so that the virtual table is not an eponymous virtual table. func csvtabCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* csv.c:681:12: */ return csvtabConnect(tls, db, pAux, argc, argv, ppVtab, pzErr) } // Destructor for a CsvCursor. func csvtabClose(tls *libc.TLS, cur uintptr) int32 { /* csv.c:694:12: */ var pCur uintptr = cur csvtabCursorRowReset(tls, pCur) csv_reader_reset(tls, (pCur + 8 /* &.rdr */)) sqlite3.Xsqlite3_free(tls, cur) return SQLITE_OK } // Constructor for a new CsvTable cursor object. func csvtabOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* csv.c:705:12: */ var pTab uintptr = p var pCur uintptr var nByte size_t nByte = (uint64(unsafe.Sizeof(CsvCursor{})) + ((uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(int32(0)))) * uint64((*CsvTable)(unsafe.Pointer(pTab)).FnCol))) pCur = sqlite3.Xsqlite3_malloc64(tls, nByte) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, nByte) (*CsvCursor)(unsafe.Pointer(pCur)).FazVal = (pCur + 1*296) (*CsvCursor)(unsafe.Pointer(pCur)).FaLen = ((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr((*CsvTable)(unsafe.Pointer(pTab)).FnCol)*8) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) if csv_reader_open(tls, (pCur+8 /* &.rdr */), (*CsvTable)(unsafe.Pointer(pTab)).FzFilename, (*CsvTable)(unsafe.Pointer(pTab)).FzData) != 0 { csv_xfer_error(tls, pTab, (pCur + 8 /* &.rdr */)) return SQLITE_ERROR } return SQLITE_OK } // Advance a CsvCursor to its next row of input. // Set the EOF marker if we reach the end of input. func csvtabNext(tls *libc.TLS, cur uintptr) int32 { /* csv.c:728:12: */ var pCur uintptr = cur var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var i int32 = 0 var z uintptr for ok := true; ok; ok = ((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FcTerm == ',') { z = csv_read_one_field(tls, (pCur + 8 /* &.rdr */)) if z == uintptr(0) { break } if i < (*CsvTable)(unsafe.Pointer(pTab)).FnCol { if *(*int32)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FaLen + uintptr(i)*4)) < ((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fn + 1) { var zNew uintptr = sqlite3.Xsqlite3_realloc64(tls, *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)), (uint64((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fn + 1))) if zNew == uintptr(0) { csv_errmsg(tls, (pCur + 8 /* &.rdr */), ts+1930 /* "out of memory" */, 0) csv_xfer_error(tls, pTab, (pCur + 8 /* &.rdr */)) break } *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)) = zNew *(*int32)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FaLen + uintptr(i)*4)) = ((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fn + 1) } libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)), z, (uint64((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fn + 1))) i++ } } if (z == uintptr(0)) || (((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FcTerm == (-1)) && (i < (*CsvTable)(unsafe.Pointer(pTab)).FnCol)) { (*CsvCursor)(unsafe.Pointer(pCur)).FiRowid = int64(-1) } else { (*CsvCursor)(unsafe.Pointer(pCur)).FiRowid++ for i < (*CsvTable)(unsafe.Pointer(pTab)).FnCol { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)) = uintptr(0) *(*int32)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FaLen + uintptr(i)*4)) = 0 i++ } } return SQLITE_OK } // Return values of columns for the row at which the CsvCursor // is currently pointing. func csvtabColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* csv.c:771:12: */ var pCur uintptr = cur var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab if ((i >= 0) && (i < (*CsvTable)(unsafe.Pointer(pTab)).FnCol)) && (*(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)) != uintptr(0)) { sqlite3.Xsqlite3_result_text(tls, ctx, *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)), -1, libc.UintptrFromInt32(-1)) } return SQLITE_OK } // Return the rowid for the current row. func csvtabRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* csv.c:787:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*CsvCursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // Return TRUE if the cursor has been moved off of the last // row of output. func csvtabEof(tls *libc.TLS, cur uintptr) int32 { /* csv.c:797:12: */ var pCur uintptr = cur return (libc.Bool32((*CsvCursor)(unsafe.Pointer(pCur)).FiRowid < int64(0))) } // Only a full table scan is supported. So xFilter simply rewinds to // the beginning. func csvtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* csv.c:806:12: */ var pCur uintptr = pVtabCursor var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab (*CsvCursor)(unsafe.Pointer(pCur)).FiRowid = int64(0) if (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fin == uintptr(0) { (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FiIn = size_t((*CsvTable)(unsafe.Pointer(pTab)).FiStart) } else { libc.Xfseek(tls, (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fin, (*CsvTable)(unsafe.Pointer(pTab)).FiStart, SEEK_SET) (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FiIn = uint64(0) (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FnIn = uint64(0) } return csvtabNext(tls, pVtabCursor) } // Only a forward full table scan is supported. xBestIndex is mostly // a no-op. If CSVTEST_FIDX is set, then the presence of equality // constraints lowers the estimated cost, which is fiction, but is useful // for testing certain kinds of virtual table behavior. func csvtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* csv.c:833:12: */ (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1000000) if ((*CsvTable)(unsafe.Pointer((tab))).FtstFlags & uint32(CSVTEST_FIDX)) != uint32(0) { // The usual (and sensible) case is to always do a full table scan. // The code in this branch only runs when testflags=1. This code // generates an artifical and unrealistic plan which is useful // for testing virtual table logic but is not helpful to real applications. // // Any ==, LIKE, or GLOB constraint is marked as usable by the virtual // table (even though it is not) and the cost of running the virtual table // is reduced from 1 million to just 10. The constraints are *not* marked // as omittable, however, so the query planner should still generate a // plan that gives a correct answer, even if they plan is not optimal. var i int32 var nConst int32 = 0 for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; i++ { var op uint8 if int32((*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint+uintptr(i)*12)).Fusable) == 0 { continue } op = (*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(i)*12)).Fop if ((int32(op) == SQLITE_INDEX_CONSTRAINT_EQ) || (int32(op) == SQLITE_INDEX_CONSTRAINT_LIKE)) || (int32(op) == SQLITE_INDEX_CONSTRAINT_GLOB) { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(10) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(nConst)*8)).FargvIndex = (nConst + 1) nConst++ } } } return SQLITE_OK } var CsvModule = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* csv.c:872:23 */ // For virtual table testing, make a version of the CSV virtual table // available that has an xUpdate function. But the xUpdate always returns // SQLITE_READONLY since the CSV file is not really writable. func csvtabUpdate(tls *libc.TLS, p uintptr, n int32, v uintptr, x uintptr) int32 { /* csv.c:901:12: */ return SQLITE_READONLY } var CsvModuleFauxWrite = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xRename } /* csv.c:904:23 */ func sqlite3_csv_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* csv.c:939:5: */ var rc int32 _ = pApi rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4686 /* "csv" */, uintptr(unsafe.Pointer(&CsvModule)), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4690 /* "csv_wr" */, uintptr(unsafe.Pointer(&CsvModuleFauxWrite)), uintptr(0)) } return rc } // Mark a function parameter as unused, to suppress nuisance compiler // warnings. // A decimal object type Decimal1 = struct { Fsign int8 Foom int8 FisNull int8 FisInit int8 FnDigit int32 FnFrac int32 _ [4]byte Fa uintptr } /* decimal.c:32:9 */ // Mark a function parameter as unused, to suppress nuisance compiler // warnings. // A decimal object type Decimal = Decimal1 /* decimal.c:32:24 */ // Release memory held by a Decimal, but do not free the object itself. func decimal_clear(tls *libc.TLS, p uintptr) { /* decimal.c:46:13: */ sqlite3.Xsqlite3_free(tls, (*Decimal)(unsafe.Pointer(p)).Fa) } // Destroy a Decimal object func decimal_free(tls *libc.TLS, p uintptr) { /* decimal.c:53:13: */ if p != 0 { decimal_clear(tls, p) sqlite3.Xsqlite3_free(tls, p) } } // Allocate a new Decimal object. Initialize it to the number given // by the input string. func decimal_new(tls *libc.TLS, pCtx uintptr, pIn uintptr, nAlt int32, zAlt uintptr) uintptr { /* decimal.c:64:16: */ var p uintptr var n int32 var i int32 var zIn uintptr var iExp int32 var j int32 var neg int32 var c int8 var nExtra int32 iExp = 0 p = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Decimal{}))) if !(p == uintptr(0)) { goto __1 } goto new_no_mem __1: ; (*Decimal)(unsafe.Pointer(p)).Fsign = int8(0) (*Decimal)(unsafe.Pointer(p)).Foom = int8(0) (*Decimal)(unsafe.Pointer(p)).FisInit = int8(1) (*Decimal)(unsafe.Pointer(p)).FisNull = int8(0) (*Decimal)(unsafe.Pointer(p)).FnDigit = 0 (*Decimal)(unsafe.Pointer(p)).FnFrac = 0 if !(zAlt != 0) { goto __2 } n = nAlt zIn = zAlt goto __3 __2: if !(sqlite3.Xsqlite3_value_type(tls, pIn) == SQLITE_NULL) { goto __4 } (*Decimal)(unsafe.Pointer(p)).Fa = uintptr(0) (*Decimal)(unsafe.Pointer(p)).FisNull = int8(1) return p __4: ; n = sqlite3.Xsqlite3_value_bytes(tls, pIn) zIn = sqlite3.Xsqlite3_value_text(tls, pIn) __3: ; (*Decimal)(unsafe.Pointer(p)).Fa = sqlite3.Xsqlite3_malloc64(tls, (uint64(n + 1))) if !((*Decimal)(unsafe.Pointer(p)).Fa == uintptr(0)) { goto __5 } goto new_no_mem __5: ; i = 0 __6: if !(libc.Xisspace(tls, int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i))))) != 0) { goto __8 } goto __7 __7: i++ goto __6 goto __8 __8: ; if !(int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) == '-') { goto __9 } (*Decimal)(unsafe.Pointer(p)).Fsign = int8(1) i++ goto __10 __9: if !(int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) == '+') { goto __11 } i++ __11: ; __10: ; __12: if !((i < n) && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) == '0')) { goto __13 } i++ goto __12 __13: ; __14: if !(i < n) { goto __15 } c = int8(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) if !((int32(c) >= '0') && (int32(c) <= '9')) { goto __16 } *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(p)).Fa + uintptr(libc.PostIncInt32(&(*Decimal)(unsafe.Pointer(p)).FnDigit, 1)))) = (int8(int32(c) - '0')) goto __17 __16: if !(int32(c) == '.') { goto __18 } (*Decimal)(unsafe.Pointer(p)).FnFrac = ((*Decimal)(unsafe.Pointer(p)).FnDigit + 1) goto __19 __18: if !((int32(c) == 'e') || (int32(c) == 'E')) { goto __20 } j = (i + 1) neg = 0 if !(j >= n) { goto __21 } goto __15 __21: ; if !(int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(j)))) == '-') { goto __22 } neg = 1 j++ goto __23 __22: if !(int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(j)))) == '+') { goto __24 } j++ __24: ; __23: ; __25: if !((j < n) && (iExp < 1000000)) { goto __26 } if !((int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(j)))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(j)))) <= '9')) { goto __27 } iExp = (((iExp * 10) + int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(j))))) - '0') __27: ; j++ goto __25 __26: ; if !(neg != 0) { goto __28 } iExp = -iExp __28: ; goto __15 __20: ; __19: ; __17: ; i++ goto __14 __15: ; if !((*Decimal)(unsafe.Pointer(p)).FnFrac != 0) { goto __29 } (*Decimal)(unsafe.Pointer(p)).FnFrac = ((*Decimal)(unsafe.Pointer(p)).FnDigit - ((*Decimal)(unsafe.Pointer(p)).FnFrac - 1)) __29: ; if !(iExp > 0) { goto __30 } if !((*Decimal)(unsafe.Pointer(p)).FnFrac > 0) { goto __32 } if !(iExp <= (*Decimal)(unsafe.Pointer(p)).FnFrac) { goto __33 } *(*int32)(unsafe.Pointer(p + 8 /* &.nFrac */)) -= (iExp) iExp = 0 goto __34 __33: iExp = iExp - ((*Decimal)(unsafe.Pointer(p)).FnFrac) (*Decimal)(unsafe.Pointer(p)).FnFrac = 0 __34: ; __32: ; if !(iExp > 0) { goto __35 } (*Decimal)(unsafe.Pointer(p)).Fa = sqlite3.Xsqlite3_realloc64(tls, (*Decimal)(unsafe.Pointer(p)).Fa, (uint64(((*Decimal)(unsafe.Pointer(p)).FnDigit + iExp) + 1))) if !((*Decimal)(unsafe.Pointer(p)).Fa == uintptr(0)) { goto __36 } goto new_no_mem __36: ; libc.Xmemset(tls, ((*Decimal)(unsafe.Pointer(p)).Fa + uintptr((*Decimal)(unsafe.Pointer(p)).FnDigit)), 0, uint64(iExp)) *(*int32)(unsafe.Pointer(p + 4 /* &.nDigit */)) += (iExp) __35: ; goto __31 __30: if !(iExp < 0) { goto __37 } iExp = -iExp nExtra = (((*Decimal)(unsafe.Pointer(p)).FnDigit - (*Decimal)(unsafe.Pointer(p)).FnFrac) - 1) if !(nExtra != 0) { goto __38 } if !(nExtra >= iExp) { goto __39 } *(*int32)(unsafe.Pointer(p + 8 /* &.nFrac */)) += (iExp) iExp = 0 goto __40 __39: iExp = iExp - (nExtra) (*Decimal)(unsafe.Pointer(p)).FnFrac = ((*Decimal)(unsafe.Pointer(p)).FnDigit - 1) __40: ; __38: ; if !(iExp > 0) { goto __41 } (*Decimal)(unsafe.Pointer(p)).Fa = sqlite3.Xsqlite3_realloc64(tls, (*Decimal)(unsafe.Pointer(p)).Fa, (uint64(((*Decimal)(unsafe.Pointer(p)).FnDigit + iExp) + 1))) if !((*Decimal)(unsafe.Pointer(p)).Fa == uintptr(0)) { goto __42 } goto new_no_mem __42: ; libc.Xmemmove(tls, ((*Decimal)(unsafe.Pointer(p)).Fa + uintptr(iExp)), (*Decimal)(unsafe.Pointer(p)).Fa, uint64((*Decimal)(unsafe.Pointer(p)).FnDigit)) libc.Xmemset(tls, (*Decimal)(unsafe.Pointer(p)).Fa, 0, uint64(iExp)) *(*int32)(unsafe.Pointer(p + 4 /* &.nDigit */)) += (iExp) *(*int32)(unsafe.Pointer(p + 8 /* &.nFrac */)) += (iExp) __41: ; __37: ; __31: ; return p new_no_mem: if !(pCtx != 0) { goto __43 } sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) __43: ; sqlite3.Xsqlite3_free(tls, p) return uintptr(0) } // Make the given Decimal the result. func decimal_result(tls *libc.TLS, pCtx uintptr, p uintptr) { /* decimal.c:183:13: */ var z uintptr var i int32 var j int32 var n int32 if (p == uintptr(0)) || ((*Decimal)(unsafe.Pointer(p)).Foom != 0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) return } if (*Decimal)(unsafe.Pointer(p)).FisNull != 0 { sqlite3.Xsqlite3_result_null(tls, pCtx) return } z = sqlite3.Xsqlite3_malloc(tls, ((*Decimal)(unsafe.Pointer(p)).FnDigit + 4)) if z == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) return } i = 0 if ((*Decimal)(unsafe.Pointer(p)).FnDigit == 0) || (((*Decimal)(unsafe.Pointer(p)).FnDigit == 1) && (int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(p)).Fa))) == 0)) { (*Decimal)(unsafe.Pointer(p)).Fsign = int8(0) } if (*Decimal)(unsafe.Pointer(p)).Fsign != 0 { *(*int8)(unsafe.Pointer(z)) = int8('-') i = 1 } n = ((*Decimal)(unsafe.Pointer(p)).FnDigit - (*Decimal)(unsafe.Pointer(p)).FnFrac) if n <= 0 { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('0') } j = 0 for (n > 1) && (int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(p)).Fa + uintptr(j)))) == 0) { j++ n-- } for n > 0 { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = (int8(int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(p)).Fa + uintptr(j)))) + '0')) j++ n-- } if (*Decimal)(unsafe.Pointer(p)).FnFrac != 0 { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('.') for ok := true; ok; ok = (j < (*Decimal)(unsafe.Pointer(p)).FnDigit) { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = (int8(int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(p)).Fa + uintptr(j)))) + '0')) j++ } } *(*int8)(unsafe.Pointer(z + uintptr(i))) = int8(0) sqlite3.Xsqlite3_result_text(tls, pCtx, z, i, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } // SQL Function: decimal(X) // // Convert input X into decimal and then back into text func decimalFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:238:13: */ var p uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) _ = argc decimal_result(tls, context, p) decimal_free(tls, p) } // Compare to Decimal objects. Return negative, 0, or positive if the // first object is less than, equal to, or greater than the second. // // Preconditions for this routine: // // pA!=0 // pA->isNull==0 // pB!=0 // pB->isNull==0 func decimal_cmp(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* decimal.c:260:12: */ var nASig int32 var nBSig int32 var rc int32 var n int32 if int32((*Decimal)(unsafe.Pointer(pA)).Fsign) != int32((*Decimal)(unsafe.Pointer(pB)).Fsign) { if (*Decimal)(unsafe.Pointer(pA)).Fsign != 0 { return -1 } return +1 } if (*Decimal)(unsafe.Pointer(pA)).Fsign != 0 { var pTemp uintptr = pA pA = pB pB = pTemp } nASig = ((*Decimal)(unsafe.Pointer(pA)).FnDigit - (*Decimal)(unsafe.Pointer(pA)).FnFrac) nBSig = ((*Decimal)(unsafe.Pointer(pB)).FnDigit - (*Decimal)(unsafe.Pointer(pB)).FnFrac) if nASig != nBSig { return (nASig - nBSig) } n = (*Decimal)(unsafe.Pointer(pA)).FnDigit if n > (*Decimal)(unsafe.Pointer(pB)).FnDigit { n = (*Decimal)(unsafe.Pointer(pB)).FnDigit } rc = libc.Xmemcmp(tls, (*Decimal)(unsafe.Pointer(pA)).Fa, (*Decimal)(unsafe.Pointer(pB)).Fa, uint64(n)) if rc == 0 { rc = ((*Decimal)(unsafe.Pointer(pA)).FnDigit - (*Decimal)(unsafe.Pointer(pB)).FnDigit) } return rc } // SQL Function: decimal_cmp(X, Y) // // Return negative, zero, or positive if X is less then, equal to, or // greater than Y. func decimalCmpFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:290:13: */ var pA uintptr var pB uintptr var rc int32 pA = uintptr(0) pB = uintptr(0) _ = argc pA = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) if !((pA == uintptr(0)) || ((*Decimal)(unsafe.Pointer(pA)).FisNull != 0)) { goto __1 } goto cmp_done __1: ; pB = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), 0, uintptr(0)) if !((pB == uintptr(0)) || ((*Decimal)(unsafe.Pointer(pB)).FisNull != 0)) { goto __2 } goto cmp_done __2: ; rc = decimal_cmp(tls, pA, pB) if !(rc < 0) { goto __3 } rc = -1 goto __4 __3: if !(rc > 0) { goto __5 } rc = +1 __5: ; __4: ; sqlite3.Xsqlite3_result_int(tls, context, rc) cmp_done: decimal_free(tls, pA) decimal_free(tls, pB) } // Expand the Decimal so that it has a least nDigit digits and nFrac // digits to the right of the decimal point. func decimal_expand(tls *libc.TLS, p uintptr, nDigit int32, nFrac int32) { /* decimal.c:316:13: */ var nAddSig int32 var nAddFrac int32 if p == uintptr(0) { return } nAddFrac = (nFrac - (*Decimal)(unsafe.Pointer(p)).FnFrac) nAddSig = ((nDigit - (*Decimal)(unsafe.Pointer(p)).FnDigit) - nAddFrac) if (nAddFrac == 0) && (nAddSig == 0) { return } (*Decimal)(unsafe.Pointer(p)).Fa = sqlite3.Xsqlite3_realloc64(tls, (*Decimal)(unsafe.Pointer(p)).Fa, (uint64(nDigit + 1))) if (*Decimal)(unsafe.Pointer(p)).Fa == uintptr(0) { (*Decimal)(unsafe.Pointer(p)).Foom = int8(1) return } if nAddSig != 0 { libc.Xmemmove(tls, ((*Decimal)(unsafe.Pointer(p)).Fa + uintptr(nAddSig)), (*Decimal)(unsafe.Pointer(p)).Fa, uint64((*Decimal)(unsafe.Pointer(p)).FnDigit)) libc.Xmemset(tls, (*Decimal)(unsafe.Pointer(p)).Fa, 0, uint64(nAddSig)) *(*int32)(unsafe.Pointer(p + 4 /* &.nDigit */)) += (nAddSig) } if nAddFrac != 0 { libc.Xmemset(tls, ((*Decimal)(unsafe.Pointer(p)).Fa + uintptr((*Decimal)(unsafe.Pointer(p)).FnDigit)), 0, uint64(nAddFrac)) *(*int32)(unsafe.Pointer(p + 4 /* &.nDigit */)) += (nAddFrac) *(*int32)(unsafe.Pointer(p + 8 /* &.nFrac */)) += (nAddFrac) } } // Add the value pB into pA. // // Both pA and pB might become denormalized by this routine. func decimal_add(tls *libc.TLS, pA uintptr, pB uintptr) { /* decimal.c:345:13: */ var nSig int32 var nFrac int32 var nDigit int32 var i int32 var rc int32 if pA == uintptr(0) { return } if (((*Decimal)(unsafe.Pointer(pA)).Foom != 0) || (pB == uintptr(0))) || ((*Decimal)(unsafe.Pointer(pB)).Foom != 0) { (*Decimal)(unsafe.Pointer(pA)).Foom = int8(1) return } if ((*Decimal)(unsafe.Pointer(pA)).FisNull != 0) || ((*Decimal)(unsafe.Pointer(pB)).FisNull != 0) { (*Decimal)(unsafe.Pointer(pA)).FisNull = int8(1) return } nSig = ((*Decimal)(unsafe.Pointer(pA)).FnDigit - (*Decimal)(unsafe.Pointer(pA)).FnFrac) if (nSig != 0) && (int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa))) == 0) { nSig-- } if nSig < ((*Decimal)(unsafe.Pointer(pB)).FnDigit - (*Decimal)(unsafe.Pointer(pB)).FnFrac) { nSig = ((*Decimal)(unsafe.Pointer(pB)).FnDigit - (*Decimal)(unsafe.Pointer(pB)).FnFrac) } nFrac = (*Decimal)(unsafe.Pointer(pA)).FnFrac if nFrac < (*Decimal)(unsafe.Pointer(pB)).FnFrac { nFrac = (*Decimal)(unsafe.Pointer(pB)).FnFrac } nDigit = ((nSig + nFrac) + 1) decimal_expand(tls, pA, nDigit, nFrac) decimal_expand(tls, pB, nDigit, nFrac) if ((*Decimal)(unsafe.Pointer(pA)).Foom != 0) || ((*Decimal)(unsafe.Pointer(pB)).Foom != 0) { (*Decimal)(unsafe.Pointer(pA)).Foom = int8(1) } else { if int32((*Decimal)(unsafe.Pointer(pA)).Fsign) == int32((*Decimal)(unsafe.Pointer(pB)).Fsign) { var carry int32 = 0 for i = (nDigit - 1); i >= 0; i-- { var x int32 = ((int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(i)))) + int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pB)).Fa + uintptr(i))))) + carry) if x >= 10 { carry = 1 *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(i))) = (int8(x - 10)) } else { carry = 0 *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(i))) = int8(x) } } } else { var aA uintptr var aB uintptr var borrow int32 = 0 rc = libc.Xmemcmp(tls, (*Decimal)(unsafe.Pointer(pA)).Fa, (*Decimal)(unsafe.Pointer(pB)).Fa, uint64(nDigit)) if rc < 0 { aA = (*Decimal)(unsafe.Pointer(pB)).Fa aB = (*Decimal)(unsafe.Pointer(pA)).Fa (*Decimal)(unsafe.Pointer(pA)).Fsign = libc.BoolInt8(!((*Decimal)(unsafe.Pointer(pA)).Fsign != 0)) } else { aA = (*Decimal)(unsafe.Pointer(pA)).Fa aB = (*Decimal)(unsafe.Pointer(pB)).Fa } for i = (nDigit - 1); i >= 0; i-- { var x int32 = ((int32(*(*int8)(unsafe.Pointer(aA + uintptr(i)))) - int32(*(*int8)(unsafe.Pointer(aB + uintptr(i))))) - borrow) if x < 0 { *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(i))) = (int8(x + 10)) borrow = 1 } else { *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(i))) = int8(x) borrow = 0 } } } } } // Compare text in decimal order. func decimalCollFunc(tls *libc.TLS, notUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* decimal.c:413:12: */ var zA uintptr = pKey1 var zB uintptr = pKey2 var pA uintptr = decimal_new(tls, uintptr(0), uintptr(0), nKey1, zA) var pB uintptr = decimal_new(tls, uintptr(0), uintptr(0), nKey2, zB) var rc int32 _ = notUsed if (pA == uintptr(0)) || (pB == uintptr(0)) { rc = 0 } else { rc = decimal_cmp(tls, pA, pB) } decimal_free(tls, pA) decimal_free(tls, pB) return rc } // SQL Function: decimal_add(X, Y) // decimal_sub(X, Y) // // Return the sum or difference of X and Y. func decimalAddFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:441:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), 0, uintptr(0)) _ = argc decimal_add(tls, pA, pB) decimal_result(tls, context, pA) decimal_free(tls, pA) decimal_free(tls, pB) } func decimalSubFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:454:13: */ var pA uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) var pB uintptr = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), 0, uintptr(0)) _ = argc if pB == uintptr(0) { return } (*Decimal)(unsafe.Pointer(pB)).Fsign = libc.BoolInt8(!((*Decimal)(unsafe.Pointer(pB)).Fsign != 0)) decimal_add(tls, pA, pB) decimal_result(tls, context, pA) decimal_free(tls, pA) decimal_free(tls, pB) } // Aggregate funcion: decimal_sum(X) // // Works like sum() except that it uses decimal arithmetic for unlimited // precision. func decimalSumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:475:13: */ var p uintptr var pArg uintptr _ = argc p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(Decimal{}))) if p == uintptr(0) { return } if !(int32((*Decimal)(unsafe.Pointer(p)).FisInit) != 0) { (*Decimal)(unsafe.Pointer(p)).FisInit = int8(1) (*Decimal)(unsafe.Pointer(p)).Fa = sqlite3.Xsqlite3_malloc(tls, 2) if (*Decimal)(unsafe.Pointer(p)).Fa == uintptr(0) { (*Decimal)(unsafe.Pointer(p)).Foom = int8(1) } else { *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(p)).Fa)) = int8(0) } (*Decimal)(unsafe.Pointer(p)).FnDigit = 1 (*Decimal)(unsafe.Pointer(p)).FnFrac = 0 } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } pArg = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) decimal_add(tls, p, pArg) decimal_free(tls, pArg) } func decimalSumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:501:13: */ var p uintptr var pArg uintptr _ = argc p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(Decimal{}))) if p == uintptr(0) { return } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } pArg = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) if pArg != 0 { (*Decimal)(unsafe.Pointer(pArg)).Fsign = libc.BoolInt8(!((*Decimal)(unsafe.Pointer(pArg)).Fsign != 0)) } decimal_add(tls, p, pArg) decimal_free(tls, pArg) } func decimalSumValue(tls *libc.TLS, context uintptr) { /* decimal.c:517:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { return } decimal_result(tls, context, p) } func decimalSumFinalize(tls *libc.TLS, context uintptr) { /* decimal.c:522:13: */ var p uintptr = sqlite3.Xsqlite3_aggregate_context(tls, context, 0) if p == uintptr(0) { return } decimal_result(tls, context, p) decimal_clear(tls, p) } // SQL Function: decimal_mul(X, Y) // // Return the product of X and Y. // // All significant digits after the decimal point are retained. // Trailing zeros after the decimal point are omitted as long as // the number of digits after the decimal point is no less than // either the number of digits in either input. func decimalMulFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* decimal.c:539:13: */ var pA uintptr var pB uintptr var acc uintptr var i int32 var j int32 var k int32 var minFrac int32 var f int8 var carry int32 var x int32 pA = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv)), 0, uintptr(0)) pB = decimal_new(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), 0, uintptr(0)) acc = uintptr(0) _ = argc if !((((((pA == uintptr(0)) || ((*Decimal)(unsafe.Pointer(pA)).Foom != 0)) || ((*Decimal)(unsafe.Pointer(pA)).FisNull != 0)) || (pB == uintptr(0))) || ((*Decimal)(unsafe.Pointer(pB)).Foom != 0)) || ((*Decimal)(unsafe.Pointer(pB)).FisNull != 0)) { goto __1 } goto mul_end __1: ; acc = sqlite3.Xsqlite3_malloc64(tls, (uint64(((*Decimal)(unsafe.Pointer(pA)).FnDigit + (*Decimal)(unsafe.Pointer(pB)).FnDigit) + 2))) if !(acc == uintptr(0)) { goto __2 } sqlite3.Xsqlite3_result_error_nomem(tls, context) goto mul_end __2: ; libc.Xmemset(tls, acc, 0, (uint64(((*Decimal)(unsafe.Pointer(pA)).FnDigit + (*Decimal)(unsafe.Pointer(pB)).FnDigit) + 2))) minFrac = (*Decimal)(unsafe.Pointer(pA)).FnFrac if !((*Decimal)(unsafe.Pointer(pB)).FnFrac < minFrac) { goto __3 } minFrac = (*Decimal)(unsafe.Pointer(pB)).FnFrac __3: ; i = ((*Decimal)(unsafe.Pointer(pA)).FnDigit - 1) __4: if !(i >= 0) { goto __6 } f = *(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(i))) carry = 0 j = ((*Decimal)(unsafe.Pointer(pB)).FnDigit - 1) k = ((i + j) + 3) __7: if !(j >= 0) { goto __9 } x = ((int32(*(*int8)(unsafe.Pointer(acc + uintptr(k)))) + (int32(f) * int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pB)).Fa + uintptr(j)))))) + carry) *(*int8)(unsafe.Pointer(acc + uintptr(k))) = (int8(x % 10)) carry = (x / 10) goto __8 __8: j-- k-- goto __7 goto __9 __9: ; x = (int32(*(*int8)(unsafe.Pointer(acc + uintptr(k)))) + carry) *(*int8)(unsafe.Pointer(acc + uintptr(k))) = (int8(x % 10)) *(*int8)(unsafe.Pointer(acc + uintptr((k - 1)))) += int8((x / 10)) goto __5 __5: i-- goto __4 goto __6 __6: ; sqlite3.Xsqlite3_free(tls, (*Decimal)(unsafe.Pointer(pA)).Fa) (*Decimal)(unsafe.Pointer(pA)).Fa = acc acc = uintptr(0) *(*int32)(unsafe.Pointer(pA + 4 /* &.nDigit */)) += ((*Decimal)(unsafe.Pointer(pB)).FnDigit + 2) *(*int32)(unsafe.Pointer(pA + 8 /* &.nFrac */)) += ((*Decimal)(unsafe.Pointer(pB)).FnFrac) *(*int8)(unsafe.Pointer(pA /* &.sign */)) ^= int8((int32((*Decimal)(unsafe.Pointer(pB)).Fsign))) __10: if !(((*Decimal)(unsafe.Pointer(pA)).FnFrac > minFrac) && (int32(*(*int8)(unsafe.Pointer((*Decimal)(unsafe.Pointer(pA)).Fa + uintptr(((*Decimal)(unsafe.Pointer(pA)).FnDigit - 1))))) == 0)) { goto __11 } (*Decimal)(unsafe.Pointer(pA)).FnFrac-- (*Decimal)(unsafe.Pointer(pA)).FnDigit-- goto __10 __11: ; decimal_result(tls, context, pA) mul_end: sqlite3.Xsqlite3_free(tls, acc) decimal_free(tls, pA) decimal_free(tls, pB) } func sqlite3_decimal_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* decimal.c:596:5: */ var rc int32 = SQLITE_OK var i uint32 _ = pzErrMsg // Unused parameter _ = pApi for i = uint32(0); (uint64(i) < (uint64(unsafe.Sizeof(aFunc)) / uint64(unsafe.Sizeof(struct { FzFuncName uintptr FnArg int32 _ [4]byte FxFunc uintptr }{})))) && (rc == SQLITE_OK); i++ { rc = sqlite3.Xsqlite3_create_function(tls, db, aFunc[i].FzFuncName, aFunc[i].FnArg, ((SQLITE_UTF8 | SQLITE_INNOCUOUS) | SQLITE_DETERMINISTIC), uintptr(0), aFunc[i].FxFunc, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_window_function(tls, db, ts+4697 /* "decimal_sum" */, 1, ((SQLITE_UTF8 | SQLITE_INNOCUOUS) | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{decimalSumStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{decimalSumFinalize})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{decimalSumValue})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{decimalSumInverse})), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_collation(tls, db, ts+4709 /* "decimal" */, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{decimalCollFunc}))) } return rc } var aFunc = [5]struct { FzFuncName uintptr FnArg int32 _ [4]byte FxFunc uintptr }{ {FzFuncName: ts + 4709 /* "decimal" */, FnArg: 1, FxFunc: 0}, {FzFuncName: ts + 4717 /* "decimal_cmp" */, FnArg: 2, FxFunc: 0}, {FzFuncName: ts + 4729 /* "decimal_add" */, FnArg: 2, FxFunc: 0}, {FzFuncName: ts + 4741 /* "decimal_sub" */, FnArg: 2, FxFunc: 0}, {FzFuncName: ts + 4753 /* "decimal_mul" */, FnArg: 2, FxFunc: 0}, } /* decimal.c:606:5 */ // Structure used to accumulate the output type EvalResult = struct { Fz uintptr FzSep uintptr FszSep int32 _ [4]byte FnAlloc sqlite3_int64 FnUsed sqlite3_int64 } /* eval.c:23:1 */ // Callback from sqlite_exec() for the eval() function. func callback(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr, colnames uintptr) int32 { /* eval.c:34:12: */ var p uintptr = pCtx var i int32 if argv == uintptr(0) { return 0 } for i = 0; i < argc; i++ { var z uintptr if *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0 { z = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) } else { z = ts + 489 /* "" */ } var sz size_t = libc.Xstrlen(tls, z) if (((sqlite3_int64(sz) + (*EvalResult)(unsafe.Pointer(p)).FnUsed) + sqlite3_int64((*EvalResult)(unsafe.Pointer(p)).FszSep)) + int64(1)) > (*EvalResult)(unsafe.Pointer(p)).FnAlloc { var zNew uintptr (*EvalResult)(unsafe.Pointer(p)).FnAlloc = (sqlite3_int64((((size_t((*EvalResult)(unsafe.Pointer(p)).FnAlloc * int64(2))) + sz) + size_t((*EvalResult)(unsafe.Pointer(p)).FszSep)) + uint64(1))) // Using sqlite3_realloc64() would be better, but it is a recent // addition and will cause a segfault if loaded by an older version // of SQLite. if (*EvalResult)(unsafe.Pointer(p)).FnAlloc <= int64(0x7fffffff) { zNew = sqlite3.Xsqlite3_realloc64(tls, (*EvalResult)(unsafe.Pointer(p)).Fz, uint64((*EvalResult)(unsafe.Pointer(p)).FnAlloc)) } else { zNew = uintptr(0) } if zNew == uintptr(0) { sqlite3.Xsqlite3_free(tls, (*EvalResult)(unsafe.Pointer(p)).Fz) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(EvalResult{}))) return 1 } (*EvalResult)(unsafe.Pointer(p)).Fz = zNew } if (*EvalResult)(unsafe.Pointer(p)).FnUsed > int64(0) { libc.Xmemcpy(tls, ((*EvalResult)(unsafe.Pointer(p)).Fz + uintptr((*EvalResult)(unsafe.Pointer(p)).FnUsed)), (*EvalResult)(unsafe.Pointer(p)).FzSep, uint64((*EvalResult)(unsafe.Pointer(p)).FszSep)) *(*sqlite3_int64)(unsafe.Pointer(p + 32 /* &.nUsed */)) += (sqlite3_int64((*EvalResult)(unsafe.Pointer(p)).FszSep)) } libc.Xmemcpy(tls, ((*EvalResult)(unsafe.Pointer(p)).Fz + uintptr((*EvalResult)(unsafe.Pointer(p)).FnUsed)), z, sz) *(*sqlite3_int64)(unsafe.Pointer(p + 32 /* &.nUsed */)) += sqlite3_int64((sz)) } return 0 } // Implementation of the eval(X) and eval(X,Y) SQL functions. // // Evaluate the SQL text in X. Return the results, using string // Y as the separator. If Y is omitted, use a single space character. func sqlEvalFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* eval.c:71:13: */ bp := tls.Alloc(48) defer tls.Free(48) var zSql uintptr var db uintptr *(*uintptr)(unsafe.Pointer(bp + 40 /* zErr */)) = uintptr(0) var rc int32 // var x EvalResult at bp, 40 libc.Xmemset(tls, bp /* &x */, 0, uint64(unsafe.Sizeof(EvalResult{}))) (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep = ts + 4765 /* " " */ zSql = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zSql == uintptr(0) { return } if argc > 1 { (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep == uintptr(0) { return } } (*EvalResult)(unsafe.Pointer(bp /* &x */)).FszSep = int32(libc.Xstrlen(tls, (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep)) db = sqlite3.Xsqlite3_context_db_handle(tls, context) rc = sqlite3.Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{callback})), bp /* &x */, bp+40 /* &zErr */) if rc != SQLITE_OK { sqlite3.Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 40 /* zErr */)), -1) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zErr */))) } else if (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) sqlite3.Xsqlite3_free(tls, (*EvalResult)(unsafe.Pointer(bp /* &x */)).Fz) } else { sqlite3.Xsqlite3_result_text(tls, context, (*EvalResult)(unsafe.Pointer(bp /* &x */)).Fz, int32((*EvalResult)(unsafe.Pointer(bp /* &x */)).FnUsed), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } func sqlite3_eval_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* eval.c:108:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Unused parameter rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4767 /* "eval" */, 1, (SQLITE_UTF8 | SQLITE_DIRECTONLY), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{sqlEvalFunc})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4767 /* "eval" */, 2, (SQLITE_UTF8 | SQLITE_DIRECTONLY), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{sqlEvalFunc})), uintptr(0), uintptr(0)) } return rc } // explain_vtab is a subclass of sqlite3_vtab which will // serve as the underlying representation of a explain virtual table type explain_vtab1 = struct { Fbase sqlite3_vtab Fdb uintptr } /* explain.c:38:9 */ // explain_vtab is a subclass of sqlite3_vtab which will // serve as the underlying representation of a explain virtual table type explain_vtab = explain_vtab1 /* explain.c:38:29 */ // explain_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result from an EXPLAIN operation. type explain_cursor1 = struct { Fbase sqlite3_vtab_cursor Fdb uintptr FzSql uintptr FpExplain uintptr Frc int32 _ [4]byte } /* explain.c:48:9 */ // explain_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result from an EXPLAIN operation. type explain_cursor = explain_cursor1 /* explain.c:48:31 */ // The explainConnect() method is invoked to create a new // explain_vtab that describes the explain virtual table. // // Think of this routine as the constructor for explain_vtab objects. // // All this routine needs to do is: // // (1) Allocate the explain_vtab object and initialize all fields. // // (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the // result set of queries against explain will look like. func explainConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* explain.c:70:12: */ var pNew uintptr var rc int32 // Column numbers rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+4772 /* "CREATE TABLE x(a..." */) if rc == SQLITE_OK { pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(explain_vtab{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(explain_vtab{}))) (*explain_vtab)(unsafe.Pointer(pNew)).Fdb = db } return rc } // This method is the destructor for explain_cursor objects. func explainDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* explain.c:107:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // Constructor for a new explain_cursor object. func explainOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* explain.c:115:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(explain_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(explain_cursor{}))) (*explain_cursor)(unsafe.Pointer(pCur)).Fdb = (*explain_vtab)(unsafe.Pointer(p)).Fdb *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Destructor for a explain_cursor. func explainClose(tls *libc.TLS, cur uintptr) int32 { /* explain.c:128:12: */ var pCur uintptr = cur sqlite3.Xsqlite3_finalize(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain) sqlite3.Xsqlite3_free(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Advance a explain_cursor to its next row of output. func explainNext(tls *libc.TLS, cur uintptr) int32 { /* explain.c:140:12: */ var pCur uintptr = cur (*explain_cursor)(unsafe.Pointer(pCur)).Frc = sqlite3.Xsqlite3_step(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain) if ((*explain_cursor)(unsafe.Pointer(pCur)).Frc != SQLITE_DONE) && ((*explain_cursor)(unsafe.Pointer(pCur)).Frc != SQLITE_ROW) { return (*explain_cursor)(unsafe.Pointer(pCur)).Frc } return SQLITE_OK } // Return values of columns for the row at which the explain_cursor // is currently pointing. func explainColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* explain.c:151:12: */ var pCur uintptr = cur if i == EXPLN_COLUMN_SQL { sqlite3.Xsqlite3_result_text(tls, ctx, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql, -1, libc.UintptrFromInt32(-1)) } else { sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain, i)) } return SQLITE_OK } // Return the rowid for the current row. In this implementation, the // rowid is the same as the output value. func explainRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* explain.c:169:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_column_int64(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain, 0) return SQLITE_OK } // Return TRUE if the cursor has been moved off of the last // row of output. func explainEof(tls *libc.TLS, cur uintptr) int32 { /* explain.c:179:12: */ var pCur uintptr = cur return (libc.Bool32((*explain_cursor)(unsafe.Pointer(pCur)).Frc != SQLITE_ROW)) } // This method is called to "rewind" the explain_cursor object back // to the first row of output. This method is always called at least // once prior to any call to explainColumn() or explainRowid() or // explainEof(). // // The argv[0] is the SQL statement that is to be explained. func explainFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* explain.c:192:12: */ bp := tls.Alloc(32) defer tls.Free(32) var pCur uintptr = pVtabCursor var zSql uintptr = uintptr(0) var rc int32 sqlite3.Xsqlite3_finalize(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain) (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain = uintptr(0) if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) != SQLITE_TEXT { (*explain_cursor)(unsafe.Pointer(pCur)).Frc = SQLITE_DONE return SQLITE_OK } sqlite3.Xsqlite3_free(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql) (*explain_cursor)(unsafe.Pointer(pCur)).FzSql = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))))) if (*explain_cursor)(unsafe.Pointer(pCur)).FzSql != 0 { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+4834 /* "EXPLAIN %s" */, libc.VaList(bp+16, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql)) } if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { rc = sqlite3.Xsqlite3_prepare_v2(tls, (*explain_cursor)(unsafe.Pointer(pCur)).Fdb, zSql, -1, (pCur + 24 /* &.pExplain */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) } if rc != 0 { sqlite3.Xsqlite3_finalize(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain) (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain = uintptr(0) sqlite3.Xsqlite3_free(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql) (*explain_cursor)(unsafe.Pointer(pCur)).FzSql = uintptr(0) } else { (*explain_cursor)(unsafe.Pointer(pCur)).Frc = sqlite3.Xsqlite3_step(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FpExplain) if ((*explain_cursor)(unsafe.Pointer(pCur)).Frc == SQLITE_DONE) || ((*explain_cursor)(unsafe.Pointer(pCur)).Frc == SQLITE_ROW) { rc = SQLITE_OK } else { rc = (*explain_cursor)(unsafe.Pointer(pCur)).Frc } } return rc } // SQLite will invoke this method one or more times while planning a query // that uses the explain virtual table. This routine needs to create // a query plan for each invocation and compute an estimated cost for that // plan. func explainBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* explain.c:235:12: */ var i int32 // Loop counter var idx int32 = -1 // Index of a usable == constraint against SQL var unusable int32 = 0 // True if there are unusable constraints on SQL (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(500) for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; i++ { var p uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(i)*12) if (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn != EXPLN_COLUMN_SQL { continue } if !(int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable) != 0) { unusable = 1 } else if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { idx = i } } if idx >= 0 { // There exists a usable == constraint against the SQL column (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 10.0 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idx)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idx)*8)).Fomit = uint8(1) } else if unusable != 0 { // There are unusable constraints against the SQL column. Do not allow // this plan to continue forward. return SQLITE_CONSTRAINT } return SQLITE_OK } // This following structure defines all the methods for the // explain virtual table. var explainModule = sqlite3_module{ // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName } /* explain.c:271:23 */ func sqlite3ExplainVtabInit(tls *libc.TLS, db uintptr) int32 { /* explain.c:300:5: */ var rc int32 = SQLITE_OK rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4845 /* "explain" */, uintptr(unsafe.Pointer(&explainModule)), uintptr(0)) return rc } func sqlite3_explain_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* explain.c:311:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3ExplainVtabInit(tls, db) return rc } // Static assertion. Requires support in the compiler. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _ino_t = uint16 /* types.h:43:24 */ type ino_t = uint16 /* types.h:45:24 */ type _dev_t = uint32 /* types.h:51:22 */ type dev_t = uint32 /* types.h:53:22 */ type _pid_t = int64 /* types.h:63:17 */ type pid_t = _pid_t /* types.h:68:16 */ type _mode_t = uint16 /* types.h:74:24 */ type mode_t = _mode_t /* types.h:77:17 */ type useconds_t = uint32 /* types.h:84:22 */ type timespec = struct { Ftv_sec time_t Ftv_nsec int32 _ [4]byte } /* types.h:89:1 */ type itimerspec = struct { Fit_interval struct { Ftv_sec time_t Ftv_nsec int32 _ [4]byte } Fit_value struct { Ftv_sec time_t Ftv_nsec int32 _ [4]byte } } /* types.h:94:1 */ type _sigset_t = uint64 /* types.h:104:28 */ type _fsize_t = uint32 /* io.h:29:25 */ type _finddata32_t = struct { Fattrib uint32 Ftime_create int32 Ftime_access int32 Ftime_write int32 Fsize _fsize_t Fname [260]int8 } /* io.h:35:3 */ type _finddata32i64_t = struct { Fattrib uint32 Ftime_create int32 Ftime_access int32 Ftime_write int32 Fsize int64 Fname [260]int8 _ [4]byte } /* io.h:44:3 */ type _finddata64i32_t = struct { Fattrib uint32 _ [4]byte Ftime_create int64 Ftime_access int64 Ftime_write int64 Fsize _fsize_t Fname [260]int8 } /* io.h:53:3 */ type __finddata64_t = struct { Fattrib uint32 _ [4]byte Ftime_create int64 Ftime_access int64 Ftime_write int64 Fsize int64 Fname [260]int8 _ [4]byte } /* io.h:62:3 */ type _wfinddata32_t = struct { Fattrib uint32 Ftime_create int32 Ftime_access int32 Ftime_write int32 Fsize _fsize_t Fname [260]wchar_t } /* io.h:94:3 */ type _wfinddata32i64_t = struct { Fattrib uint32 Ftime_create int32 Ftime_access int32 Ftime_write int32 Fsize int64 Fname [260]wchar_t } /* io.h:103:3 */ type _wfinddata64i32_t = struct { Fattrib uint32 _ [4]byte Ftime_create int64 Ftime_access int64 Ftime_write int64 Fsize _fsize_t Fname [260]wchar_t _ [4]byte } /* io.h:112:3 */ type _wfinddata64_t = struct { Fattrib uint32 _ [4]byte Ftime_create int64 Ftime_access int64 Ftime_write int64 Fsize int64 Fname [260]wchar_t } /* io.h:121:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _stat32 = struct { Fst_dev _dev_t Fst_ino _ino_t Fst_mode uint16 Fst_nlink int16 Fst_uid int16 Fst_gid int16 _ [2]byte Fst_rdev _dev_t Fst_size _off_t Fst_atime int32 Fst_mtime int32 Fst_ctime int32 } /* _mingw_stat64.h:25:3 */ type _stat32i64 = struct { Fst_dev _dev_t Fst_ino _ino_t Fst_mode uint16 Fst_nlink int16 Fst_uid int16 Fst_gid int16 _ [2]byte Fst_rdev _dev_t _ [4]byte Fst_size int64 Fst_atime int32 Fst_mtime int32 Fst_ctime int32 _ [4]byte } /* _mingw_stat64.h:55:3 */ type _stat64i32 = struct { Fst_dev _dev_t Fst_ino _ino_t Fst_mode uint16 Fst_nlink int16 Fst_uid int16 Fst_gid int16 _ [2]byte Fst_rdev _dev_t Fst_size _off_t Fst_atime int64 Fst_mtime int64 Fst_ctime int64 } /* _mingw_stat64.h:69:3 */ type _stat64 = struct { Fst_dev _dev_t Fst_ino _ino_t Fst_mode uint16 Fst_nlink int16 Fst_uid int16 Fst_gid int16 _ [2]byte Fst_rdev _dev_t _ [4]byte Fst_size int64 Fst_atime int64 Fst_mtime int64 Fst_ctime int64 } /* _mingw_stat64.h:83:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // sdkddkver.h: Version definitions for SDK and DDK. Originally // from ReactOS PSDK/DDK, this file is in the public domain: // // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // _WIN32_WINNT // _WIN32_IE // Mappings Between IE Version and Windows Version // NTDDI_VERSION // Version Fields in NTDDI_VERSION // Macros to Extract Version Fields From NTDDI_VERSION // Macros to get the NTDDI for a given WIN32 // Select Default WIN32_WINNT Value // Choose NTDDI Version // Choose WINVER Value // Choose IE Version // Make Sure NTDDI_VERSION and _WIN32_WINNT Match // Some kludge for Obj-C. // For Obj-C the 'interface' is a keyword, but interface is used // in midl-code too. To resolve this conflict for at least the // main windows API header, we define it here temporary. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _EXCEPTION_POINTERS = struct { FExceptionRecord PEXCEPTION_RECORD FContextRecord PCONTEXT } /* excpt.h:17:3 */ type _EXCEPTION_RECORD = struct { FExceptionCode DWORD FExceptionFlags DWORD FExceptionRecord uintptr FExceptionAddress PVOID FNumberParameters DWORD _ [4]byte FExceptionInformation [15]ULONG_PTR } /* excpt.h:17:3 */ type _CONTEXT = struct { FP1Home DWORD64 FP2Home DWORD64 FP3Home DWORD64 FP4Home DWORD64 FP5Home DWORD64 FP6Home DWORD64 FContextFlags DWORD FMxCsr DWORD FSegCs WORD FSegDs WORD FSegEs WORD FSegFs WORD FSegGs WORD FSegSs WORD FEFlags DWORD FDr0 DWORD64 FDr1 DWORD64 FDr2 DWORD64 FDr3 DWORD64 FDr6 DWORD64 FDr7 DWORD64 FRax DWORD64 FRcx DWORD64 FRdx DWORD64 FRbx DWORD64 FRsp DWORD64 FRbp DWORD64 FRsi DWORD64 FRdi DWORD64 FR8 DWORD64 FR9 DWORD64 FR10 DWORD64 FR11 DWORD64 FR12 DWORD64 FR13 DWORD64 FR14 DWORD64 FR15 DWORD64 FRip DWORD64 F__256 struct{ FFltSave XMM_SAVE_AREA32 } FVectorRegister [26]M128A FVectorControl DWORD64 FDebugControl DWORD64 FLastBranchToRip DWORD64 FLastBranchFromRip DWORD64 FLastExceptionToRip DWORD64 FLastExceptionFromRip DWORD64 } /* excpt.h:17:3 */ type _DISPATCHER_CONTEXT = struct { FControlPc ULONG64 FImageBase ULONG64 FFunctionEntry PRUNTIME_FUNCTION FEstablisherFrame ULONG64 FTargetIp ULONG64 FContextRecord PCONTEXT FLanguageHandler PEXCEPTION_ROUTINE FHandlerData PVOID FHistoryTable PUNWIND_HISTORY_TABLE FScopeIndex ULONG FFill0 ULONG } /* excpt.h:45:3 */ // CRT stuff type _PHNDLR = uintptr /* excpt.h:66:16 */ type _XCPT_ACTION = struct { FXcptNum uint32 FSigNum int32 FXcptAction _PHNDLR } /* excpt.h:68:3 */ // The type of function that is expected as an exception handler to be // installed with __try1. type PEXCEPTION_HANDLER = uintptr /* excpt.h:87:33 */ // Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with GCC; see the file COPYING. If not, write to // the Free Software Foundation, 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. // As a special exception, if you include this header file into source // files compiled by GCC, this header file does not by itself cause // the resulting executable to be covered by the GNU General Public // License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General // Public License. // ISO C Standard: 7.15 Variable arguments // include mingw stuff // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.15 Variable arguments // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // WINAPI_FAMILY can be either desktop + App, or App. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Pointer parameters // Optional pointer parameters // Output pointer parameters // Output reference parameters // Return values // Other common annotations // Function annotations // Success/failure annotations // Buffer properties // Field properties // Structural annotations // printf/scanf annotations // Analysis // FIXME: __in macro conflicts with argument names in libstdc++. For this reason, // we disable it for C++. This should be fixed in libstdc++ so we can uncomment // it in fixed version here. // Renamed __null to SAL__null for avoiding private keyword conflicts between // gcc and MS world. // PROJECT: ReactOS DDK // COPYRIGHT: This file is in the Public Domain. // FILE: driverspecs.h // ABSTRACT: This header stubs out Driver Verifier annotations to // allow drivers using them to compile with our header set. // Stubs type ULONG = uint32 /* minwindef.h:24:29 */ type PULONG = uintptr /* minwindef.h:25:17 */ type USHORT = uint16 /* minwindef.h:26:26 */ type PUSHORT = uintptr /* minwindef.h:27:18 */ type UCHAR = uint8 /* minwindef.h:28:25 */ type PUCHAR = uintptr /* minwindef.h:29:17 */ type PSZ = uintptr /* minwindef.h:30:16 */ type WINBOOL = int32 /* minwindef.h:127:13 */ type BOOL = int32 /* minwindef.h:131:15 */ type PBOOL = uintptr /* minwindef.h:134:14 */ type LPBOOL = uintptr /* minwindef.h:135:14 */ type BYTE = uint8 /* minwindef.h:139:25 */ type WORD = uint16 /* minwindef.h:140:26 */ type DWORD = uint32 /* minwindef.h:141:29 */ type FLOAT = float32 /* minwindef.h:142:17 */ type PFLOAT = uintptr /* minwindef.h:143:17 */ type PBYTE = uintptr /* minwindef.h:144:16 */ type LPBYTE = uintptr /* minwindef.h:145:16 */ type PINT = uintptr /* minwindef.h:146:15 */ type LPINT = uintptr /* minwindef.h:147:15 */ type PWORD = uintptr /* minwindef.h:148:16 */ type LPWORD = uintptr /* minwindef.h:149:16 */ type LPLONG = uintptr /* minwindef.h:150:20 */ type PDWORD = uintptr /* minwindef.h:151:17 */ type LPDWORD = uintptr /* minwindef.h:152:17 */ type LPVOID = uintptr /* minwindef.h:153:16 */ type LPCVOID = uintptr /* minwindef.h:156:22 */ type INT = int32 /* minwindef.h:158:15 */ type UINT = uint32 /* minwindef.h:159:24 */ type PUINT = uintptr /* minwindef.h:160:24 */ // ***************************************************** // * // sdkddkver.h: Version definitions for SDK and DDK. Originally // from ReactOS PSDK/DDK, this file is in the public domain: // // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type POINTER_64_INT = uint64 /* basetsd.h:11:44 */ type INT8 = int8 /* basetsd.h:29:23 */ type PINT8 = uintptr /* basetsd.h:29:28 */ type INT16 = int16 /* basetsd.h:30:24 */ type PINT16 = uintptr /* basetsd.h:30:30 */ type INT32 = int32 /* basetsd.h:31:22 */ type PINT32 = uintptr /* basetsd.h:31:28 */ type INT64 = int64 /* basetsd.h:32:44 */ type PINT64 = uintptr /* basetsd.h:32:50 */ type UINT8 = uint8 /* basetsd.h:33:25 */ type PUINT8 = uintptr /* basetsd.h:33:31 */ type UINT16 = uint16 /* basetsd.h:34:26 */ type PUINT16 = uintptr /* basetsd.h:34:33 */ type UINT32 = uint32 /* basetsd.h:35:24 */ type PUINT32 = uintptr /* basetsd.h:35:31 */ type UINT64 = uint64 /* basetsd.h:36:46 */ type PUINT64 = uintptr /* basetsd.h:36:53 */ type LONG32 = int32 /* basetsd.h:37:22 */ type PLONG32 = uintptr /* basetsd.h:37:29 */ type ULONG32 = uint32 /* basetsd.h:38:24 */ type PULONG32 = uintptr /* basetsd.h:38:32 */ type DWORD32 = uint32 /* basetsd.h:39:24 */ type PDWORD32 = uintptr /* basetsd.h:39:32 */ type INT_PTR = int64 /* basetsd.h:46:37 */ type PINT_PTR = uintptr /* basetsd.h:46:45 */ type UINT_PTR = uint64 /* basetsd.h:47:46 */ type PUINT_PTR = uintptr /* basetsd.h:47:55 */ type LONG_PTR = int64 /* basetsd.h:48:37 */ type PLONG_PTR = uintptr /* basetsd.h:48:46 */ type ULONG_PTR = uint64 /* basetsd.h:49:46 */ type PULONG_PTR = uintptr /* basetsd.h:49:56 */ type SHANDLE_PTR = int64 /* basetsd.h:62:37 */ type HANDLE_PTR = uint64 /* basetsd.h:63:46 */ type UHALF_PTR = uint32 /* basetsd.h:64:24 */ type PUHALF_PTR = uintptr /* basetsd.h:64:34 */ type HALF_PTR = int32 /* basetsd.h:65:15 */ type PHALF_PTR = uintptr /* basetsd.h:65:24 */ type SIZE_T = ULONG_PTR /* basetsd.h:147:39 */ type PSIZE_T = uintptr /* basetsd.h:147:46 */ type SSIZE_T = LONG_PTR /* basetsd.h:148:38 */ type PSSIZE_T = uintptr /* basetsd.h:148:46 */ type DWORD_PTR = ULONG_PTR /* basetsd.h:191:39 */ type PDWORD_PTR = uintptr /* basetsd.h:191:49 */ type LONG64 = int64 /* basetsd.h:192:37 */ type PLONG64 = uintptr /* basetsd.h:192:44 */ type ULONG64 = uint64 /* basetsd.h:193:46 */ type PULONG64 = uintptr /* basetsd.h:193:54 */ type DWORD64 = uint64 /* basetsd.h:194:46 */ type PDWORD64 = uintptr /* basetsd.h:194:54 */ type KAFFINITY = ULONG_PTR /* basetsd.h:195:39 */ type PKAFFINITY = uintptr /* basetsd.h:196:39 */ type PVOID = uintptr /* winnt.h:257:16 */ type PVOID64 = uintptr /* winnt.h:258:16 */ type WCHAR = wchar_t /* winnt.h:295:19 */ type PWCHAR = uintptr /* winnt.h:297:17 */ type LPWCH = uintptr /* winnt.h:297:25 */ type PWCH = uintptr /* winnt.h:297:32 */ type LPCWCH = uintptr /* winnt.h:298:23 */ type PCWCH = uintptr /* winnt.h:298:31 */ type NWPSTR = uintptr /* winnt.h:299:17 */ type LPWSTR = uintptr /* winnt.h:299:25 */ type PWSTR = uintptr /* winnt.h:299:33 */ type PZPWSTR = uintptr /* winnt.h:300:17 */ type PCZPWSTR = uintptr /* winnt.h:301:23 */ type LPUWSTR = uintptr /* winnt.h:302:27 */ type PUWSTR = uintptr /* winnt.h:302:36 */ type LPCWSTR = uintptr /* winnt.h:303:23 */ type PCWSTR = uintptr /* winnt.h:303:32 */ type PZPCWSTR = uintptr /* winnt.h:304:18 */ type LPCUWSTR = uintptr /* winnt.h:305:33 */ type PCUWSTR = uintptr /* winnt.h:305:43 */ type PZZWSTR = uintptr /* winnt.h:306:17 */ type PCZZWSTR = uintptr /* winnt.h:307:23 */ type PUZZWSTR = uintptr /* winnt.h:308:27 */ type PCUZZWSTR = uintptr /* winnt.h:309:33 */ type PNZWCH = uintptr /* winnt.h:310:17 */ type PCNZWCH = uintptr /* winnt.h:311:23 */ type PUNZWCH = uintptr /* winnt.h:312:27 */ type PCUNZWCH = uintptr /* winnt.h:313:33 */ type PCHAR = uintptr /* winnt.h:334:16 */ type LPCH = uintptr /* winnt.h:334:23 */ type PCH = uintptr /* winnt.h:334:29 */ type LPCCH = uintptr /* winnt.h:335:22 */ type PCCH = uintptr /* winnt.h:335:29 */ type NPSTR = uintptr /* winnt.h:336:16 */ type LPSTR = uintptr /* winnt.h:336:23 */ type PSTR = uintptr /* winnt.h:336:30 */ type PZPSTR = uintptr /* winnt.h:337:16 */ type PCZPSTR = uintptr /* winnt.h:338:22 */ type LPCSTR = uintptr /* winnt.h:339:22 */ type PCSTR = uintptr /* winnt.h:339:30 */ type PZPCSTR = uintptr /* winnt.h:340:17 */ type PZZSTR = uintptr /* winnt.h:341:16 */ type PCZZSTR = uintptr /* winnt.h:342:22 */ type PNZCH = uintptr /* winnt.h:343:16 */ type PCNZCH = uintptr /* winnt.h:344:22 */ type PTCHAR = uintptr /* winnt.h:373:23 */ type TBYTE = uint8 /* winnt.h:374:25 */ type PTBYTE = uintptr /* winnt.h:374:32 */ type LPTCH = LPSTR /* winnt.h:377:17 */ type PTCH = LPSTR /* winnt.h:377:23 */ type LPCTCH = LPCCH /* winnt.h:378:17 */ type PCTCH = LPCCH /* winnt.h:378:24 */ type PTSTR = LPSTR /* winnt.h:379:17 */ type LPTSTR = LPSTR /* winnt.h:379:23 */ type PUTSTR = LPSTR /* winnt.h:379:30 */ type LPUTSTR = LPSTR /* winnt.h:379:37 */ type PCTSTR = LPCSTR /* winnt.h:380:18 */ type LPCTSTR = LPCSTR /* winnt.h:380:25 */ type PCUTSTR = LPCSTR /* winnt.h:380:33 */ type LPCUTSTR = LPCSTR /* winnt.h:380:41 */ type PZZTSTR = PZZSTR /* winnt.h:381:18 */ type PUZZTSTR = PZZSTR /* winnt.h:381:27 */ type PCZZTSTR = PCZZSTR /* winnt.h:382:19 */ type PCUZZTSTR = PCZZSTR /* winnt.h:382:29 */ type PZPTSTR = PZPSTR /* winnt.h:383:18 */ type PNZTCH = PNZCH /* winnt.h:384:17 */ type PUNZTCH = PNZCH /* winnt.h:384:25 */ type PCNZTCH = PCNZCH /* winnt.h:385:18 */ type PCUNZTCH = PCNZCH /* winnt.h:385:27 */ type PSHORT = uintptr /* winnt.h:392:17 */ type PLONG = uintptr /* winnt.h:393:16 */ type _GROUP_AFFINITY = struct { FMask KAFFINITY FGroup WORD FReserved [3]WORD } /* winnt.h:397:9 */ type GROUP_AFFINITY = _GROUP_AFFINITY /* winnt.h:401:3 */ type PGROUP_AFFINITY = uintptr /* winnt.h:401:19 */ type HANDLE = uintptr /* winnt.h:405:16 */ type PHANDLE = uintptr /* winnt.h:412:18 */ type FCHAR = BYTE /* winnt.h:413:16 */ type FSHORT = WORD /* winnt.h:414:16 */ type FLONG = DWORD /* winnt.h:415:17 */ type HRESULT = LONG /* winnt.h:419:16 */ // Keep in sync with basetyps.h header. type CCHAR = int8 /* winnt.h:453:16 */ type LCID = DWORD /* winnt.h:456:15 */ type PLCID = PDWORD /* winnt.h:458:18 */ type LANGID = WORD /* winnt.h:461:16 */ type COMPARTMENT_ID = uint32 /* winnt.h:470:3 */ type PCOMPARTMENT_ID = uintptr /* winnt.h:470:18 */ type _FLOAT128 = struct { FLowPart int64 FHighPart int64 } /* winnt.h:482:13 */ type FLOAT128 = _FLOAT128 /* winnt.h:485:5 */ type PFLOAT128 = uintptr /* winnt.h:487:20 */ type LONGLONG = int64 /* winnt.h:490:37 */ type ULONGLONG = uint64 /* winnt.h:491:46 */ type PLONGLONG = uintptr /* winnt.h:495:20 */ type PULONGLONG = uintptr /* winnt.h:496:21 */ type USN = LONGLONG /* winnt.h:497:20 */ type _LARGE_INTEGER = struct { _ [0]uint64 Fs struct { FLowPart DWORD FHighPart LONG } } /* winnt.h:505:11 */ type LARGE_INTEGER = _LARGE_INTEGER /* winnt.h:516:5 */ type PLARGE_INTEGER = uintptr /* winnt.h:518:25 */ type _ULARGE_INTEGER = struct { _ [0]uint64 Fs struct { FLowPart DWORD FHighPart DWORD } } /* winnt.h:523:11 */ type ULARGE_INTEGER = _ULARGE_INTEGER /* winnt.h:534:5 */ type PULARGE_INTEGER = uintptr /* winnt.h:536:26 */ type _LUID = struct { FLowPart DWORD FHighPart LONG } /* winnt.h:538:11 */ type LUID = _LUID /* winnt.h:541:5 */ type PLUID = uintptr /* winnt.h:541:10 */ type DWORDLONG = ULONGLONG /* winnt.h:546:21 */ type PDWORDLONG = uintptr /* winnt.h:547:21 */ type BOOLEAN = BYTE /* winnt.h:605:16 */ type PBOOLEAN = uintptr /* winnt.h:607:19 */ type _LIST_ENTRY = struct { FFlink uintptr FBlink uintptr } /* winnt.h:612:11 */ type LIST_ENTRY = _LIST_ENTRY /* winnt.h:615:5 */ type PLIST_ENTRY = uintptr /* winnt.h:615:16 */ type PRLIST_ENTRY = uintptr /* winnt.h:615:29 */ type _SINGLE_LIST_ENTRY = struct{ FNext uintptr } /* winnt.h:617:11 */ type SINGLE_LIST_ENTRY = _SINGLE_LIST_ENTRY /* winnt.h:619:5 */ type PSINGLE_LIST_ENTRY = uintptr /* winnt.h:619:23 */ type LIST_ENTRY321 = struct { FFlink DWORD FBlink DWORD } /* winnt.h:621:11 */ type LIST_ENTRY32 = LIST_ENTRY321 /* winnt.h:624:5 */ type PLIST_ENTRY32 = uintptr /* winnt.h:625:24 */ type LIST_ENTRY641 = struct { FFlink ULONGLONG FBlink ULONGLONG } /* winnt.h:627:11 */ type LIST_ENTRY64 = LIST_ENTRY641 /* winnt.h:630:5 */ type PLIST_ENTRY64 = uintptr /* winnt.h:631:24 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Make sure __LONG32 is defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _GUID = struct { FData1 uint32 FData2 uint16 FData3 uint16 FData4 [8]uint8 } /* guiddef.h:19:9 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Make sure __LONG32 is defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type GUID = _GUID /* guiddef.h:24:3 */ // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. type LPGUID = uintptr /* guiddef.h:77:14 */ type LPCGUID = uintptr /* guiddef.h:82:20 */ type IID = GUID /* guiddef.h:88:14 */ type LPIID = uintptr /* guiddef.h:89:13 */ type CLSID = GUID /* guiddef.h:96:14 */ type LPCLSID = uintptr /* guiddef.h:99:15 */ type FMTID = GUID /* guiddef.h:103:14 */ type LPFMTID = uintptr /* guiddef.h:104:15 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _OBJECTID = struct { FLineage GUID FUniquifier DWORD } /* winnt.h:639:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type OBJECTID = _OBJECTID /* winnt.h:642:5 */ type PEXCEPTION_ROUTINE = uintptr /* winnt.h:709:31 */ // ??? #define SUBLANG_ROMANIAN_MOLDOVA 0x01 ??? type KSPIN_LOCK = ULONG_PTR /* winnt.h:1383:21 */ type PKSPIN_LOCK = uintptr /* winnt.h:1384:22 */ type _M128A = struct { FLow ULONGLONG FHigh LONGLONG } /* excpt.h:17:3 */ type M128A = _M128A /* winnt.h:1389:7 */ type PM128A = uintptr /* winnt.h:1389:13 */ type _XSAVE_FORMAT = struct { FControlWord WORD FStatusWord WORD FTagWord BYTE FReserved1 BYTE FErrorOpcode WORD FErrorOffset DWORD FErrorSelector WORD FReserved2 WORD FDataOffset DWORD FDataSelector WORD FReserved3 WORD FMxCsr DWORD FMxCsr_Mask DWORD FFloatRegisters [8]M128A FXmmRegisters [16]M128A FReserved4 [96]BYTE } /* winnt.h:1391:13 */ type XSAVE_FORMAT = _XSAVE_FORMAT /* winnt.h:1414:7 */ type PXSAVE_FORMAT = uintptr /* winnt.h:1414:20 */ type _XSAVE_AREA_HEADER = struct { FMask DWORD64 FReserved [7]DWORD64 } /* winnt.h:1416:13 */ type XSAVE_AREA_HEADER = _XSAVE_AREA_HEADER /* winnt.h:1419:7 */ type PXSAVE_AREA_HEADER = uintptr /* winnt.h:1419:25 */ type _XSAVE_AREA = struct { FLegacyState XSAVE_FORMAT FHeader XSAVE_AREA_HEADER } /* winnt.h:1421:13 */ type XSAVE_AREA = _XSAVE_AREA /* winnt.h:1424:7 */ type PXSAVE_AREA = uintptr /* winnt.h:1424:18 */ type _XSTATE_CONTEXT = struct { FMask DWORD64 FLength DWORD FReserved1 DWORD FArea PXSAVE_AREA FBuffer PVOID } /* winnt.h:1426:13 */ type XSTATE_CONTEXT = _XSTATE_CONTEXT /* winnt.h:1438:7 */ type PXSTATE_CONTEXT = uintptr /* winnt.h:1438:22 */ type _SCOPE_TABLE_AMD64 = struct { FCount DWORD FScopeRecord [1]struct { FBeginAddress DWORD FEndAddress DWORD FHandlerAddress DWORD FJumpTarget DWORD } } /* winnt.h:1440:13 */ type SCOPE_TABLE_AMD64 = _SCOPE_TABLE_AMD64 /* winnt.h:1448:7 */ type PSCOPE_TABLE_AMD64 = uintptr /* winnt.h:1448:25 */ type _MM_PERM_ENUM = uint32 /* avx512fintrin.h:4288:3 */ // Constants for mantissa extraction type _MM_MANTISSA_NORM_ENUM = uint32 /* avx512fintrin.h:8516:3 */ type _MM_MANTISSA_SIGN_ENUM = uint32 /* avx512fintrin.h:8523:3 */ // unsigned char __readgsbyte(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // unsigned short __readgsword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // unsigned __LONG32 __readgsdword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // __MINGW_EXTENSION unsigned __int64 __readgsqword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // void __writegsbyte(unsigned __LONG32 Offset,unsigned char Data); moved to psdk_inc/intrin-impl.h // void __writegsword(unsigned __LONG32 Offset,unsigned short Data); moved to psdk_inc/intrin-impl.h // void __writegsdword(unsigned __LONG32 Offset,unsigned __LONG32 Data); moved to psdk_inc/intrin-impl.h type _XMM_SAVE_AREA32 = struct { FControlWord WORD FStatusWord WORD FTagWord BYTE FReserved1 BYTE FErrorOpcode WORD FErrorOffset DWORD FErrorSelector WORD FReserved2 WORD FDataOffset DWORD FDataSelector WORD FReserved3 WORD FMxCsr DWORD FMxCsr_Mask DWORD FFloatRegisters [8]M128A FXmmRegisters [16]M128A FReserved4 [96]BYTE } /* winnt.h:1678:11 */ // unsigned char __readgsbyte(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // unsigned short __readgsword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // unsigned __LONG32 __readgsdword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // __MINGW_EXTENSION unsigned __int64 __readgsqword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h // void __writegsbyte(unsigned __LONG32 Offset,unsigned char Data); moved to psdk_inc/intrin-impl.h // void __writegsword(unsigned __LONG32 Offset,unsigned short Data); moved to psdk_inc/intrin-impl.h // void __writegsdword(unsigned __LONG32 Offset,unsigned __LONG32 Data); moved to psdk_inc/intrin-impl.h type XMM_SAVE_AREA32 = _XMM_SAVE_AREA32 /* winnt.h:1695:5 */ type PXMM_SAVE_AREA32 = uintptr /* winnt.h:1695:21 */ type CONTEXT = _CONTEXT /* winnt.h:1769:5 */ type PCONTEXT = uintptr /* winnt.h:1769:13 */ type _RUNTIME_FUNCTION = struct { FBeginAddress DWORD FEndAddress DWORD FUnwindData DWORD } /* excpt.h:45:3 */ type RUNTIME_FUNCTION = _RUNTIME_FUNCTION /* winnt.h:1777:5 */ type PRUNTIME_FUNCTION = uintptr /* winnt.h:1777:22 */ type PGET_RUNTIME_FUNCTION_CALLBACK = uintptr /* winnt.h:1779:29 */ type POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK = uintptr /* winnt.h:1780:17 */ // LONG WINAPI InterlockedIncrement(LONG volatile *); moved to psdk_inc/intrin-impl.h // LONG WINAPI InterlockedDecrement(LONG volatile *); moved to psdk_inc/intrin-impl.h // LONG WINAPI InterlockedExchange(LONG volatile *, LONG); moved to psdk_inc/intrin-impl.h type _LDT_ENTRY = struct { FLimitLow WORD FBaseLow WORD FHighWord struct { _ [0]uint32 FBytes struct { FBaseMid BYTE FFlags1 BYTE FFlags2 BYTE FBaseHi BYTE } } } /* winnt.h:2415:13 */ // LONG WINAPI InterlockedIncrement(LONG volatile *); moved to psdk_inc/intrin-impl.h // LONG WINAPI InterlockedDecrement(LONG volatile *); moved to psdk_inc/intrin-impl.h // LONG WINAPI InterlockedExchange(LONG volatile *, LONG); moved to psdk_inc/intrin-impl.h type LDT_ENTRY = _LDT_ENTRY /* winnt.h:2438:7 */ type PLDT_ENTRY = uintptr /* winnt.h:2438:17 */ // http://www.nynaeve.net/?p=99 type EXCEPTION_RECORD = _EXCEPTION_RECORD /* winnt.h:2783:7 */ type PEXCEPTION_RECORD = uintptr /* winnt.h:2785:30 */ type _EXCEPTION_RECORD32 = struct { FExceptionCode DWORD FExceptionFlags DWORD FExceptionRecord DWORD FExceptionAddress DWORD FNumberParameters DWORD FExceptionInformation [15]DWORD } /* winnt.h:2787:13 */ type EXCEPTION_RECORD32 = _EXCEPTION_RECORD32 /* winnt.h:2794:7 */ type PEXCEPTION_RECORD32 = uintptr /* winnt.h:2794:26 */ type _EXCEPTION_RECORD64 = struct { FExceptionCode DWORD FExceptionFlags DWORD FExceptionRecord DWORD64 FExceptionAddress DWORD64 FNumberParameters DWORD F__unusedAlignment DWORD FExceptionInformation [15]DWORD64 } /* winnt.h:2796:13 */ type EXCEPTION_RECORD64 = _EXCEPTION_RECORD64 /* winnt.h:2804:7 */ type PEXCEPTION_RECORD64 = uintptr /* winnt.h:2804:26 */ type EXCEPTION_POINTERS = _EXCEPTION_POINTERS /* winnt.h:2809:7 */ type PEXCEPTION_POINTERS = uintptr /* winnt.h:2809:26 */ // http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx type _UNWIND_HISTORY_TABLE_ENTRY = struct { FImageBase ULONG64 FFunctionEntry PRUNTIME_FUNCTION } /* excpt.h:45:3 */ // http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx type UNWIND_HISTORY_TABLE_ENTRY = _UNWIND_HISTORY_TABLE_ENTRY /* winnt.h:2824:5 */ type PUNWIND_HISTORY_TABLE_ENTRY = uintptr /* winnt.h:2824:33 */ type _UNWIND_HISTORY_TABLE = struct { FCount ULONG FLocalHint BYTE FGlobalHint BYTE FSearch BYTE FOnce BYTE FLowAddress ULONG64 FHighAddress ULONG64 FEntry [12]UNWIND_HISTORY_TABLE_ENTRY } /* excpt.h:45:3 */ type UNWIND_HISTORY_TABLE = _UNWIND_HISTORY_TABLE /* winnt.h:2839:5 */ type PUNWIND_HISTORY_TABLE = uintptr /* winnt.h:2839:27 */ type DISPATCHER_CONTEXT = _DISPATCHER_CONTEXT /* winnt.h:2844:38 */ type PDISPATCHER_CONTEXT = uintptr /* winnt.h:2845:38 */ // http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx type _KNONVOLATILE_CONTEXT_POINTERS = struct { FFloatingContext [16]PM128A FIntegerContext [16]PULONG64 } /* winnt.h:2864:11 */ // http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx type KNONVOLATILE_CONTEXT_POINTERS = _KNONVOLATILE_CONTEXT_POINTERS /* winnt.h:2868:5 */ type PKNONVOLATILE_CONTEXT_POINTERS = uintptr /* winnt.h:2868:36 */ type PACCESS_TOKEN = PVOID /* winnt.h:2871:19 */ type PSECURITY_DESCRIPTOR = PVOID /* winnt.h:2872:19 */ type PSID = PVOID /* winnt.h:2873:19 */ type PCLAIMS_BLOB = PVOID /* winnt.h:2874:19 */ type ACCESS_MASK = DWORD /* winnt.h:2875:19 */ type PACCESS_MASK = uintptr /* winnt.h:2876:25 */ type _GENERIC_MAPPING = struct { FGenericRead ACCESS_MASK FGenericWrite ACCESS_MASK FGenericExecute ACCESS_MASK FGenericAll ACCESS_MASK } /* winnt.h:2902:13 */ type GENERIC_MAPPING = _GENERIC_MAPPING /* winnt.h:2907:7 */ type PGENERIC_MAPPING = uintptr /* winnt.h:2908:29 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _LUID_AND_ATTRIBUTES = struct { FLuid LUID FAttributes DWORD } /* winnt.h:2911:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type LUID_AND_ATTRIBUTES = _LUID_AND_ATTRIBUTES /* winnt.h:2914:7 */ type PLUID_AND_ATTRIBUTES = uintptr /* winnt.h:2914:27 */ type LUID_AND_ATTRIBUTES_ARRAY = [1]LUID_AND_ATTRIBUTES /* winnt.h:2915:33 */ type PLUID_AND_ATTRIBUTES_ARRAY = uintptr /* winnt.h:2916:39 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _SID_IDENTIFIER_AUTHORITY = struct{ FValue [6]BYTE } /* winnt.h:2921:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type SID_IDENTIFIER_AUTHORITY = _SID_IDENTIFIER_AUTHORITY /* winnt.h:2923:7 */ type PSID_IDENTIFIER_AUTHORITY = uintptr /* winnt.h:2923:32 */ type _SID = struct { FRevision BYTE FSubAuthorityCount BYTE FIdentifierAuthority SID_IDENTIFIER_AUTHORITY FSubAuthority [1]DWORD } /* winnt.h:2928:13 */ type SID = _SID /* winnt.h:2933:7 */ type PISID = uintptr /* winnt.h:2933:11 */ type SID_NAME_USE = uint32 /* winnt.h:2947:7 */ type PSID_NAME_USE = uintptr /* winnt.h:2947:20 */ type _SID_AND_ATTRIBUTES = struct { FSid PSID FAttributes DWORD _ [4]byte } /* winnt.h:2949:13 */ type SID_AND_ATTRIBUTES = _SID_AND_ATTRIBUTES /* winnt.h:2956:7 */ type PSID_AND_ATTRIBUTES = uintptr /* winnt.h:2956:26 */ type SID_AND_ATTRIBUTES_ARRAY = [1]SID_AND_ATTRIBUTES /* winnt.h:2958:32 */ type PSID_AND_ATTRIBUTES_ARRAY = uintptr /* winnt.h:2959:38 */ type SID_HASH_ENTRY = ULONG_PTR /* winnt.h:2961:23 */ type PSID_HASH_ENTRY = uintptr /* winnt.h:2961:39 */ type _SID_AND_ATTRIBUTES_HASH = struct { FSidCount DWORD _ [4]byte FSidAttr PSID_AND_ATTRIBUTES FHash [32]SID_HASH_ENTRY } /* winnt.h:2963:13 */ type SID_AND_ATTRIBUTES_HASH = _SID_AND_ATTRIBUTES_HASH /* winnt.h:2967:7 */ type PSID_AND_ATTRIBUTES_HASH = uintptr /* winnt.h:2967:32 */ type WELL_KNOWN_SID_TYPE = uint32 /* winnt.h:3251:3 */ type _ACL = struct { FAclRevision BYTE FSbz1 BYTE FAclSize WORD FAceCount WORD FSbz2 WORD } /* winnt.h:3281:13 */ type ACL = _ACL /* winnt.h:3287:7 */ type PACL = uintptr /* winnt.h:3288:17 */ type _ACE_HEADER = struct { FAceType BYTE FAceFlags BYTE FAceSize WORD } /* winnt.h:3290:13 */ type ACE_HEADER = _ACE_HEADER /* winnt.h:3294:7 */ type PACE_HEADER = uintptr /* winnt.h:3295:24 */ type _ACCESS_ALLOWED_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3341:13 */ type ACCESS_ALLOWED_ACE = _ACCESS_ALLOWED_ACE /* winnt.h:3345:7 */ type PACCESS_ALLOWED_ACE = uintptr /* winnt.h:3347:32 */ type _ACCESS_DENIED_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3349:13 */ type ACCESS_DENIED_ACE = _ACCESS_DENIED_ACE /* winnt.h:3353:7 */ type PACCESS_DENIED_ACE = uintptr /* winnt.h:3354:31 */ type _SYSTEM_AUDIT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3356:13 */ type SYSTEM_AUDIT_ACE = _SYSTEM_AUDIT_ACE /* winnt.h:3360:7 */ type PSYSTEM_AUDIT_ACE = uintptr /* winnt.h:3361:30 */ type _SYSTEM_ALARM_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3363:13 */ type SYSTEM_ALARM_ACE = _SYSTEM_ALARM_ACE /* winnt.h:3367:7 */ type PSYSTEM_ALARM_ACE = uintptr /* winnt.h:3368:30 */ type _SYSTEM_RESOURCE_ATTRIBUTE_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3370:13 */ type SYSTEM_RESOURCE_ATTRIBUTE_ACE = _SYSTEM_RESOURCE_ATTRIBUTE_ACE /* winnt.h:3374:7 */ type PSYSTEM_RESOURCE_ATTRIBUTE_ACE = uintptr /* winnt.h:3374:37 */ type _SYSTEM_SCOPED_POLICY_ID_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3376:13 */ type SYSTEM_SCOPED_POLICY_ID_ACE = _SYSTEM_SCOPED_POLICY_ID_ACE /* winnt.h:3380:7 */ type PSYSTEM_SCOPED_POLICY_ID_ACE = uintptr /* winnt.h:3380:35 */ type _SYSTEM_MANDATORY_LABEL_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3382:13 */ type SYSTEM_MANDATORY_LABEL_ACE = _SYSTEM_MANDATORY_LABEL_ACE /* winnt.h:3386:7 */ type PSYSTEM_MANDATORY_LABEL_ACE = uintptr /* winnt.h:3386:35 */ type _ACCESS_ALLOWED_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3394:13 */ type ACCESS_ALLOWED_OBJECT_ACE = _ACCESS_ALLOWED_OBJECT_ACE /* winnt.h:3401:7 */ type PACCESS_ALLOWED_OBJECT_ACE = uintptr /* winnt.h:3401:33 */ type _ACCESS_DENIED_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3403:13 */ type ACCESS_DENIED_OBJECT_ACE = _ACCESS_DENIED_OBJECT_ACE /* winnt.h:3410:7 */ type PACCESS_DENIED_OBJECT_ACE = uintptr /* winnt.h:3410:32 */ type _SYSTEM_AUDIT_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3412:13 */ type SYSTEM_AUDIT_OBJECT_ACE = _SYSTEM_AUDIT_OBJECT_ACE /* winnt.h:3419:7 */ type PSYSTEM_AUDIT_OBJECT_ACE = uintptr /* winnt.h:3419:31 */ type _SYSTEM_ALARM_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3421:13 */ type SYSTEM_ALARM_OBJECT_ACE = _SYSTEM_ALARM_OBJECT_ACE /* winnt.h:3428:7 */ type PSYSTEM_ALARM_OBJECT_ACE = uintptr /* winnt.h:3428:31 */ type _ACCESS_ALLOWED_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3430:13 */ type ACCESS_ALLOWED_CALLBACK_ACE = _ACCESS_ALLOWED_CALLBACK_ACE /* winnt.h:3434:7 */ type PACCESS_ALLOWED_CALLBACK_ACE = uintptr /* winnt.h:3434:35 */ type _ACCESS_DENIED_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3436:13 */ type ACCESS_DENIED_CALLBACK_ACE = _ACCESS_DENIED_CALLBACK_ACE /* winnt.h:3440:7 */ type PACCESS_DENIED_CALLBACK_ACE = uintptr /* winnt.h:3440:34 */ type _SYSTEM_AUDIT_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3442:13 */ type SYSTEM_AUDIT_CALLBACK_ACE = _SYSTEM_AUDIT_CALLBACK_ACE /* winnt.h:3446:7 */ type PSYSTEM_AUDIT_CALLBACK_ACE = uintptr /* winnt.h:3446:33 */ type _SYSTEM_ALARM_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* winnt.h:3448:13 */ type SYSTEM_ALARM_CALLBACK_ACE = _SYSTEM_ALARM_CALLBACK_ACE /* winnt.h:3452:7 */ type PSYSTEM_ALARM_CALLBACK_ACE = uintptr /* winnt.h:3452:33 */ type _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3454:13 */ type ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE /* winnt.h:3462:7 */ type PACCESS_ALLOWED_CALLBACK_OBJECT_ACE = uintptr /* winnt.h:3462:42 */ type _ACCESS_DENIED_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3464:13 */ type ACCESS_DENIED_CALLBACK_OBJECT_ACE = _ACCESS_DENIED_CALLBACK_OBJECT_ACE /* winnt.h:3471:7 */ type PACCESS_DENIED_CALLBACK_OBJECT_ACE = uintptr /* winnt.h:3471:41 */ type _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3473:13 */ type SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE /* winnt.h:3480:7 */ type PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE = uintptr /* winnt.h:3480:40 */ type _SYSTEM_ALARM_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* winnt.h:3482:13 */ type SYSTEM_ALARM_CALLBACK_OBJECT_ACE = _SYSTEM_ALARM_CALLBACK_OBJECT_ACE /* winnt.h:3490:7 */ type PSYSTEM_ALARM_CALLBACK_OBJECT_ACE = uintptr /* winnt.h:3490:40 */ type ACL_INFORMATION_CLASS = uint32 /* winnt.h:3497:7 */ type _ACL_REVISION_INFORMATION = struct{ FAclRevision DWORD } /* winnt.h:3499:13 */ type ACL_REVISION_INFORMATION = _ACL_REVISION_INFORMATION /* winnt.h:3501:7 */ type PACL_REVISION_INFORMATION = uintptr /* winnt.h:3502:38 */ type _ACL_SIZE_INFORMATION = struct { FAceCount DWORD FAclBytesInUse DWORD FAclBytesFree DWORD } /* winnt.h:3504:13 */ type ACL_SIZE_INFORMATION = _ACL_SIZE_INFORMATION /* winnt.h:3508:7 */ type PACL_SIZE_INFORMATION = uintptr /* winnt.h:3509:34 */ type SECURITY_DESCRIPTOR_CONTROL = WORD /* winnt.h:3516:18 */ type PSECURITY_DESCRIPTOR_CONTROL = uintptr /* winnt.h:3516:46 */ type _SECURITY_DESCRIPTOR_RELATIVE = struct { FRevision BYTE FSbz1 BYTE FControl SECURITY_DESCRIPTOR_CONTROL FOwner DWORD FGroup DWORD FSacl DWORD FDacl DWORD } /* winnt.h:3533:13 */ type SECURITY_DESCRIPTOR_RELATIVE = _SECURITY_DESCRIPTOR_RELATIVE /* winnt.h:3541:7 */ type PISECURITY_DESCRIPTOR_RELATIVE = uintptr /* winnt.h:3541:36 */ type _SECURITY_DESCRIPTOR = struct { FRevision BYTE FSbz1 BYTE FControl SECURITY_DESCRIPTOR_CONTROL _ [4]byte FOwner PSID FGroup PSID FSacl PACL FDacl PACL } /* winnt.h:3543:13 */ type SECURITY_DESCRIPTOR = _SECURITY_DESCRIPTOR /* winnt.h:3551:7 */ type PISECURITY_DESCRIPTOR = uintptr /* winnt.h:3551:27 */ type _OBJECT_TYPE_LIST = struct { FLevel WORD FSbz WORD _ [4]byte FObjectType uintptr } /* winnt.h:3553:13 */ type OBJECT_TYPE_LIST = _OBJECT_TYPE_LIST /* winnt.h:3557:7 */ type POBJECT_TYPE_LIST = uintptr /* winnt.h:3557:24 */ type AUDIT_EVENT_TYPE = uint32 /* winnt.h:3567:7 */ type PAUDIT_EVENT_TYPE = uintptr /* winnt.h:3567:24 */ type _PRIVILEGE_SET = struct { FPrivilegeCount DWORD FControl DWORD FPrivilege [1]LUID_AND_ATTRIBUTES } /* winnt.h:3585:13 */ type PRIVILEGE_SET = _PRIVILEGE_SET /* winnt.h:3589:7 */ type PPRIVILEGE_SET = uintptr /* winnt.h:3589:21 */ type ACCESS_REASON_TYPE = uint32 /* winnt.h:3614:7 */ type ACCESS_REASON = DWORD /* winnt.h:3615:19 */ type _ACCESS_REASONS = struct{ FData [32]ACCESS_REASON } /* winnt.h:3617:13 */ type ACCESS_REASONS = _ACCESS_REASONS /* winnt.h:3619:7 */ type PACCESS_REASONS = uintptr /* winnt.h:3619:22 */ type _SE_SECURITY_DESCRIPTOR = struct { FSize DWORD FFlags DWORD FSecurityDescriptor PSECURITY_DESCRIPTOR } /* winnt.h:3625:13 */ type SE_SECURITY_DESCRIPTOR = _SE_SECURITY_DESCRIPTOR /* winnt.h:3629:7 */ type PSE_SECURITY_DESCRIPTOR = uintptr /* winnt.h:3629:30 */ type _SE_ACCESS_REQUEST = struct { FSize DWORD _ [4]byte FSeSecurityDescriptor PSE_SECURITY_DESCRIPTOR FDesiredAccess ACCESS_MASK FPreviouslyGrantedAccess ACCESS_MASK FPrincipalSelfSid PSID FGenericMapping PGENERIC_MAPPING FObjectTypeListCount DWORD _ [4]byte FObjectTypeList POBJECT_TYPE_LIST } /* winnt.h:3631:13 */ type SE_ACCESS_REQUEST = _SE_ACCESS_REQUEST /* winnt.h:3640:7 */ type PSE_ACCESS_REQUEST = uintptr /* winnt.h:3640:25 */ type _SE_ACCESS_REPLY = struct { FSize DWORD FResultListCount DWORD FGrantedAccess PACCESS_MASK FAccessStatus PDWORD FAccessReason PACCESS_REASONS FPrivileges uintptr } /* winnt.h:3642:13 */ type SE_ACCESS_REPLY = _SE_ACCESS_REPLY /* winnt.h:3649:7 */ type PSE_ACCESS_REPLY = uintptr /* winnt.h:3649:23 */ type SECURITY_IMPERSONATION_LEVEL = uint32 /* winnt.h:3689:7 */ type PSECURITY_IMPERSONATION_LEVEL = uintptr /* winnt.h:3689:36 */ type TOKEN_TYPE = uint32 /* winnt.h:3716:7 */ type PTOKEN_TYPE = uintptr /* winnt.h:3717:24 */ type TOKEN_ELEVATION_TYPE = uint32 /* winnt.h:3723:7 */ type PTOKEN_ELEVATION_TYPE = uintptr /* winnt.h:3723:29 */ type TOKEN_INFORMATION_CLASS = uint32 /* winnt.h:3767:7 */ type PTOKEN_INFORMATION_CLASS = uintptr /* winnt.h:3767:31 */ type _TOKEN_USER = struct{ FUser SID_AND_ATTRIBUTES } /* winnt.h:3769:13 */ type TOKEN_USER = _TOKEN_USER /* winnt.h:3771:7 */ type PTOKEN_USER = uintptr /* winnt.h:3771:18 */ type _TOKEN_GROUPS = struct { FGroupCount DWORD _ [4]byte FGroups [1]SID_AND_ATTRIBUTES } /* winnt.h:3773:13 */ type TOKEN_GROUPS = _TOKEN_GROUPS /* winnt.h:3780:7 */ type PTOKEN_GROUPS = uintptr /* winnt.h:3780:20 */ type _TOKEN_PRIVILEGES = struct { FPrivilegeCount DWORD FPrivileges [1]LUID_AND_ATTRIBUTES } /* winnt.h:3782:13 */ type TOKEN_PRIVILEGES = _TOKEN_PRIVILEGES /* winnt.h:3785:7 */ type PTOKEN_PRIVILEGES = uintptr /* winnt.h:3785:24 */ type _TOKEN_OWNER = struct{ FOwner PSID } /* winnt.h:3787:13 */ type TOKEN_OWNER = _TOKEN_OWNER /* winnt.h:3789:7 */ type PTOKEN_OWNER = uintptr /* winnt.h:3789:19 */ type _TOKEN_PRIMARY_GROUP = struct{ FPrimaryGroup PSID } /* winnt.h:3791:13 */ type TOKEN_PRIMARY_GROUP = _TOKEN_PRIMARY_GROUP /* winnt.h:3793:7 */ type PTOKEN_PRIMARY_GROUP = uintptr /* winnt.h:3793:27 */ type _TOKEN_DEFAULT_DACL = struct{ FDefaultDacl PACL } /* winnt.h:3795:13 */ type TOKEN_DEFAULT_DACL = _TOKEN_DEFAULT_DACL /* winnt.h:3797:7 */ type PTOKEN_DEFAULT_DACL = uintptr /* winnt.h:3797:26 */ type _TOKEN_USER_CLAIMS = struct{ FUserClaims PCLAIMS_BLOB } /* winnt.h:3799:13 */ type TOKEN_USER_CLAIMS = _TOKEN_USER_CLAIMS /* winnt.h:3801:7 */ type PTOKEN_USER_CLAIMS = uintptr /* winnt.h:3801:25 */ type _TOKEN_DEVICE_CLAIMS = struct{ FDeviceClaims PCLAIMS_BLOB } /* winnt.h:3803:13 */ type TOKEN_DEVICE_CLAIMS = _TOKEN_DEVICE_CLAIMS /* winnt.h:3805:7 */ type PTOKEN_DEVICE_CLAIMS = uintptr /* winnt.h:3805:27 */ type _TOKEN_GROUPS_AND_PRIVILEGES = struct { FSidCount DWORD FSidLength DWORD FSids PSID_AND_ATTRIBUTES FRestrictedSidCount DWORD FRestrictedSidLength DWORD FRestrictedSids PSID_AND_ATTRIBUTES FPrivilegeCount DWORD FPrivilegeLength DWORD FPrivileges PLUID_AND_ATTRIBUTES FAuthenticationId LUID } /* winnt.h:3807:13 */ type TOKEN_GROUPS_AND_PRIVILEGES = _TOKEN_GROUPS_AND_PRIVILEGES /* winnt.h:3818:7 */ type PTOKEN_GROUPS_AND_PRIVILEGES = uintptr /* winnt.h:3818:35 */ type _TOKEN_LINKED_TOKEN = struct{ FLinkedToken HANDLE } /* winnt.h:3820:13 */ type TOKEN_LINKED_TOKEN = _TOKEN_LINKED_TOKEN /* winnt.h:3822:7 */ type PTOKEN_LINKED_TOKEN = uintptr /* winnt.h:3822:26 */ type _TOKEN_ELEVATION = struct{ FTokenIsElevated DWORD } /* winnt.h:3824:13 */ type TOKEN_ELEVATION = _TOKEN_ELEVATION /* winnt.h:3826:7 */ type PTOKEN_ELEVATION = uintptr /* winnt.h:3826:23 */ type _TOKEN_MANDATORY_LABEL = struct{ FLabel SID_AND_ATTRIBUTES } /* winnt.h:3828:13 */ type TOKEN_MANDATORY_LABEL = _TOKEN_MANDATORY_LABEL /* winnt.h:3830:7 */ type PTOKEN_MANDATORY_LABEL = uintptr /* winnt.h:3830:29 */ type _TOKEN_MANDATORY_POLICY = struct{ FPolicy DWORD } /* winnt.h:3838:13 */ type TOKEN_MANDATORY_POLICY = _TOKEN_MANDATORY_POLICY /* winnt.h:3840:7 */ type PTOKEN_MANDATORY_POLICY = uintptr /* winnt.h:3840:30 */ type _TOKEN_ACCESS_INFORMATION = struct { FSidHash PSID_AND_ATTRIBUTES_HASH FRestrictedSidHash PSID_AND_ATTRIBUTES_HASH FPrivileges PTOKEN_PRIVILEGES FAuthenticationId LUID FTokenType TOKEN_TYPE FImpersonationLevel SECURITY_IMPERSONATION_LEVEL FMandatoryPolicy TOKEN_MANDATORY_POLICY FFlags DWORD FAppContainerNumber DWORD _ [4]byte FPackageSid PSID FCapabilitiesHash PSID_AND_ATTRIBUTES_HASH } /* winnt.h:3842:13 */ type TOKEN_ACCESS_INFORMATION = _TOKEN_ACCESS_INFORMATION /* winnt.h:3854:7 */ type PTOKEN_ACCESS_INFORMATION = uintptr /* winnt.h:3854:32 */ type _TOKEN_AUDIT_POLICY = struct{ FPerUserPolicy [29]UCHAR } /* winnt.h:3858:13 */ type TOKEN_AUDIT_POLICY = _TOKEN_AUDIT_POLICY /* winnt.h:3860:7 */ type PTOKEN_AUDIT_POLICY = uintptr /* winnt.h:3860:27 */ type _TOKEN_SOURCE = struct { FSourceName [8]CHAR FSourceIdentifier LUID } /* winnt.h:3864:13 */ type TOKEN_SOURCE = _TOKEN_SOURCE /* winnt.h:3867:7 */ type PTOKEN_SOURCE = uintptr /* winnt.h:3867:20 */ type _TOKEN_STATISTICS = struct { FTokenId LUID FAuthenticationId LUID FExpirationTime LARGE_INTEGER FTokenType TOKEN_TYPE FImpersonationLevel SECURITY_IMPERSONATION_LEVEL FDynamicCharged DWORD FDynamicAvailable DWORD FGroupCount DWORD FPrivilegeCount DWORD FModifiedId LUID } /* winnt.h:3869:13 */ type TOKEN_STATISTICS = _TOKEN_STATISTICS /* winnt.h:3880:7 */ type PTOKEN_STATISTICS = uintptr /* winnt.h:3880:24 */ type _TOKEN_CONTROL = struct { FTokenId LUID FAuthenticationId LUID FModifiedId LUID FTokenSource TOKEN_SOURCE } /* winnt.h:3882:13 */ type TOKEN_CONTROL = _TOKEN_CONTROL /* winnt.h:3887:7 */ type PTOKEN_CONTROL = uintptr /* winnt.h:3887:21 */ type _TOKEN_ORIGIN = struct{ FOriginatingLogonSession LUID } /* winnt.h:3889:13 */ type TOKEN_ORIGIN = _TOKEN_ORIGIN /* winnt.h:3891:7 */ type PTOKEN_ORIGIN = uintptr /* winnt.h:3891:20 */ type MANDATORY_LEVEL = uint32 /* winnt.h:3901:7 */ type PMANDATORY_LEVEL = uintptr /* winnt.h:3901:23 */ type _TOKEN_APPCONTAINER_INFORMATION = struct{ FTokenAppContainer PSID } /* winnt.h:3903:13 */ type TOKEN_APPCONTAINER_INFORMATION = _TOKEN_APPCONTAINER_INFORMATION /* winnt.h:3905:7 */ type PTOKEN_APPCONTAINER_INFORMATION = uintptr /* winnt.h:3905:38 */ type _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = struct { FVersion DWORD64 FName PWSTR } /* winnt.h:3915:13 */ type CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE /* winnt.h:3918:7 */ type PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = uintptr /* winnt.h:3918:43 */ type _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = struct { FpValue PVOID FValueLength DWORD _ [4]byte } /* winnt.h:3920:13 */ type CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE /* winnt.h:3923:7 */ type PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = uintptr /* winnt.h:3923:52 */ type _CLAIM_SECURITY_ATTRIBUTE_V1 = struct { FName PWSTR FValueType WORD FReserved WORD FFlags DWORD FValueCount DWORD _ [4]byte FValues struct{ FpInt64 PLONG64 } } /* winnt.h:3936:13 */ type CLAIM_SECURITY_ATTRIBUTE_V1 = _CLAIM_SECURITY_ATTRIBUTE_V1 /* winnt.h:3949:7 */ type PCLAIM_SECURITY_ATTRIBUTE_V1 = uintptr /* winnt.h:3949:35 */ type _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = struct { FName DWORD FValueType WORD FReserved WORD FFlags DWORD FValueCount DWORD FValues struct{ FpInt64 [1]DWORD } } /* winnt.h:3951:13 */ type CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 /* winnt.h:3964:7 */ type PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = uintptr /* winnt.h:3964:44 */ type _CLAIM_SECURITY_ATTRIBUTES_INFORMATION = struct { FVersion WORD FReserved WORD FAttributeCount DWORD FAttribute struct{ FpAttributeV1 PCLAIM_SECURITY_ATTRIBUTE_V1 } } /* winnt.h:3970:13 */ type CLAIM_SECURITY_ATTRIBUTES_INFORMATION = _CLAIM_SECURITY_ATTRIBUTES_INFORMATION /* winnt.h:3977:7 */ type PCLAIM_SECURITY_ATTRIBUTES_INFORMATION = uintptr /* winnt.h:3977:45 */ type SECURITY_CONTEXT_TRACKING_MODE = BOOLEAN /* winnt.h:3982:21 */ type PSECURITY_CONTEXT_TRACKING_MODE = uintptr /* winnt.h:3982:52 */ type _SECURITY_QUALITY_OF_SERVICE = struct { FLength DWORD FImpersonationLevel SECURITY_IMPERSONATION_LEVEL FContextTrackingMode SECURITY_CONTEXT_TRACKING_MODE FEffectiveOnly BOOLEAN _ [2]byte } /* winnt.h:3984:13 */ type SECURITY_QUALITY_OF_SERVICE = _SECURITY_QUALITY_OF_SERVICE /* winnt.h:3989:7 */ type PSECURITY_QUALITY_OF_SERVICE = uintptr /* winnt.h:3989:35 */ type _SE_IMPERSONATION_STATE = struct { FToken PACCESS_TOKEN FCopyOnOpen BOOLEAN FEffectiveOnly BOOLEAN _ [2]byte FLevel SECURITY_IMPERSONATION_LEVEL } /* winnt.h:3991:13 */ type SE_IMPERSONATION_STATE = _SE_IMPERSONATION_STATE /* winnt.h:3996:7 */ type PSE_IMPERSONATION_STATE = uintptr /* winnt.h:3996:30 */ type SECURITY_INFORMATION = DWORD /* winnt.h:4003:19 */ type PSECURITY_INFORMATION = uintptr /* winnt.h:4003:40 */ type SE_LEARNING_MODE_DATA_TYPE = uint32 /* winnt.h:4023:7 */ type _SECURITY_CAPABILITIES = struct { FAppContainerSid PSID FCapabilities PSID_AND_ATTRIBUTES FCapabilityCount DWORD FReserved DWORD } /* winnt.h:4027:13 */ type SECURITY_CAPABILITIES = _SECURITY_CAPABILITIES /* winnt.h:4032:7 */ type PSECURITY_CAPABILITIES = uintptr /* winnt.h:4032:29 */ type LPSECURITY_CAPABILITIES = uintptr /* winnt.h:4032:53 */ type _JOB_SET_ARRAY = struct { FJobHandle HANDLE FMemberLevel DWORD FFlags DWORD } /* winnt.h:4087:13 */ type JOB_SET_ARRAY = _JOB_SET_ARRAY /* winnt.h:4091:7 */ type PJOB_SET_ARRAY = uintptr /* winnt.h:4091:21 */ type _EXCEPTION_REGISTRATION_RECORD = struct { F__0 struct{ FNext uintptr } F__8 struct{ FHandler PEXCEPTION_ROUTINE } } /* winnt.h:4097:13 */ type EXCEPTION_REGISTRATION_RECORD = _EXCEPTION_REGISTRATION_RECORD /* winnt.h:4106:7 */ type PEXCEPTION_REGISTRATION_RECORD = uintptr /* winnt.h:4108:43 */ type EXCEPTION_REGISTRATION = EXCEPTION_REGISTRATION_RECORD /* winnt.h:4110:43 */ type PEXCEPTION_REGISTRATION = PEXCEPTION_REGISTRATION_RECORD /* winnt.h:4111:44 */ type _NT_TIB = struct { FExceptionList uintptr FStackBase PVOID FStackLimit PVOID FSubSystemTib PVOID F__32 struct{ FFiberData PVOID } FArbitraryUserPointer PVOID FSelf uintptr } /* winnt.h:4116:28 */ type NT_TIB = _NT_TIB /* winnt.h:4127:7 */ type PNT_TIB = uintptr /* winnt.h:4128:20 */ type _NT_TIB32 = struct { FExceptionList DWORD FStackBase DWORD FStackLimit DWORD FSubSystemTib DWORD F__16 struct{ FFiberData DWORD } FArbitraryUserPointer DWORD FSelf DWORD } /* winnt.h:4131:28 */ type NT_TIB32 = _NT_TIB32 /* winnt.h:4142:7 */ type PNT_TIB32 = uintptr /* winnt.h:4142:16 */ type _NT_TIB64 = struct { FExceptionList DWORD64 FStackBase DWORD64 FStackLimit DWORD64 FSubSystemTib DWORD64 F__32 struct{ FFiberData DWORD64 } FArbitraryUserPointer DWORD64 FSelf DWORD64 } /* winnt.h:4144:28 */ type NT_TIB64 = _NT_TIB64 /* winnt.h:4155:7 */ type PNT_TIB64 = uintptr /* winnt.h:4155:16 */ type _UMS_CREATE_THREAD_ATTRIBUTES = struct { FUmsVersion DWORD _ [4]byte FUmsContext PVOID FUmsCompletionList PVOID } /* winnt.h:4166:13 */ type UMS_CREATE_THREAD_ATTRIBUTES = _UMS_CREATE_THREAD_ATTRIBUTES /* winnt.h:4170:7 */ type PUMS_CREATE_THREAD_ATTRIBUTES = uintptr /* winnt.h:4170:36 */ type _QUOTA_LIMITS = struct { FPagedPoolLimit SIZE_T FNonPagedPoolLimit SIZE_T FMinimumWorkingSetSize SIZE_T FMaximumWorkingSetSize SIZE_T FPagefileLimit SIZE_T FTimeLimit LARGE_INTEGER } /* winnt.h:4172:13 */ type QUOTA_LIMITS = _QUOTA_LIMITS /* winnt.h:4179:7 */ type PQUOTA_LIMITS = uintptr /* winnt.h:4179:20 */ type _RATE_QUOTA_LIMIT = struct{ FRateData DWORD } /* winnt.h:4187:13 */ type RATE_QUOTA_LIMIT = _RATE_QUOTA_LIMIT /* winnt.h:4193:7 */ type PRATE_QUOTA_LIMIT = uintptr /* winnt.h:4193:25 */ type _QUOTA_LIMITS_EX = struct { FPagedPoolLimit SIZE_T FNonPagedPoolLimit SIZE_T FMinimumWorkingSetSize SIZE_T FMaximumWorkingSetSize SIZE_T FPagefileLimit SIZE_T FTimeLimit LARGE_INTEGER FWorkingSetLimit SIZE_T FReserved2 SIZE_T FReserved3 SIZE_T FReserved4 SIZE_T FFlags DWORD FCpuRateLimit RATE_QUOTA_LIMIT } /* winnt.h:4195:13 */ type QUOTA_LIMITS_EX = _QUOTA_LIMITS_EX /* winnt.h:4208:7 */ type PQUOTA_LIMITS_EX = uintptr /* winnt.h:4208:23 */ type _IO_COUNTERS = struct { FReadOperationCount ULONGLONG FWriteOperationCount ULONGLONG FOtherOperationCount ULONGLONG FReadTransferCount ULONGLONG FWriteTransferCount ULONGLONG FOtherTransferCount ULONGLONG } /* winnt.h:4210:13 */ type IO_COUNTERS = _IO_COUNTERS /* winnt.h:4217:7 */ type PIO_COUNTERS = uintptr /* winnt.h:4218:25 */ type HARDWARE_COUNTER_TYPE = uint32 /* winnt.h:4226:7 */ type PHARDWARE_COUNTER_TYPE = uintptr /* winnt.h:4226:30 */ type PROCESS_MITIGATION_POLICY = uint32 /* winnt.h:4241:7 */ type PPROCESS_MITIGATION_POLICY = uintptr /* winnt.h:4241:33 */ type _PROCESS_MITIGATION_ASLR_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4243:13 */ type PROCESS_MITIGATION_ASLR_POLICY = _PROCESS_MITIGATION_ASLR_POLICY /* winnt.h:4254:7 */ type PPROCESS_MITIGATION_ASLR_POLICY = uintptr /* winnt.h:4254:38 */ type _PROCESS_MITIGATION_DEP_POLICY = struct { F__0 struct{ FFlags DWORD } FPermanent BOOLEAN _ [3]byte } /* winnt.h:4256:13 */ type PROCESS_MITIGATION_DEP_POLICY = _PROCESS_MITIGATION_DEP_POLICY /* winnt.h:4266:7 */ type PPROCESS_MITIGATION_DEP_POLICY = uintptr /* winnt.h:4266:37 */ type _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4268:13 */ type PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY /* winnt.h:4277:7 */ type PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = uintptr /* winnt.h:4277:53 */ type _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4279:13 */ type PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY /* winnt.h:4287:7 */ type PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = uintptr /* winnt.h:4287:53 */ type _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4289:13 */ type PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY /* winnt.h:4297:7 */ type PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = uintptr /* winnt.h:4297:57 */ type _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4299:13 */ type PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY /* winnt.h:4309:7 */ type PPROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = uintptr /* winnt.h:4309:53 */ type _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4311:13 */ type PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY /* winnt.h:4321:7 */ type PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = uintptr /* winnt.h:4321:51 */ type _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = struct { F__0 struct { FFlags DWORD _ [4]byte } } /* winnt.h:4323:13 */ type PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY /* winnt.h:4333:7 */ type PPROCESS_MITIGATION_DYNAMIC_CODE_POLICY = uintptr /* winnt.h:4333:47 */ type _PROCESS_MITIGATION_FONT_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4335:13 */ type PROCESS_MITIGATION_FONT_DISABLE_POLICY = _PROCESS_MITIGATION_FONT_DISABLE_POLICY /* winnt.h:4344:7 */ type PPROCESS_MITIGATION_FONT_DISABLE_POLICY = uintptr /* winnt.h:4344:47 */ type _PROCESS_MITIGATION_IMAGE_LOAD_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4346:13 */ type PROCESS_MITIGATION_IMAGE_LOAD_POLICY = _PROCESS_MITIGATION_IMAGE_LOAD_POLICY /* winnt.h:4356:7 */ type PPROCESS_MITIGATION_IMAGE_LOAD_POLICY = uintptr /* winnt.h:4356:45 */ type _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = struct { FTotalUserTime LARGE_INTEGER FTotalKernelTime LARGE_INTEGER FThisPeriodTotalUserTime LARGE_INTEGER FThisPeriodTotalKernelTime LARGE_INTEGER FTotalPageFaultCount DWORD FTotalProcesses DWORD FActiveProcesses DWORD FTotalTerminatedProcesses DWORD } /* winnt.h:4358:13 */ type JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION /* winnt.h:4367:7 */ type PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION = uintptr /* winnt.h:4367:46 */ type _JOBOBJECT_BASIC_LIMIT_INFORMATION = struct { FPerProcessUserTimeLimit LARGE_INTEGER FPerJobUserTimeLimit LARGE_INTEGER FLimitFlags DWORD _ [4]byte FMinimumWorkingSetSize SIZE_T FMaximumWorkingSetSize SIZE_T FActiveProcessLimit DWORD _ [4]byte FAffinity ULONG_PTR FPriorityClass DWORD FSchedulingClass DWORD } /* winnt.h:4369:13 */ type JOBOBJECT_BASIC_LIMIT_INFORMATION = _JOBOBJECT_BASIC_LIMIT_INFORMATION /* winnt.h:4379:7 */ type PJOBOBJECT_BASIC_LIMIT_INFORMATION = uintptr /* winnt.h:4379:41 */ type _JOBOBJECT_EXTENDED_LIMIT_INFORMATION = struct { FBasicLimitInformation JOBOBJECT_BASIC_LIMIT_INFORMATION FIoInfo IO_COUNTERS FProcessMemoryLimit SIZE_T FJobMemoryLimit SIZE_T FPeakProcessMemoryUsed SIZE_T FPeakJobMemoryUsed SIZE_T } /* winnt.h:4381:13 */ type JOBOBJECT_EXTENDED_LIMIT_INFORMATION = _JOBOBJECT_EXTENDED_LIMIT_INFORMATION /* winnt.h:4388:7 */ type PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = uintptr /* winnt.h:4388:44 */ type _JOBOBJECT_BASIC_PROCESS_ID_LIST = struct { FNumberOfAssignedProcesses DWORD FNumberOfProcessIdsInList DWORD FProcessIdList [1]ULONG_PTR } /* winnt.h:4390:13 */ type JOBOBJECT_BASIC_PROCESS_ID_LIST = _JOBOBJECT_BASIC_PROCESS_ID_LIST /* winnt.h:4394:7 */ type PJOBOBJECT_BASIC_PROCESS_ID_LIST = uintptr /* winnt.h:4394:39 */ type _JOBOBJECT_BASIC_UI_RESTRICTIONS = struct{ FUIRestrictionsClass DWORD } /* winnt.h:4396:13 */ type JOBOBJECT_BASIC_UI_RESTRICTIONS = _JOBOBJECT_BASIC_UI_RESTRICTIONS /* winnt.h:4398:7 */ type PJOBOBJECT_BASIC_UI_RESTRICTIONS = uintptr /* winnt.h:4398:39 */ type _JOBOBJECT_SECURITY_LIMIT_INFORMATION = struct { FSecurityLimitFlags DWORD _ [4]byte FJobToken HANDLE FSidsToDisable PTOKEN_GROUPS FPrivilegesToDelete PTOKEN_PRIVILEGES FRestrictedSids PTOKEN_GROUPS } /* winnt.h:4400:13 */ type JOBOBJECT_SECURITY_LIMIT_INFORMATION = _JOBOBJECT_SECURITY_LIMIT_INFORMATION /* winnt.h:4406:7 */ type PJOBOBJECT_SECURITY_LIMIT_INFORMATION = uintptr /* winnt.h:4406:44 */ type _JOBOBJECT_END_OF_JOB_TIME_INFORMATION = struct{ FEndOfJobTimeAction DWORD } /* winnt.h:4408:13 */ type JOBOBJECT_END_OF_JOB_TIME_INFORMATION = _JOBOBJECT_END_OF_JOB_TIME_INFORMATION /* winnt.h:4410:7 */ type PJOBOBJECT_END_OF_JOB_TIME_INFORMATION = uintptr /* winnt.h:4410:45 */ type _JOBOBJECT_ASSOCIATE_COMPLETION_PORT = struct { FCompletionKey PVOID FCompletionPort HANDLE } /* winnt.h:4412:13 */ type JOBOBJECT_ASSOCIATE_COMPLETION_PORT = _JOBOBJECT_ASSOCIATE_COMPLETION_PORT /* winnt.h:4415:7 */ type PJOBOBJECT_ASSOCIATE_COMPLETION_PORT = uintptr /* winnt.h:4415:43 */ type _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = struct { FBasicInfo JOBOBJECT_BASIC_ACCOUNTING_INFORMATION FIoInfo IO_COUNTERS } /* winnt.h:4417:13 */ type JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION /* winnt.h:4420:7 */ type PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = uintptr /* winnt.h:4420:53 */ type _JOBOBJECT_JOBSET_INFORMATION = struct{ FMemberLevel DWORD } /* winnt.h:4422:13 */ type JOBOBJECT_JOBSET_INFORMATION = _JOBOBJECT_JOBSET_INFORMATION /* winnt.h:4424:7 */ type PJOBOBJECT_JOBSET_INFORMATION = uintptr /* winnt.h:4424:36 */ type JOBOBJECT_RATE_CONTROL_TOLERANCE = uint32 /* winnt.h:4430:7 */ type JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL = uint32 /* winnt.h:4436:7 */ type _JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = struct { FIoReadBytesLimit DWORD64 FIoWriteBytesLimit DWORD64 FPerJobUserTimeLimit LARGE_INTEGER FJobMemoryLimit DWORD64 FRateControlTolerance JOBOBJECT_RATE_CONTROL_TOLERANCE FRateControlToleranceInterval JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL FLimitFlags DWORD _ [4]byte } /* winnt.h:4438:13 */ type JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = _JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION /* winnt.h:4446:7 */ type PJOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = uintptr /* winnt.h:4446:48 */ type _JOBOBJECT_LIMIT_VIOLATION_INFORMATION = struct { FLimitFlags DWORD FViolationLimitFlags DWORD FIoReadBytes DWORD64 FIoReadBytesLimit DWORD64 FIoWriteBytes DWORD64 FIoWriteBytesLimit DWORD64 FPerJobUserTime LARGE_INTEGER FPerJobUserTimeLimit LARGE_INTEGER FJobMemory DWORD64 FJobMemoryLimit DWORD64 FRateControlTolerance JOBOBJECT_RATE_CONTROL_TOLERANCE FRateControlToleranceLimit JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL } /* winnt.h:4448:13 */ type JOBOBJECT_LIMIT_VIOLATION_INFORMATION = _JOBOBJECT_LIMIT_VIOLATION_INFORMATION /* winnt.h:4461:7 */ type PJOBOBJECT_LIMIT_VIOLATION_INFORMATION = uintptr /* winnt.h:4461:45 */ type _JOBOBJECT_CPU_RATE_CONTROL_INFORMATION = struct { FControlFlags DWORD F__4 struct{ FCpuRate DWORD } } /* winnt.h:4463:13 */ type JOBOBJECT_CPU_RATE_CONTROL_INFORMATION = _JOBOBJECT_CPU_RATE_CONTROL_INFORMATION /* winnt.h:4469:7 */ type PJOBOBJECT_CPU_RATE_CONTROL_INFORMATION = uintptr /* winnt.h:4469:46 */ type JOBOBJECTINFOCLASS = uint32 /* winnt.h:4573:7 */ type FIRMWARE_TYPE = uint32 /* winnt.h:4580:7 */ type PFIRMWARE_TYPE = uintptr /* winnt.h:4580:21 */ type LOGICAL_PROCESSOR_RELATIONSHIP = uint32 /* winnt.h:4603:7 */ type PROCESSOR_CACHE_TYPE = uint32 /* winnt.h:4609:7 */ type _CACHE_DESCRIPTOR = struct { FLevel BYTE FAssociativity BYTE FLineSize WORD FSize DWORD FType PROCESSOR_CACHE_TYPE } /* winnt.h:4613:13 */ type CACHE_DESCRIPTOR = _CACHE_DESCRIPTOR /* winnt.h:4619:7 */ type PCACHE_DESCRIPTOR = uintptr /* winnt.h:4619:24 */ type _SYSTEM_LOGICAL_PROCESSOR_INFORMATION = struct { FProcessorMask ULONG_PTR FRelationship LOGICAL_PROCESSOR_RELATIONSHIP _ [4]byte Fu struct { _ [0]uint64 FProcessorCore struct{ FFlags BYTE } _ [15]byte } } /* winnt.h:4621:13 */ type SYSTEM_LOGICAL_PROCESSOR_INFORMATION = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION /* winnt.h:4634:7 */ type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = uintptr /* winnt.h:4634:44 */ type _PROCESSOR_RELATIONSHIP = struct { FFlags BYTE FReserved [21]BYTE FGroupCount WORD FGroupMask [1]GROUP_AFFINITY } /* winnt.h:4636:13 */ type PROCESSOR_RELATIONSHIP = _PROCESSOR_RELATIONSHIP /* winnt.h:4641:7 */ type PPROCESSOR_RELATIONSHIP = uintptr /* winnt.h:4641:30 */ type _NUMA_NODE_RELATIONSHIP = struct { FNodeNumber DWORD FReserved [20]BYTE FGroupMask GROUP_AFFINITY } /* winnt.h:4643:13 */ type NUMA_NODE_RELATIONSHIP = _NUMA_NODE_RELATIONSHIP /* winnt.h:4647:7 */ type PNUMA_NODE_RELATIONSHIP = uintptr /* winnt.h:4647:30 */ type _CACHE_RELATIONSHIP = struct { FLevel BYTE FAssociativity BYTE FLineSize WORD FCacheSize DWORD FType PROCESSOR_CACHE_TYPE FReserved [20]BYTE FGroupMask GROUP_AFFINITY } /* winnt.h:4649:13 */ type CACHE_RELATIONSHIP = _CACHE_RELATIONSHIP /* winnt.h:4657:7 */ type PCACHE_RELATIONSHIP = uintptr /* winnt.h:4657:26 */ type _PROCESSOR_GROUP_INFO = struct { FMaximumProcessorCount BYTE FActiveProcessorCount BYTE FReserved [38]BYTE FActiveProcessorMask KAFFINITY } /* winnt.h:4659:13 */ type PROCESSOR_GROUP_INFO = _PROCESSOR_GROUP_INFO /* winnt.h:4664:7 */ type PPROCESSOR_GROUP_INFO = uintptr /* winnt.h:4664:28 */ type _GROUP_RELATIONSHIP = struct { FMaximumGroupCount WORD FActiveGroupCount WORD FReserved [20]BYTE FGroupInfo [1]PROCESSOR_GROUP_INFO } /* winnt.h:4666:13 */ type GROUP_RELATIONSHIP = _GROUP_RELATIONSHIP /* winnt.h:4671:7 */ type PGROUP_RELATIONSHIP = uintptr /* winnt.h:4671:26 */ type _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = struct { FRelationship LOGICAL_PROCESSOR_RELATIONSHIP FSize DWORD Fu struct { FProcessor PROCESSOR_RELATIONSHIP _ [32]byte } } /* winnt.h:4673:5 */ type SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX /* winnt.h:4684:61 */ type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = uintptr /* winnt.h:4684:101 */ type _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = struct{ FCycleTime DWORD64 } /* winnt.h:4686:13 */ type SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION /* winnt.h:4688:7 */ type PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = uintptr /* winnt.h:4688:47 */ type _XSTATE_FEATURE = struct { FOffset DWORD FSize DWORD } /* winnt.h:4771:13 */ type XSTATE_FEATURE = _XSTATE_FEATURE /* winnt.h:4774:7 */ type PXSTATE_FEATURE = uintptr /* winnt.h:4774:22 */ type _XSTATE_CONFIGURATION = struct { FEnabledFeatures DWORD64 FEnabledVolatileFeatures DWORD64 FSize DWORD FOptimizedSave uint8 /* DWORD OptimizedSave: 1 */ _ [3]byte FFeatures [64]XSTATE_FEATURE } /* winnt.h:4776:13 */ type XSTATE_CONFIGURATION = _XSTATE_CONFIGURATION /* winnt.h:4782:7 */ type PXSTATE_CONFIGURATION = uintptr /* winnt.h:4782:28 */ type _MEMORY_BASIC_INFORMATION = struct { FBaseAddress PVOID FAllocationBase PVOID FAllocationProtect DWORD _ [4]byte FRegionSize SIZE_T FState DWORD FProtect DWORD FType DWORD _ [4]byte } /* winnt.h:4784:13 */ type MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION /* winnt.h:4792:7 */ type PMEMORY_BASIC_INFORMATION = uintptr /* winnt.h:4792:32 */ type _MEMORY_BASIC_INFORMATION32 = struct { FBaseAddress DWORD FAllocationBase DWORD FAllocationProtect DWORD FRegionSize DWORD FState DWORD FProtect DWORD FType DWORD } /* winnt.h:4794:13 */ type MEMORY_BASIC_INFORMATION32 = _MEMORY_BASIC_INFORMATION32 /* winnt.h:4802:7 */ type PMEMORY_BASIC_INFORMATION32 = uintptr /* winnt.h:4802:34 */ type _MEMORY_BASIC_INFORMATION64 = struct { FBaseAddress ULONGLONG FAllocationBase ULONGLONG FAllocationProtect DWORD F__alignment1 DWORD FRegionSize ULONGLONG FState DWORD FProtect DWORD FType DWORD F__alignment2 DWORD } /* winnt.h:4804:13 */ type MEMORY_BASIC_INFORMATION64 = _MEMORY_BASIC_INFORMATION64 /* winnt.h:4814:7 */ type PMEMORY_BASIC_INFORMATION64 = uintptr /* winnt.h:4814:34 */ type FILE_ID_1281 = struct { FLowPart ULONGLONG FHighPart ULONGLONG } /* winnt.h:4981:13 */ type FILE_ID_128 = FILE_ID_1281 /* winnt.h:4984:7 */ type PFILE_ID_128 = uintptr /* winnt.h:4984:20 */ type _FILE_NOTIFY_INFORMATION = struct { FNextEntryOffset DWORD FAction DWORD FFileNameLength DWORD FFileName [1]WCHAR _ [2]byte } /* winnt.h:4986:13 */ type FILE_NOTIFY_INFORMATION = _FILE_NOTIFY_INFORMATION /* winnt.h:4991:7 */ type PFILE_NOTIFY_INFORMATION = uintptr /* winnt.h:4991:31 */ type _FILE_SEGMENT_ELEMENT = struct{ FBuffer PVOID64 } /* winnt.h:4993:13 */ type FILE_SEGMENT_ELEMENT = _FILE_SEGMENT_ELEMENT /* winnt.h:4996:7 */ type PFILE_SEGMENT_ELEMENT = uintptr /* winnt.h:4996:28 */ type _REPARSE_GUID_DATA_BUFFER = struct { FReparseTag DWORD FReparseDataLength WORD FReserved WORD FReparseGuid GUID FGenericReparseBuffer struct{ FDataBuffer [1]BYTE } _ [3]byte } /* winnt.h:4998:13 */ type REPARSE_GUID_DATA_BUFFER = _REPARSE_GUID_DATA_BUFFER /* winnt.h:5006:7 */ type PREPARSE_GUID_DATA_BUFFER = uintptr /* winnt.h:5006:32 */ type SYSTEM_POWER_STATE = uint32 /* winnt.h:5231:5 */ type PSYSTEM_POWER_STATE = uintptr /* winnt.h:5231:24 */ type POWER_ACTION = uint32 /* winnt.h:5239:5 */ type PPOWER_ACTION = uintptr /* winnt.h:5239:18 */ type DEVICE_POWER_STATE = uint32 /* winnt.h:5244:5 */ type PDEVICE_POWER_STATE = uintptr /* winnt.h:5244:24 */ type MONITOR_DISPLAY_STATE = uint32 /* winnt.h:5248:5 */ type PMONITOR_DISPLAY_STATE = uintptr /* winnt.h:5248:28 */ type USER_ACTIVITY_PRESENCE = uint32 /* winnt.h:5256:5 */ type PUSER_ACTIVITY_PRESENCE = uintptr /* winnt.h:5256:28 */ type EXECUTION_STATE = DWORD /* winnt.h:5264:17 */ type PEXECUTION_STATE = uintptr /* winnt.h:5264:34 */ type LATENCY_TIME = uint32 /* winnt.h:5268:5 */ type POWER_REQUEST_TYPE = uint32 /* winnt.h:5286:5 */ type PPOWER_REQUEST_TYPE = uintptr /* winnt.h:5286:24 */ type CM_Power_Data_s = struct { FPD_Size DWORD FPD_MostRecentPowerState DEVICE_POWER_STATE FPD_Capabilities DWORD FPD_D1Latency DWORD FPD_D2Latency DWORD FPD_D3Latency DWORD FPD_PowerStateMapping [7]DEVICE_POWER_STATE FPD_DeepestSystemWake SYSTEM_POWER_STATE } /* winnt.h:5298:13 */ type CM_POWER_DATA = CM_Power_Data_s /* winnt.h:5307:7 */ type PCM_POWER_DATA = uintptr /* winnt.h:5307:21 */ type POWER_INFORMATION_LEVEL = uint32 /* winnt.h:5391:7 */ type POWER_USER_PRESENCE_TYPE = uint32 /* winnt.h:5397:7 */ type PPOWER_USER_PRESENCE_TYPE = uintptr /* winnt.h:5397:32 */ type _POWER_USER_PRESENCE = struct{ FUserPresence POWER_USER_PRESENCE_TYPE } /* winnt.h:5399:13 */ type POWER_USER_PRESENCE = _POWER_USER_PRESENCE /* winnt.h:5401:7 */ type PPOWER_USER_PRESENCE = uintptr /* winnt.h:5401:27 */ type _POWER_SESSION_CONNECT = struct { FConnected BOOLEAN FConsole BOOLEAN } /* winnt.h:5403:13 */ type POWER_SESSION_CONNECT = _POWER_SESSION_CONNECT /* winnt.h:5406:7 */ type PPOWER_SESSION_CONNECT = uintptr /* winnt.h:5406:29 */ type _POWER_SESSION_TIMEOUTS = struct { FInputTimeout DWORD FDisplayTimeout DWORD } /* winnt.h:5408:13 */ type POWER_SESSION_TIMEOUTS = _POWER_SESSION_TIMEOUTS /* winnt.h:5411:7 */ type PPOWER_SESSION_TIMEOUTS = uintptr /* winnt.h:5411:30 */ type _POWER_SESSION_RIT_STATE = struct { FActive BOOLEAN _ [3]byte FLastInputTime DWORD } /* winnt.h:5413:13 */ type POWER_SESSION_RIT_STATE = _POWER_SESSION_RIT_STATE /* winnt.h:5416:7 */ type PPOWER_SESSION_RIT_STATE = uintptr /* winnt.h:5416:31 */ type _POWER_SESSION_WINLOGON = struct { FSessionId DWORD FConsole BOOLEAN FLocked BOOLEAN _ [2]byte } /* winnt.h:5418:13 */ type POWER_SESSION_WINLOGON = _POWER_SESSION_WINLOGON /* winnt.h:5422:7 */ type PPOWER_SESSION_WINLOGON = uintptr /* winnt.h:5422:30 */ type _POWER_IDLE_RESILIENCY = struct { FCoalescingTimeout DWORD FIdleResiliencyPeriod DWORD } /* winnt.h:5424:13 */ type POWER_IDLE_RESILIENCY = _POWER_IDLE_RESILIENCY /* winnt.h:5427:7 */ type PPOWER_IDLE_RESILIENCY = uintptr /* winnt.h:5427:29 */ type POWER_MONITOR_REQUEST_REASON = uint32 /* winnt.h:5445:7 */ type _POWER_MONITOR_INVOCATION = struct { FOn BOOLEAN FConsole BOOLEAN _ [2]byte FRequestReason POWER_MONITOR_REQUEST_REASON } /* winnt.h:5447:13 */ type POWER_MONITOR_INVOCATION = _POWER_MONITOR_INVOCATION /* winnt.h:5451:7 */ type PPOWER_MONITOR_INVOCATION = uintptr /* winnt.h:5451:32 */ type _RESUME_PERFORMANCE = struct { FPostTimeMs DWORD _ [4]byte FTotalResumeTimeMs ULONGLONG FResumeCompleteTimestamp ULONGLONG } /* winnt.h:5453:13 */ type RESUME_PERFORMANCE = _RESUME_PERFORMANCE /* winnt.h:5457:7 */ type PRESUME_PERFORMANCE = uintptr /* winnt.h:5457:26 */ type SYSTEM_POWER_CONDITION = uint32 /* winnt.h:5464:7 */ type SET_POWER_SETTING_VALUE = struct { FVersion DWORD FGuid GUID FPowerCondition SYSTEM_POWER_CONDITION FDataLength DWORD FData [1]BYTE _ [3]byte } /* winnt.h:5472:7 */ type PSET_POWER_SETTING_VALUE = uintptr /* winnt.h:5472:31 */ type NOTIFY_USER_POWER_SETTING = struct{ FGuid GUID } /* winnt.h:5478:7 */ type PNOTIFY_USER_POWER_SETTING = uintptr /* winnt.h:5478:33 */ type _APPLICATIONLAUNCH_SETTING_VALUE = struct { FActivationTime LARGE_INTEGER FFlags DWORD FButtonInstanceID DWORD } /* winnt.h:5480:13 */ type APPLICATIONLAUNCH_SETTING_VALUE = _APPLICATIONLAUNCH_SETTING_VALUE /* winnt.h:5484:7 */ type PAPPLICATIONLAUNCH_SETTING_VALUE = uintptr /* winnt.h:5484:39 */ type POWER_PLATFORM_ROLE = uint32 /* winnt.h:5497:7 */ type PPOWER_PLATFORM_ROLE = uintptr /* winnt.h:5497:27 */ type _POWER_PLATFORM_INFORMATION = struct{ FAoAc BOOLEAN } /* winnt.h:5499:13 */ type POWER_PLATFORM_INFORMATION = _POWER_PLATFORM_INFORMATION /* winnt.h:5501:7 */ type PPOWER_PLATFORM_INFORMATION = uintptr /* winnt.h:5501:34 */ type BATTERY_REPORTING_SCALE = struct { FGranularity DWORD FCapacity DWORD } /* winnt.h:5520:7 */ type PBATTERY_REPORTING_SCALE = uintptr /* winnt.h:5520:31 */ type PPM_WMI_LEGACY_PERFSTATE = struct { FFrequency DWORD FFlags DWORD FPercentFrequency DWORD } /* winnt.h:5526:7 */ type PPPM_WMI_LEGACY_PERFSTATE = uintptr /* winnt.h:5526:32 */ type PPM_WMI_IDLE_STATE = struct { FLatency DWORD FPower DWORD FTimeCheck DWORD FPromotePercent BYTE FDemotePercent BYTE FStateType BYTE FReserved BYTE FStateFlags DWORD FContext DWORD FIdleHandler DWORD FReserved1 DWORD } /* winnt.h:5540:7 */ type PPPM_WMI_IDLE_STATE = uintptr /* winnt.h:5540:26 */ type PPM_WMI_IDLE_STATES = struct { FType DWORD FCount DWORD FTargetState DWORD FOldState DWORD FTargetProcessors DWORD64 FState [1]PPM_WMI_IDLE_STATE } /* winnt.h:5549:7 */ type PPPM_WMI_IDLE_STATES = uintptr /* winnt.h:5549:27 */ type PPM_WMI_IDLE_STATES_EX = struct { FType DWORD FCount DWORD FTargetState DWORD FOldState DWORD FTargetProcessors PVOID FState [1]PPM_WMI_IDLE_STATE } /* winnt.h:5558:7 */ type PPPM_WMI_IDLE_STATES_EX = uintptr /* winnt.h:5558:30 */ type PPM_WMI_PERF_STATE = struct { FFrequency DWORD FPower DWORD FPercentFrequency BYTE FIncreaseLevel BYTE FDecreaseLevel BYTE FType BYTE FIncreaseTime DWORD FDecreaseTime DWORD _ [4]byte FControl DWORD64 FStatus DWORD64 FHitCount DWORD FReserved1 DWORD FReserved2 DWORD64 FReserved3 DWORD64 } /* winnt.h:5575:7 */ type PPPM_WMI_PERF_STATE = uintptr /* winnt.h:5575:26 */ type PPM_WMI_PERF_STATES = struct { FCount DWORD FMaxFrequency DWORD FCurrentState DWORD FMaxPerfState DWORD FMinPerfState DWORD FLowestPerfState DWORD FThermalConstraint DWORD FBusyAdjThreshold BYTE FPolicyType BYTE FType BYTE FReserved BYTE FTimerInterval DWORD _ [4]byte FTargetProcessors DWORD64 FPStateHandler DWORD FPStateContext DWORD FTStateHandler DWORD FTStateContext DWORD FFeedbackHandler DWORD FReserved1 DWORD FReserved2 DWORD64 FState [1]PPM_WMI_PERF_STATE } /* winnt.h:5599:7 */ type PPPM_WMI_PERF_STATES = uintptr /* winnt.h:5599:27 */ type PPM_WMI_PERF_STATES_EX = struct { FCount DWORD FMaxFrequency DWORD FCurrentState DWORD FMaxPerfState DWORD FMinPerfState DWORD FLowestPerfState DWORD FThermalConstraint DWORD FBusyAdjThreshold BYTE FPolicyType BYTE FType BYTE FReserved BYTE FTimerInterval DWORD _ [4]byte FTargetProcessors PVOID FPStateHandler DWORD FPStateContext DWORD FTStateHandler DWORD FTStateContext DWORD FFeedbackHandler DWORD FReserved1 DWORD FReserved2 DWORD64 FState [1]PPM_WMI_PERF_STATE } /* winnt.h:5623:7 */ type PPPM_WMI_PERF_STATES_EX = uintptr /* winnt.h:5623:30 */ type PPM_IDLE_STATE_ACCOUNTING = struct { FIdleTransitions DWORD FFailedTransitions DWORD FInvalidBucketIndex DWORD _ [4]byte FTotalTime DWORD64 FIdleTimeBuckets [6]DWORD } /* winnt.h:5634:7 */ type PPPM_IDLE_STATE_ACCOUNTING = uintptr /* winnt.h:5634:33 */ type PPM_IDLE_ACCOUNTING = struct { FStateCount DWORD FTotalTransitions DWORD FResetCount DWORD _ [4]byte FStartTime DWORD64 FState [1]PPM_IDLE_STATE_ACCOUNTING } /* winnt.h:5642:7 */ type PPPM_IDLE_ACCOUNTING = uintptr /* winnt.h:5642:27 */ type PPM_IDLE_STATE_BUCKET_EX = struct { FTotalTimeUs DWORD64 FMinTimeUs DWORD FMaxTimeUs DWORD FCount DWORD _ [4]byte } /* winnt.h:5649:7 */ type PPPM_IDLE_STATE_BUCKET_EX = uintptr /* winnt.h:5649:32 */ type PPM_IDLE_STATE_ACCOUNTING_EX = struct { FTotalTime DWORD64 FIdleTransitions DWORD FFailedTransitions DWORD FInvalidBucketIndex DWORD FMinTimeUs DWORD FMaxTimeUs DWORD FCancelledTransitions DWORD FIdleTimeBuckets [16]PPM_IDLE_STATE_BUCKET_EX } /* winnt.h:5660:7 */ type PPPM_IDLE_STATE_ACCOUNTING_EX = uintptr /* winnt.h:5660:36 */ type PPM_IDLE_ACCOUNTING_EX = struct { FStateCount DWORD FTotalTransitions DWORD FResetCount DWORD FAbortCount DWORD FStartTime DWORD64 FState [1]PPM_IDLE_STATE_ACCOUNTING_EX } /* winnt.h:5669:7 */ type PPPM_IDLE_ACCOUNTING_EX = uintptr /* winnt.h:5669:30 */ type PPM_PERFSTATE_EVENT = struct { FState DWORD FStatus DWORD FLatency DWORD FSpeed DWORD FProcessor DWORD } /* winnt.h:5713:7 */ type PPPM_PERFSTATE_EVENT = uintptr /* winnt.h:5713:27 */ type PPM_PERFSTATE_DOMAIN_EVENT = struct { FState DWORD FLatency DWORD FSpeed DWORD _ [4]byte FProcessors DWORD64 } /* winnt.h:5720:7 */ type PPPM_PERFSTATE_DOMAIN_EVENT = uintptr /* winnt.h:5720:34 */ type PPM_IDLESTATE_EVENT = struct { FNewState DWORD FOldState DWORD FProcessors DWORD64 } /* winnt.h:5726:7 */ type PPPM_IDLESTATE_EVENT = uintptr /* winnt.h:5726:27 */ type PPM_THERMALCHANGE_EVENT = struct { FThermalConstraint DWORD _ [4]byte FProcessors DWORD64 } /* winnt.h:5731:7 */ type PPPM_THERMALCHANGE_EVENT = uintptr /* winnt.h:5731:31 */ type PPM_THERMAL_POLICY_EVENT = struct { FMode BYTE _ [7]byte FProcessors DWORD64 } /* winnt.h:5735:7 */ type PPPM_THERMAL_POLICY_EVENT = uintptr /* winnt.h:5735:32 */ type POWER_ACTION_POLICY = struct { FAction POWER_ACTION FFlags DWORD FEventCode DWORD } /* winnt.h:5752:7 */ type PPOWER_ACTION_POLICY = uintptr /* winnt.h:5752:27 */ type PROCESSOR_IDLESTATE_INFO = struct { FTimeCheck DWORD FDemotePercent BYTE FPromotePercent BYTE FSpare [2]BYTE } /* winnt.h:5787:7 */ type PPROCESSOR_IDLESTATE_INFO = uintptr /* winnt.h:5787:32 */ type SYSTEM_POWER_LEVEL = struct { FEnable BOOLEAN FSpare [3]BYTE FBatteryLevel DWORD FPowerPolicy POWER_ACTION_POLICY FMinSystemState SYSTEM_POWER_STATE } /* winnt.h:5795:7 */ type PSYSTEM_POWER_LEVEL = uintptr /* winnt.h:5795:26 */ type _SYSTEM_POWER_POLICY = struct { FRevision DWORD FPowerButton POWER_ACTION_POLICY FSleepButton POWER_ACTION_POLICY FLidClose POWER_ACTION_POLICY FLidOpenWake SYSTEM_POWER_STATE FReserved DWORD FIdle POWER_ACTION_POLICY FIdleTimeout DWORD FIdleSensitivity BYTE FDynamicThrottle BYTE FSpare2 [2]BYTE FMinSleep SYSTEM_POWER_STATE FMaxSleep SYSTEM_POWER_STATE FReducedLatencySleep SYSTEM_POWER_STATE FWinLogonFlags DWORD FSpare3 DWORD FDozeS4Timeout DWORD FBroadcastCapacityResolution DWORD FDischargePolicy [4]SYSTEM_POWER_LEVEL FVideoTimeout DWORD FVideoDimDisplay BOOLEAN _ [3]byte FVideoReserved [3]DWORD FSpindownTimeout DWORD FOptimizeForPower BOOLEAN FFanThrottleTolerance BYTE FForcedThrottle BYTE FMinThrottle BYTE FOverThrottled POWER_ACTION_POLICY } /* winnt.h:5797:13 */ type SYSTEM_POWER_POLICY = _SYSTEM_POWER_POLICY /* winnt.h:5826:7 */ type PSYSTEM_POWER_POLICY = uintptr /* winnt.h:5826:27 */ type PROCESSOR_IDLESTATE_POLICY = struct { FRevision WORD FFlags struct{ FAsWORD WORD } FPolicyCount DWORD FPolicy [3]PROCESSOR_IDLESTATE_INFO } /* winnt.h:5846:7 */ type PPROCESSOR_IDLESTATE_POLICY = uintptr /* winnt.h:5846:34 */ type _PROCESSOR_POWER_POLICY_INFO = struct { FTimeCheck DWORD FDemoteLimit DWORD FPromoteLimit DWORD FDemotePercent BYTE FPromotePercent BYTE FSpare [2]BYTE FAllowDemotion uint32 /* DWORD AllowDemotion: 1, DWORD AllowPromotion: 1, DWORD Reserved: 30 */ } /* winnt.h:5848:13 */ type PROCESSOR_POWER_POLICY_INFO = _PROCESSOR_POWER_POLICY_INFO /* winnt.h:5858:7 */ type PPROCESSOR_POWER_POLICY_INFO = uintptr /* winnt.h:5858:35 */ type _PROCESSOR_POWER_POLICY = struct { FRevision DWORD FDynamicThrottle BYTE FSpare [3]BYTE FDisableCStates uint32 /* DWORD DisableCStates: 1, DWORD Reserved: 31 */ _ [4]byte FPolicyCount DWORD FPolicy [3]PROCESSOR_POWER_POLICY_INFO } /* winnt.h:5860:13 */ type PROCESSOR_POWER_POLICY = _PROCESSOR_POWER_POLICY /* winnt.h:5868:7 */ type PPROCESSOR_POWER_POLICY = uintptr /* winnt.h:5868:30 */ type PROCESSOR_PERFSTATE_POLICY = struct { FRevision DWORD FMaxThrottle BYTE FMinThrottle BYTE FBusyAdjThreshold BYTE Fu struct{ FSpare BYTE } FTimeCheck DWORD FIncreaseTime DWORD FDecreaseTime DWORD FIncreasePercent DWORD FDecreasePercent DWORD } /* winnt.h:5892:7 */ type PPROCESSOR_PERFSTATE_POLICY = uintptr /* winnt.h:5892:34 */ type _ADMINISTRATOR_POWER_POLICY = struct { FMinSleep SYSTEM_POWER_STATE FMaxSleep SYSTEM_POWER_STATE FMinVideoTimeout DWORD FMaxVideoTimeout DWORD FMinSpindownTimeout DWORD FMaxSpindownTimeout DWORD } /* winnt.h:5894:13 */ type ADMINISTRATOR_POWER_POLICY = _ADMINISTRATOR_POWER_POLICY /* winnt.h:5901:7 */ type PADMINISTRATOR_POWER_POLICY = uintptr /* winnt.h:5901:34 */ type SYSTEM_POWER_CAPABILITIES = struct { FPowerButtonPresent BOOLEAN FSleepButtonPresent BOOLEAN FLidPresent BOOLEAN FSystemS1 BOOLEAN FSystemS2 BOOLEAN FSystemS3 BOOLEAN FSystemS4 BOOLEAN FSystemS5 BOOLEAN FHiberFilePresent BOOLEAN FFullWake BOOLEAN FVideoDimPresent BOOLEAN FApmPresent BOOLEAN FUpsPresent BOOLEAN FThermalControl BOOLEAN FProcessorThrottle BOOLEAN FProcessorMinThrottle BYTE FProcessorMaxThrottle BYTE FFastSystemS4 BOOLEAN Fspare2 [3]BYTE FDiskSpinDown BOOLEAN Fspare3 [8]BYTE FSystemBatteriesPresent BOOLEAN FBatteriesAreShortTerm BOOLEAN FBatteryScale [3]BATTERY_REPORTING_SCALE FAcOnLineWake SYSTEM_POWER_STATE FSoftLidWake SYSTEM_POWER_STATE FRtcWake SYSTEM_POWER_STATE FMinDeviceWakeState SYSTEM_POWER_STATE FDefaultLowLatencyWake SYSTEM_POWER_STATE } /* winnt.h:5933:7 */ type PSYSTEM_POWER_CAPABILITIES = uintptr /* winnt.h:5933:33 */ type SYSTEM_BATTERY_STATE = struct { FAcOnLine BOOLEAN FBatteryPresent BOOLEAN FCharging BOOLEAN FDischarging BOOLEAN FSpare1 [4]BOOLEAN FMaxCapacity DWORD FRemainingCapacity DWORD FRate DWORD FEstimatedTime DWORD FDefaultAlert1 DWORD FDefaultAlert2 DWORD } /* winnt.h:5947:7 */ type PSYSTEM_BATTERY_STATE = uintptr /* winnt.h:5947:28 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_DOS_HEADER = struct { Fe_magic WORD Fe_cblp WORD Fe_cp WORD Fe_crlc WORD Fe_cparhdr WORD Fe_minalloc WORD Fe_maxalloc WORD Fe_ss WORD Fe_sp WORD Fe_csum WORD Fe_ip WORD Fe_cs WORD Fe_lfarlc WORD Fe_ovno WORD Fe_res [4]WORD Fe_oemid WORD Fe_oeminfo WORD Fe_res2 [10]WORD Fe_lfanew LONG } /* winnt.h:5959:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_DOS_HEADER = _IMAGE_DOS_HEADER /* winnt.h:5979:7 */ type PIMAGE_DOS_HEADER = uintptr /* winnt.h:5979:24 */ type _IMAGE_OS2_HEADER = struct { Fne_magic WORD Fne_ver CHAR Fne_rev CHAR Fne_enttab WORD Fne_cbenttab WORD Fne_crc LONG Fne_flags WORD Fne_autodata WORD Fne_heap WORD Fne_stack WORD Fne_csip LONG Fne_sssp LONG Fne_cseg WORD Fne_cmod WORD Fne_cbnrestab WORD Fne_segtab WORD Fne_rsrctab WORD Fne_restab WORD Fne_modtab WORD Fne_imptab WORD Fne_nrestab LONG Fne_cmovent WORD Fne_align WORD Fne_cres WORD Fne_exetyp BYTE Fne_flagsothers BYTE Fne_pretthunks WORD Fne_psegrefbytes WORD Fne_swaparea WORD Fne_expver WORD } /* winnt.h:5981:13 */ type IMAGE_OS2_HEADER = _IMAGE_OS2_HEADER /* winnt.h:6012:7 */ type PIMAGE_OS2_HEADER = uintptr /* winnt.h:6012:24 */ type _IMAGE_VXD_HEADER = struct { Fe32_magic WORD Fe32_border BYTE Fe32_worder BYTE Fe32_level DWORD Fe32_cpu WORD Fe32_os WORD Fe32_ver DWORD Fe32_mflags DWORD Fe32_mpages DWORD Fe32_startobj DWORD Fe32_eip DWORD Fe32_stackobj DWORD Fe32_esp DWORD Fe32_pagesize DWORD Fe32_lastpagesize DWORD Fe32_fixupsize DWORD Fe32_fixupsum DWORD Fe32_ldrsize DWORD Fe32_ldrsum DWORD Fe32_objtab DWORD Fe32_objcnt DWORD Fe32_objmap DWORD Fe32_itermap DWORD Fe32_rsrctab DWORD Fe32_rsrccnt DWORD Fe32_restab DWORD Fe32_enttab DWORD Fe32_dirtab DWORD Fe32_dircnt DWORD Fe32_fpagetab DWORD Fe32_frectab DWORD Fe32_impmod DWORD Fe32_impmodcnt DWORD Fe32_impproc DWORD Fe32_pagesum DWORD Fe32_datapage DWORD Fe32_preload DWORD Fe32_nrestab DWORD Fe32_cbnrestab DWORD Fe32_nressum DWORD Fe32_autodata DWORD Fe32_debuginfo DWORD Fe32_debuglen DWORD Fe32_instpreload DWORD Fe32_instdemand DWORD Fe32_heapsize DWORD Fe32_res3 [12]BYTE Fe32_winresoff DWORD Fe32_winreslen DWORD Fe32_devid WORD Fe32_ddkver WORD } /* winnt.h:6014:13 */ type IMAGE_VXD_HEADER = _IMAGE_VXD_HEADER /* winnt.h:6066:7 */ type PIMAGE_VXD_HEADER = uintptr /* winnt.h:6066:24 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_FILE_HEADER = struct { FMachine WORD FNumberOfSections WORD FTimeDateStamp DWORD FPointerToSymbolTable DWORD FNumberOfSymbols DWORD FSizeOfOptionalHeader WORD FCharacteristics WORD } /* winnt.h:6070:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_FILE_HEADER = _IMAGE_FILE_HEADER /* winnt.h:6078:7 */ type PIMAGE_FILE_HEADER = uintptr /* winnt.h:6078:25 */ type _IMAGE_DATA_DIRECTORY = struct { FVirtualAddress DWORD FSize DWORD } /* winnt.h:6131:13 */ type IMAGE_DATA_DIRECTORY = _IMAGE_DATA_DIRECTORY /* winnt.h:6134:7 */ type PIMAGE_DATA_DIRECTORY = uintptr /* winnt.h:6134:28 */ type _IMAGE_OPTIONAL_HEADER = struct { FMagic WORD FMajorLinkerVersion BYTE FMinorLinkerVersion BYTE FSizeOfCode DWORD FSizeOfInitializedData DWORD FSizeOfUninitializedData DWORD FAddressOfEntryPoint DWORD FBaseOfCode DWORD FBaseOfData DWORD FImageBase DWORD FSectionAlignment DWORD FFileAlignment DWORD FMajorOperatingSystemVersion WORD FMinorOperatingSystemVersion WORD FMajorImageVersion WORD FMinorImageVersion WORD FMajorSubsystemVersion WORD FMinorSubsystemVersion WORD FWin32VersionValue DWORD FSizeOfImage DWORD FSizeOfHeaders DWORD FCheckSum DWORD FSubsystem WORD FDllCharacteristics WORD FSizeOfStackReserve DWORD FSizeOfStackCommit DWORD FSizeOfHeapReserve DWORD FSizeOfHeapCommit DWORD FLoaderFlags DWORD FNumberOfRvaAndSizes DWORD FDataDirectory [16]IMAGE_DATA_DIRECTORY } /* winnt.h:6138:13 */ type IMAGE_OPTIONAL_HEADER32 = _IMAGE_OPTIONAL_HEADER /* winnt.h:6171:7 */ type PIMAGE_OPTIONAL_HEADER32 = uintptr /* winnt.h:6171:31 */ type _IMAGE_ROM_OPTIONAL_HEADER = struct { FMagic WORD FMajorLinkerVersion BYTE FMinorLinkerVersion BYTE FSizeOfCode DWORD FSizeOfInitializedData DWORD FSizeOfUninitializedData DWORD FAddressOfEntryPoint DWORD FBaseOfCode DWORD FBaseOfData DWORD FBaseOfBss DWORD FGprMask DWORD FCprMask [4]DWORD FGpValue DWORD } /* winnt.h:6173:13 */ type IMAGE_ROM_OPTIONAL_HEADER = _IMAGE_ROM_OPTIONAL_HEADER /* winnt.h:6187:7 */ type PIMAGE_ROM_OPTIONAL_HEADER = uintptr /* winnt.h:6187:33 */ type _IMAGE_OPTIONAL_HEADER64 = struct { FMagic WORD FMajorLinkerVersion BYTE FMinorLinkerVersion BYTE FSizeOfCode DWORD FSizeOfInitializedData DWORD FSizeOfUninitializedData DWORD FAddressOfEntryPoint DWORD FBaseOfCode DWORD FImageBase ULONGLONG FSectionAlignment DWORD FFileAlignment DWORD FMajorOperatingSystemVersion WORD FMinorOperatingSystemVersion WORD FMajorImageVersion WORD FMinorImageVersion WORD FMajorSubsystemVersion WORD FMinorSubsystemVersion WORD FWin32VersionValue DWORD FSizeOfImage DWORD FSizeOfHeaders DWORD FCheckSum DWORD FSubsystem WORD FDllCharacteristics WORD FSizeOfStackReserve ULONGLONG FSizeOfStackCommit ULONGLONG FSizeOfHeapReserve ULONGLONG FSizeOfHeapCommit ULONGLONG FLoaderFlags DWORD FNumberOfRvaAndSizes DWORD FDataDirectory [16]IMAGE_DATA_DIRECTORY } /* winnt.h:6189:13 */ type IMAGE_OPTIONAL_HEADER64 = _IMAGE_OPTIONAL_HEADER64 /* winnt.h:6220:7 */ type PIMAGE_OPTIONAL_HEADER64 = uintptr /* winnt.h:6220:31 */ type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER64 /* winnt.h:6232:37 */ type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER64 /* winnt.h:6233:38 */ type _IMAGE_NT_HEADERS64 = struct { FSignature DWORD FFileHeader IMAGE_FILE_HEADER FOptionalHeader IMAGE_OPTIONAL_HEADER64 } /* winnt.h:6243:13 */ type IMAGE_NT_HEADERS64 = _IMAGE_NT_HEADERS64 /* winnt.h:6247:7 */ type PIMAGE_NT_HEADERS64 = uintptr /* winnt.h:6247:26 */ type _IMAGE_NT_HEADERS = struct { FSignature DWORD FFileHeader IMAGE_FILE_HEADER FOptionalHeader IMAGE_OPTIONAL_HEADER32 } /* winnt.h:6249:13 */ type IMAGE_NT_HEADERS32 = _IMAGE_NT_HEADERS /* winnt.h:6253:7 */ type PIMAGE_NT_HEADERS32 = uintptr /* winnt.h:6253:26 */ type _IMAGE_ROM_HEADERS = struct { FFileHeader IMAGE_FILE_HEADER FOptionalHeader IMAGE_ROM_OPTIONAL_HEADER } /* winnt.h:6255:13 */ type IMAGE_ROM_HEADERS = _IMAGE_ROM_HEADERS /* winnt.h:6258:7 */ type PIMAGE_ROM_HEADERS = uintptr /* winnt.h:6258:25 */ type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS64 /* winnt.h:6261:32 */ type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS64 /* winnt.h:6262:33 */ type ANON_OBJECT_HEADER1 = struct { FSig1 WORD FSig2 WORD FVersion WORD FMachine WORD FTimeDateStamp DWORD FClassID CLSID FSizeOfData DWORD } /* winnt.h:6313:13 */ type ANON_OBJECT_HEADER = ANON_OBJECT_HEADER1 /* winnt.h:6321:7 */ type ANON_OBJECT_HEADER_V21 = struct { FSig1 WORD FSig2 WORD FVersion WORD FMachine WORD FTimeDateStamp DWORD FClassID CLSID FSizeOfData DWORD FFlags DWORD FMetaDataSize DWORD FMetaDataOffset DWORD } /* winnt.h:6323:13 */ type ANON_OBJECT_HEADER_V2 = ANON_OBJECT_HEADER_V21 /* winnt.h:6334:7 */ type ANON_OBJECT_HEADER_BIGOBJ1 = struct { FSig1 WORD FSig2 WORD FVersion WORD FMachine WORD FTimeDateStamp DWORD FClassID CLSID FSizeOfData DWORD FFlags DWORD FMetaDataSize DWORD FMetaDataOffset DWORD FNumberOfSections DWORD FPointerToSymbolTable DWORD FNumberOfSymbols DWORD } /* winnt.h:6336:13 */ type ANON_OBJECT_HEADER_BIGOBJ = ANON_OBJECT_HEADER_BIGOBJ1 /* winnt.h:6350:7 */ type _IMAGE_SECTION_HEADER = struct { FName [8]BYTE FMisc struct{ FPhysicalAddress DWORD } FVirtualAddress DWORD FSizeOfRawData DWORD FPointerToRawData DWORD FPointerToRelocations DWORD FPointerToLinenumbers DWORD FNumberOfRelocations WORD FNumberOfLinenumbers WORD FCharacteristics DWORD } /* winnt.h:6354:13 */ type IMAGE_SECTION_HEADER = _IMAGE_SECTION_HEADER /* winnt.h:6368:7 */ type PIMAGE_SECTION_HEADER = uintptr /* winnt.h:6368:28 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_SYMBOL = struct { FN struct { _ [0]uint32 FShortName [8]BYTE } FValue DWORD FSectionNumber SHORT FType WORD FStorageClass BYTE FNumberOfAuxSymbols BYTE _ [2]byte } /* winnt.h:6418:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_SYMBOL = _IMAGE_SYMBOL /* winnt.h:6432:7 */ type PIMAGE_SYMBOL = uintptr /* winnt.h:6433:36 */ type _IMAGE_SYMBOL_EX = struct { FN struct { _ [0]uint32 FShortName [8]BYTE } FValue DWORD FSectionNumber LONG FType WORD FStorageClass BYTE FNumberOfAuxSymbols BYTE } /* winnt.h:6437:13 */ type IMAGE_SYMBOL_EX = _IMAGE_SYMBOL_EX /* winnt.h:6451:7 */ type PIMAGE_SYMBOL_EX = uintptr /* winnt.h:6451:33 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_AUX_SYMBOL_TOKEN_DEF1 = struct { FbAuxType BYTE FbReserved BYTE _ [2]byte FSymbolTableIndex DWORD FrgbReserved [12]BYTE } /* winnt.h:6544:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_AUX_SYMBOL_TOKEN_DEF = IMAGE_AUX_SYMBOL_TOKEN_DEF1 /* winnt.h:6549:7 */ type PIMAGE_AUX_SYMBOL_TOKEN_DEF = uintptr /* winnt.h:6549:44 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_AUX_SYMBOL = struct { FSym struct { FTagIndex DWORD FMisc struct { _ [0]uint32 FLnSz struct { FLinenumber WORD FSize WORD } } FFcnAry struct { FFunction struct { FPointerToLinenumber DWORD FPointerToNextFunction DWORD } } FTvIndex WORD _ [2]byte } } /* winnt.h:6552:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_AUX_SYMBOL = _IMAGE_AUX_SYMBOL /* winnt.h:6589:7 */ type PIMAGE_AUX_SYMBOL = uintptr /* winnt.h:6589:34 */ type _IMAGE_AUX_SYMBOL_EX = struct { FSym struct { FWeakDefaultSymIndex DWORD FWeakSearchType DWORD FrgbReserved [12]BYTE } _ [4]byte } /* winnt.h:6591:13 */ type IMAGE_AUX_SYMBOL_EX = _IMAGE_AUX_SYMBOL_EX /* winnt.h:6619:7 */ type PIMAGE_AUX_SYMBOL_EX = uintptr /* winnt.h:6619:37 */ type IMAGE_AUX_SYMBOL_TYPE = uint32 /* winnt.h:6625:7 */ type _IMAGE_RELOCATION = struct { Fu struct{ FVirtualAddress DWORD } FSymbolTableIndex DWORD FType WORD _ [2]byte } /* winnt.h:6639:13 */ type IMAGE_RELOCATION = _IMAGE_RELOCATION /* winnt.h:6646:7 */ type PIMAGE_RELOCATION = uintptr /* winnt.h:6647:40 */ type _IMAGE_LINENUMBER = struct { FType struct{ FSymbolTableIndex DWORD } FLinenumber WORD _ [2]byte } /* winnt.h:6977:13 */ type IMAGE_LINENUMBER = _IMAGE_LINENUMBER /* winnt.h:6983:7 */ type PIMAGE_LINENUMBER = uintptr /* winnt.h:6984:40 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_BASE_RELOCATION = struct { FVirtualAddress DWORD FSizeOfBlock DWORD } /* winnt.h:6990:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_BASE_RELOCATION = _IMAGE_BASE_RELOCATION /* winnt.h:6993:7 */ type PIMAGE_BASE_RELOCATION = uintptr /* winnt.h:6994:45 */ type _IMAGE_ARCHIVE_MEMBER_HEADER = struct { FName [16]BYTE FDate [12]BYTE FUserID [6]BYTE FGroupID [6]BYTE FMode [8]BYTE FSize [10]BYTE FEndHeader [2]BYTE } /* winnt.h:7017:13 */ type IMAGE_ARCHIVE_MEMBER_HEADER = _IMAGE_ARCHIVE_MEMBER_HEADER /* winnt.h:7025:7 */ type PIMAGE_ARCHIVE_MEMBER_HEADER = uintptr /* winnt.h:7025:35 */ type _IMAGE_EXPORT_DIRECTORY = struct { FCharacteristics DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FName DWORD FBase DWORD FNumberOfFunctions DWORD FNumberOfNames DWORD FAddressOfFunctions DWORD FAddressOfNames DWORD FAddressOfNameOrdinals DWORD } /* winnt.h:7029:13 */ type IMAGE_EXPORT_DIRECTORY = _IMAGE_EXPORT_DIRECTORY /* winnt.h:7041:7 */ type PIMAGE_EXPORT_DIRECTORY = uintptr /* winnt.h:7041:30 */ type _IMAGE_IMPORT_BY_NAME = struct { FHint WORD FName [1]CHAR _ [1]byte } /* winnt.h:7043:13 */ type IMAGE_IMPORT_BY_NAME = _IMAGE_IMPORT_BY_NAME /* winnt.h:7046:7 */ type PIMAGE_IMPORT_BY_NAME = uintptr /* winnt.h:7046:28 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_THUNK_DATA64 = struct { Fu1 struct{ FForwarderString ULONGLONG } } /* winnt.h:7050:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_THUNK_DATA64 = _IMAGE_THUNK_DATA64 /* winnt.h:7057:7 */ type PIMAGE_THUNK_DATA64 = uintptr /* winnt.h:7058:32 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IMAGE_THUNK_DATA32 = struct { Fu1 struct{ FForwarderString DWORD } } /* winnt.h:7062:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMAGE_THUNK_DATA32 = _IMAGE_THUNK_DATA32 /* winnt.h:7069:7 */ type PIMAGE_THUNK_DATA32 = uintptr /* winnt.h:7070:32 */ type PIMAGE_TLS_CALLBACK = uintptr /* winnt.h:7079:18 */ type _IMAGE_TLS_DIRECTORY64 = struct { FStartAddressOfRawData ULONGLONG FEndAddressOfRawData ULONGLONG FAddressOfIndex ULONGLONG FAddressOfCallBacks ULONGLONG FSizeOfZeroFill DWORD FCharacteristics DWORD } /* winnt.h:7081:13 */ type IMAGE_TLS_DIRECTORY64 = _IMAGE_TLS_DIRECTORY64 /* winnt.h:7088:7 */ type PIMAGE_TLS_DIRECTORY64 = uintptr /* winnt.h:7089:35 */ type _IMAGE_TLS_DIRECTORY32 = struct { FStartAddressOfRawData DWORD FEndAddressOfRawData DWORD FAddressOfIndex DWORD FAddressOfCallBacks DWORD FSizeOfZeroFill DWORD FCharacteristics DWORD } /* winnt.h:7091:13 */ type IMAGE_TLS_DIRECTORY32 = _IMAGE_TLS_DIRECTORY32 /* winnt.h:7098:7 */ type PIMAGE_TLS_DIRECTORY32 = uintptr /* winnt.h:7099:35 */ type IMAGE_THUNK_DATA = IMAGE_THUNK_DATA64 /* winnt.h:7104:32 */ type PIMAGE_THUNK_DATA = PIMAGE_THUNK_DATA64 /* winnt.h:7105:33 */ type IMAGE_TLS_DIRECTORY = IMAGE_TLS_DIRECTORY64 /* winnt.h:7107:35 */ type PIMAGE_TLS_DIRECTORY = PIMAGE_TLS_DIRECTORY64 /* winnt.h:7108:36 */ type _IMAGE_IMPORT_DESCRIPTOR = struct { Fu struct{ FCharacteristics DWORD } FTimeDateStamp DWORD FForwarderChain DWORD FName DWORD FFirstThunk DWORD } /* winnt.h:7119:13 */ type IMAGE_IMPORT_DESCRIPTOR = _IMAGE_IMPORT_DESCRIPTOR /* winnt.h:7129:7 */ type PIMAGE_IMPORT_DESCRIPTOR = uintptr /* winnt.h:7130:47 */ type _IMAGE_BOUND_IMPORT_DESCRIPTOR = struct { FTimeDateStamp DWORD FOffsetModuleName WORD FNumberOfModuleForwarderRefs WORD } /* winnt.h:7132:13 */ type IMAGE_BOUND_IMPORT_DESCRIPTOR = _IMAGE_BOUND_IMPORT_DESCRIPTOR /* winnt.h:7136:7 */ type PIMAGE_BOUND_IMPORT_DESCRIPTOR = uintptr /* winnt.h:7136:37 */ type _IMAGE_BOUND_FORWARDER_REF = struct { FTimeDateStamp DWORD FOffsetModuleName WORD FReserved WORD } /* winnt.h:7138:13 */ type IMAGE_BOUND_FORWARDER_REF = _IMAGE_BOUND_FORWARDER_REF /* winnt.h:7142:7 */ type PIMAGE_BOUND_FORWARDER_REF = uintptr /* winnt.h:7142:33 */ type _IMAGE_DELAYLOAD_DESCRIPTOR = struct { FAttributes struct{ FAllAttributes DWORD } FDllNameRVA DWORD FModuleHandleRVA DWORD FImportAddressTableRVA DWORD FImportNameTableRVA DWORD FBoundImportAddressTableRVA DWORD FUnloadInformationTableRVA DWORD FTimeDateStamp DWORD } /* winnt.h:7144:13 */ type IMAGE_DELAYLOAD_DESCRIPTOR = _IMAGE_DELAYLOAD_DESCRIPTOR /* winnt.h:7159:7 */ type PIMAGE_DELAYLOAD_DESCRIPTOR = uintptr /* winnt.h:7159:34 */ type PCIMAGE_DELAYLOAD_DESCRIPTOR = uintptr /* winnt.h:7160:46 */ type _IMAGE_RESOURCE_DIRECTORY = struct { FCharacteristics DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FNumberOfNamedEntries WORD FNumberOfIdEntries WORD } /* winnt.h:7162:13 */ type IMAGE_RESOURCE_DIRECTORY = _IMAGE_RESOURCE_DIRECTORY /* winnt.h:7169:7 */ type PIMAGE_RESOURCE_DIRECTORY = uintptr /* winnt.h:7169:32 */ type _IMAGE_RESOURCE_DIRECTORY_ENTRY = struct { Fu struct { Fs struct { _ [0]uint32 FNameOffset uint32 /* DWORD NameOffset: 31, DWORD NameIsString: 1 */ } } Fu2 struct{ FOffsetToData DWORD } } /* winnt.h:7174:13 */ type IMAGE_RESOURCE_DIRECTORY_ENTRY = _IMAGE_RESOURCE_DIRECTORY_ENTRY /* winnt.h:7190:7 */ type PIMAGE_RESOURCE_DIRECTORY_ENTRY = uintptr /* winnt.h:7190:38 */ type _IMAGE_RESOURCE_DIRECTORY_STRING = struct { FLength WORD FNameString [1]CHAR _ [1]byte } /* winnt.h:7192:13 */ type IMAGE_RESOURCE_DIRECTORY_STRING = _IMAGE_RESOURCE_DIRECTORY_STRING /* winnt.h:7195:7 */ type PIMAGE_RESOURCE_DIRECTORY_STRING = uintptr /* winnt.h:7195:39 */ type _IMAGE_RESOURCE_DIR_STRING_U = struct { FLength WORD FNameString [1]WCHAR } /* winnt.h:7197:13 */ type IMAGE_RESOURCE_DIR_STRING_U = _IMAGE_RESOURCE_DIR_STRING_U /* winnt.h:7200:7 */ type PIMAGE_RESOURCE_DIR_STRING_U = uintptr /* winnt.h:7200:35 */ type _IMAGE_RESOURCE_DATA_ENTRY = struct { FOffsetToData DWORD FSize DWORD FCodePage DWORD FReserved DWORD } /* winnt.h:7202:13 */ type IMAGE_RESOURCE_DATA_ENTRY = _IMAGE_RESOURCE_DATA_ENTRY /* winnt.h:7207:7 */ type PIMAGE_RESOURCE_DATA_ENTRY = uintptr /* winnt.h:7207:33 */ type IMAGE_LOAD_CONFIG_DIRECTORY32 = struct { FSize DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FGlobalFlagsClear DWORD FGlobalFlagsSet DWORD FCriticalSectionDefaultTimeout DWORD FDeCommitFreeBlockThreshold DWORD FDeCommitTotalFreeThreshold DWORD FLockPrefixTable DWORD FMaximumAllocationSize DWORD FVirtualMemoryThreshold DWORD FProcessHeapFlags DWORD FProcessAffinityMask DWORD FCSDVersion WORD FReserved1 WORD FEditList DWORD FSecurityCookie DWORD FSEHandlerTable DWORD FSEHandlerCount DWORD } /* winnt.h:7230:7 */ type PIMAGE_LOAD_CONFIG_DIRECTORY32 = uintptr /* winnt.h:7230:37 */ type IMAGE_LOAD_CONFIG_DIRECTORY64 = struct { FSize DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FGlobalFlagsClear DWORD FGlobalFlagsSet DWORD FCriticalSectionDefaultTimeout DWORD FDeCommitFreeBlockThreshold ULONGLONG FDeCommitTotalFreeThreshold ULONGLONG FLockPrefixTable ULONGLONG FMaximumAllocationSize ULONGLONG FVirtualMemoryThreshold ULONGLONG FProcessAffinityMask ULONGLONG FProcessHeapFlags DWORD FCSDVersion WORD FReserved1 WORD FEditList ULONGLONG FSecurityCookie ULONGLONG FSEHandlerTable ULONGLONG FSEHandlerCount ULONGLONG } /* winnt.h:7253:7 */ type PIMAGE_LOAD_CONFIG_DIRECTORY64 = uintptr /* winnt.h:7253:37 */ type IMAGE_LOAD_CONFIG_DIRECTORY = IMAGE_LOAD_CONFIG_DIRECTORY64 /* winnt.h:7256:43 */ type PIMAGE_LOAD_CONFIG_DIRECTORY = PIMAGE_LOAD_CONFIG_DIRECTORY64 /* winnt.h:7257:44 */ type _IMAGE_CE_RUNTIME_FUNCTION_ENTRY = struct { FFuncStart DWORD FPrologLen uint32 /* DWORD PrologLen: 8, DWORD FuncLen: 22, DWORD ThirtyTwoBit: 1, DWORD ExceptionFlag: 1 */ } /* winnt.h:7263:13 */ type IMAGE_CE_RUNTIME_FUNCTION_ENTRY = _IMAGE_CE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7269:7 */ type PIMAGE_CE_RUNTIME_FUNCTION_ENTRY = uintptr /* winnt.h:7269:39 */ type _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress ULONGLONG FEndAddress ULONGLONG FExceptionHandler ULONGLONG FHandlerData ULONGLONG FPrologEndAddress ULONGLONG } /* winnt.h:7271:13 */ type IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY /* winnt.h:7277:7 */ type PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = uintptr /* winnt.h:7277:44 */ type _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD FEndAddress DWORD FExceptionHandler DWORD FHandlerData DWORD FPrologEndAddress DWORD } /* winnt.h:7279:13 */ type IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY /* winnt.h:7285:7 */ type PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = uintptr /* winnt.h:7285:42 */ type _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD Fu struct{ FUnwindData DWORD } } /* winnt.h:7287:13 */ type IMAGE_ARM_RUNTIME_FUNCTION_ENTRY = _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY /* winnt.h:7303:7 */ type PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY = uintptr /* winnt.h:7303:40 */ type _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD Fu struct{ FUnwindData DWORD } } /* winnt.h:7305:13 */ type IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY /* winnt.h:7319:7 */ type PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = uintptr /* winnt.h:7319:42 */ type _IMAGE_RUNTIME_FUNCTION_ENTRY1 = struct { FBeginAddress DWORD FEndAddress DWORD Fu struct{ FUnwindInfoAddress DWORD } } /* winnt.h:7321:13 */ type _IMAGE_RUNTIME_FUNCTION_ENTRY = _IMAGE_RUNTIME_FUNCTION_ENTRY1 /* winnt.h:7328:7 */ type _PIMAGE_RUNTIME_FUNCTION_ENTRY = uintptr /* winnt.h:7328:37 */ type IMAGE_IA64_RUNTIME_FUNCTION_ENTRY = _IMAGE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7330:43 */ type PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY = _PIMAGE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7331:44 */ type IMAGE_RUNTIME_FUNCTION_ENTRY = _IMAGE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7345:43 */ type PIMAGE_RUNTIME_FUNCTION_ENTRY = _PIMAGE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7346:44 */ type _IMAGE_DEBUG_DIRECTORY = struct { FCharacteristics DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FType DWORD FSizeOfData DWORD FAddressOfRawData DWORD FPointerToRawData DWORD } /* winnt.h:7349:13 */ type IMAGE_DEBUG_DIRECTORY = _IMAGE_DEBUG_DIRECTORY /* winnt.h:7358:7 */ type PIMAGE_DEBUG_DIRECTORY = uintptr /* winnt.h:7358:29 */ type _IMAGE_COFF_SYMBOLS_HEADER = struct { FNumberOfSymbols DWORD FLvaToFirstSymbol DWORD FNumberOfLinenumbers DWORD FLvaToFirstLinenumber DWORD FRvaToFirstByteOfCode DWORD FRvaToLastByteOfCode DWORD FRvaToFirstByteOfData DWORD FRvaToLastByteOfData DWORD } /* winnt.h:7373:13 */ type IMAGE_COFF_SYMBOLS_HEADER = _IMAGE_COFF_SYMBOLS_HEADER /* winnt.h:7382:7 */ type PIMAGE_COFF_SYMBOLS_HEADER = uintptr /* winnt.h:7382:33 */ type _FPO_DATA = struct { FulOffStart DWORD FcbProcSize DWORD FcdwLocals DWORD FcdwParams WORD FcbProlog uint16 /* WORD cbProlog: 8, WORD cbRegs: 3, WORD fHasSEH: 1, WORD fUseBP: 1, WORD reserved: 1, WORD cbFrame: 2 */ } /* winnt.h:7389:13 */ type FPO_DATA = _FPO_DATA /* winnt.h:7400:7 */ type PFPO_DATA = uintptr /* winnt.h:7400:16 */ type _IMAGE_DEBUG_MISC = struct { FDataType DWORD FLength DWORD FUnicode BOOLEAN FReserved [3]BYTE FData [1]BYTE _ [3]byte } /* winnt.h:7405:13 */ type IMAGE_DEBUG_MISC = _IMAGE_DEBUG_MISC /* winnt.h:7411:7 */ type PIMAGE_DEBUG_MISC = uintptr /* winnt.h:7411:24 */ type _IMAGE_FUNCTION_ENTRY = struct { FStartingAddress DWORD FEndingAddress DWORD FEndOfPrologue DWORD } /* winnt.h:7413:13 */ type IMAGE_FUNCTION_ENTRY = _IMAGE_FUNCTION_ENTRY /* winnt.h:7417:7 */ type PIMAGE_FUNCTION_ENTRY = uintptr /* winnt.h:7417:28 */ type _IMAGE_FUNCTION_ENTRY64 = struct { FStartingAddress ULONGLONG FEndingAddress ULONGLONG Fu struct{ FEndOfPrologue ULONGLONG } } /* winnt.h:7419:13 */ type IMAGE_FUNCTION_ENTRY64 = _IMAGE_FUNCTION_ENTRY64 /* winnt.h:7426:7 */ type PIMAGE_FUNCTION_ENTRY64 = uintptr /* winnt.h:7426:30 */ type _IMAGE_SEPARATE_DEBUG_HEADER = struct { FSignature WORD FFlags WORD FMachine WORD FCharacteristics WORD FTimeDateStamp DWORD FCheckSum DWORD FImageBase DWORD FSizeOfImage DWORD FNumberOfSections DWORD FExportedNamesSize DWORD FDebugDirectorySize DWORD FSectionAlignment DWORD FReserved [2]DWORD } /* winnt.h:7428:13 */ type IMAGE_SEPARATE_DEBUG_HEADER = _IMAGE_SEPARATE_DEBUG_HEADER /* winnt.h:7442:7 */ type PIMAGE_SEPARATE_DEBUG_HEADER = uintptr /* winnt.h:7442:35 */ type _NON_PAGED_DEBUG_INFO = struct { FSignature WORD FFlags WORD FSize DWORD FMachine WORD FCharacteristics WORD FTimeDateStamp DWORD FCheckSum DWORD FSizeOfImage DWORD FImageBase ULONGLONG } /* winnt.h:7444:13 */ type NON_PAGED_DEBUG_INFO = _NON_PAGED_DEBUG_INFO /* winnt.h:7454:7 */ type PNON_PAGED_DEBUG_INFO = uintptr /* winnt.h:7454:28 */ type _ImageArchitectureHeader = struct { FAmaskValue uint32 /* unsigned AmaskValue: 1, int Adummy1: 7, unsigned AmaskShift: 8, int Adummy2: 16 */ _ [4]byte FFirstEntryRVA DWORD } /* winnt.h:7462:13 */ type IMAGE_ARCHITECTURE_HEADER = _ImageArchitectureHeader /* winnt.h:7468:7 */ type PIMAGE_ARCHITECTURE_HEADER = uintptr /* winnt.h:7468:33 */ type _ImageArchitectureEntry = struct { FFixupInstRVA DWORD FNewInst DWORD } /* winnt.h:7470:13 */ type IMAGE_ARCHITECTURE_ENTRY = _ImageArchitectureEntry /* winnt.h:7473:7 */ type PIMAGE_ARCHITECTURE_ENTRY = uintptr /* winnt.h:7473:32 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMPORT_OBJECT_HEADER1 = struct { FSig1 WORD FSig2 WORD FVersion WORD FMachine WORD FTimeDateStamp DWORD FSizeOfData DWORD F__16 struct{ FOrdinal WORD } FType uint16 /* WORD Type: 2, WORD NameType: 3, WORD Reserved: 11 */ } /* winnt.h:7478:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IMPORT_OBJECT_HEADER = IMPORT_OBJECT_HEADER1 /* winnt.h:7492:7 */ type IMPORT_OBJECT_TYPE = uint32 /* winnt.h:7496:7 */ type IMPORT_OBJECT_NAME_TYPE = uint32 /* winnt.h:7500:7 */ type ReplacesCorHdrNumericDefines = uint32 /* winnt.h:7511:7 */ type IMAGE_COR20_HEADER1 = struct { Fcb DWORD FMajorRuntimeVersion WORD FMinorRuntimeVersion WORD FMetaData IMAGE_DATA_DIRECTORY FFlags DWORD Fu struct{ FEntryPointToken DWORD } FResources IMAGE_DATA_DIRECTORY FStrongNameSignature IMAGE_DATA_DIRECTORY FCodeManagerTable IMAGE_DATA_DIRECTORY FVTableFixups IMAGE_DATA_DIRECTORY FExportAddressTableJumps IMAGE_DATA_DIRECTORY FManagedNativeHeader IMAGE_DATA_DIRECTORY } /* winnt.h:7513:13 */ type IMAGE_COR20_HEADER = IMAGE_COR20_HEADER1 /* winnt.h:7529:7 */ type PIMAGE_COR20_HEADER = uintptr /* winnt.h:7529:26 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _SLIST_ENTRY = struct{ FNext uintptr } /* winnt.h:7607:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type SLIST_ENTRY = _SLIST_ENTRY /* winnt.h:7609:7 */ type PSLIST_ENTRY = uintptr /* winnt.h:7609:19 */ type _SLIST_HEADER = struct { Fs struct { FAlignment ULONGLONG FRegion ULONGLONG } } /* winnt.h:7611:13 */ type SLIST_HEADER = _SLIST_HEADER /* winnt.h:7632:7 */ type PSLIST_HEADER = uintptr /* winnt.h:7632:20 */ type _RTL_RUN_ONCE = struct{ FPtr PVOID } /* winnt.h:7661:9 */ type RTL_RUN_ONCE = _RTL_RUN_ONCE /* winnt.h:7661:45 */ type PRTL_RUN_ONCE = uintptr /* winnt.h:7661:59 */ type PRTL_RUN_ONCE_INIT_FN = uintptr /* winnt.h:7662:15 */ type _RTL_BARRIER = struct { FReserved1 DWORD FReserved2 DWORD FReserved3 [2]ULONG_PTR FReserved4 DWORD FReserved5 DWORD } /* winnt.h:7671:11 */ type RTL_BARRIER = _RTL_BARRIER /* winnt.h:7677:5 */ type PRTL_BARRIER = uintptr /* winnt.h:7677:17 */ type _MESSAGE_RESOURCE_ENTRY = struct { FLength WORD FFlags WORD FText [1]BYTE _ [1]byte } /* winnt.h:7780:13 */ type MESSAGE_RESOURCE_ENTRY = _MESSAGE_RESOURCE_ENTRY /* winnt.h:7784:7 */ type PMESSAGE_RESOURCE_ENTRY = uintptr /* winnt.h:7784:30 */ type _MESSAGE_RESOURCE_BLOCK = struct { FLowId DWORD FHighId DWORD FOffsetToEntries DWORD } /* winnt.h:7802:13 */ type MESSAGE_RESOURCE_BLOCK = _MESSAGE_RESOURCE_BLOCK /* winnt.h:7806:7 */ type PMESSAGE_RESOURCE_BLOCK = uintptr /* winnt.h:7806:30 */ type _MESSAGE_RESOURCE_DATA = struct { FNumberOfBlocks DWORD FBlocks [1]MESSAGE_RESOURCE_BLOCK } /* winnt.h:7808:13 */ type MESSAGE_RESOURCE_DATA = _MESSAGE_RESOURCE_DATA /* winnt.h:7811:7 */ type PMESSAGE_RESOURCE_DATA = uintptr /* winnt.h:7811:29 */ type _OSVERSIONINFOA = struct { FdwOSVersionInfoSize DWORD FdwMajorVersion DWORD FdwMinorVersion DWORD FdwBuildNumber DWORD FdwPlatformId DWORD FszCSDVersion [128]CHAR } /* winnt.h:7813:13 */ type OSVERSIONINFOA = _OSVERSIONINFOA /* winnt.h:7820:7 */ type POSVERSIONINFOA = uintptr /* winnt.h:7820:22 */ type LPOSVERSIONINFOA = uintptr /* winnt.h:7820:39 */ type _OSVERSIONINFOW = struct { FdwOSVersionInfoSize DWORD FdwMajorVersion DWORD FdwMinorVersion DWORD FdwBuildNumber DWORD FdwPlatformId DWORD FszCSDVersion [128]WCHAR } /* winnt.h:7822:13 */ type OSVERSIONINFOW = _OSVERSIONINFOW /* winnt.h:7829:7 */ type POSVERSIONINFOW = uintptr /* winnt.h:7829:22 */ type LPOSVERSIONINFOW = uintptr /* winnt.h:7829:39 */ type RTL_OSVERSIONINFOW = _OSVERSIONINFOW /* winnt.h:7829:57 */ type PRTL_OSVERSIONINFOW = uintptr /* winnt.h:7829:76 */ type OSVERSIONINFO = OSVERSIONINFOA /* winnt.h:7831:5 */ type POSVERSIONINFO = POSVERSIONINFOA /* winnt.h:7832:5 */ type LPOSVERSIONINFO = LPOSVERSIONINFOA /* winnt.h:7833:5 */ type _OSVERSIONINFOEXA = struct { FdwOSVersionInfoSize DWORD FdwMajorVersion DWORD FdwMinorVersion DWORD FdwBuildNumber DWORD FdwPlatformId DWORD FszCSDVersion [128]CHAR FwServicePackMajor WORD FwServicePackMinor WORD FwSuiteMask WORD FwProductType BYTE FwReserved BYTE } /* winnt.h:7835:13 */ type OSVERSIONINFOEXA = _OSVERSIONINFOEXA /* winnt.h:7847:7 */ type POSVERSIONINFOEXA = uintptr /* winnt.h:7847:24 */ type LPOSVERSIONINFOEXA = uintptr /* winnt.h:7847:43 */ type _OSVERSIONINFOEXW = struct { FdwOSVersionInfoSize DWORD FdwMajorVersion DWORD FdwMinorVersion DWORD FdwBuildNumber DWORD FdwPlatformId DWORD FszCSDVersion [128]WCHAR FwServicePackMajor WORD FwServicePackMinor WORD FwSuiteMask WORD FwProductType BYTE FwReserved BYTE } /* winnt.h:7849:13 */ type OSVERSIONINFOEXW = _OSVERSIONINFOEXW /* winnt.h:7861:7 */ type POSVERSIONINFOEXW = uintptr /* winnt.h:7861:24 */ type LPOSVERSIONINFOEXW = uintptr /* winnt.h:7861:43 */ type RTL_OSVERSIONINFOEXW = _OSVERSIONINFOEXW /* winnt.h:7861:63 */ type PRTL_OSVERSIONINFOEXW = uintptr /* winnt.h:7861:84 */ type OSVERSIONINFOEX = OSVERSIONINFOEXA /* winnt.h:7863:5 */ type POSVERSIONINFOEX = POSVERSIONINFOEXA /* winnt.h:7864:5 */ type LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA /* winnt.h:7865:5 */ type RTL_UMS_THREAD_INFO_CLASS = uint32 /* winnt.h:7918:7 */ type PRTL_UMS_THREAD_INFO_CLASS = uintptr /* winnt.h:7918:33 */ type RTL_UMS_SCHEDULER_REASON = uint32 /* winnt.h:7924:7 */ type PRTL_UMS_SCHEDULER_REASON = uintptr /* winnt.h:7924:32 */ type PRTL_UMS_SCHEDULER_ENTRY_POINT = uintptr /* winnt.h:7927:43 */ type _RTL_CRITICAL_SECTION_DEBUG = struct { FType WORD FCreatorBackTraceIndex WORD _ [4]byte FCriticalSection uintptr FProcessLocksList LIST_ENTRY FEntryCount DWORD FContentionCount DWORD FFlags DWORD FCreatorBackTraceIndexHigh WORD FSpareWORD WORD } /* winnt.h:7947:13 */ type _RTL_CRITICAL_SECTION = struct { FDebugInfo PRTL_CRITICAL_SECTION_DEBUG FLockCount LONG FRecursionCount LONG FOwningThread HANDLE FLockSemaphore HANDLE FSpinCount ULONG_PTR } /* winnt.h:7947:13 */ type RTL_CRITICAL_SECTION_DEBUG = _RTL_CRITICAL_SECTION_DEBUG /* winnt.h:7957:7 */ type PRTL_CRITICAL_SECTION_DEBUG = uintptr /* winnt.h:7957:34 */ type RTL_RESOURCE_DEBUG = _RTL_CRITICAL_SECTION_DEBUG /* winnt.h:7957:63 */ type PRTL_RESOURCE_DEBUG = uintptr /* winnt.h:7957:82 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RTL_CRITICAL_SECTION = _RTL_CRITICAL_SECTION /* winnt.h:7981:7 */ type PRTL_CRITICAL_SECTION = uintptr /* winnt.h:7981:28 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _RTL_SRWLOCK = struct{ FPtr PVOID } /* winnt.h:7984:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RTL_SRWLOCK = _RTL_SRWLOCK /* winnt.h:7984:48 */ type PRTL_SRWLOCK = uintptr /* winnt.h:7984:60 */ type _RTL_CONDITION_VARIABLE = struct{ FPtr PVOID } /* winnt.h:7985:13 */ type RTL_CONDITION_VARIABLE = _RTL_CONDITION_VARIABLE /* winnt.h:7985:59 */ type PRTL_CONDITION_VARIABLE = uintptr /* winnt.h:7985:82 */ type PAPCFUNC = uintptr /* winnt.h:7992:18 */ type PVECTORED_EXCEPTION_HANDLER = uintptr /* winnt.h:7993:18 */ type HEAP_INFORMATION_CLASS = uint32 /* winnt.h:7998:7 */ type WORKERCALLBACKFUNC = uintptr /* winnt.h:8000:18 */ type APC_CALLBACK_FUNCTION = uintptr /* winnt.h:8001:18 */ type WAITORTIMERCALLBACKFUNC = uintptr /* winnt.h:8002:18 */ type WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC /* winnt.h:8003:37 */ type PFLS_CALLBACK_FUNCTION = uintptr /* winnt.h:8004:18 */ type PSECURE_MEMORY_CACHE_CALLBACK = uintptr /* winnt.h:8005:21 */ type ACTIVATION_CONTEXT_INFO_CLASS = uint32 /* winnt.h:8034:7 */ type ACTCTX_REQUESTED_RUN_LEVEL = uint32 /* winnt.h:8042:7 */ type ACTCTX_COMPATIBILITY_ELEMENT_TYPE = uint32 /* winnt.h:8048:7 */ type _ACTIVATION_CONTEXT_QUERY_INDEX = struct { FulAssemblyIndex DWORD FulFileIndexInAssembly DWORD } /* winnt.h:8050:13 */ type ACTIVATION_CONTEXT_QUERY_INDEX = _ACTIVATION_CONTEXT_QUERY_INDEX /* winnt.h:8053:7 */ type PACTIVATION_CONTEXT_QUERY_INDEX = uintptr /* winnt.h:8053:38 */ type _ASSEMBLY_FILE_DETAILED_INFORMATION = struct { FulFlags DWORD FulFilenameLength DWORD FulPathLength DWORD _ [4]byte FlpFileName PCWSTR FlpFilePath PCWSTR } /* winnt.h:8055:13 */ type ASSEMBLY_FILE_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION /* winnt.h:8061:7 */ type PASSEMBLY_FILE_DETAILED_INFORMATION = uintptr /* winnt.h:8061:42 */ type _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = struct { FulFlags DWORD FulEncodedAssemblyIdentityLength DWORD FulManifestPathType DWORD FulManifestPathLength DWORD FliManifestLastWriteTime LARGE_INTEGER FulPolicyPathType DWORD FulPolicyPathLength DWORD FliPolicyLastWriteTime LARGE_INTEGER FulMetadataSatelliteRosterIndex DWORD FulManifestVersionMajor DWORD FulManifestVersionMinor DWORD FulPolicyVersionMajor DWORD FulPolicyVersionMinor DWORD FulAssemblyDirectoryNameLength DWORD FlpAssemblyEncodedAssemblyIdentity PCWSTR FlpAssemblyManifestPath PCWSTR FlpAssemblyPolicyPath PCWSTR FlpAssemblyDirectoryName PCWSTR FulFileCount DWORD _ [4]byte } /* winnt.h:8063:13 */ type ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION /* winnt.h:8083:7 */ type PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = uintptr /* winnt.h:8083:56 */ type _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = struct { FulFlags DWORD FRunLevel ACTCTX_REQUESTED_RUN_LEVEL FUiAccess DWORD } /* winnt.h:8085:13 */ type ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION /* winnt.h:8089:7 */ type PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = uintptr /* winnt.h:8089:48 */ type _COMPATIBILITY_CONTEXT_ELEMENT = struct { FId GUID FType ACTCTX_COMPATIBILITY_ELEMENT_TYPE } /* winnt.h:8091:13 */ type COMPATIBILITY_CONTEXT_ELEMENT = _COMPATIBILITY_CONTEXT_ELEMENT /* winnt.h:8094:7 */ type PCOMPATIBILITY_CONTEXT_ELEMENT = uintptr /* winnt.h:8094:37 */ //Vista: {e2011457-1546-43c5-a5fe-008deee3d3f0} //Seven: {35138b9a-5d96-4fbd-8e2d-a2440225f93a} type _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = struct { _ [0]uint32 FElementCount DWORD } /* winnt.h:8098:13 */ //Vista: {e2011457-1546-43c5-a5fe-008deee3d3f0} //Seven: {35138b9a-5d96-4fbd-8e2d-a2440225f93a} type ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION /* winnt.h:8101:7 */ type PACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = uintptr /* winnt.h:8101:52 */ type _SUPPORTED_OS_INFO = struct { FOsCount WORD FMitigationExist WORD FOsList [4]WORD } /* winnt.h:8105:13 */ type SUPPORTED_OS_INFO = _SUPPORTED_OS_INFO /* winnt.h:8109:7 */ type PSUPPORTED_OS_INFO = uintptr /* winnt.h:8109:25 */ type _ACTIVATION_CONTEXT_DETAILED_INFORMATION = struct { FdwFlags DWORD FulFormatVersion DWORD FulAssemblyCount DWORD FulRootManifestPathType DWORD FulRootManifestPathChars DWORD FulRootConfigurationPathType DWORD FulRootConfigurationPathChars DWORD FulAppDirPathType DWORD FulAppDirPathChars DWORD _ [4]byte FlpRootManifestPath PCWSTR FlpRootConfigurationPath PCWSTR FlpAppDirPath PCWSTR } /* winnt.h:8111:13 */ type ACTIVATION_CONTEXT_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_DETAILED_INFORMATION /* winnt.h:8124:7 */ type PACTIVATION_CONTEXT_DETAILED_INFORMATION = uintptr /* winnt.h:8124:47 */ type PCACTIVATION_CONTEXT_QUERY_INDEX = uintptr /* winnt.h:8126:58 */ type PCASSEMBLY_FILE_DETAILED_INFORMATION = uintptr /* winnt.h:8127:54 */ type PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = uintptr /* winnt.h:8128:76 */ type PCACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = uintptr /* winnt.h:8129:68 */ type PCCOMPATIBILITY_CONTEXT_ELEMENT = uintptr /* winnt.h:8130:57 */ type PCACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = uintptr /* winnt.h:8131:72 */ type PCACTIVATION_CONTEXT_DETAILED_INFORMATION = uintptr /* winnt.h:8132:67 */ type RTL_VERIFIER_DLL_LOAD_CALLBACK = uintptr /* winnt.h:8149:18 */ type RTL_VERIFIER_DLL_UNLOAD_CALLBACK = uintptr /* winnt.h:8150:18 */ type RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK = uintptr /* winnt.h:8151:18 */ type _RTL_VERIFIER_THUNK_DESCRIPTOR = struct { FThunkName PCHAR FThunkOldAddress PVOID FThunkNewAddress PVOID } /* winnt.h:8153:13 */ type RTL_VERIFIER_THUNK_DESCRIPTOR = _RTL_VERIFIER_THUNK_DESCRIPTOR /* winnt.h:8157:7 */ type PRTL_VERIFIER_THUNK_DESCRIPTOR = uintptr /* winnt.h:8157:37 */ type _RTL_VERIFIER_DLL_DESCRIPTOR = struct { FDllName PWCHAR FDllFlags DWORD _ [4]byte FDllAddress PVOID FDllThunks PRTL_VERIFIER_THUNK_DESCRIPTOR } /* winnt.h:8159:13 */ type RTL_VERIFIER_DLL_DESCRIPTOR = _RTL_VERIFIER_DLL_DESCRIPTOR /* winnt.h:8164:7 */ type PRTL_VERIFIER_DLL_DESCRIPTOR = uintptr /* winnt.h:8164:35 */ type _RTL_VERIFIER_PROVIDER_DESCRIPTOR = struct { FLength DWORD _ [4]byte FProviderDlls PRTL_VERIFIER_DLL_DESCRIPTOR FProviderDllLoadCallback RTL_VERIFIER_DLL_LOAD_CALLBACK FProviderDllUnloadCallback RTL_VERIFIER_DLL_UNLOAD_CALLBACK FVerifierImage PWSTR FVerifierFlags DWORD FVerifierDebug DWORD FRtlpGetStackTraceAddress PVOID FRtlpDebugPageHeapCreate PVOID FRtlpDebugPageHeapDestroy PVOID FProviderNtdllHeapFreeCallback RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK } /* winnt.h:8166:13 */ type RTL_VERIFIER_PROVIDER_DESCRIPTOR = _RTL_VERIFIER_PROVIDER_DESCRIPTOR /* winnt.h:8178:7 */ type PRTL_VERIFIER_PROVIDER_DESCRIPTOR = uintptr /* winnt.h:8178:40 */ type _HARDWARE_COUNTER_DATA = struct { FType HARDWARE_COUNTER_TYPE FReserved DWORD FValue DWORD64 } /* winnt.h:8291:13 */ type HARDWARE_COUNTER_DATA = _HARDWARE_COUNTER_DATA /* winnt.h:8295:7 */ type PHARDWARE_COUNTER_DATA = uintptr /* winnt.h:8295:29 */ type _PERFORMANCE_DATA = struct { FSize WORD FVersion BYTE FHwCountersCount BYTE FContextSwitchCount DWORD FWaitReasonBitMap DWORD64 FCycleTime DWORD64 FRetryCount DWORD FReserved DWORD FHwCounters [16]HARDWARE_COUNTER_DATA } /* winnt.h:8297:13 */ type PERFORMANCE_DATA = _PERFORMANCE_DATA /* winnt.h:8307:7 */ type PPERFORMANCE_DATA = uintptr /* winnt.h:8307:24 */ type _EVENTLOGRECORD = struct { FLength DWORD FReserved DWORD FRecordNumber DWORD FTimeGenerated DWORD FTimeWritten DWORD FEventID DWORD FEventType WORD FNumStrings WORD FEventCategory WORD FReservedFlags WORD FClosingRecordNumber DWORD FStringOffset DWORD FUserSidLength DWORD FUserSidOffset DWORD FDataLength DWORD FDataOffset DWORD } /* winnt.h:8338:13 */ type EVENTLOGRECORD = _EVENTLOGRECORD /* winnt.h:8355:7 */ type PEVENTLOGRECORD = uintptr /* winnt.h:8355:22 */ type _EVENTSFORLOGFILE = struct { _ [0]uint32 FulSize DWORD FszLogicalLogFile [256]WCHAR FulNumRecords DWORD } /* winnt.h:8359:13 */ type EVENTSFORLOGFILE = _EVENTSFORLOGFILE /* winnt.h:8364:7 */ type PEVENTSFORLOGFILE = uintptr /* winnt.h:8364:24 */ type _PACKEDEVENTINFO = struct { _ [0]uint32 FulSize DWORD FulNumEventsForLogFile DWORD } /* winnt.h:8366:13 */ type PACKEDEVENTINFO = _PACKEDEVENTINFO /* winnt.h:8370:7 */ type PPACKEDEVENTINFO = uintptr /* winnt.h:8370:23 */ type SERVICE_NODE_TYPE = uint32 /* winnt.h:8468:7 */ type SERVICE_LOAD_TYPE = uint32 /* winnt.h:8473:7 */ type SERVICE_ERROR_TYPE = uint32 /* winnt.h:8477:7 */ type _TAPE_ERASE = struct { FType DWORD FImmediate BOOLEAN _ [3]byte } /* winnt.h:8496:13 */ type TAPE_ERASE = _TAPE_ERASE /* winnt.h:8499:7 */ type PTAPE_ERASE = uintptr /* winnt.h:8499:18 */ type _TAPE_PREPARE = struct { FOperation DWORD FImmediate BOOLEAN _ [3]byte } /* winnt.h:8508:13 */ type TAPE_PREPARE = _TAPE_PREPARE /* winnt.h:8511:7 */ type PTAPE_PREPARE = uintptr /* winnt.h:8511:20 */ type _TAPE_WRITE_MARKS = struct { FType DWORD FCount DWORD FImmediate BOOLEAN _ [3]byte } /* winnt.h:8518:13 */ type TAPE_WRITE_MARKS = _TAPE_WRITE_MARKS /* winnt.h:8522:7 */ type PTAPE_WRITE_MARKS = uintptr /* winnt.h:8522:24 */ type _TAPE_GET_POSITION = struct { FType DWORD FPartition DWORD FOffset LARGE_INTEGER } /* winnt.h:8528:13 */ type TAPE_GET_POSITION = _TAPE_GET_POSITION /* winnt.h:8532:7 */ type PTAPE_GET_POSITION = uintptr /* winnt.h:8532:25 */ type _TAPE_SET_POSITION = struct { FMethod DWORD FPartition DWORD FOffset LARGE_INTEGER FImmediate BOOLEAN _ [7]byte } /* winnt.h:8545:13 */ type TAPE_SET_POSITION = _TAPE_SET_POSITION /* winnt.h:8550:7 */ type PTAPE_SET_POSITION = uintptr /* winnt.h:8550:25 */ type _TAPE_GET_DRIVE_PARAMETERS = struct { FECC BOOLEAN FCompression BOOLEAN FDataPadding BOOLEAN FReportSetmarks BOOLEAN FDefaultBlockSize DWORD FMaximumBlockSize DWORD FMinimumBlockSize DWORD FMaximumPartitionCount DWORD FFeaturesLow DWORD FFeaturesHigh DWORD FEOTWarningZoneSize DWORD } /* winnt.h:8619:13 */ type TAPE_GET_DRIVE_PARAMETERS = _TAPE_GET_DRIVE_PARAMETERS /* winnt.h:8631:7 */ type PTAPE_GET_DRIVE_PARAMETERS = uintptr /* winnt.h:8631:33 */ type _TAPE_SET_DRIVE_PARAMETERS = struct { FECC BOOLEAN FCompression BOOLEAN FDataPadding BOOLEAN FReportSetmarks BOOLEAN FEOTWarningZoneSize DWORD } /* winnt.h:8633:13 */ type TAPE_SET_DRIVE_PARAMETERS = _TAPE_SET_DRIVE_PARAMETERS /* winnt.h:8639:7 */ type PTAPE_SET_DRIVE_PARAMETERS = uintptr /* winnt.h:8639:33 */ type _TAPE_GET_MEDIA_PARAMETERS = struct { FCapacity LARGE_INTEGER FRemaining LARGE_INTEGER FBlockSize DWORD FPartitionCount DWORD FWriteProtected BOOLEAN _ [7]byte } /* winnt.h:8641:13 */ type TAPE_GET_MEDIA_PARAMETERS = _TAPE_GET_MEDIA_PARAMETERS /* winnt.h:8647:7 */ type PTAPE_GET_MEDIA_PARAMETERS = uintptr /* winnt.h:8647:33 */ type _TAPE_SET_MEDIA_PARAMETERS = struct{ FBlockSize DWORD } /* winnt.h:8649:13 */ type TAPE_SET_MEDIA_PARAMETERS = _TAPE_SET_MEDIA_PARAMETERS /* winnt.h:8651:7 */ type PTAPE_SET_MEDIA_PARAMETERS = uintptr /* winnt.h:8651:33 */ type _TAPE_CREATE_PARTITION = struct { FMethod DWORD FCount DWORD FSize DWORD } /* winnt.h:8657:13 */ type TAPE_CREATE_PARTITION = _TAPE_CREATE_PARTITION /* winnt.h:8661:7 */ type PTAPE_CREATE_PARTITION = uintptr /* winnt.h:8661:29 */ type _TAPE_WMI_OPERATIONS = struct { FMethod DWORD FDataBufferSize DWORD FDataBuffer PVOID } /* winnt.h:8669:13 */ type TAPE_WMI_OPERATIONS = _TAPE_WMI_OPERATIONS /* winnt.h:8673:7 */ type PTAPE_WMI_OPERATIONS = uintptr /* winnt.h:8673:27 */ type TAPE_DRIVE_PROBLEM_TYPE = uint32 /* winnt.h:8677:7 */ type TP_VERSION = DWORD /* winnt.h:8680:17 */ type PTP_VERSION = uintptr /* winnt.h:8680:28 */ type PTP_CALLBACK_INSTANCE = uintptr /* winnt.h:8681:61 */ type PTP_SIMPLE_CALLBACK = uintptr /* winnt.h:8682:16 */ type PTP_POOL = uintptr /* winnt.h:8683:35 */ type TP_CALLBACK_PRIORITY = uint32 /* winnt.h:8691:5 */ type _TP_POOL_STACK_INFORMATION = struct { FStackReserve SIZE_T FStackCommit SIZE_T } /* winnt.h:8693:11 */ type TP_POOL_STACK_INFORMATION = _TP_POOL_STACK_INFORMATION /* winnt.h:8696:5 */ type PTP_POOL_STACK_INFORMATION = uintptr /* winnt.h:8696:32 */ type PTP_CLEANUP_GROUP = uintptr /* winnt.h:8698:53 */ type PTP_CLEANUP_GROUP_CANCEL_CALLBACK = uintptr /* winnt.h:8699:16 */ type _TP_CALLBACK_ENVIRON_V1 = struct { FVersion TP_VERSION _ [4]byte FPool PTP_POOL FCleanupGroup PTP_CLEANUP_GROUP FCleanupGroupCancelCallback PTP_CLEANUP_GROUP_CANCEL_CALLBACK FRaceDll PVOID FActivationContext uintptr FFinalizationCallback PTP_SIMPLE_CALLBACK Fu struct{ FFlags DWORD } _ [4]byte } /* winnt.h:8723:11 */ type TP_CALLBACK_ENVIRON_V1 = _TP_CALLBACK_ENVIRON_V1 /* winnt.h:8739:5 */ type TP_CALLBACK_ENVIRON = TP_CALLBACK_ENVIRON_V1 /* winnt.h:8740:34 */ type PTP_CALLBACK_ENVIRON = uintptr /* winnt.h:8740:54 */ type PTP_WORK = uintptr /* winnt.h:8743:35 */ type PTP_WORK_CALLBACK = uintptr /* winnt.h:8744:16 */ type PTP_TIMER = uintptr /* winnt.h:8745:37 */ type PTP_TIMER_CALLBACK = uintptr /* winnt.h:8746:16 */ type TP_WAIT_RESULT = DWORD /* winnt.h:8747:17 */ type PTP_WAIT = uintptr /* winnt.h:8748:35 */ type PTP_WAIT_CALLBACK = uintptr /* winnt.h:8749:16 */ type PTP_IO = uintptr /* winnt.h:8750:31 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type CRM_PROTOCOL_ID = GUID /* ktmtypes.h:13:16 */ type PCRM_PROTOCOL_ID = uintptr /* ktmtypes.h:13:32 */ type NOTIFICATION_MASK = ULONG /* ktmtypes.h:38:17 */ type _TRANSACTION_NOTIFICATION = struct { FTransactionKey PVOID FTransactionNotification ULONG _ [4]byte FTmVirtualClock LARGE_INTEGER FArgumentLength ULONG _ [4]byte } /* ktmtypes.h:78:11 */ type TRANSACTION_NOTIFICATION = _TRANSACTION_NOTIFICATION /* ktmtypes.h:83:5 */ type PTRANSACTION_NOTIFICATION = uintptr /* ktmtypes.h:83:30 */ type _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = struct { FEnlistmentId GUID FUOW GUID } /* ktmtypes.h:85:11 */ type TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT /* ktmtypes.h:88:5 */ type PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = uintptr /* ktmtypes.h:88:48 */ type _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = struct { FTmIdentity GUID FFlags ULONG } /* ktmtypes.h:92:11 */ type TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT /* ktmtypes.h:95:5 */ type PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = uintptr /* ktmtypes.h:95:49 */ type SAVEPOINT_ID = ULONG /* ktmtypes.h:97:17 */ type PSAVEPOINT_ID = uintptr /* ktmtypes.h:97:30 */ type _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = struct{ FSavepointId SAVEPOINT_ID } /* ktmtypes.h:99:11 */ type TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT /* ktmtypes.h:101:5 */ type PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = uintptr /* ktmtypes.h:101:49 */ type _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = struct { FPropagationCookie ULONG FUOW GUID FTmIdentity GUID FBufferLength ULONG } /* ktmtypes.h:103:11 */ type TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT /* ktmtypes.h:108:5 */ type PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = uintptr /* ktmtypes.h:108:49 */ type _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = struct { FMarshalCookie ULONG FUOW GUID } /* ktmtypes.h:110:11 */ type TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT /* ktmtypes.h:113:5 */ type PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = uintptr /* ktmtypes.h:113:47 */ type TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT /* ktmtypes.h:115:55 */ type PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = uintptr /* ktmtypes.h:115:97 */ type _KCRM_MARSHAL_HEADER = struct { FVersionMajor ULONG FVersionMinor ULONG FNumProtocols ULONG FUnused ULONG } /* ktmtypes.h:123:11 */ type KCRM_MARSHAL_HEADER = _KCRM_MARSHAL_HEADER /* ktmtypes.h:128:5 */ type PKCRM_MARSHAL_HEADER = uintptr /* ktmtypes.h:128:25 */ type PRKCRM_MARSHAL_HEADER = uintptr /* ktmtypes.h:128:47 */ type _KCRM_TRANSACTION_BLOB = struct { FUOW GUID FTmIdentity GUID FIsolationLevel ULONG FIsolationFlags ULONG FTimeout ULONG FDescription [64]WCHAR } /* ktmtypes.h:130:11 */ type KCRM_TRANSACTION_BLOB = _KCRM_TRANSACTION_BLOB /* ktmtypes.h:137:5 */ type PKCRM_TRANSACTION_BLOB = uintptr /* ktmtypes.h:137:27 */ type PRKCRM_TRANSACTION_BLOB = uintptr /* ktmtypes.h:137:51 */ type _KCRM_PROTOCOL_BLOB = struct { FProtocolId CRM_PROTOCOL_ID FStaticInfoLength ULONG FTransactionIdInfoLength ULONG FUnused1 ULONG FUnused2 ULONG } /* ktmtypes.h:139:11 */ type KCRM_PROTOCOL_BLOB = _KCRM_PROTOCOL_BLOB /* ktmtypes.h:145:5 */ type PKCRM_PROTOCOL_BLOB = uintptr /* ktmtypes.h:145:24 */ type PRKCRM_PROTOCOL_BLOB = uintptr /* ktmtypes.h:145:45 */ type TRANSACTION_OUTCOME = uint32 /* winnt.h:8882:9 */ type TRANSACTION_STATE = uint32 /* winnt.h:8888:9 */ type _TRANSACTION_BASIC_INFORMATION = struct { FTransactionId GUID FState DWORD FOutcome DWORD } /* winnt.h:8890:15 */ type TRANSACTION_BASIC_INFORMATION = _TRANSACTION_BASIC_INFORMATION /* winnt.h:8894:9 */ type PTRANSACTION_BASIC_INFORMATION = uintptr /* winnt.h:8894:39 */ type _TRANSACTIONMANAGER_BASIC_INFORMATION = struct { FTmIdentity GUID FVirtualClock LARGE_INTEGER } /* winnt.h:8896:15 */ type TRANSACTIONMANAGER_BASIC_INFORMATION = _TRANSACTIONMANAGER_BASIC_INFORMATION /* winnt.h:8899:9 */ type PTRANSACTIONMANAGER_BASIC_INFORMATION = uintptr /* winnt.h:8899:46 */ type _TRANSACTIONMANAGER_LOG_INFORMATION = struct{ FLogIdentity GUID } /* winnt.h:8901:15 */ type TRANSACTIONMANAGER_LOG_INFORMATION = _TRANSACTIONMANAGER_LOG_INFORMATION /* winnt.h:8903:9 */ type PTRANSACTIONMANAGER_LOG_INFORMATION = uintptr /* winnt.h:8903:44 */ type _TRANSACTIONMANAGER_LOGPATH_INFORMATION = struct { FLogPathLength DWORD FLogPath [1]WCHAR _ [2]byte } /* winnt.h:8905:15 */ type TRANSACTIONMANAGER_LOGPATH_INFORMATION = _TRANSACTIONMANAGER_LOGPATH_INFORMATION /* winnt.h:8908:9 */ type PTRANSACTIONMANAGER_LOGPATH_INFORMATION = uintptr /* winnt.h:8908:48 */ type _TRANSACTIONMANAGER_RECOVERY_INFORMATION = struct{ FLastRecoveredLsn ULONGLONG } /* winnt.h:8910:15 */ type TRANSACTIONMANAGER_RECOVERY_INFORMATION = _TRANSACTIONMANAGER_RECOVERY_INFORMATION /* winnt.h:8912:9 */ type PTRANSACTIONMANAGER_RECOVERY_INFORMATION = uintptr /* winnt.h:8912:49 */ type _TRANSACTIONMANAGER_OLDEST_INFORMATION = struct{ FOldestTransactionGuid GUID } /* winnt.h:8914:15 */ type TRANSACTIONMANAGER_OLDEST_INFORMATION = _TRANSACTIONMANAGER_OLDEST_INFORMATION /* winnt.h:8916:9 */ type PTRANSACTIONMANAGER_OLDEST_INFORMATION = uintptr /* winnt.h:8916:47 */ type _TRANSACTION_PROPERTIES_INFORMATION = struct { FIsolationLevel DWORD FIsolationFlags DWORD FTimeout LARGE_INTEGER FOutcome DWORD FDescriptionLength DWORD FDescription [1]WCHAR _ [6]byte } /* winnt.h:8918:15 */ type TRANSACTION_PROPERTIES_INFORMATION = _TRANSACTION_PROPERTIES_INFORMATION /* winnt.h:8925:9 */ type PTRANSACTION_PROPERTIES_INFORMATION = uintptr /* winnt.h:8925:44 */ type _TRANSACTION_BIND_INFORMATION = struct{ FTmHandle HANDLE } /* winnt.h:8927:15 */ type TRANSACTION_BIND_INFORMATION = _TRANSACTION_BIND_INFORMATION /* winnt.h:8929:9 */ type PTRANSACTION_BIND_INFORMATION = uintptr /* winnt.h:8929:38 */ type _TRANSACTION_ENLISTMENT_PAIR = struct { FEnlistmentId GUID FResourceManagerId GUID } /* winnt.h:8931:15 */ type TRANSACTION_ENLISTMENT_PAIR = _TRANSACTION_ENLISTMENT_PAIR /* winnt.h:8934:9 */ type PTRANSACTION_ENLISTMENT_PAIR = uintptr /* winnt.h:8934:37 */ type _TRANSACTION_ENLISTMENTS_INFORMATION = struct { FNumberOfEnlistments DWORD FEnlistmentPair [1]TRANSACTION_ENLISTMENT_PAIR } /* winnt.h:8936:15 */ type TRANSACTION_ENLISTMENTS_INFORMATION = _TRANSACTION_ENLISTMENTS_INFORMATION /* winnt.h:8939:9 */ type PTRANSACTION_ENLISTMENTS_INFORMATION = uintptr /* winnt.h:8939:45 */ type _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = struct{ FSuperiorEnlistmentPair TRANSACTION_ENLISTMENT_PAIR } /* winnt.h:8941:15 */ type TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION /* winnt.h:8943:9 */ type PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = uintptr /* winnt.h:8943:53 */ type _RESOURCEMANAGER_BASIC_INFORMATION = struct { FResourceManagerId GUID FDescriptionLength DWORD FDescription [1]WCHAR _ [2]byte } /* winnt.h:8945:15 */ type RESOURCEMANAGER_BASIC_INFORMATION = _RESOURCEMANAGER_BASIC_INFORMATION /* winnt.h:8949:9 */ type PRESOURCEMANAGER_BASIC_INFORMATION = uintptr /* winnt.h:8949:43 */ type _RESOURCEMANAGER_COMPLETION_INFORMATION = struct { FIoCompletionPortHandle HANDLE FCompletionKey ULONG_PTR } /* winnt.h:8951:15 */ type RESOURCEMANAGER_COMPLETION_INFORMATION = _RESOURCEMANAGER_COMPLETION_INFORMATION /* winnt.h:8954:9 */ type PRESOURCEMANAGER_COMPLETION_INFORMATION = uintptr /* winnt.h:8954:48 */ type TRANSACTION_INFORMATION_CLASS = uint32 /* winnt.h:8963:9 */ type TRANSACTIONMANAGER_INFORMATION_CLASS = uint32 /* winnt.h:8972:9 */ type RESOURCEMANAGER_INFORMATION_CLASS = uint32 /* winnt.h:8977:9 */ type _ENLISTMENT_BASIC_INFORMATION = struct { FEnlistmentId GUID FTransactionId GUID FResourceManagerId GUID } /* winnt.h:8979:15 */ type ENLISTMENT_BASIC_INFORMATION = _ENLISTMENT_BASIC_INFORMATION /* winnt.h:8983:9 */ type PENLISTMENT_BASIC_INFORMATION = uintptr /* winnt.h:8983:38 */ type _ENLISTMENT_CRM_INFORMATION = struct { FCrmTransactionManagerId GUID FCrmResourceManagerId GUID FCrmEnlistmentId GUID } /* winnt.h:8985:15 */ type ENLISTMENT_CRM_INFORMATION = _ENLISTMENT_CRM_INFORMATION /* winnt.h:8989:9 */ type PENLISTMENT_CRM_INFORMATION = uintptr /* winnt.h:8989:36 */ type ENLISTMENT_INFORMATION_CLASS = uint32 /* winnt.h:8995:9 */ type _TRANSACTION_LIST_ENTRY = struct{ FUOW GUID } /* winnt.h:8997:15 */ type TRANSACTION_LIST_ENTRY = _TRANSACTION_LIST_ENTRY /* winnt.h:8999:9 */ type PTRANSACTION_LIST_ENTRY = uintptr /* winnt.h:8999:32 */ type _TRANSACTION_LIST_INFORMATION = struct { FNumberOfTransactions DWORD FTransactionInformation [1]TRANSACTION_LIST_ENTRY } /* winnt.h:9001:15 */ type TRANSACTION_LIST_INFORMATION = _TRANSACTION_LIST_INFORMATION /* winnt.h:9004:9 */ type PTRANSACTION_LIST_INFORMATION = uintptr /* winnt.h:9004:38 */ type KTMOBJECT_TYPE = uint32 /* winnt.h:9012:9 */ type PKTMOBJECT_TYPE = uintptr /* winnt.h:9012:24 */ type _KTMOBJECT_CURSOR = struct { FLastQuery GUID FObjectIdCount DWORD FObjectIds [1]GUID } /* winnt.h:9014:15 */ type KTMOBJECT_CURSOR = _KTMOBJECT_CURSOR /* winnt.h:9018:9 */ type PKTMOBJECT_CURSOR = uintptr /* winnt.h:9018:26 */ // Field Names From (See _fields_ section) // FIXME: Verify these against documentation // -- These documentation describes Win32 Constants and Structures in Python -- // Constants - http://packages.python.org/winappdbg/winappdbg.win32.context_i386-pysrc.html // WOW64_FLOATING_SAVE_AREA - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_FLOATING_SAVE_AREA-class.html // WOW64_CONTEXT - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_CONTEXT-class.html type _WOW64_FLOATING_SAVE_AREA = struct { FControlWord DWORD FStatusWord DWORD FTagWord DWORD FErrorOffset DWORD FErrorSelector DWORD FDataOffset DWORD FDataSelector DWORD FRegisterArea [80]BYTE FCr0NpxState DWORD } /* winnt.h:9055:9 */ // Field Names From (See _fields_ section) // FIXME: Verify these against documentation // -- These documentation describes Win32 Constants and Structures in Python -- // Constants - http://packages.python.org/winappdbg/winappdbg.win32.context_i386-pysrc.html // WOW64_FLOATING_SAVE_AREA - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_FLOATING_SAVE_AREA-class.html // WOW64_CONTEXT - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_CONTEXT-class.html type WOW64_FLOATING_SAVE_AREA = _WOW64_FLOATING_SAVE_AREA /* winnt.h:9065:3 */ type PWOW64_FLOATING_SAVE_AREA = uintptr /* winnt.h:9065:29 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _WOW64_CONTEXT = struct { FContextFlags DWORD FDr0 DWORD FDr1 DWORD FDr2 DWORD FDr3 DWORD FDr6 DWORD FDr7 DWORD FFloatSave WOW64_FLOATING_SAVE_AREA FSegGs DWORD FSegFs DWORD FSegEs DWORD FSegDs DWORD FEdi DWORD FEsi DWORD FEbx DWORD FEdx DWORD FEcx DWORD FEax DWORD FEbp DWORD FEip DWORD FSegCs DWORD FEFlags DWORD FEsp DWORD FSegSs DWORD FExtendedRegisters [512]BYTE } /* winnt.h:9068:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type WOW64_CONTEXT = _WOW64_CONTEXT /* winnt.h:9094:3 */ type PWOW64_CONTEXT = uintptr /* winnt.h:9094:18 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _WOW64_LDT_ENTRY = struct { FLimitLow WORD FBaseLow WORD FHighWord struct { _ [0]uint32 FBytes struct { FBaseMid BYTE FFlags1 BYTE FFlags2 BYTE FBaseHi BYTE } } } /* winnt.h:9097:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type WOW64_LDT_ENTRY = _WOW64_LDT_ENTRY /* winnt.h:9120:3 */ type PWOW64_LDT_ENTRY = uintptr /* winnt.h:9120:20 */ type _WOW64_DESCRIPTOR_TABLE_ENTRY = struct { FSelector DWORD FDescriptor WOW64_LDT_ENTRY } /* winnt.h:9122:13 */ type WOW64_DESCRIPTOR_TABLE_ENTRY = _WOW64_DESCRIPTOR_TABLE_ENTRY /* winnt.h:9125:7 */ type PWOW64_DESCRIPTOR_TABLE_ENTRY = uintptr /* winnt.h:9125:36 */ type WPARAM = UINT_PTR /* minwindef.h:166:20 */ type LPARAM = LONG_PTR /* minwindef.h:167:20 */ type LRESULT = LONG_PTR /* minwindef.h:168:20 */ type SPHANDLE = uintptr /* minwindef.h:189:18 */ type LPHANDLE = uintptr /* minwindef.h:190:18 */ type HGLOBAL = HANDLE /* minwindef.h:191:18 */ type HLOCAL = HANDLE /* minwindef.h:192:18 */ type GLOBALHANDLE = HANDLE /* minwindef.h:193:18 */ type LOCALHANDLE = HANDLE /* minwindef.h:194:18 */ type FARPROC = uintptr /* minwindef.h:196:19 */ type NEARPROC = uintptr /* minwindef.h:197:19 */ type PROC = uintptr /* minwindef.h:198:19 */ type ATOM = WORD /* minwindef.h:205:16 */ type HFILE = int32 /* minwindef.h:207:15 */ type HINSTANCE__ = struct{ Funused int32 } /* minwindef.h:208:3 */ type HINSTANCE = uintptr /* minwindef.h:208:3 */ type HKEY__ = struct{ Funused int32 } /* minwindef.h:209:3 */ type HKEY = uintptr /* minwindef.h:209:3 */ type PHKEY = uintptr /* minwindef.h:210:16 */ type HKL__ = struct{ Funused int32 } /* minwindef.h:211:3 */ type HKL = uintptr /* minwindef.h:211:3 */ type HLSURF__ = struct{ Funused int32 } /* minwindef.h:212:3 */ type HLSURF = uintptr /* minwindef.h:212:3 */ type HMETAFILE__ = struct{ Funused int32 } /* minwindef.h:213:3 */ type HMETAFILE = uintptr /* minwindef.h:213:3 */ type HMODULE = HINSTANCE /* minwindef.h:214:21 */ type HRGN__ = struct{ Funused int32 } /* minwindef.h:215:3 */ type HRGN = uintptr /* minwindef.h:215:3 */ type HRSRC__ = struct{ Funused int32 } /* minwindef.h:216:3 */ type HRSRC = uintptr /* minwindef.h:216:3 */ type HSPRITE__ = struct{ Funused int32 } /* minwindef.h:217:3 */ type HSPRITE = uintptr /* minwindef.h:217:3 */ type HSTR__ = struct{ Funused int32 } /* minwindef.h:218:3 */ type HSTR = uintptr /* minwindef.h:218:3 */ type HTASK__ = struct{ Funused int32 } /* minwindef.h:219:3 */ type HTASK = uintptr /* minwindef.h:219:3 */ type HWINSTA__ = struct{ Funused int32 } /* minwindef.h:220:3 */ type HWINSTA = uintptr /* minwindef.h:220:3 */ type _FILETIME = struct { FdwLowDateTime DWORD FdwHighDateTime DWORD } /* minwindef.h:222:11 */ type FILETIME = _FILETIME /* minwindef.h:225:5 */ type PFILETIME = uintptr /* minwindef.h:225:14 */ type LPFILETIME = uintptr /* minwindef.h:225:25 */ // Make sure winnt.h is included. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type HWND__ = struct{ Funused int32 } /* windef.h:25:1 */ type HWND = uintptr /* windef.h:25:1 */ type HHOOK__ = struct{ Funused int32 } /* windef.h:26:1 */ type HHOOK = uintptr /* windef.h:26:1 */ type HGDIOBJ = uintptr /* windef.h:37:16 */ type HACCEL__ = struct{ Funused int32 } /* windef.h:42:1 */ type HACCEL = uintptr /* windef.h:42:1 */ type HBITMAP__ = struct{ Funused int32 } /* windef.h:43:1 */ type HBITMAP = uintptr /* windef.h:43:1 */ type HBRUSH__ = struct{ Funused int32 } /* windef.h:44:1 */ type HBRUSH = uintptr /* windef.h:44:1 */ type HCOLORSPACE__ = struct{ Funused int32 } /* windef.h:45:1 */ type HCOLORSPACE = uintptr /* windef.h:45:1 */ type HDC__ = struct{ Funused int32 } /* windef.h:46:1 */ type HDC = uintptr /* windef.h:46:1 */ type HGLRC__ = struct{ Funused int32 } /* windef.h:47:1 */ type HGLRC = uintptr /* windef.h:47:1 */ type HDESK__ = struct{ Funused int32 } /* windef.h:48:1 */ type HDESK = uintptr /* windef.h:48:1 */ type HENHMETAFILE__ = struct{ Funused int32 } /* windef.h:49:1 */ type HENHMETAFILE = uintptr /* windef.h:49:1 */ type HFONT__ = struct{ Funused int32 } /* windef.h:50:1 */ type HFONT = uintptr /* windef.h:50:1 */ type HICON__ = struct{ Funused int32 } /* windef.h:51:1 */ type HICON = uintptr /* windef.h:51:1 */ type HMENU__ = struct{ Funused int32 } /* windef.h:52:1 */ type HMENU = uintptr /* windef.h:52:1 */ type HPALETTE__ = struct{ Funused int32 } /* windef.h:53:1 */ type HPALETTE = uintptr /* windef.h:53:1 */ type HPEN__ = struct{ Funused int32 } /* windef.h:54:1 */ type HPEN = uintptr /* windef.h:54:1 */ type HMONITOR__ = struct{ Funused int32 } /* windef.h:55:1 */ type HMONITOR = uintptr /* windef.h:55:1 */ type HWINEVENTHOOK__ = struct{ Funused int32 } /* windef.h:57:1 */ type HWINEVENTHOOK = uintptr /* windef.h:57:1 */ type HCURSOR = HICON /* windef.h:59:15 */ type COLORREF = DWORD /* windef.h:60:15 */ type HUMPD__ = struct{ Funused int32 } /* windef.h:64:1 */ type HUMPD = uintptr /* windef.h:64:1 */ type LPCOLORREF = uintptr /* windef.h:66:15 */ type tagRECT = struct { Fleft LONG Ftop LONG Fright LONG Fbottom LONG } /* windef.h:72:9 */ type RECT = tagRECT /* windef.h:77:3 */ type PRECT = uintptr /* windef.h:77:8 */ type NPRECT = uintptr /* windef.h:77:15 */ type LPRECT = uintptr /* windef.h:77:23 */ type LPCRECT = uintptr /* windef.h:79:20 */ type _RECTL = struct { Fleft LONG Ftop LONG Fright LONG Fbottom LONG } /* windef.h:81:9 */ type RECTL = _RECTL /* windef.h:86:3 */ type PRECTL = uintptr /* windef.h:86:9 */ type LPRECTL = uintptr /* windef.h:86:17 */ type LPCRECTL = uintptr /* windef.h:88:21 */ type tagPOINT = struct { Fx LONG Fy LONG } /* windef.h:90:9 */ type POINT = tagPOINT /* windef.h:93:3 */ type PPOINT = uintptr /* windef.h:93:9 */ type NPPOINT = uintptr /* windef.h:93:17 */ type LPPOINT = uintptr /* windef.h:93:26 */ type _POINTL = struct { Fx LONG Fy LONG } /* windef.h:95:9 */ type POINTL = _POINTL /* windef.h:98:3 */ type PPOINTL = uintptr /* windef.h:98:10 */ type tagSIZE = struct { Fcx LONG Fcy LONG } /* windef.h:100:9 */ type SIZE = tagSIZE /* windef.h:103:3 */ type PSIZE = uintptr /* windef.h:103:8 */ type LPSIZE = uintptr /* windef.h:103:15 */ type SIZEL = SIZE /* windef.h:105:14 */ type PSIZEL = uintptr /* windef.h:106:14 */ type LPSIZEL = uintptr /* windef.h:106:22 */ type tagPOINTS = struct { Fx SHORT Fy SHORT } /* windef.h:108:9 */ type POINTS = tagPOINTS /* windef.h:111:3 */ type PPOINTS = uintptr /* windef.h:111:10 */ type LPPOINTS = uintptr /* windef.h:111:19 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _SECURITY_ATTRIBUTES = struct { FnLength DWORD _ [4]byte FlpSecurityDescriptor LPVOID FbInheritHandle WINBOOL _ [4]byte } /* minwinbase.h:13:11 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type SECURITY_ATTRIBUTES = _SECURITY_ATTRIBUTES /* minwinbase.h:17:5 */ type PSECURITY_ATTRIBUTES = uintptr /* minwinbase.h:17:26 */ type LPSECURITY_ATTRIBUTES = uintptr /* minwinbase.h:17:49 */ type _OVERLAPPED = struct { FInternal ULONG_PTR FInternalHigh ULONG_PTR Fu struct { _ [0]uint64 Fs struct { FOffset DWORD FOffsetHigh DWORD } } FhEvent HANDLE } /* minwinbase.h:19:11 */ type OVERLAPPED = _OVERLAPPED /* minwinbase.h:30:5 */ type LPOVERLAPPED = uintptr /* minwinbase.h:30:17 */ type _OVERLAPPED_ENTRY = struct { FlpCompletionKey ULONG_PTR FlpOverlapped LPOVERLAPPED FInternal ULONG_PTR FdwNumberOfBytesTransferred DWORD _ [4]byte } /* minwinbase.h:32:11 */ type OVERLAPPED_ENTRY = _OVERLAPPED_ENTRY /* minwinbase.h:37:5 */ type LPOVERLAPPED_ENTRY = uintptr /* minwinbase.h:37:23 */ type _SYSTEMTIME = struct { FwYear WORD FwMonth WORD FwDayOfWeek WORD FwDay WORD FwHour WORD FwMinute WORD FwSecond WORD FwMilliseconds WORD } /* minwinbase.h:49:11 */ type SYSTEMTIME = _SYSTEMTIME /* minwinbase.h:58:5 */ type PSYSTEMTIME = uintptr /* minwinbase.h:58:17 */ type LPSYSTEMTIME = uintptr /* minwinbase.h:58:31 */ type _WIN32_FIND_DATAA = struct { FdwFileAttributes DWORD FftCreationTime FILETIME FftLastAccessTime FILETIME FftLastWriteTime FILETIME FnFileSizeHigh DWORD FnFileSizeLow DWORD FdwReserved0 DWORD FdwReserved1 DWORD FcFileName [260]CHAR FcAlternateFileName [14]CHAR _ [2]byte } /* minwinbase.h:61:11 */ type WIN32_FIND_DATAA = _WIN32_FIND_DATAA /* minwinbase.h:72:5 */ type PWIN32_FIND_DATAA = uintptr /* minwinbase.h:72:23 */ type LPWIN32_FIND_DATAA = uintptr /* minwinbase.h:72:43 */ type _WIN32_FIND_DATAW = struct { FdwFileAttributes DWORD FftCreationTime FILETIME FftLastAccessTime FILETIME FftLastWriteTime FILETIME FnFileSizeHigh DWORD FnFileSizeLow DWORD FdwReserved0 DWORD FdwReserved1 DWORD FcFileName [260]WCHAR FcAlternateFileName [14]WCHAR } /* minwinbase.h:74:11 */ type WIN32_FIND_DATAW = _WIN32_FIND_DATAW /* minwinbase.h:85:5 */ type PWIN32_FIND_DATAW = uintptr /* minwinbase.h:85:23 */ type LPWIN32_FIND_DATAW = uintptr /* minwinbase.h:85:43 */ type WIN32_FIND_DATA = WIN32_FIND_DATAA /* minwinbase.h:87:3 */ type PWIN32_FIND_DATA = PWIN32_FIND_DATAA /* minwinbase.h:88:3 */ type LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA /* minwinbase.h:89:3 */ type FINDEX_INFO_LEVELS = uint32 /* minwinbase.h:95:5 */ type FINDEX_SEARCH_OPS = uint32 /* minwinbase.h:105:5 */ type GET_FILEEX_INFO_LEVELS = uint32 /* minwinbase.h:110:5 */ type CRITICAL_SECTION = RTL_CRITICAL_SECTION /* minwinbase.h:141:32 */ type PCRITICAL_SECTION = PRTL_CRITICAL_SECTION /* minwinbase.h:142:33 */ type LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION /* minwinbase.h:143:33 */ type CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG /* minwinbase.h:144:38 */ type PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG /* minwinbase.h:145:39 */ type LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG /* minwinbase.h:146:39 */ type LPOVERLAPPED_COMPLETION_ROUTINE = uintptr /* minwinbase.h:148:16 */ type _PROCESS_HEAP_ENTRY = struct { FlpData PVOID FcbData DWORD FcbOverhead BYTE FiRegionIndex BYTE FwFlags WORD Fu struct { FBlock struct { FhMem HANDLE FdwReserved [3]DWORD _ [4]byte } } } /* minwinbase.h:153:11 */ type PROCESS_HEAP_ENTRY = _PROCESS_HEAP_ENTRY /* minwinbase.h:171:5 */ type LPPROCESS_HEAP_ENTRY = uintptr /* minwinbase.h:171:24 */ type PPROCESS_HEAP_ENTRY = uintptr /* minwinbase.h:171:46 */ type _REASON_CONTEXT = struct { FVersion ULONG FFlags DWORD FReason struct { FDetailed struct { FLocalizedReasonModule HMODULE FLocalizedReasonId ULONG FReasonStringCount ULONG FReasonStrings uintptr } } } /* minwinbase.h:179:11 */ type REASON_CONTEXT = _REASON_CONTEXT /* minwinbase.h:191:5 */ type PREASON_CONTEXT = uintptr /* minwinbase.h:191:21 */ type PTHREAD_START_ROUTINE = uintptr /* minwinbase.h:203:17 */ type LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE /* minwinbase.h:204:33 */ type _EXCEPTION_DEBUG_INFO = struct { FExceptionRecord EXCEPTION_RECORD FdwFirstChance DWORD _ [4]byte } /* minwinbase.h:206:11 */ type EXCEPTION_DEBUG_INFO = _EXCEPTION_DEBUG_INFO /* minwinbase.h:209:5 */ type LPEXCEPTION_DEBUG_INFO = uintptr /* minwinbase.h:209:27 */ type _CREATE_THREAD_DEBUG_INFO = struct { FhThread HANDLE FlpThreadLocalBase LPVOID FlpStartAddress LPTHREAD_START_ROUTINE } /* minwinbase.h:211:11 */ type CREATE_THREAD_DEBUG_INFO = _CREATE_THREAD_DEBUG_INFO /* minwinbase.h:215:5 */ type LPCREATE_THREAD_DEBUG_INFO = uintptr /* minwinbase.h:215:31 */ type _CREATE_PROCESS_DEBUG_INFO = struct { FhFile HANDLE FhProcess HANDLE FhThread HANDLE FlpBaseOfImage LPVOID FdwDebugInfoFileOffset DWORD FnDebugInfoSize DWORD FlpThreadLocalBase LPVOID FlpStartAddress LPTHREAD_START_ROUTINE FlpImageName LPVOID FfUnicode WORD _ [6]byte } /* minwinbase.h:217:11 */ type CREATE_PROCESS_DEBUG_INFO = _CREATE_PROCESS_DEBUG_INFO /* minwinbase.h:228:5 */ type LPCREATE_PROCESS_DEBUG_INFO = uintptr /* minwinbase.h:228:32 */ type _EXIT_THREAD_DEBUG_INFO = struct{ FdwExitCode DWORD } /* minwinbase.h:230:11 */ type EXIT_THREAD_DEBUG_INFO = _EXIT_THREAD_DEBUG_INFO /* minwinbase.h:232:5 */ type LPEXIT_THREAD_DEBUG_INFO = uintptr /* minwinbase.h:232:29 */ type _EXIT_PROCESS_DEBUG_INFO = struct{ FdwExitCode DWORD } /* minwinbase.h:234:11 */ type EXIT_PROCESS_DEBUG_INFO = _EXIT_PROCESS_DEBUG_INFO /* minwinbase.h:236:5 */ type LPEXIT_PROCESS_DEBUG_INFO = uintptr /* minwinbase.h:236:30 */ type _LOAD_DLL_DEBUG_INFO = struct { FhFile HANDLE FlpBaseOfDll LPVOID FdwDebugInfoFileOffset DWORD FnDebugInfoSize DWORD FlpImageName LPVOID FfUnicode WORD _ [6]byte } /* minwinbase.h:238:11 */ type LOAD_DLL_DEBUG_INFO = _LOAD_DLL_DEBUG_INFO /* minwinbase.h:245:5 */ type LPLOAD_DLL_DEBUG_INFO = uintptr /* minwinbase.h:245:26 */ type _UNLOAD_DLL_DEBUG_INFO = struct{ FlpBaseOfDll LPVOID } /* minwinbase.h:247:11 */ type UNLOAD_DLL_DEBUG_INFO = _UNLOAD_DLL_DEBUG_INFO /* minwinbase.h:249:5 */ type LPUNLOAD_DLL_DEBUG_INFO = uintptr /* minwinbase.h:249:28 */ type _OUTPUT_DEBUG_STRING_INFO = struct { FlpDebugStringData LPSTR FfUnicode WORD FnDebugStringLength WORD _ [4]byte } /* minwinbase.h:251:11 */ type OUTPUT_DEBUG_STRING_INFO = _OUTPUT_DEBUG_STRING_INFO /* minwinbase.h:255:5 */ type LPOUTPUT_DEBUG_STRING_INFO = uintptr /* minwinbase.h:255:31 */ type _RIP_INFO = struct { FdwError DWORD FdwType DWORD } /* minwinbase.h:257:11 */ type RIP_INFO = _RIP_INFO /* minwinbase.h:260:5 */ type LPRIP_INFO = uintptr /* minwinbase.h:260:15 */ type _DEBUG_EVENT = struct { FdwDebugEventCode DWORD FdwProcessId DWORD FdwThreadId DWORD _ [4]byte Fu struct{ FException EXCEPTION_DEBUG_INFO } } /* minwinbase.h:262:11 */ type DEBUG_EVENT = _DEBUG_EVENT /* minwinbase.h:277:5 */ type LPDEBUG_EVENT = uintptr /* minwinbase.h:277:18 */ type LPCONTEXT = PCONTEXT /* minwinbase.h:280:20 */ type BEM_FREE_INTERFACE_CALLBACK = uintptr /* bemapiset.h:21:16 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type PTOP_LEVEL_EXCEPTION_FILTER = uintptr /* errhandlingapi.h:17:14 */ type LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER /* errhandlingapi.h:18:37 */ type _BY_HANDLE_FILE_INFORMATION = struct { FdwFileAttributes DWORD FftCreationTime FILETIME FftLastAccessTime FILETIME FftLastWriteTime FILETIME FdwVolumeSerialNumber DWORD FnFileSizeHigh DWORD FnFileSizeLow DWORD FnNumberOfLinks DWORD FnFileIndexHigh DWORD FnFileIndexLow DWORD } /* fileapi.h:38:11 */ type BY_HANDLE_FILE_INFORMATION = _BY_HANDLE_FILE_INFORMATION /* fileapi.h:49:5 */ type PBY_HANDLE_FILE_INFORMATION = uintptr /* fileapi.h:49:33 */ type LPBY_HANDLE_FILE_INFORMATION = uintptr /* fileapi.h:50:5 */ type _WIN32_FILE_ATTRIBUTE_DATA = struct { FdwFileAttributes DWORD FftCreationTime FILETIME FftLastAccessTime FILETIME FftLastWriteTime FILETIME FnFileSizeHigh DWORD FnFileSizeLow DWORD } /* fileapi.h:129:11 */ type WIN32_FILE_ATTRIBUTE_DATA = _WIN32_FILE_ATTRIBUTE_DATA /* fileapi.h:136:5 */ type LPWIN32_FILE_ATTRIBUTE_DATA = uintptr /* fileapi.h:136:32 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _HEAP_SUMMARY = struct { Fcb DWORD _ [4]byte FcbAllocated SIZE_T FcbCommitted SIZE_T FcbReserved SIZE_T FcbMaxReserve SIZE_T } /* heapapi.h:18:11 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type HEAP_SUMMARY = _HEAP_SUMMARY /* heapapi.h:24:5 */ type PHEAP_SUMMARY = uintptr /* heapapi.h:24:18 */ type LPHEAP_SUMMARY = PHEAP_SUMMARY /* heapapi.h:26:25 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type tagENUMUILANG = struct { FNumOfEnumUILang ULONG FSizeOfEnumUIBuffer ULONG FpEnumUIBuffer uintptr } /* libloaderapi.h:18:11 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type ENUMUILANG = tagENUMUILANG /* libloaderapi.h:22:5 */ type PENUMUILANG = uintptr /* libloaderapi.h:22:17 */ type ENUMRESLANGPROCA = uintptr /* libloaderapi.h:25:19 */ type ENUMRESLANGPROCW = uintptr /* libloaderapi.h:26:19 */ type ENUMRESNAMEPROCA = uintptr /* libloaderapi.h:27:19 */ type ENUMRESNAMEPROCW = uintptr /* libloaderapi.h:28:19 */ type ENUMRESTYPEPROCA = uintptr /* libloaderapi.h:29:19 */ type ENUMRESTYPEPROCW = uintptr /* libloaderapi.h:30:19 */ type PGET_MODULE_HANDLE_EXA = uintptr /* libloaderapi.h:41:19 */ type PGET_MODULE_HANDLE_EXW = uintptr /* libloaderapi.h:42:19 */ type DLL_DIRECTORY_COOKIE = PVOID /* libloaderapi.h:45:17 */ type PDLL_DIRECTORY_COOKIE = uintptr /* libloaderapi.h:45:39 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type MEMORY_RESOURCE_NOTIFICATION_TYPE = uint32 /* memoryapi.h:21:5 */ type _PROCESS_INFORMATION = struct { FhProcess HANDLE FhThread HANDLE FdwProcessId DWORD FdwThreadId DWORD } /* processthreadsapi.h:28:11 */ type PROCESS_INFORMATION = _PROCESS_INFORMATION /* processthreadsapi.h:33:5 */ type PPROCESS_INFORMATION = uintptr /* processthreadsapi.h:33:26 */ type LPPROCESS_INFORMATION = uintptr /* processthreadsapi.h:33:49 */ type _STARTUPINFOA = struct { Fcb DWORD _ [4]byte FlpReserved LPSTR FlpDesktop LPSTR FlpTitle LPSTR FdwX DWORD FdwY DWORD FdwXSize DWORD FdwYSize DWORD FdwXCountChars DWORD FdwYCountChars DWORD FdwFillAttribute DWORD FdwFlags DWORD FwShowWindow WORD FcbReserved2 WORD _ [4]byte FlpReserved2 LPBYTE FhStdInput HANDLE FhStdOutput HANDLE FhStdError HANDLE } /* processthreadsapi.h:35:11 */ type STARTUPINFOA = _STARTUPINFOA /* processthreadsapi.h:54:5 */ type LPSTARTUPINFOA = uintptr /* processthreadsapi.h:54:19 */ type _STARTUPINFOW = struct { Fcb DWORD _ [4]byte FlpReserved LPWSTR FlpDesktop LPWSTR FlpTitle LPWSTR FdwX DWORD FdwY DWORD FdwXSize DWORD FdwYSize DWORD FdwXCountChars DWORD FdwYCountChars DWORD FdwFillAttribute DWORD FdwFlags DWORD FwShowWindow WORD FcbReserved2 WORD _ [4]byte FlpReserved2 LPBYTE FhStdInput HANDLE FhStdOutput HANDLE FhStdError HANDLE } /* processthreadsapi.h:56:11 */ type STARTUPINFOW = _STARTUPINFOW /* processthreadsapi.h:75:5 */ type LPSTARTUPINFOW = uintptr /* processthreadsapi.h:75:19 */ type STARTUPINFO = STARTUPINFOA /* processthreadsapi.h:77:3 */ type LPSTARTUPINFO = LPSTARTUPINFOA /* processthreadsapi.h:78:3 */ type PPROC_THREAD_ATTRIBUTE_LIST = uintptr /* processthreadsapi.h:80:46 */ type LPPROC_THREAD_ATTRIBUTE_LIST = uintptr /* processthreadsapi.h:80:76 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type SRWLOCK = RTL_SRWLOCK /* synchapi.h:34:23 */ type PSRWLOCK = uintptr /* synchapi.h:34:32 */ type INIT_ONCE = RTL_RUN_ONCE /* synchapi.h:36:24 */ type PINIT_ONCE = PRTL_RUN_ONCE /* synchapi.h:37:25 */ type LPINIT_ONCE = PRTL_RUN_ONCE /* synchapi.h:38:25 */ type PINIT_ONCE_FN = uintptr /* synchapi.h:40:19 */ type CONDITION_VARIABLE = RTL_CONDITION_VARIABLE /* synchapi.h:41:34 */ type PCONDITION_VARIABLE = uintptr /* synchapi.h:41:54 */ type PTIMERAPCROUTINE = uintptr /* synchapi.h:102:16 */ type SYNCHRONIZATION_BARRIER = RTL_BARRIER /* synchapi.h:104:23 */ type PSYNCHRONIZATION_BARRIER = PRTL_BARRIER /* synchapi.h:105:24 */ type LPSYNCHRONIZATION_BARRIER = PRTL_BARRIER /* synchapi.h:106:24 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _SYSTEM_INFO = struct { Fu struct{ FdwOemId DWORD } FdwPageSize DWORD FlpMinimumApplicationAddress LPVOID FlpMaximumApplicationAddress LPVOID FdwActiveProcessorMask DWORD_PTR FdwNumberOfProcessors DWORD FdwProcessorType DWORD FdwAllocationGranularity DWORD FwProcessorLevel WORD FwProcessorRevision WORD } /* sysinfoapi.h:18:11 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type SYSTEM_INFO = _SYSTEM_INFO /* sysinfoapi.h:35:5 */ type LPSYSTEM_INFO = uintptr /* sysinfoapi.h:35:18 */ type _MEMORYSTATUSEX = struct { FdwLength DWORD FdwMemoryLoad DWORD FullTotalPhys DWORDLONG FullAvailPhys DWORDLONG FullTotalPageFile DWORDLONG FullAvailPageFile DWORDLONG FullTotalVirtual DWORDLONG FullAvailVirtual DWORDLONG FullAvailExtendedVirtual DWORDLONG } /* sysinfoapi.h:48:11 */ type MEMORYSTATUSEX = _MEMORYSTATUSEX /* sysinfoapi.h:58:5 */ type LPMEMORYSTATUSEX = uintptr /* sysinfoapi.h:58:20 */ type COMPUTER_NAME_FORMAT = uint32 /* sysinfoapi.h:80:5 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type PTP_WIN32_IO_CALLBACK = uintptr /* threadpoolapiset.h:18:16 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // There are 3 separate ways this file is intended to be used: // // 1) Included from intrin.h. In this case, all intrinsics in this file get declarations and // implementations. No special #defines are needed for this case. // // 2) Included from the library versions of these functions (ie mingw-w64-crt\intrincs\*.c). All // intrinsics in this file must also be included in the library. In this case, only the // specific functions requested will get defined, and they will not be defined as inline. If // you have followed the instructions (below) for adding functions to this file, then all you // need to have in the .c file is the following: // // #define __INTRINSIC_ONLYSPECIAL // #define __INTRINSIC_SPECIAL___stosb // Causes code generation in intrin-impl.h // // #include // // 3) Included from various platform sdk headers. Some platform sdk headers (such as winnt.h) // define a subset of intrinsics. To avoid potential conflicts, this file is designed to // allow for specific subsets of functions to be defined. This is done by defining the // appropriate variable before including this file: // // #define __INTRINSIC_GROUP_WINNT // #include // // In all cases, it is acceptable to include this file multiple times in any order (ie include // winnt.h to get its subset, then include intrin.h to get everything, or vice versa). // // See also the comments at the top of intrin.h. // To add an implementation for a new intrinsic to this file, you should comment out the current prototype in intrin.h. // If the function you are adding is not in intrin.h, you should not be adding it to this file. This file is only // for MSVC intrinsics. // // Make sure you put your definition in the right section (x86 vs x64), and use this outline when adding definitions // to this file: // // #if __INTRINSIC_PROLOG(__int2c) // // // // __INTRINSICS_USEINLINE // // // #define __INTRINSIC_DEFINED___int2c // #endif // Note that there is no file-wide #if to prevent intrin-impl.h from being // included multiple times. This is because this file might be included multiple // times to define various subsets of the functions it contains. // However we do check for __MINGW_INTRIN_INLINE. In theory this means we // can work with other compilers. // Clang has support for MSVC builtins, GCC doesn't // These macros are used by the routines below. While this file may be included // multiple times, these macros only need to be defined once. // The Barrier functions can never be in the library. Since gcc only // supports ReadWriteBarrier, map all 3 to do the same. // The logic for this macro is: // if the function is not yet defined AND // ( // (if we are not just defining special OR // (we are defining special AND this is one of the ones we are defining) // ) // ) // Normally __INTRINSIC_ONLYSPECIAL is used to indicate that we are // being included in the library version of the intrinsic (case 2). However, // that really only affects the definition of __INTRINSICS_USEINLINE. // So here we are letting it serve an additional purpose of only defining // the intrinsics for a certain file (case 3). For example, to create the // intrinsics for the functions in winnt.h, define __INTRINSIC_GROUP_WINNT. // // Note that this file can be included multiple times, and as a result // there can be overlap (definitions that appear in more than one // file). This is handled by __INTRINSIC_DEFINED_* // // If no groups are defined (such as what happens when including intrin.h), // all intrinsics are defined. // If __INTRINSIC_ONLYSPECIAL is defined at this point, we are processing case 2. In // that case, don't go looking for groups // Note that this gets undefined at the end of this file // To add an additional group, put the #ifdef and definitions here. // Before 4.9.2, ia32intrin.h had broken versions of these. // ***************************************************** // ***************************************************** // ***************************************************** type PFIBER_START_ROUTINE = uintptr /* winbase.h:160:16 */ type LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE /* winbase.h:161:32 */ type LPLDT_ENTRY = LPVOID /* winbase.h:166:18 */ type _COMMPROP = struct { FwPacketLength WORD FwPacketVersion WORD FdwServiceMask DWORD FdwReserved1 DWORD FdwMaxTxQueue DWORD FdwMaxRxQueue DWORD FdwMaxBaud DWORD FdwProvSubType DWORD FdwProvCapabilities DWORD FdwSettableParams DWORD FdwSettableBaud DWORD FwSettableData WORD FwSettableStopParity WORD FdwCurrentTxQueue DWORD FdwCurrentRxQueue DWORD FdwProvSpec1 DWORD FdwProvSpec2 DWORD FwcProvChar [1]WCHAR _ [2]byte } /* winbase.h:240:11 */ type COMMPROP = _COMMPROP /* winbase.h:259:5 */ type LPCOMMPROP = uintptr /* winbase.h:259:14 */ type _COMSTAT = struct { FfCtsHold uint32 /* DWORD fCtsHold: 1, DWORD fDsrHold: 1, DWORD fRlsdHold: 1, DWORD fXoffHold: 1, DWORD fXoffSent: 1, DWORD fEof: 1, DWORD fTxim: 1, DWORD fReserved: 25 */ _ [4]byte FcbInQue DWORD FcbOutQue DWORD } /* winbase.h:263:11 */ type COMSTAT = _COMSTAT /* winbase.h:274:5 */ type LPCOMSTAT = uintptr /* winbase.h:274:13 */ type _DCB = struct { FDCBlength DWORD FBaudRate DWORD FfBinary uint32 /* DWORD fBinary: 1, DWORD fParity: 1, DWORD fOutxCtsFlow: 1, DWORD fOutxDsrFlow: 1, DWORD fDtrControl: 2, DWORD fDsrSensitivity: 1, DWORD fTXContinueOnXoff: 1, DWORD fOutX: 1, DWORD fInX: 1, DWORD fErrorChar: 1, DWORD fNull: 1, DWORD fRtsControl: 2, DWORD fAbortOnError: 1, DWORD fDummy2: 17 */ _ [2]byte FwReserved WORD FXonLim WORD FXoffLim WORD FByteSize BYTE FParity BYTE FStopBits BYTE FXonChar int8 FXoffChar int8 FErrorChar int8 FEofChar int8 FEvtChar int8 FwReserved1 WORD _ [2]byte } /* winbase.h:285:11 */ type DCB = _DCB /* winbase.h:314:5 */ type LPDCB = uintptr /* winbase.h:314:9 */ type _COMMTIMEOUTS = struct { FReadIntervalTimeout DWORD FReadTotalTimeoutMultiplier DWORD FReadTotalTimeoutConstant DWORD FWriteTotalTimeoutMultiplier DWORD FWriteTotalTimeoutConstant DWORD } /* winbase.h:316:11 */ type COMMTIMEOUTS = _COMMTIMEOUTS /* winbase.h:322:5 */ type LPCOMMTIMEOUTS = uintptr /* winbase.h:322:18 */ type _COMMCONFIG = struct { FdwSize DWORD FwVersion WORD FwReserved WORD Fdcb DCB FdwProviderSubType DWORD FdwProviderOffset DWORD FdwProviderSize DWORD FwcProviderData [1]WCHAR _ [2]byte } /* winbase.h:324:11 */ type COMMCONFIG = _COMMCONFIG /* winbase.h:333:5 */ type LPCOMMCONFIG = uintptr /* winbase.h:333:16 */ type _MEMORYSTATUS = struct { FdwLength DWORD FdwMemoryLoad DWORD FdwTotalPhys SIZE_T FdwAvailPhys SIZE_T FdwTotalPageFile SIZE_T FdwAvailPageFile SIZE_T FdwTotalVirtual SIZE_T FdwAvailVirtual SIZE_T } /* winbase.h:364:11 */ type MEMORYSTATUS = _MEMORYSTATUS /* winbase.h:373:5 */ type LPMEMORYSTATUS = uintptr /* winbase.h:373:18 */ type _JIT_DEBUG_INFO = struct { FdwSize DWORD FdwProcessorArchitecture DWORD FdwThreadID DWORD FdwReserved0 DWORD FlpExceptionAddress ULONG64 FlpExceptionRecord ULONG64 FlpContextRecord ULONG64 } /* winbase.h:431:11 */ type JIT_DEBUG_INFO = _JIT_DEBUG_INFO /* winbase.h:439:5 */ type LPJIT_DEBUG_INFO = uintptr /* winbase.h:439:20 */ type JIT_DEBUG_INFO32 = JIT_DEBUG_INFO /* winbase.h:441:26 */ type LPJIT_DEBUG_INFO32 = uintptr /* winbase.h:441:44 */ type JIT_DEBUG_INFO64 = JIT_DEBUG_INFO /* winbase.h:442:26 */ type LPJIT_DEBUG_INFO64 = uintptr /* winbase.h:442:44 */ type LPEXCEPTION_RECORD = PEXCEPTION_RECORD /* winbase.h:445:29 */ type LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS /* winbase.h:446:31 */ type _OFSTRUCT = struct { FcBytes BYTE FfFixedDisk BYTE FnErrCode WORD FReserved1 WORD FReserved2 WORD FszPathName [128]CHAR } /* winbase.h:620:11 */ type OFSTRUCT = _OFSTRUCT /* winbase.h:627:5 */ type LPOFSTRUCT = uintptr /* winbase.h:627:15 */ type POFSTRUCT = uintptr /* winbase.h:627:27 */ // TODO: Add RTL_UMS... to winnt.h header and add UMS-base API. type THREAD_INFORMATION_CLASS = uint32 /* winbase.h:1195:5 */ type PROCESS_INFORMATION_CLASS = uint32 /* winbase.h:1200:5 */ type DEP_SYSTEM_POLICY_TYPE = uint32 /* winbase.h:1304:5 */ type PFE_EXPORT_FUNC = uintptr /* winbase.h:1387:17 */ type PFE_IMPORT_FUNC = uintptr /* winbase.h:1388:17 */ type _WIN32_STREAM_ID = struct { FdwStreamId DWORD FdwStreamAttributes DWORD FSize LARGE_INTEGER FdwStreamNameSize DWORD FcStreamName [1]WCHAR _ [2]byte } /* winbase.h:1465:11 */ type WIN32_STREAM_ID = _WIN32_STREAM_ID /* winbase.h:1471:5 */ type LPWIN32_STREAM_ID = uintptr /* winbase.h:1471:21 */ type PGET_SYSTEM_WOW64_DIRECTORY_A = uintptr /* winbase.h:1856:16 */ type PGET_SYSTEM_WOW64_DIRECTORY_W = uintptr /* winbase.h:1857:16 */ type LPPROGRESS_ROUTINE = uintptr /* winbase.h:1960:17 */ type STREAM_INFO_LEVELS = uint32 /* winbase.h:2150:5 */ type _WIN32_FIND_STREAM_DATA = struct { FStreamSize LARGE_INTEGER FcStreamName [296]WCHAR } /* winbase.h:2152:11 */ type WIN32_FIND_STREAM_DATA = _WIN32_FIND_STREAM_DATA /* winbase.h:2155:5 */ type PWIN32_FIND_STREAM_DATA = uintptr /* winbase.h:2155:28 */ type _EVENTLOG_FULL_INFORMATION = struct{ FdwFull DWORD } /* winbase.h:2227:11 */ type EVENTLOG_FULL_INFORMATION = _EVENTLOG_FULL_INFORMATION /* winbase.h:2229:5 */ type LPEVENTLOG_FULL_INFORMATION = uintptr /* winbase.h:2229:31 */ type tagHW_PROFILE_INFOA = struct { FdwDockInfo DWORD FszHwProfileGuid [39]CHAR FszHwProfileName [80]CHAR _ [1]byte } /* winbase.h:2444:11 */ type HW_PROFILE_INFOA = tagHW_PROFILE_INFOA /* winbase.h:2448:5 */ type LPHW_PROFILE_INFOA = uintptr /* winbase.h:2448:22 */ type tagHW_PROFILE_INFOW = struct { FdwDockInfo DWORD FszHwProfileGuid [39]WCHAR FszHwProfileName [80]WCHAR _ [2]byte } /* winbase.h:2450:11 */ type HW_PROFILE_INFOW = tagHW_PROFILE_INFOW /* winbase.h:2454:5 */ type LPHW_PROFILE_INFOW = uintptr /* winbase.h:2454:22 */ type HW_PROFILE_INFO = HW_PROFILE_INFOA /* winbase.h:2456:3 */ type LPHW_PROFILE_INFO = LPHW_PROFILE_INFOA /* winbase.h:2457:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // ******************** WARNING ******************** // This is inconsistent with MSDN! // In MSDN: // ERROR_IPSEC_IKE_QM_LIMIT => 13884 (here not defined) // ERROR_IPSEC_IKE_NEG_STATUS_END => 13897 (here 13884) // Source: // WinINet Reference -> WinINet Constants -> Error Messages // https://msdn.microsoft.com/en-us/library/windows/desktop/aa385465%28v=vs.85%29.aspx // ******************** END WARNING ******************** //#define ERROR_IPSEC_IKE_NEG_STATUS_END __MSABI_LONG(13884) // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _TIME_ZONE_INFORMATION = struct { FBias LONG FStandardName [32]WCHAR FStandardDate SYSTEMTIME FStandardBias LONG FDaylightName [32]WCHAR FDaylightDate SYSTEMTIME FDaylightBias LONG } /* timezoneapi.h:21:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // ******************** WARNING ******************** // This is inconsistent with MSDN! // In MSDN: // ERROR_IPSEC_IKE_QM_LIMIT => 13884 (here not defined) // ERROR_IPSEC_IKE_NEG_STATUS_END => 13897 (here 13884) // Source: // WinINet Reference -> WinINet Constants -> Error Messages // https://msdn.microsoft.com/en-us/library/windows/desktop/aa385465%28v=vs.85%29.aspx // ******************** END WARNING ******************** //#define ERROR_IPSEC_IKE_NEG_STATUS_END __MSABI_LONG(13884) // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type TIME_ZONE_INFORMATION = _TIME_ZONE_INFORMATION /* timezoneapi.h:29:5 */ type PTIME_ZONE_INFORMATION = uintptr /* timezoneapi.h:29:27 */ type LPTIME_ZONE_INFORMATION = uintptr /* timezoneapi.h:29:51 */ type _TIME_DYNAMIC_ZONE_INFORMATION = struct { FBias LONG FStandardName [32]WCHAR FStandardDate SYSTEMTIME FStandardBias LONG FDaylightName [32]WCHAR FDaylightDate SYSTEMTIME FDaylightBias LONG FTimeZoneKeyName [128]WCHAR FDynamicDaylightTimeDisabled BOOLEAN _ [3]byte } /* timezoneapi.h:31:11 */ type DYNAMIC_TIME_ZONE_INFORMATION = _TIME_DYNAMIC_ZONE_INFORMATION /* timezoneapi.h:41:5 */ type PDYNAMIC_TIME_ZONE_INFORMATION = uintptr /* timezoneapi.h:41:35 */ type _SYSTEM_POWER_STATUS = struct { FACLineStatus BYTE FBatteryFlag BYTE FBatteryLifePercent BYTE FReserved1 BYTE FBatteryLifeTime DWORD FBatteryFullLifeTime DWORD } /* winbase.h:2495:11 */ type SYSTEM_POWER_STATUS = _SYSTEM_POWER_STATUS /* winbase.h:2502:5 */ type LPSYSTEM_POWER_STATUS = uintptr /* winbase.h:2502:25 */ type tagACTCTXA = struct { FcbSize ULONG FdwFlags DWORD FlpSource LPCSTR FwProcessorArchitecture USHORT FwLangId LANGID _ [4]byte FlpAssemblyDirectory LPCSTR FlpResourceName LPCSTR FlpApplicationName LPCSTR FhModule HMODULE } /* winbase.h:2573:11 */ type ACTCTXA = tagACTCTXA /* winbase.h:2583:5 */ type PACTCTXA = uintptr /* winbase.h:2583:13 */ type tagACTCTXW = struct { FcbSize ULONG FdwFlags DWORD FlpSource LPCWSTR FwProcessorArchitecture USHORT FwLangId LANGID _ [4]byte FlpAssemblyDirectory LPCWSTR FlpResourceName LPCWSTR FlpApplicationName LPCWSTR FhModule HMODULE } /* winbase.h:2585:11 */ type ACTCTXW = tagACTCTXW /* winbase.h:2595:5 */ type PACTCTXW = uintptr /* winbase.h:2595:13 */ type ACTCTX = ACTCTXA /* winbase.h:2597:3 */ type PACTCTX = PACTCTXA /* winbase.h:2598:3 */ type PCACTCTXA = uintptr /* winbase.h:2600:25 */ type PCACTCTXW = uintptr /* winbase.h:2601:25 */ type PCACTCTX = PCACTCTXA /* winbase.h:2603:3 */ type tagACTCTX_SECTION_KEYED_DATA_2600 = struct { FcbSize ULONG FulDataFormatVersion ULONG FlpData PVOID FulLength ULONG _ [4]byte FlpSectionGlobalData PVOID FulSectionGlobalDataLength ULONG _ [4]byte FlpSectionBase PVOID FulSectionTotalLength ULONG _ [4]byte FhActCtx HANDLE FulAssemblyRosterIndex ULONG _ [4]byte } /* winbase.h:2617:11 */ type ACTCTX_SECTION_KEYED_DATA_2600 = tagACTCTX_SECTION_KEYED_DATA_2600 /* winbase.h:2628:5 */ type PACTCTX_SECTION_KEYED_DATA_2600 = uintptr /* winbase.h:2628:36 */ type PCACTCTX_SECTION_KEYED_DATA_2600 = uintptr /* winbase.h:2630:48 */ type tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = struct { FlpInformation PVOID FlpSectionBase PVOID FulSectionLength ULONG _ [4]byte FlpSectionGlobalDataBase PVOID FulSectionGlobalDataLength ULONG _ [4]byte } /* winbase.h:2632:11 */ type ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA /* winbase.h:2638:5 */ type PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = uintptr /* winbase.h:2638:49 */ type PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = uintptr /* winbase.h:2640:61 */ type tagACTCTX_SECTION_KEYED_DATA = struct { FcbSize ULONG FulDataFormatVersion ULONG FlpData PVOID FulLength ULONG _ [4]byte FlpSectionGlobalData PVOID FulSectionGlobalDataLength ULONG _ [4]byte FlpSectionBase PVOID FulSectionTotalLength ULONG _ [4]byte FhActCtx HANDLE FulAssemblyRosterIndex ULONG FulFlags ULONG FAssemblyMetadata ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA } /* winbase.h:2642:11 */ type ACTCTX_SECTION_KEYED_DATA = tagACTCTX_SECTION_KEYED_DATA /* winbase.h:2655:5 */ type PACTCTX_SECTION_KEYED_DATA = uintptr /* winbase.h:2655:31 */ type PCACTCTX_SECTION_KEYED_DATA = uintptr /* winbase.h:2657:43 */ type _ACTIVATION_CONTEXT_BASIC_INFORMATION = struct { FhActCtx HANDLE FdwFlags DWORD _ [4]byte } /* winbase.h:2670:11 */ type ACTIVATION_CONTEXT_BASIC_INFORMATION = _ACTIVATION_CONTEXT_BASIC_INFORMATION /* winbase.h:2673:5 */ type PACTIVATION_CONTEXT_BASIC_INFORMATION = uintptr /* winbase.h:2673:42 */ type PCACTIVATION_CONTEXT_BASIC_INFORMATION = uintptr /* winbase.h:2675:62 */ type PQUERYACTCTXW_FUNC = uintptr /* winbase.h:2687:19 */ type APPLICATION_RECOVERY_CALLBACK = uintptr /* winbase.h:2707:17 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _DRAWPATRECT = struct { FptPosition POINT FptSize POINT FwStyle WORD FwPattern WORD } /* wingdi.h:224:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type DRAWPATRECT = _DRAWPATRECT /* wingdi.h:229:5 */ type PDRAWPATRECT = uintptr /* wingdi.h:229:17 */ type _PSINJECTDATA = struct { FDataBytes DWORD FInjectionPoint WORD FPageNumber WORD } /* wingdi.h:335:11 */ type PSINJECTDATA = _PSINJECTDATA /* wingdi.h:339:5 */ type PPSINJECTDATA = uintptr /* wingdi.h:339:18 */ type _PSFEATURE_OUTPUT = struct { FbPageIndependent WINBOOL FbSetPageDevice WINBOOL } /* wingdi.h:391:11 */ type PSFEATURE_OUTPUT = _PSFEATURE_OUTPUT /* wingdi.h:394:5 */ type PPSFEATURE_OUTPUT = uintptr /* wingdi.h:394:22 */ type _PSFEATURE_CUSTPAPER = struct { FlOrientation LONG FlWidth LONG FlHeight LONG FlWidthOffset LONG FlHeightOffset LONG } /* wingdi.h:396:11 */ type PSFEATURE_CUSTPAPER = _PSFEATURE_CUSTPAPER /* wingdi.h:402:5 */ type PPSFEATURE_CUSTPAPER = uintptr /* wingdi.h:402:25 */ type tagXFORM = struct { FeM11 FLOAT FeM12 FLOAT FeM21 FLOAT FeM22 FLOAT FeDx FLOAT FeDy FLOAT } /* wingdi.h:450:11 */ type XFORM = tagXFORM /* wingdi.h:457:5 */ type PXFORM = uintptr /* wingdi.h:457:11 */ type LPXFORM = uintptr /* wingdi.h:457:19 */ type tagBITMAP = struct { FbmType LONG FbmWidth LONG FbmHeight LONG FbmWidthBytes LONG FbmPlanes WORD FbmBitsPixel WORD _ [4]byte FbmBits LPVOID } /* wingdi.h:459:11 */ type BITMAP = tagBITMAP /* wingdi.h:467:5 */ type PBITMAP = uintptr /* wingdi.h:467:12 */ type NPBITMAP = uintptr /* wingdi.h:467:21 */ type LPBITMAP = uintptr /* wingdi.h:467:31 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagRGBTRIPLE = struct { FrgbtBlue BYTE FrgbtGreen BYTE FrgbtRed BYTE } /* wingdi.h:470:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RGBTRIPLE = tagRGBTRIPLE /* wingdi.h:474:5 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagRGBQUAD = struct { FrgbBlue BYTE FrgbGreen BYTE FrgbRed BYTE FrgbReserved BYTE } /* wingdi.h:477:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RGBQUAD = tagRGBQUAD /* wingdi.h:482:5 */ type LPRGBQUAD = uintptr /* wingdi.h:486:19 */ type LCSCSTYPE = LONG /* wingdi.h:499:16 */ type LCSGAMUTMATCH = LONG /* wingdi.h:502:16 */ type FXPT16DOT16 = int32 /* wingdi.h:526:20 */ type LPFXPT16DOT16 = uintptr /* wingdi.h:526:32 */ type FXPT2DOT30 = int32 /* wingdi.h:527:20 */ type LPFXPT2DOT30 = uintptr /* wingdi.h:527:31 */ type tagCIEXYZ = struct { FciexyzX FXPT2DOT30 FciexyzY FXPT2DOT30 FciexyzZ FXPT2DOT30 } /* wingdi.h:529:11 */ type CIEXYZ = tagCIEXYZ /* wingdi.h:533:5 */ type LPCIEXYZ = uintptr /* wingdi.h:536:18 */ type tagICEXYZTRIPLE = struct { FciexyzRed CIEXYZ FciexyzGreen CIEXYZ FciexyzBlue CIEXYZ } /* wingdi.h:539:11 */ type CIEXYZTRIPLE = tagICEXYZTRIPLE /* wingdi.h:543:5 */ type LPCIEXYZTRIPLE = uintptr /* wingdi.h:546:24 */ type tagLOGCOLORSPACEA = struct { FlcsSignature DWORD FlcsVersion DWORD FlcsSize DWORD FlcsCSType LCSCSTYPE FlcsIntent LCSGAMUTMATCH FlcsEndpoints CIEXYZTRIPLE FlcsGammaRed DWORD FlcsGammaGreen DWORD FlcsGammaBlue DWORD FlcsFilename [260]CHAR } /* wingdi.h:550:11 */ type LOGCOLORSPACEA = tagLOGCOLORSPACEA /* wingdi.h:561:5 */ type LPLOGCOLORSPACEA = uintptr /* wingdi.h:561:20 */ type tagLOGCOLORSPACEW = struct { FlcsSignature DWORD FlcsVersion DWORD FlcsSize DWORD FlcsCSType LCSCSTYPE FlcsIntent LCSGAMUTMATCH FlcsEndpoints CIEXYZTRIPLE FlcsGammaRed DWORD FlcsGammaGreen DWORD FlcsGammaBlue DWORD FlcsFilename [260]WCHAR } /* wingdi.h:563:11 */ type LOGCOLORSPACEW = tagLOGCOLORSPACEW /* wingdi.h:574:5 */ type LPLOGCOLORSPACEW = uintptr /* wingdi.h:574:20 */ type LOGCOLORSPACE = LOGCOLORSPACEA /* wingdi.h:576:3 */ type LPLOGCOLORSPACE = LPLOGCOLORSPACEA /* wingdi.h:577:3 */ type tagBITMAPCOREHEADER = struct { FbcSize DWORD FbcWidth WORD FbcHeight WORD FbcPlanes WORD FbcBitCount WORD } /* wingdi.h:581:11 */ type BITMAPCOREHEADER = tagBITMAPCOREHEADER /* wingdi.h:587:5 */ type LPBITMAPCOREHEADER = uintptr /* wingdi.h:587:22 */ type PBITMAPCOREHEADER = uintptr /* wingdi.h:587:42 */ type tagBITMAPINFOHEADER = struct { FbiSize DWORD FbiWidth LONG FbiHeight LONG FbiPlanes WORD FbiBitCount WORD FbiCompression DWORD FbiSizeImage DWORD FbiXPelsPerMeter LONG FbiYPelsPerMeter LONG FbiClrUsed DWORD FbiClrImportant DWORD } /* wingdi.h:591:11 */ type BITMAPINFOHEADER = tagBITMAPINFOHEADER /* wingdi.h:603:5 */ type LPBITMAPINFOHEADER = uintptr /* wingdi.h:603:22 */ type PBITMAPINFOHEADER = uintptr /* wingdi.h:603:42 */ type BITMAPV4HEADER = struct { FbV4Size DWORD FbV4Width LONG FbV4Height LONG FbV4Planes WORD FbV4BitCount WORD FbV4V4Compression DWORD FbV4SizeImage DWORD FbV4XPelsPerMeter LONG FbV4YPelsPerMeter LONG FbV4ClrUsed DWORD FbV4ClrImportant DWORD FbV4RedMask DWORD FbV4GreenMask DWORD FbV4BlueMask DWORD FbV4AlphaMask DWORD FbV4CSType DWORD FbV4Endpoints CIEXYZTRIPLE FbV4GammaRed DWORD FbV4GammaGreen DWORD FbV4GammaBlue DWORD } /* wingdi.h:628:5 */ type LPBITMAPV4HEADER = uintptr /* wingdi.h:628:20 */ type PBITMAPV4HEADER = uintptr /* wingdi.h:628:38 */ type BITMAPV5HEADER = struct { FbV5Size DWORD FbV5Width LONG FbV5Height LONG FbV5Planes WORD FbV5BitCount WORD FbV5Compression DWORD FbV5SizeImage DWORD FbV5XPelsPerMeter LONG FbV5YPelsPerMeter LONG FbV5ClrUsed DWORD FbV5ClrImportant DWORD FbV5RedMask DWORD FbV5GreenMask DWORD FbV5BlueMask DWORD FbV5AlphaMask DWORD FbV5CSType DWORD FbV5Endpoints CIEXYZTRIPLE FbV5GammaRed DWORD FbV5GammaGreen DWORD FbV5GammaBlue DWORD FbV5Intent DWORD FbV5ProfileData DWORD FbV5ProfileSize DWORD FbV5Reserved DWORD } /* wingdi.h:655:5 */ type LPBITMAPV5HEADER = uintptr /* wingdi.h:655:20 */ type PBITMAPV5HEADER = uintptr /* wingdi.h:655:38 */ type tagBITMAPINFO = struct { FbmiHeader BITMAPINFOHEADER FbmiColors [1]RGBQUAD } /* wingdi.h:669:11 */ type BITMAPINFO = tagBITMAPINFO /* wingdi.h:672:5 */ type LPBITMAPINFO = uintptr /* wingdi.h:672:16 */ type PBITMAPINFO = uintptr /* wingdi.h:672:30 */ type tagBITMAPCOREINFO = struct { FbmciHeader BITMAPCOREHEADER FbmciColors [1]RGBTRIPLE _ [1]byte } /* wingdi.h:676:11 */ type BITMAPCOREINFO = tagBITMAPCOREINFO /* wingdi.h:679:5 */ type LPBITMAPCOREINFO = uintptr /* wingdi.h:679:20 */ type PBITMAPCOREINFO = uintptr /* wingdi.h:679:38 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagBITMAPFILEHEADER = struct { FbfType WORD _ [2]byte FbfSize DWORD FbfReserved1 WORD FbfReserved2 WORD FbfOffBits DWORD } /* wingdi.h:682:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type BITMAPFILEHEADER = tagBITMAPFILEHEADER /* wingdi.h:688:5 */ type LPBITMAPFILEHEADER = uintptr /* wingdi.h:688:22 */ type PBITMAPFILEHEADER = uintptr /* wingdi.h:688:42 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagFONTSIGNATURE = struct { FfsUsb [4]DWORD FfsCsb [2]DWORD } /* wingdi.h:697:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type FONTSIGNATURE = tagFONTSIGNATURE /* wingdi.h:700:5 */ type PFONTSIGNATURE = uintptr /* wingdi.h:700:19 */ type LPFONTSIGNATURE = uintptr /* wingdi.h:700:35 */ type tagCHARSETINFO = struct { FciCharset UINT FciACP UINT Ffs FONTSIGNATURE } /* wingdi.h:702:11 */ type CHARSETINFO = tagCHARSETINFO /* wingdi.h:706:5 */ type PCHARSETINFO = uintptr /* wingdi.h:706:17 */ type NPCHARSETINFO = uintptr /* wingdi.h:706:31 */ type LPCHARSETINFO = uintptr /* wingdi.h:706:46 */ type tagLOCALESIGNATURE = struct { FlsUsb [4]DWORD FlsCsbDefault [2]DWORD FlsCsbSupported [2]DWORD } /* wingdi.h:715:11 */ type LOCALESIGNATURE = tagLOCALESIGNATURE /* wingdi.h:719:5 */ type PLOCALESIGNATURE = uintptr /* wingdi.h:719:21 */ type LPLOCALESIGNATURE = uintptr /* wingdi.h:719:39 */ type tagHANDLETABLE = struct{ FobjectHandle [1]HGDIOBJ } /* wingdi.h:725:11 */ type HANDLETABLE = tagHANDLETABLE /* wingdi.h:727:5 */ type PHANDLETABLE = uintptr /* wingdi.h:727:17 */ type LPHANDLETABLE = uintptr /* wingdi.h:727:31 */ type tagMETARECORD = struct { FrdSize DWORD FrdFunction WORD FrdParm [1]WORD } /* wingdi.h:729:11 */ type METARECORD = tagMETARECORD /* wingdi.h:733:5 */ type PMETARECORD = uintptr /* wingdi.h:736:42 */ type LPMETARECORD = uintptr /* wingdi.h:739:42 */ type tagMETAFILEPICT = struct { Fmm LONG FxExt LONG FyExt LONG _ [4]byte FhMF HMETAFILE } /* wingdi.h:741:11 */ type METAFILEPICT = tagMETAFILEPICT /* wingdi.h:746:5 */ type LPMETAFILEPICT = uintptr /* wingdi.h:746:18 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagMETAHEADER = struct { FmtType WORD FmtHeaderSize WORD FmtVersion WORD _ [2]byte FmtSize DWORD FmtNoObjects WORD _ [2]byte FmtMaxRecord DWORD FmtNoParameters WORD _ [2]byte } /* wingdi.h:751:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type METAHEADER = tagMETAHEADER /* wingdi.h:759:5 */ type PMETAHEADER = uintptr /* wingdi.h:760:42 */ type LPMETAHEADER = uintptr /* wingdi.h:761:42 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagENHMETARECORD = struct { FiType DWORD FnSize DWORD FdParm [1]DWORD } /* wingdi.h:767:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type ENHMETARECORD = tagENHMETARECORD /* wingdi.h:771:5 */ type PENHMETARECORD = uintptr /* wingdi.h:771:19 */ type LPENHMETARECORD = uintptr /* wingdi.h:771:35 */ type tagENHMETAHEADER = struct { FiType DWORD FnSize DWORD FrclBounds RECTL FrclFrame RECTL FdSignature DWORD FnVersion DWORD FnBytes DWORD FnRecords DWORD FnHandles WORD FsReserved WORD FnDescription DWORD FoffDescription DWORD FnPalEntries DWORD FszlDevice SIZEL FszlMillimeters SIZEL FcbPixelFormat DWORD FoffPixelFormat DWORD FbOpenGL DWORD FszlMicrometers SIZEL } /* wingdi.h:773:11 */ type ENHMETAHEADER = tagENHMETAHEADER /* wingdi.h:793:5 */ type PENHMETAHEADER = uintptr /* wingdi.h:793:19 */ type LPENHMETAHEADER = uintptr /* wingdi.h:793:35 */ type BCHAR = BYTE /* wingdi.h:807:16 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagTEXTMETRICA = struct { FtmHeight LONG FtmAscent LONG FtmDescent LONG FtmInternalLeading LONG FtmExternalLeading LONG FtmAveCharWidth LONG FtmMaxCharWidth LONG FtmWeight LONG FtmOverhang LONG FtmDigitizedAspectX LONG FtmDigitizedAspectY LONG FtmFirstChar BYTE FtmLastChar BYTE FtmDefaultChar BYTE FtmBreakChar BYTE FtmItalic BYTE FtmUnderlined BYTE FtmStruckOut BYTE FtmPitchAndFamily BYTE FtmCharSet BYTE _ [3]byte } /* wingdi.h:816:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type TEXTMETRICA = tagTEXTMETRICA /* wingdi.h:837:5 */ type PTEXTMETRICA = uintptr /* wingdi.h:837:17 */ type NPTEXTMETRICA = uintptr /* wingdi.h:837:31 */ type LPTEXTMETRICA = uintptr /* wingdi.h:837:46 */ type tagTEXTMETRICW = struct { FtmHeight LONG FtmAscent LONG FtmDescent LONG FtmInternalLeading LONG FtmExternalLeading LONG FtmAveCharWidth LONG FtmMaxCharWidth LONG FtmWeight LONG FtmOverhang LONG FtmDigitizedAspectX LONG FtmDigitizedAspectY LONG FtmFirstChar WCHAR FtmLastChar WCHAR FtmDefaultChar WCHAR FtmBreakChar WCHAR FtmItalic BYTE FtmUnderlined BYTE FtmStruckOut BYTE FtmPitchAndFamily BYTE FtmCharSet BYTE _ [3]byte } /* wingdi.h:839:11 */ type TEXTMETRICW = tagTEXTMETRICW /* wingdi.h:860:5 */ type PTEXTMETRICW = uintptr /* wingdi.h:860:17 */ type NPTEXTMETRICW = uintptr /* wingdi.h:860:31 */ type LPTEXTMETRICW = uintptr /* wingdi.h:860:46 */ type TEXTMETRIC = TEXTMETRICA /* wingdi.h:862:3 */ type PTEXTMETRIC = PTEXTMETRICA /* wingdi.h:863:3 */ type NPTEXTMETRIC = NPTEXTMETRICA /* wingdi.h:864:3 */ type LPTEXTMETRIC = LPTEXTMETRICA /* wingdi.h:865:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagNEWTEXTMETRICA = struct { FtmHeight LONG FtmAscent LONG FtmDescent LONG FtmInternalLeading LONG FtmExternalLeading LONG FtmAveCharWidth LONG FtmMaxCharWidth LONG FtmWeight LONG FtmOverhang LONG FtmDigitizedAspectX LONG FtmDigitizedAspectY LONG FtmFirstChar BYTE FtmLastChar BYTE FtmDefaultChar BYTE FtmBreakChar BYTE FtmItalic BYTE FtmUnderlined BYTE FtmStruckOut BYTE FtmPitchAndFamily BYTE FtmCharSet BYTE _ [3]byte FntmFlags DWORD FntmSizeEM UINT FntmCellHeight UINT FntmAvgWidth UINT } /* wingdi.h:883:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type NEWTEXTMETRICA = tagNEWTEXTMETRICA /* wingdi.h:908:5 */ type PNEWTEXTMETRICA = uintptr /* wingdi.h:908:20 */ type NPNEWTEXTMETRICA = uintptr /* wingdi.h:908:37 */ type LPNEWTEXTMETRICA = uintptr /* wingdi.h:908:55 */ type tagNEWTEXTMETRICW = struct { FtmHeight LONG FtmAscent LONG FtmDescent LONG FtmInternalLeading LONG FtmExternalLeading LONG FtmAveCharWidth LONG FtmMaxCharWidth LONG FtmWeight LONG FtmOverhang LONG FtmDigitizedAspectX LONG FtmDigitizedAspectY LONG FtmFirstChar WCHAR FtmLastChar WCHAR FtmDefaultChar WCHAR FtmBreakChar WCHAR FtmItalic BYTE FtmUnderlined BYTE FtmStruckOut BYTE FtmPitchAndFamily BYTE FtmCharSet BYTE _ [3]byte FntmFlags DWORD FntmSizeEM UINT FntmCellHeight UINT FntmAvgWidth UINT } /* wingdi.h:910:11 */ type NEWTEXTMETRICW = tagNEWTEXTMETRICW /* wingdi.h:935:5 */ type PNEWTEXTMETRICW = uintptr /* wingdi.h:935:20 */ type NPNEWTEXTMETRICW = uintptr /* wingdi.h:935:37 */ type LPNEWTEXTMETRICW = uintptr /* wingdi.h:935:55 */ type NEWTEXTMETRIC = NEWTEXTMETRICA /* wingdi.h:937:3 */ type PNEWTEXTMETRIC = PNEWTEXTMETRICA /* wingdi.h:938:3 */ type NPNEWTEXTMETRIC = NPNEWTEXTMETRICA /* wingdi.h:939:3 */ type LPNEWTEXTMETRIC = LPNEWTEXTMETRICA /* wingdi.h:940:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagNEWTEXTMETRICEXA = struct { FntmTm NEWTEXTMETRICA FntmFontSig FONTSIGNATURE } /* wingdi.h:944:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type NEWTEXTMETRICEXA = tagNEWTEXTMETRICEXA /* wingdi.h:947:5 */ type tagNEWTEXTMETRICEXW = struct { FntmTm NEWTEXTMETRICW FntmFontSig FONTSIGNATURE } /* wingdi.h:949:11 */ type NEWTEXTMETRICEXW = tagNEWTEXTMETRICEXW /* wingdi.h:952:5 */ type NEWTEXTMETRICEX = NEWTEXTMETRICEXA /* wingdi.h:954:3 */ type tagPELARRAY = struct { FpaXCount LONG FpaYCount LONG FpaXExt LONG FpaYExt LONG FpaRGBs BYTE _ [3]byte } /* wingdi.h:959:11 */ type PELARRAY = tagPELARRAY /* wingdi.h:965:5 */ type PPELARRAY = uintptr /* wingdi.h:965:14 */ type NPPELARRAY = uintptr /* wingdi.h:965:25 */ type LPPELARRAY = uintptr /* wingdi.h:965:37 */ type tagLOGBRUSH = struct { FlbStyle UINT FlbColor COLORREF FlbHatch ULONG_PTR } /* wingdi.h:968:11 */ type LOGBRUSH = tagLOGBRUSH /* wingdi.h:972:5 */ type PLOGBRUSH = uintptr /* wingdi.h:972:14 */ type NPLOGBRUSH = uintptr /* wingdi.h:972:25 */ type LPLOGBRUSH = uintptr /* wingdi.h:972:37 */ type tagLOGBRUSH32 = struct { FlbStyle UINT FlbColor COLORREF FlbHatch ULONG } /* wingdi.h:974:11 */ type LOGBRUSH32 = tagLOGBRUSH32 /* wingdi.h:978:5 */ type PLOGBRUSH32 = uintptr /* wingdi.h:978:16 */ type NPLOGBRUSH32 = uintptr /* wingdi.h:978:29 */ type LPLOGBRUSH32 = uintptr /* wingdi.h:978:43 */ type PATTERN = LOGBRUSH /* wingdi.h:981:20 */ type PPATTERN = uintptr /* wingdi.h:982:19 */ type NPPATTERN = uintptr /* wingdi.h:983:19 */ type LPPATTERN = uintptr /* wingdi.h:984:19 */ type tagLOGPEN = struct { FlopnStyle UINT FlopnWidth POINT FlopnColor COLORREF } /* wingdi.h:988:11 */ type LOGPEN = tagLOGPEN /* wingdi.h:992:5 */ type PLOGPEN = uintptr /* wingdi.h:992:12 */ type NPLOGPEN = uintptr /* wingdi.h:992:21 */ type LPLOGPEN = uintptr /* wingdi.h:992:31 */ type tagEXTLOGPEN = struct { FelpPenStyle DWORD FelpWidth DWORD FelpBrushStyle UINT FelpColor COLORREF FelpHatch ULONG_PTR FelpNumEntries DWORD FelpStyleEntry [1]DWORD } /* wingdi.h:996:11 */ type EXTLOGPEN = tagEXTLOGPEN /* wingdi.h:1004:5 */ type PEXTLOGPEN = uintptr /* wingdi.h:1004:15 */ type NPEXTLOGPEN = uintptr /* wingdi.h:1004:27 */ type LPEXTLOGPEN = uintptr /* wingdi.h:1004:40 */ type tagEXTLOGPEN32 = struct { FelpPenStyle DWORD FelpWidth DWORD FelpBrushStyle UINT FelpColor COLORREF FelpHatch ULONG FelpNumEntries DWORD FelpStyleEntry [1]DWORD } /* wingdi.h:1008:11 */ type EXTLOGPEN32 = tagEXTLOGPEN32 /* wingdi.h:1016:5 */ type PEXTLOGPEN32 = uintptr /* wingdi.h:1016:18 */ type NPEXTLOGPEN32 = uintptr /* wingdi.h:1016:33 */ type LPEXTLOGPEN32 = uintptr /* wingdi.h:1016:49 */ type tagPALETTEENTRY = struct { FpeRed BYTE FpeGreen BYTE FpeBlue BYTE FpeFlags BYTE } /* wingdi.h:1020:11 */ type PALETTEENTRY = tagPALETTEENTRY /* wingdi.h:1025:5 */ type PPALETTEENTRY = uintptr /* wingdi.h:1025:18 */ type LPPALETTEENTRY = uintptr /* wingdi.h:1025:33 */ type tagLOGPALETTE = struct { FpalVersion WORD FpalNumEntries WORD FpalPalEntry [1]PALETTEENTRY } /* wingdi.h:1030:11 */ type LOGPALETTE = tagLOGPALETTE /* wingdi.h:1034:5 */ type PLOGPALETTE = uintptr /* wingdi.h:1034:16 */ type NPLOGPALETTE = uintptr /* wingdi.h:1034:29 */ type LPLOGPALETTE = uintptr /* wingdi.h:1034:43 */ type tagLOGFONTA = struct { FlfHeight LONG FlfWidth LONG FlfEscapement LONG FlfOrientation LONG FlfWeight LONG FlfItalic BYTE FlfUnderline BYTE FlfStrikeOut BYTE FlfCharSet BYTE FlfOutPrecision BYTE FlfClipPrecision BYTE FlfQuality BYTE FlfPitchAndFamily BYTE FlfFaceName [32]CHAR } /* wingdi.h:1041:11 */ type LOGFONTA = tagLOGFONTA /* wingdi.h:1056:5 */ type PLOGFONTA = uintptr /* wingdi.h:1056:14 */ type NPLOGFONTA = uintptr /* wingdi.h:1056:25 */ type LPLOGFONTA = uintptr /* wingdi.h:1056:37 */ type tagLOGFONTW = struct { FlfHeight LONG FlfWidth LONG FlfEscapement LONG FlfOrientation LONG FlfWeight LONG FlfItalic BYTE FlfUnderline BYTE FlfStrikeOut BYTE FlfCharSet BYTE FlfOutPrecision BYTE FlfClipPrecision BYTE FlfQuality BYTE FlfPitchAndFamily BYTE FlfFaceName [32]WCHAR } /* wingdi.h:1058:11 */ type LOGFONTW = tagLOGFONTW /* wingdi.h:1073:5 */ type PLOGFONTW = uintptr /* wingdi.h:1073:14 */ type NPLOGFONTW = uintptr /* wingdi.h:1073:25 */ type LPLOGFONTW = uintptr /* wingdi.h:1073:37 */ type LOGFONT = LOGFONTA /* wingdi.h:1075:3 */ type PLOGFONT = PLOGFONTA /* wingdi.h:1076:3 */ type NPLOGFONT = NPLOGFONTA /* wingdi.h:1077:3 */ type LPLOGFONT = LPLOGFONTA /* wingdi.h:1078:3 */ type tagENUMLOGFONTA = struct { FelfLogFont LOGFONTA FelfFullName [64]BYTE FelfStyle [32]BYTE } /* wingdi.h:1084:11 */ type ENUMLOGFONTA = tagENUMLOGFONTA /* wingdi.h:1088:5 */ type LPENUMLOGFONTA = uintptr /* wingdi.h:1088:18 */ type tagENUMLOGFONTW = struct { FelfLogFont LOGFONTW FelfFullName [64]WCHAR FelfStyle [32]WCHAR } /* wingdi.h:1090:11 */ type ENUMLOGFONTW = tagENUMLOGFONTW /* wingdi.h:1094:5 */ type LPENUMLOGFONTW = uintptr /* wingdi.h:1094:18 */ type ENUMLOGFONT = ENUMLOGFONTA /* wingdi.h:1096:3 */ type LPENUMLOGFONT = LPENUMLOGFONTA /* wingdi.h:1097:3 */ type tagENUMLOGFONTEXA = struct { FelfLogFont LOGFONTA FelfFullName [64]BYTE FelfStyle [32]BYTE FelfScript [32]BYTE } /* wingdi.h:1099:11 */ type ENUMLOGFONTEXA = tagENUMLOGFONTEXA /* wingdi.h:1104:5 */ type LPENUMLOGFONTEXA = uintptr /* wingdi.h:1104:20 */ type tagENUMLOGFONTEXW = struct { FelfLogFont LOGFONTW FelfFullName [64]WCHAR FelfStyle [32]WCHAR FelfScript [32]WCHAR } /* wingdi.h:1106:11 */ type ENUMLOGFONTEXW = tagENUMLOGFONTEXW /* wingdi.h:1111:5 */ type LPENUMLOGFONTEXW = uintptr /* wingdi.h:1111:20 */ type ENUMLOGFONTEX = ENUMLOGFONTEXA /* wingdi.h:1113:3 */ type LPENUMLOGFONTEX = LPENUMLOGFONTEXA /* wingdi.h:1114:3 */ type tagPANOSE = struct { FbFamilyType BYTE FbSerifStyle BYTE FbWeight BYTE FbProportion BYTE FbContrast BYTE FbStrokeVariation BYTE FbArmStyle BYTE FbLetterform BYTE FbMidline BYTE FbXHeight BYTE } /* wingdi.h:1235:11 */ type PANOSE = tagPANOSE /* wingdi.h:1246:5 */ type LPPANOSE = uintptr /* wingdi.h:1246:12 */ type tagEXTLOGFONTA = struct { FelfLogFont LOGFONTA FelfFullName [64]BYTE FelfStyle [32]BYTE FelfVersion DWORD FelfStyleSize DWORD FelfMatch DWORD FelfReserved DWORD FelfVendorId [4]BYTE FelfCulture DWORD FelfPanose PANOSE _ [2]byte } /* wingdi.h:1356:11 */ type EXTLOGFONTA = tagEXTLOGFONTA /* wingdi.h:1367:5 */ type PEXTLOGFONTA = uintptr /* wingdi.h:1367:17 */ type NPEXTLOGFONTA = uintptr /* wingdi.h:1367:31 */ type LPEXTLOGFONTA = uintptr /* wingdi.h:1367:46 */ type tagEXTLOGFONTW = struct { FelfLogFont LOGFONTW FelfFullName [64]WCHAR FelfStyle [32]WCHAR FelfVersion DWORD FelfStyleSize DWORD FelfMatch DWORD FelfReserved DWORD FelfVendorId [4]BYTE FelfCulture DWORD FelfPanose PANOSE _ [2]byte } /* wingdi.h:1369:11 */ type EXTLOGFONTW = tagEXTLOGFONTW /* wingdi.h:1380:5 */ type PEXTLOGFONTW = uintptr /* wingdi.h:1380:17 */ type NPEXTLOGFONTW = uintptr /* wingdi.h:1380:31 */ type LPEXTLOGFONTW = uintptr /* wingdi.h:1380:46 */ type EXTLOGFONT = EXTLOGFONTA /* wingdi.h:1382:3 */ type PEXTLOGFONT = PEXTLOGFONTA /* wingdi.h:1383:3 */ type NPEXTLOGFONT = NPEXTLOGFONTA /* wingdi.h:1384:3 */ type LPEXTLOGFONT = LPEXTLOGFONTA /* wingdi.h:1385:3 */ type _devicemodeA = struct { FdmDeviceName [32]BYTE FdmSpecVersion WORD FdmDriverVersion WORD FdmSize WORD FdmDriverExtra WORD FdmFields DWORD F__44 struct { _ [0]uint32 F__0 struct { FdmOrientation int16 FdmPaperSize int16 FdmPaperLength int16 FdmPaperWidth int16 FdmScale int16 FdmCopies int16 FdmDefaultSource int16 FdmPrintQuality int16 } } FdmColor int16 FdmDuplex int16 FdmYResolution int16 FdmTTOption int16 FdmCollate int16 FdmFormName [32]BYTE FdmLogPixels WORD FdmBitsPerPel DWORD FdmPelsWidth DWORD FdmPelsHeight DWORD F__116 struct{ FdmDisplayFlags DWORD } FdmDisplayFrequency DWORD FdmICMMethod DWORD FdmICMIntent DWORD FdmMediaType DWORD FdmDitherType DWORD FdmReserved1 DWORD FdmReserved2 DWORD FdmPanningWidth DWORD FdmPanningHeight DWORD } /* wingdi.h:1669:11 */ type DEVMODEA = _devicemodeA /* wingdi.h:1716:5 */ type PDEVMODEA = uintptr /* wingdi.h:1716:14 */ type NPDEVMODEA = uintptr /* wingdi.h:1716:25 */ type LPDEVMODEA = uintptr /* wingdi.h:1716:37 */ type _devicemodeW = struct { FdmDeviceName [32]WCHAR FdmSpecVersion WORD FdmDriverVersion WORD FdmSize WORD FdmDriverExtra WORD FdmFields DWORD F__76 struct { _ [0]uint32 F__0 struct { FdmOrientation int16 FdmPaperSize int16 FdmPaperLength int16 FdmPaperWidth int16 FdmScale int16 FdmCopies int16 FdmDefaultSource int16 FdmPrintQuality int16 } } FdmColor int16 FdmDuplex int16 FdmYResolution int16 FdmTTOption int16 FdmCollate int16 FdmFormName [32]WCHAR FdmLogPixels WORD FdmBitsPerPel DWORD FdmPelsWidth DWORD FdmPelsHeight DWORD F__180 struct{ FdmDisplayFlags DWORD } FdmDisplayFrequency DWORD FdmICMMethod DWORD FdmICMIntent DWORD FdmMediaType DWORD FdmDitherType DWORD FdmReserved1 DWORD FdmReserved2 DWORD FdmPanningWidth DWORD FdmPanningHeight DWORD } /* wingdi.h:1718:11 */ type DEVMODEW = _devicemodeW /* wingdi.h:1765:5 */ type PDEVMODEW = uintptr /* wingdi.h:1765:14 */ type NPDEVMODEW = uintptr /* wingdi.h:1765:25 */ type LPDEVMODEW = uintptr /* wingdi.h:1765:37 */ type DEVMODE = DEVMODEA /* wingdi.h:1767:3 */ type PDEVMODE = PDEVMODEA /* wingdi.h:1768:3 */ type NPDEVMODE = NPDEVMODEA /* wingdi.h:1769:3 */ type LPDEVMODE = LPDEVMODEA /* wingdi.h:1770:3 */ type _DISPLAY_DEVICEA = struct { Fcb DWORD FDeviceName [32]CHAR FDeviceString [128]CHAR FStateFlags DWORD FDeviceID [128]CHAR FDeviceKey [128]CHAR } /* wingdi.h:2021:11 */ type DISPLAY_DEVICEA = _DISPLAY_DEVICEA /* wingdi.h:2028:5 */ type PDISPLAY_DEVICEA = uintptr /* wingdi.h:2028:21 */ type LPDISPLAY_DEVICEA = uintptr /* wingdi.h:2028:39 */ type _DISPLAY_DEVICEW = struct { Fcb DWORD FDeviceName [32]WCHAR FDeviceString [128]WCHAR FStateFlags DWORD FDeviceID [128]WCHAR FDeviceKey [128]WCHAR } /* wingdi.h:2030:11 */ type DISPLAY_DEVICEW = _DISPLAY_DEVICEW /* wingdi.h:2037:5 */ type PDISPLAY_DEVICEW = uintptr /* wingdi.h:2037:21 */ type LPDISPLAY_DEVICEW = uintptr /* wingdi.h:2037:39 */ type DISPLAY_DEVICE = DISPLAY_DEVICEA /* wingdi.h:2039:3 */ type PDISPLAY_DEVICE = PDISPLAY_DEVICEA /* wingdi.h:2040:3 */ type LPDISPLAY_DEVICE = LPDISPLAY_DEVICEA /* wingdi.h:2041:3 */ type _RGNDATAHEADER = struct { FdwSize DWORD FiType DWORD FnCount DWORD FnRgnSize DWORD FrcBound RECT } /* wingdi.h:2315:11 */ type RGNDATAHEADER = _RGNDATAHEADER /* wingdi.h:2321:5 */ type PRGNDATAHEADER = uintptr /* wingdi.h:2321:19 */ type _RGNDATA = struct { Frdh RGNDATAHEADER FBuffer [1]int8 _ [3]byte } /* wingdi.h:2323:11 */ type RGNDATA = _RGNDATA /* wingdi.h:2326:5 */ type PRGNDATA = uintptr /* wingdi.h:2326:13 */ type NPRGNDATA = uintptr /* wingdi.h:2326:23 */ type LPRGNDATA = uintptr /* wingdi.h:2326:34 */ type _ABC = struct { FabcA int32 FabcB UINT FabcC int32 } /* wingdi.h:2332:11 */ type ABC = _ABC /* wingdi.h:2336:5 */ type PABC = uintptr /* wingdi.h:2336:9 */ type NPABC = uintptr /* wingdi.h:2336:15 */ type LPABC = uintptr /* wingdi.h:2336:22 */ type _ABCFLOAT = struct { FabcfA FLOAT FabcfB FLOAT FabcfC FLOAT } /* wingdi.h:2338:11 */ type ABCFLOAT = _ABCFLOAT /* wingdi.h:2342:5 */ type PABCFLOAT = uintptr /* wingdi.h:2342:14 */ type NPABCFLOAT = uintptr /* wingdi.h:2342:25 */ type LPABCFLOAT = uintptr /* wingdi.h:2342:37 */ type _OUTLINETEXTMETRICA = struct { FotmSize UINT FotmTextMetrics TEXTMETRICA FotmFiller BYTE FotmPanoseNumber PANOSE _ [1]byte FotmfsSelection UINT FotmfsType UINT FotmsCharSlopeRise int32 FotmsCharSlopeRun int32 FotmItalicAngle int32 FotmEMSquare UINT FotmAscent int32 FotmDescent int32 FotmLineGap UINT FotmsCapEmHeight UINT FotmsXHeight UINT FotmrcFontBox RECT FotmMacAscent int32 FotmMacDescent int32 FotmMacLineGap UINT FotmusMinimumPPEM UINT FotmptSubscriptSize POINT FotmptSubscriptOffset POINT FotmptSuperscriptSize POINT FotmptSuperscriptOffset POINT FotmsStrikeoutSize UINT FotmsStrikeoutPosition int32 FotmsUnderscoreSize int32 FotmsUnderscorePosition int32 _ [4]byte FotmpFamilyName PSTR FotmpFaceName PSTR FotmpStyleName PSTR FotmpFullName PSTR } /* wingdi.h:2348:11 */ type OUTLINETEXTMETRICA = _OUTLINETEXTMETRICA /* wingdi.h:2381:5 */ type POUTLINETEXTMETRICA = uintptr /* wingdi.h:2381:24 */ type NPOUTLINETEXTMETRICA = uintptr /* wingdi.h:2381:45 */ type LPOUTLINETEXTMETRICA = uintptr /* wingdi.h:2381:67 */ type _OUTLINETEXTMETRICW = struct { FotmSize UINT FotmTextMetrics TEXTMETRICW FotmFiller BYTE FotmPanoseNumber PANOSE _ [1]byte FotmfsSelection UINT FotmfsType UINT FotmsCharSlopeRise int32 FotmsCharSlopeRun int32 FotmItalicAngle int32 FotmEMSquare UINT FotmAscent int32 FotmDescent int32 FotmLineGap UINT FotmsCapEmHeight UINT FotmsXHeight UINT FotmrcFontBox RECT FotmMacAscent int32 FotmMacDescent int32 FotmMacLineGap UINT FotmusMinimumPPEM UINT FotmptSubscriptSize POINT FotmptSubscriptOffset POINT FotmptSuperscriptSize POINT FotmptSuperscriptOffset POINT FotmsStrikeoutSize UINT FotmsStrikeoutPosition int32 FotmsUnderscoreSize int32 FotmsUnderscorePosition int32 FotmpFamilyName PSTR FotmpFaceName PSTR FotmpStyleName PSTR FotmpFullName PSTR } /* wingdi.h:2383:11 */ type OUTLINETEXTMETRICW = _OUTLINETEXTMETRICW /* wingdi.h:2416:5 */ type POUTLINETEXTMETRICW = uintptr /* wingdi.h:2416:24 */ type NPOUTLINETEXTMETRICW = uintptr /* wingdi.h:2416:45 */ type LPOUTLINETEXTMETRICW = uintptr /* wingdi.h:2416:67 */ type OUTLINETEXTMETRIC = OUTLINETEXTMETRICA /* wingdi.h:2418:3 */ type POUTLINETEXTMETRIC = POUTLINETEXTMETRICA /* wingdi.h:2419:3 */ type NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA /* wingdi.h:2420:3 */ type LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA /* wingdi.h:2421:3 */ type tagPOLYTEXTA = struct { Fx int32 Fy int32 Fn UINT _ [4]byte Flpstr LPCSTR FuiFlags UINT Frcl RECT _ [4]byte Fpdx uintptr } /* wingdi.h:2426:11 */ type POLYTEXTA = tagPOLYTEXTA /* wingdi.h:2434:5 */ type PPOLYTEXTA = uintptr /* wingdi.h:2434:15 */ type NPPOLYTEXTA = uintptr /* wingdi.h:2434:27 */ type LPPOLYTEXTA = uintptr /* wingdi.h:2434:40 */ type tagPOLYTEXTW = struct { Fx int32 Fy int32 Fn UINT _ [4]byte Flpstr LPCWSTR FuiFlags UINT Frcl RECT _ [4]byte Fpdx uintptr } /* wingdi.h:2436:11 */ type POLYTEXTW = tagPOLYTEXTW /* wingdi.h:2444:5 */ type PPOLYTEXTW = uintptr /* wingdi.h:2444:15 */ type NPPOLYTEXTW = uintptr /* wingdi.h:2444:27 */ type LPPOLYTEXTW = uintptr /* wingdi.h:2444:40 */ type POLYTEXT = POLYTEXTA /* wingdi.h:2446:3 */ type PPOLYTEXT = PPOLYTEXTA /* wingdi.h:2447:3 */ type NPPOLYTEXT = NPPOLYTEXTA /* wingdi.h:2448:3 */ type LPPOLYTEXT = LPPOLYTEXTA /* wingdi.h:2449:3 */ type _FIXED = struct { Ffract WORD Fvalue int16 } /* wingdi.h:2453:11 */ type FIXED = _FIXED /* wingdi.h:2456:5 */ type _MAT2 = struct { FeM11 FIXED FeM12 FIXED FeM21 FIXED FeM22 FIXED } /* wingdi.h:2458:11 */ type MAT2 = _MAT2 /* wingdi.h:2463:5 */ type LPMAT2 = uintptr /* wingdi.h:2463:10 */ type _GLYPHMETRICS = struct { FgmBlackBoxX UINT FgmBlackBoxY UINT FgmptGlyphOrigin POINT FgmCellIncX int16 FgmCellIncY int16 } /* wingdi.h:2465:11 */ type GLYPHMETRICS = _GLYPHMETRICS /* wingdi.h:2471:5 */ type LPGLYPHMETRICS = uintptr /* wingdi.h:2471:18 */ type tagPOINTFX = struct { Fx FIXED Fy FIXED } /* wingdi.h:2491:11 */ type POINTFX = tagPOINTFX /* wingdi.h:2494:5 */ type LPPOINTFX = uintptr /* wingdi.h:2494:13 */ type tagTTPOLYCURVE = struct { FwType WORD Fcpfx WORD Fapfx [1]POINTFX } /* wingdi.h:2496:11 */ type TTPOLYCURVE = tagTTPOLYCURVE /* wingdi.h:2500:5 */ type LPTTPOLYCURVE = uintptr /* wingdi.h:2500:17 */ type tagTTPOLYGONHEADER = struct { Fcb DWORD FdwType DWORD FpfxStart POINTFX } /* wingdi.h:2502:11 */ type TTPOLYGONHEADER = tagTTPOLYGONHEADER /* wingdi.h:2506:5 */ type LPTTPOLYGONHEADER = uintptr /* wingdi.h:2506:21 */ type tagGCP_RESULTSA = struct { FlStructSize DWORD _ [4]byte FlpOutString LPSTR FlpOrder uintptr FlpDx uintptr FlpCaretPos uintptr FlpClass LPSTR FlpGlyphs LPWSTR FnGlyphs UINT FnMaxFit int32 } /* wingdi.h:2549:11 */ type GCP_RESULTSA = tagGCP_RESULTSA /* wingdi.h:2559:5 */ type LPGCP_RESULTSA = uintptr /* wingdi.h:2559:18 */ type tagGCP_RESULTSW = struct { FlStructSize DWORD _ [4]byte FlpOutString LPWSTR FlpOrder uintptr FlpDx uintptr FlpCaretPos uintptr FlpClass LPSTR FlpGlyphs LPWSTR FnGlyphs UINT FnMaxFit int32 } /* wingdi.h:2560:11 */ type GCP_RESULTSW = tagGCP_RESULTSW /* wingdi.h:2570:5 */ type LPGCP_RESULTSW = uintptr /* wingdi.h:2570:18 */ type GCP_RESULTS = GCP_RESULTSA /* wingdi.h:2572:3 */ type LPGCP_RESULTS = LPGCP_RESULTSA /* wingdi.h:2573:3 */ type _RASTERIZER_STATUS = struct { FnSize int16 FwFlags int16 FnLanguageID int16 } /* wingdi.h:2575:11 */ type RASTERIZER_STATUS = _RASTERIZER_STATUS /* wingdi.h:2579:5 */ type LPRASTERIZER_STATUS = uintptr /* wingdi.h:2579:23 */ type tagPIXELFORMATDESCRIPTOR = struct { FnSize WORD FnVersion WORD FdwFlags DWORD FiPixelType BYTE FcColorBits BYTE FcRedBits BYTE FcRedShift BYTE FcGreenBits BYTE FcGreenShift BYTE FcBlueBits BYTE FcBlueShift BYTE FcAlphaBits BYTE FcAlphaShift BYTE FcAccumBits BYTE FcAccumRedBits BYTE FcAccumGreenBits BYTE FcAccumBlueBits BYTE FcAccumAlphaBits BYTE FcDepthBits BYTE FcStencilBits BYTE FcAuxBuffers BYTE FiLayerType BYTE FbReserved BYTE FdwLayerMask DWORD FdwVisibleMask DWORD FdwDamageMask DWORD } /* wingdi.h:2586:11 */ type PIXELFORMATDESCRIPTOR = tagPIXELFORMATDESCRIPTOR /* wingdi.h:2613:5 */ type PPIXELFORMATDESCRIPTOR = uintptr /* wingdi.h:2613:27 */ type LPPIXELFORMATDESCRIPTOR = uintptr /* wingdi.h:2613:51 */ type OLDFONTENUMPROCA = uintptr /* wingdi.h:2646:15 */ type OLDFONTENUMPROCW = uintptr /* wingdi.h:2647:15 */ type FONTENUMPROCA = OLDFONTENUMPROCA /* wingdi.h:2657:28 */ type FONTENUMPROCW = OLDFONTENUMPROCW /* wingdi.h:2658:28 */ type FONTENUMPROC = FONTENUMPROCA /* wingdi.h:2660:3 */ type GOBJENUMPROC = uintptr /* wingdi.h:2662:15 */ type LINEDDAPROC = uintptr /* wingdi.h:2663:16 */ type LPFNDEVMODE = uintptr /* wingdi.h:2725:16 */ type LPFNDEVCAPS = uintptr /* wingdi.h:2726:17 */ type tagWCRANGE = struct { FwcLow WCHAR FcGlyphs USHORT } /* wingdi.h:2906:11 */ type WCRANGE = tagWCRANGE /* wingdi.h:2909:5 */ type PWCRANGE = uintptr /* wingdi.h:2909:13 */ type LPWCRANGE = uintptr /* wingdi.h:2909:23 */ type tagGLYPHSET = struct { FcbThis DWORD FflAccel DWORD FcGlyphsSupported DWORD FcRanges DWORD Franges [1]WCRANGE } /* wingdi.h:2911:11 */ type GLYPHSET = tagGLYPHSET /* wingdi.h:2917:5 */ type PGLYPHSET = uintptr /* wingdi.h:2917:14 */ type LPGLYPHSET = uintptr /* wingdi.h:2917:25 */ type tagDESIGNVECTOR = struct { FdvReserved DWORD FdvNumAxes DWORD FdvValues [16]LONG } /* wingdi.h:2937:11 */ type DESIGNVECTOR = tagDESIGNVECTOR /* wingdi.h:2941:5 */ type PDESIGNVECTOR = uintptr /* wingdi.h:2941:18 */ type LPDESIGNVECTOR = uintptr /* wingdi.h:2941:33 */ type tagAXISINFOA = struct { FaxMinValue LONG FaxMaxValue LONG FaxAxisName [16]BYTE } /* wingdi.h:2958:11 */ type AXISINFOA = tagAXISINFOA /* wingdi.h:2962:5 */ type PAXISINFOA = uintptr /* wingdi.h:2962:15 */ type LPAXISINFOA = uintptr /* wingdi.h:2962:27 */ type tagAXISINFOW = struct { FaxMinValue LONG FaxMaxValue LONG FaxAxisName [16]WCHAR } /* wingdi.h:2964:11 */ type AXISINFOW = tagAXISINFOW /* wingdi.h:2968:5 */ type PAXISINFOW = uintptr /* wingdi.h:2968:15 */ type LPAXISINFOW = uintptr /* wingdi.h:2968:27 */ type AXISINFO = AXISINFOA /* wingdi.h:2970:3 */ type PAXISINFO = PAXISINFOA /* wingdi.h:2971:3 */ type LPAXISINFO = LPAXISINFOA /* wingdi.h:2972:3 */ type tagAXESLISTA = struct { FaxlReserved DWORD FaxlNumAxes DWORD FaxlAxisInfo [16]AXISINFOA } /* wingdi.h:2974:11 */ type AXESLISTA = tagAXESLISTA /* wingdi.h:2978:5 */ type PAXESLISTA = uintptr /* wingdi.h:2978:15 */ type LPAXESLISTA = uintptr /* wingdi.h:2978:27 */ type tagAXESLISTW = struct { FaxlReserved DWORD FaxlNumAxes DWORD FaxlAxisInfo [16]AXISINFOW } /* wingdi.h:2980:11 */ type AXESLISTW = tagAXESLISTW /* wingdi.h:2984:5 */ type PAXESLISTW = uintptr /* wingdi.h:2984:15 */ type LPAXESLISTW = uintptr /* wingdi.h:2984:27 */ type AXESLIST = AXESLISTA /* wingdi.h:2986:3 */ type PAXESLIST = PAXESLISTA /* wingdi.h:2987:3 */ type LPAXESLIST = LPAXESLISTA /* wingdi.h:2988:3 */ type tagENUMLOGFONTEXDVA = struct { FelfEnumLogfontEx ENUMLOGFONTEXA FelfDesignVector DESIGNVECTOR } /* wingdi.h:2990:11 */ type ENUMLOGFONTEXDVA = tagENUMLOGFONTEXDVA /* wingdi.h:2993:5 */ type PENUMLOGFONTEXDVA = uintptr /* wingdi.h:2993:22 */ type LPENUMLOGFONTEXDVA = uintptr /* wingdi.h:2993:41 */ type tagENUMLOGFONTEXDVW = struct { FelfEnumLogfontEx ENUMLOGFONTEXW FelfDesignVector DESIGNVECTOR } /* wingdi.h:2995:11 */ type ENUMLOGFONTEXDVW = tagENUMLOGFONTEXDVW /* wingdi.h:2998:5 */ type PENUMLOGFONTEXDVW = uintptr /* wingdi.h:2998:22 */ type LPENUMLOGFONTEXDVW = uintptr /* wingdi.h:2998:41 */ type ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA /* wingdi.h:3000:3 */ type PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA /* wingdi.h:3001:3 */ type LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA /* wingdi.h:3002:3 */ type tagENUMTEXTMETRICA = struct { FetmNewTextMetricEx NEWTEXTMETRICEXA FetmAxesList AXESLISTA } /* wingdi.h:3010:11 */ type ENUMTEXTMETRICA = tagENUMTEXTMETRICA /* wingdi.h:3013:5 */ type PENUMTEXTMETRICA = uintptr /* wingdi.h:3013:21 */ type LPENUMTEXTMETRICA = uintptr /* wingdi.h:3013:39 */ type tagENUMTEXTMETRICW = struct { FetmNewTextMetricEx NEWTEXTMETRICEXW FetmAxesList AXESLISTW } /* wingdi.h:3014:11 */ type ENUMTEXTMETRICW = tagENUMTEXTMETRICW /* wingdi.h:3018:5 */ type PENUMTEXTMETRICW = uintptr /* wingdi.h:3018:21 */ type LPENUMTEXTMETRICW = uintptr /* wingdi.h:3018:39 */ type ENUMTEXTMETRIC = ENUMTEXTMETRICA /* wingdi.h:3020:3 */ type PENUMTEXTMETRIC = PENUMTEXTMETRICA /* wingdi.h:3021:3 */ type LPENUMTEXTMETRIC = LPENUMTEXTMETRICA /* wingdi.h:3022:3 */ type COLOR16 = USHORT /* wingdi.h:3124:18 */ type _TRIVERTEX = struct { Fx LONG Fy LONG FRed COLOR16 FGreen COLOR16 FBlue COLOR16 FAlpha COLOR16 } /* wingdi.h:3126:11 */ type TRIVERTEX = _TRIVERTEX /* wingdi.h:3133:5 */ type PTRIVERTEX = uintptr /* wingdi.h:3133:15 */ type LPTRIVERTEX = uintptr /* wingdi.h:3133:27 */ type _GRADIENT_TRIANGLE = struct { FVertex1 ULONG FVertex2 ULONG FVertex3 ULONG } /* wingdi.h:3136:11 */ type GRADIENT_TRIANGLE = _GRADIENT_TRIANGLE /* wingdi.h:3140:5 */ type PGRADIENT_TRIANGLE = uintptr /* wingdi.h:3140:23 */ type LPGRADIENT_TRIANGLE = uintptr /* wingdi.h:3140:43 */ type _GRADIENT_RECT = struct { FUpperLeft ULONG FLowerRight ULONG } /* wingdi.h:3142:11 */ type GRADIENT_RECT = _GRADIENT_RECT /* wingdi.h:3145:5 */ type PGRADIENT_RECT = uintptr /* wingdi.h:3145:19 */ type LPGRADIENT_RECT = uintptr /* wingdi.h:3145:35 */ type _BLENDFUNCTION = struct { FBlendOp BYTE FBlendFlags BYTE FSourceConstantAlpha BYTE FAlphaFormat BYTE } /* wingdi.h:3148:11 */ type BLENDFUNCTION = _BLENDFUNCTION /* wingdi.h:3153:5 */ type PBLENDFUNCTION = uintptr /* wingdi.h:3153:19 */ type MFENUMPROC = uintptr /* wingdi.h:3181:15 */ type ENHMFENUMPROC = uintptr /* wingdi.h:3185:15 */ type tagDIBSECTION = struct { FdsBm BITMAP FdsBmih BITMAPINFOHEADER FdsBitfields [3]DWORD _ [4]byte FdshSection HANDLE FdsOffset DWORD _ [4]byte } /* wingdi.h:3217:11 */ type DIBSECTION = tagDIBSECTION /* wingdi.h:3223:5 */ type LPDIBSECTION = uintptr /* wingdi.h:3223:16 */ type PDIBSECTION = uintptr /* wingdi.h:3223:30 */ type tagCOLORADJUSTMENT = struct { FcaSize WORD FcaFlags WORD FcaIlluminantIndex WORD FcaRedGamma WORD FcaGreenGamma WORD FcaBlueGamma WORD FcaReferenceBlack WORD FcaReferenceWhite WORD FcaContrast SHORT FcaBrightness SHORT FcaColorfulness SHORT FcaRedGreenTint SHORT } /* wingdi.h:3265:11 */ type COLORADJUSTMENT = tagCOLORADJUSTMENT /* wingdi.h:3278:5 */ type PCOLORADJUSTMENT = uintptr /* wingdi.h:3278:21 */ type LPCOLORADJUSTMENT = uintptr /* wingdi.h:3278:39 */ type ABORTPROC = uintptr /* wingdi.h:3284:19 */ type _DOCINFOA = struct { FcbSize int32 _ [4]byte FlpszDocName LPCSTR FlpszOutput LPCSTR FlpszDatatype LPCSTR FfwType DWORD _ [4]byte } /* wingdi.h:3286:11 */ type DOCINFOA = _DOCINFOA /* wingdi.h:3292:5 */ type LPDOCINFOA = uintptr /* wingdi.h:3292:14 */ type _DOCINFOW = struct { FcbSize int32 _ [4]byte FlpszDocName LPCWSTR FlpszOutput LPCWSTR FlpszDatatype LPCWSTR FfwType DWORD _ [4]byte } /* wingdi.h:3294:11 */ type DOCINFOW = _DOCINFOW /* wingdi.h:3300:5 */ type LPDOCINFOW = uintptr /* wingdi.h:3300:14 */ type DOCINFO = DOCINFOA /* wingdi.h:3302:3 */ type LPDOCINFO = LPDOCINFOA /* wingdi.h:3303:3 */ type tagKERNINGPAIR = struct { FwFirst WORD FwSecond WORD FiKernAmount int32 } /* wingdi.h:3373:11 */ type KERNINGPAIR = tagKERNINGPAIR /* wingdi.h:3377:5 */ type LPKERNINGPAIR = uintptr /* wingdi.h:3377:17 */ type ICMENUMPROCA = uintptr /* wingdi.h:3395:15 */ type ICMENUMPROCW = uintptr /* wingdi.h:3396:15 */ type tagEMR = struct { FiType DWORD FnSize DWORD } /* wingdi.h:3561:11 */ type EMR = tagEMR /* wingdi.h:3564:5 */ type PEMR = uintptr /* wingdi.h:3564:9 */ type tagEMRTEXT = struct { FptlReference POINTL FnChars DWORD FoffString DWORD FfOptions DWORD Frcl RECTL FoffDx DWORD } /* wingdi.h:3566:11 */ type EMRTEXT = tagEMRTEXT /* wingdi.h:3573:5 */ type PEMRTEXT = uintptr /* wingdi.h:3573:13 */ type tagABORTPATH = struct{ Femr EMR } /* wingdi.h:3575:11 */ type EMRABORTPATH = tagABORTPATH /* wingdi.h:3577:5 */ type PEMRABORTPATH = uintptr /* wingdi.h:3577:18 */ type EMRBEGINPATH = tagABORTPATH /* wingdi.h:3577:33 */ type PEMRBEGINPATH = uintptr /* wingdi.h:3577:46 */ type EMRENDPATH = tagABORTPATH /* wingdi.h:3577:61 */ type PEMRENDPATH = uintptr /* wingdi.h:3577:72 */ type EMRCLOSEFIGURE = tagABORTPATH /* wingdi.h:3577:85 */ type PEMRCLOSEFIGURE = uintptr /* wingdi.h:3577:100 */ type EMRFLATTENPATH = tagABORTPATH /* wingdi.h:3577:117 */ type PEMRFLATTENPATH = uintptr /* wingdi.h:3577:132 */ type EMRWIDENPATH = tagABORTPATH /* wingdi.h:3577:149 */ type PEMRWIDENPATH = uintptr /* wingdi.h:3577:162 */ type EMRSETMETARGN = tagABORTPATH /* wingdi.h:3577:177 */ type PEMRSETMETARGN = uintptr /* wingdi.h:3577:191 */ type EMRSAVEDC = tagABORTPATH /* wingdi.h:3577:207 */ type PEMRSAVEDC = uintptr /* wingdi.h:3577:217 */ type EMRREALIZEPALETTE = tagABORTPATH /* wingdi.h:3577:229 */ type PEMRREALIZEPALETTE = uintptr /* wingdi.h:3577:247 */ type tagEMRSELECTCLIPPATH = struct { Femr EMR FiMode DWORD } /* wingdi.h:3579:11 */ type EMRSELECTCLIPPATH = tagEMRSELECTCLIPPATH /* wingdi.h:3582:5 */ type PEMRSELECTCLIPPATH = uintptr /* wingdi.h:3582:23 */ type EMRSETBKMODE = tagEMRSELECTCLIPPATH /* wingdi.h:3582:43 */ type PEMRSETBKMODE = uintptr /* wingdi.h:3582:56 */ type EMRSETMAPMODE = tagEMRSELECTCLIPPATH /* wingdi.h:3582:71 */ type PEMRSETMAPMODE = uintptr /* wingdi.h:3582:85 */ type EMRSETLAYOUT = tagEMRSELECTCLIPPATH /* wingdi.h:3582:101 */ type PEMRSETLAYOUT = uintptr /* wingdi.h:3582:114 */ type EMRSETPOLYFILLMODE = tagEMRSELECTCLIPPATH /* wingdi.h:3583:5 */ type PEMRSETPOLYFILLMODE = uintptr /* wingdi.h:3583:24 */ type EMRSETROP2 = tagEMRSELECTCLIPPATH /* wingdi.h:3583:45 */ type PEMRSETROP2 = uintptr /* wingdi.h:3583:56 */ type EMRSETSTRETCHBLTMODE = tagEMRSELECTCLIPPATH /* wingdi.h:3583:69 */ type PEMRSETSTRETCHBLTMODE = uintptr /* wingdi.h:3583:90 */ type EMRSETICMMODE = tagEMRSELECTCLIPPATH /* wingdi.h:3583:113 */ type PEMRSETICMMODE = uintptr /* wingdi.h:3584:5 */ type EMRSETTEXTALIGN = tagEMRSELECTCLIPPATH /* wingdi.h:3584:21 */ type PEMRSETTEXTALIGN = uintptr /* wingdi.h:3584:37 */ type tagEMRSETMITERLIMIT = struct { Femr EMR FeMiterLimit FLOAT } /* wingdi.h:3586:11 */ type EMRSETMITERLIMIT = tagEMRSETMITERLIMIT /* wingdi.h:3589:5 */ type PEMRSETMITERLIMIT = uintptr /* wingdi.h:3589:22 */ type tagEMRRESTOREDC = struct { Femr EMR FiRelative LONG } /* wingdi.h:3591:11 */ type EMRRESTOREDC = tagEMRRESTOREDC /* wingdi.h:3594:5 */ type PEMRRESTOREDC = uintptr /* wingdi.h:3594:18 */ type tagEMRSETARCDIRECTION = struct { Femr EMR FiArcDirection DWORD } /* wingdi.h:3596:11 */ type EMRSETARCDIRECTION = tagEMRSETARCDIRECTION /* wingdi.h:3600:5 */ type PEMRSETARCDIRECTION = uintptr /* wingdi.h:3600:24 */ type tagEMRSETMAPPERFLAGS = struct { Femr EMR FdwFlags DWORD } /* wingdi.h:3602:11 */ type EMRSETMAPPERFLAGS = tagEMRSETMAPPERFLAGS /* wingdi.h:3605:5 */ type PEMRSETMAPPERFLAGS = uintptr /* wingdi.h:3605:23 */ type tagEMRSETTEXTCOLOR = struct { Femr EMR FcrColor COLORREF } /* wingdi.h:3607:11 */ type EMRSETBKCOLOR = tagEMRSETTEXTCOLOR /* wingdi.h:3610:5 */ type PEMRSETBKCOLOR = uintptr /* wingdi.h:3610:19 */ type EMRSETTEXTCOLOR = tagEMRSETTEXTCOLOR /* wingdi.h:3610:35 */ type PEMRSETTEXTCOLOR = uintptr /* wingdi.h:3610:51 */ type tagEMRSELECTOBJECT = struct { Femr EMR FihObject DWORD } /* wingdi.h:3612:11 */ type EMRSELECTOBJECT = tagEMRSELECTOBJECT /* wingdi.h:3615:5 */ type PEMRSELECTOBJECT = uintptr /* wingdi.h:3615:21 */ type EMRDELETEOBJECT = tagEMRSELECTOBJECT /* wingdi.h:3615:39 */ type PEMRDELETEOBJECT = uintptr /* wingdi.h:3615:55 */ type tagEMRSELECTPALETTE = struct { Femr EMR FihPal DWORD } /* wingdi.h:3617:11 */ type EMRSELECTPALETTE = tagEMRSELECTPALETTE /* wingdi.h:3620:5 */ type PEMRSELECTPALETTE = uintptr /* wingdi.h:3620:22 */ type tagEMRRESIZEPALETTE = struct { Femr EMR FihPal DWORD FcEntries DWORD } /* wingdi.h:3622:11 */ type EMRRESIZEPALETTE = tagEMRRESIZEPALETTE /* wingdi.h:3626:5 */ type PEMRRESIZEPALETTE = uintptr /* wingdi.h:3626:22 */ type tagEMRSETPALETTEENTRIES = struct { Femr EMR FihPal DWORD FiStart DWORD FcEntries DWORD FaPalEntries [1]PALETTEENTRY } /* wingdi.h:3628:11 */ type EMRSETPALETTEENTRIES = tagEMRSETPALETTEENTRIES /* wingdi.h:3634:5 */ type PEMRSETPALETTEENTRIES = uintptr /* wingdi.h:3634:26 */ type tagEMRSETCOLORADJUSTMENT = struct { Femr EMR FColorAdjustment COLORADJUSTMENT } /* wingdi.h:3636:11 */ type EMRSETCOLORADJUSTMENT = tagEMRSETCOLORADJUSTMENT /* wingdi.h:3639:5 */ type PEMRSETCOLORADJUSTMENT = uintptr /* wingdi.h:3639:27 */ type tagEMRGDICOMMENT = struct { Femr EMR FcbData DWORD FData [1]BYTE _ [3]byte } /* wingdi.h:3641:11 */ type EMRGDICOMMENT = tagEMRGDICOMMENT /* wingdi.h:3645:5 */ type PEMRGDICOMMENT = uintptr /* wingdi.h:3645:19 */ type tagEMREOF = struct { Femr EMR FnPalEntries DWORD FoffPalEntries DWORD FnSizeLast DWORD } /* wingdi.h:3647:11 */ type EMREOF = tagEMREOF /* wingdi.h:3652:5 */ type PEMREOF = uintptr /* wingdi.h:3652:12 */ type tagEMRLINETO = struct { Femr EMR Fptl POINTL } /* wingdi.h:3654:11 */ type EMRLINETO = tagEMRLINETO /* wingdi.h:3657:5 */ type PEMRLINETO = uintptr /* wingdi.h:3657:15 */ type EMRMOVETOEX = tagEMRLINETO /* wingdi.h:3657:27 */ type PEMRMOVETOEX = uintptr /* wingdi.h:3657:39 */ type tagEMROFFSETCLIPRGN = struct { Femr EMR FptlOffset POINTL } /* wingdi.h:3659:11 */ type EMROFFSETCLIPRGN = tagEMROFFSETCLIPRGN /* wingdi.h:3662:5 */ type PEMROFFSETCLIPRGN = uintptr /* wingdi.h:3662:22 */ type tagEMRFILLPATH = struct { Femr EMR FrclBounds RECTL } /* wingdi.h:3664:11 */ type EMRFILLPATH = tagEMRFILLPATH /* wingdi.h:3667:5 */ type PEMRFILLPATH = uintptr /* wingdi.h:3667:17 */ type EMRSTROKEANDFILLPATH = tagEMRFILLPATH /* wingdi.h:3667:31 */ type PEMRSTROKEANDFILLPATH = uintptr /* wingdi.h:3667:52 */ type EMRSTROKEPATH = tagEMRFILLPATH /* wingdi.h:3667:75 */ type PEMRSTROKEPATH = uintptr /* wingdi.h:3667:89 */ type tagEMREXCLUDECLIPRECT = struct { Femr EMR FrclClip RECTL } /* wingdi.h:3669:11 */ type EMREXCLUDECLIPRECT = tagEMREXCLUDECLIPRECT /* wingdi.h:3672:5 */ type PEMREXCLUDECLIPRECT = uintptr /* wingdi.h:3672:24 */ type EMRINTERSECTCLIPRECT = tagEMREXCLUDECLIPRECT /* wingdi.h:3672:45 */ type PEMRINTERSECTCLIPRECT = uintptr /* wingdi.h:3672:66 */ type tagEMRSETVIEWPORTORGEX = struct { Femr EMR FptlOrigin POINTL } /* wingdi.h:3674:11 */ type EMRSETVIEWPORTORGEX = tagEMRSETVIEWPORTORGEX /* wingdi.h:3677:5 */ type PEMRSETVIEWPORTORGEX = uintptr /* wingdi.h:3677:25 */ type EMRSETWINDOWORGEX = tagEMRSETVIEWPORTORGEX /* wingdi.h:3677:47 */ type PEMRSETWINDOWORGEX = uintptr /* wingdi.h:3677:65 */ type EMRSETBRUSHORGEX = tagEMRSETVIEWPORTORGEX /* wingdi.h:3677:85 */ type PEMRSETBRUSHORGEX = uintptr /* wingdi.h:3677:102 */ type tagEMRSETVIEWPORTEXTEX = struct { Femr EMR FszlExtent SIZEL } /* wingdi.h:3679:11 */ type EMRSETVIEWPORTEXTEX = tagEMRSETVIEWPORTEXTEX /* wingdi.h:3682:5 */ type PEMRSETVIEWPORTEXTEX = uintptr /* wingdi.h:3682:25 */ type EMRSETWINDOWEXTEX = tagEMRSETVIEWPORTEXTEX /* wingdi.h:3682:47 */ type PEMRSETWINDOWEXTEX = uintptr /* wingdi.h:3682:65 */ type tagEMRSCALEVIEWPORTEXTEX = struct { Femr EMR FxNum LONG FxDenom LONG FyNum LONG FyDenom LONG } /* wingdi.h:3684:11 */ type EMRSCALEVIEWPORTEXTEX = tagEMRSCALEVIEWPORTEXTEX /* wingdi.h:3690:5 */ type PEMRSCALEVIEWPORTEXTEX = uintptr /* wingdi.h:3690:27 */ type EMRSCALEWINDOWEXTEX = tagEMRSCALEVIEWPORTEXTEX /* wingdi.h:3690:51 */ type PEMRSCALEWINDOWEXTEX = uintptr /* wingdi.h:3690:71 */ type tagEMRSETWORLDTRANSFORM = struct { Femr EMR Fxform XFORM } /* wingdi.h:3692:11 */ type EMRSETWORLDTRANSFORM = tagEMRSETWORLDTRANSFORM /* wingdi.h:3695:5 */ type PEMRSETWORLDTRANSFORM = uintptr /* wingdi.h:3695:26 */ type tagEMRMODIFYWORLDTRANSFORM = struct { Femr EMR Fxform XFORM FiMode DWORD } /* wingdi.h:3697:11 */ type EMRMODIFYWORLDTRANSFORM = tagEMRMODIFYWORLDTRANSFORM /* wingdi.h:3701:5 */ type PEMRMODIFYWORLDTRANSFORM = uintptr /* wingdi.h:3701:29 */ type tagEMRSETPIXELV = struct { Femr EMR FptlPixel POINTL FcrColor COLORREF } /* wingdi.h:3703:11 */ type EMRSETPIXELV = tagEMRSETPIXELV /* wingdi.h:3707:5 */ type PEMRSETPIXELV = uintptr /* wingdi.h:3707:18 */ type tagEMREXTFLOODFILL = struct { Femr EMR FptlStart POINTL FcrColor COLORREF FiMode DWORD } /* wingdi.h:3709:11 */ type EMREXTFLOODFILL = tagEMREXTFLOODFILL /* wingdi.h:3714:5 */ type PEMREXTFLOODFILL = uintptr /* wingdi.h:3714:21 */ type tagEMRELLIPSE = struct { Femr EMR FrclBox RECTL } /* wingdi.h:3716:11 */ type EMRELLIPSE = tagEMRELLIPSE /* wingdi.h:3719:5 */ type PEMRELLIPSE = uintptr /* wingdi.h:3719:16 */ type EMRRECTANGLE = tagEMRELLIPSE /* wingdi.h:3719:29 */ type PEMRRECTANGLE = uintptr /* wingdi.h:3719:42 */ type tagEMRROUNDRECT = struct { Femr EMR FrclBox RECTL FszlCorner SIZEL } /* wingdi.h:3721:11 */ type EMRROUNDRECT = tagEMRROUNDRECT /* wingdi.h:3725:5 */ type PEMRROUNDRECT = uintptr /* wingdi.h:3725:18 */ type tagEMRARC = struct { Femr EMR FrclBox RECTL FptlStart POINTL FptlEnd POINTL } /* wingdi.h:3727:11 */ type EMRARC = tagEMRARC /* wingdi.h:3732:5 */ type PEMRARC = uintptr /* wingdi.h:3732:12 */ type EMRARCTO = tagEMRARC /* wingdi.h:3732:21 */ type PEMRARCTO = uintptr /* wingdi.h:3732:30 */ type EMRCHORD = tagEMRARC /* wingdi.h:3732:41 */ type PEMRCHORD = uintptr /* wingdi.h:3732:50 */ type EMRPIE = tagEMRARC /* wingdi.h:3732:61 */ type PEMRPIE = uintptr /* wingdi.h:3732:68 */ type tagEMRANGLEARC = struct { Femr EMR FptlCenter POINTL FnRadius DWORD FeStartAngle FLOAT FeSweepAngle FLOAT } /* wingdi.h:3734:11 */ type EMRANGLEARC = tagEMRANGLEARC /* wingdi.h:3740:5 */ type PEMRANGLEARC = uintptr /* wingdi.h:3740:17 */ type tagEMRPOLYLINE = struct { Femr EMR FrclBounds RECTL Fcptl DWORD Faptl [1]POINTL } /* wingdi.h:3742:11 */ type EMRPOLYLINE = tagEMRPOLYLINE /* wingdi.h:3747:5 */ type PEMRPOLYLINE = uintptr /* wingdi.h:3747:17 */ type EMRPOLYBEZIER = tagEMRPOLYLINE /* wingdi.h:3747:31 */ type PEMRPOLYBEZIER = uintptr /* wingdi.h:3747:45 */ type EMRPOLYGON = tagEMRPOLYLINE /* wingdi.h:3747:61 */ type PEMRPOLYGON = uintptr /* wingdi.h:3747:72 */ type EMRPOLYBEZIERTO = tagEMRPOLYLINE /* wingdi.h:3747:85 */ type PEMRPOLYBEZIERTO = uintptr /* wingdi.h:3747:101 */ type EMRPOLYLINETO = tagEMRPOLYLINE /* wingdi.h:3747:119 */ type PEMRPOLYLINETO = uintptr /* wingdi.h:3747:133 */ type tagEMRPOLYLINE16 = struct { Femr EMR FrclBounds RECTL Fcpts DWORD Fapts [1]POINTS } /* wingdi.h:3749:11 */ type EMRPOLYLINE16 = tagEMRPOLYLINE16 /* wingdi.h:3754:5 */ type PEMRPOLYLINE16 = uintptr /* wingdi.h:3754:19 */ type EMRPOLYBEZIER16 = tagEMRPOLYLINE16 /* wingdi.h:3754:35 */ type PEMRPOLYBEZIER16 = uintptr /* wingdi.h:3754:51 */ type EMRPOLYGON16 = tagEMRPOLYLINE16 /* wingdi.h:3754:69 */ type PEMRPOLYGON16 = uintptr /* wingdi.h:3754:82 */ type EMRPOLYBEZIERTO16 = tagEMRPOLYLINE16 /* wingdi.h:3754:97 */ type PEMRPOLYBEZIERTO16 = uintptr /* wingdi.h:3754:115 */ type EMRPOLYLINETO16 = tagEMRPOLYLINE16 /* wingdi.h:3754:135 */ type PEMRPOLYLINETO16 = uintptr /* wingdi.h:3754:151 */ type tagEMRPOLYDRAW = struct { Femr EMR FrclBounds RECTL Fcptl DWORD Faptl [1]POINTL FabTypes [1]BYTE _ [3]byte } /* wingdi.h:3756:11 */ type EMRPOLYDRAW = tagEMRPOLYDRAW /* wingdi.h:3762:5 */ type PEMRPOLYDRAW = uintptr /* wingdi.h:3762:17 */ type tagEMRPOLYDRAW16 = struct { Femr EMR FrclBounds RECTL Fcpts DWORD Fapts [1]POINTS FabTypes [1]BYTE _ [3]byte } /* wingdi.h:3764:11 */ type EMRPOLYDRAW16 = tagEMRPOLYDRAW16 /* wingdi.h:3770:5 */ type PEMRPOLYDRAW16 = uintptr /* wingdi.h:3770:19 */ type tagEMRPOLYPOLYLINE = struct { Femr EMR FrclBounds RECTL FnPolys DWORD Fcptl DWORD FaPolyCounts [1]DWORD Faptl [1]POINTL } /* wingdi.h:3772:11 */ type EMRPOLYPOLYLINE = tagEMRPOLYPOLYLINE /* wingdi.h:3779:5 */ type PEMRPOLYPOLYLINE = uintptr /* wingdi.h:3779:21 */ type EMRPOLYPOLYGON = tagEMRPOLYPOLYLINE /* wingdi.h:3779:39 */ type PEMRPOLYPOLYGON = uintptr /* wingdi.h:3779:54 */ type tagEMRPOLYPOLYLINE16 = struct { Femr EMR FrclBounds RECTL FnPolys DWORD Fcpts DWORD FaPolyCounts [1]DWORD Fapts [1]POINTS } /* wingdi.h:3781:11 */ type EMRPOLYPOLYLINE16 = tagEMRPOLYPOLYLINE16 /* wingdi.h:3788:5 */ type PEMRPOLYPOLYLINE16 = uintptr /* wingdi.h:3788:23 */ type EMRPOLYPOLYGON16 = tagEMRPOLYPOLYLINE16 /* wingdi.h:3788:43 */ type PEMRPOLYPOLYGON16 = uintptr /* wingdi.h:3788:60 */ type tagEMRINVERTRGN = struct { Femr EMR FrclBounds RECTL FcbRgnData DWORD FRgnData [1]BYTE _ [3]byte } /* wingdi.h:3790:11 */ type EMRINVERTRGN = tagEMRINVERTRGN /* wingdi.h:3795:5 */ type PEMRINVERTRGN = uintptr /* wingdi.h:3795:18 */ type EMRPAINTRGN = tagEMRINVERTRGN /* wingdi.h:3795:33 */ type PEMRPAINTRGN = uintptr /* wingdi.h:3795:45 */ type tagEMRFILLRGN = struct { Femr EMR FrclBounds RECTL FcbRgnData DWORD FihBrush DWORD FRgnData [1]BYTE _ [3]byte } /* wingdi.h:3797:11 */ type EMRFILLRGN = tagEMRFILLRGN /* wingdi.h:3803:5 */ type PEMRFILLRGN = uintptr /* wingdi.h:3803:16 */ type tagEMRFRAMERGN = struct { Femr EMR FrclBounds RECTL FcbRgnData DWORD FihBrush DWORD FszlStroke SIZEL FRgnData [1]BYTE _ [3]byte } /* wingdi.h:3805:11 */ type EMRFRAMERGN = tagEMRFRAMERGN /* wingdi.h:3812:5 */ type PEMRFRAMERGN = uintptr /* wingdi.h:3812:17 */ type tagEMREXTSELECTCLIPRGN = struct { Femr EMR FcbRgnData DWORD FiMode DWORD FRgnData [1]BYTE _ [3]byte } /* wingdi.h:3814:11 */ type EMREXTSELECTCLIPRGN = tagEMREXTSELECTCLIPRGN /* wingdi.h:3819:5 */ type PEMREXTSELECTCLIPRGN = uintptr /* wingdi.h:3819:25 */ type tagEMREXTTEXTOUTA = struct { Femr EMR FrclBounds RECTL FiGraphicsMode DWORD FexScale FLOAT FeyScale FLOAT Femrtext EMRTEXT } /* wingdi.h:3821:11 */ type EMREXTTEXTOUTA = tagEMREXTTEXTOUTA /* wingdi.h:3828:5 */ type PEMREXTTEXTOUTA = uintptr /* wingdi.h:3828:20 */ type EMREXTTEXTOUTW = tagEMREXTTEXTOUTA /* wingdi.h:3828:37 */ type PEMREXTTEXTOUTW = uintptr /* wingdi.h:3828:52 */ type tagEMRPOLYTEXTOUTA = struct { Femr EMR FrclBounds RECTL FiGraphicsMode DWORD FexScale FLOAT FeyScale FLOAT FcStrings LONG Faemrtext [1]EMRTEXT } /* wingdi.h:3830:11 */ type EMRPOLYTEXTOUTA = tagEMRPOLYTEXTOUTA /* wingdi.h:3838:5 */ type PEMRPOLYTEXTOUTA = uintptr /* wingdi.h:3838:21 */ type EMRPOLYTEXTOUTW = tagEMRPOLYTEXTOUTA /* wingdi.h:3838:39 */ type PEMRPOLYTEXTOUTW = uintptr /* wingdi.h:3838:55 */ type tagEMRBITBLT = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FcxDest LONG FcyDest LONG FdwRop DWORD FxSrc LONG FySrc LONG FxformSrc XFORM FcrBkColorSrc COLORREF FiUsageSrc DWORD FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD } /* wingdi.h:3840:11 */ type EMRBITBLT = tagEMRBITBLT /* wingdi.h:3857:5 */ type PEMRBITBLT = uintptr /* wingdi.h:3857:15 */ type tagEMRSTRETCHBLT = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FcxDest LONG FcyDest LONG FdwRop DWORD FxSrc LONG FySrc LONG FxformSrc XFORM FcrBkColorSrc COLORREF FiUsageSrc DWORD FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FcxSrc LONG FcySrc LONG } /* wingdi.h:3859:11 */ type EMRSTRETCHBLT = tagEMRSTRETCHBLT /* wingdi.h:3878:5 */ type PEMRSTRETCHBLT = uintptr /* wingdi.h:3878:19 */ type tagEMRMASKBLT = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FcxDest LONG FcyDest LONG FdwRop DWORD FxSrc LONG FySrc LONG FxformSrc XFORM FcrBkColorSrc COLORREF FiUsageSrc DWORD FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FxMask LONG FyMask LONG FiUsageMask DWORD FoffBmiMask DWORD FcbBmiMask DWORD FoffBitsMask DWORD FcbBitsMask DWORD } /* wingdi.h:3880:11 */ type EMRMASKBLT = tagEMRMASKBLT /* wingdi.h:3904:5 */ type PEMRMASKBLT = uintptr /* wingdi.h:3904:16 */ type tagEMRPLGBLT = struct { Femr EMR FrclBounds RECTL FaptlDest [3]POINTL FxSrc LONG FySrc LONG FcxSrc LONG FcySrc LONG FxformSrc XFORM FcrBkColorSrc COLORREF FiUsageSrc DWORD FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FxMask LONG FyMask LONG FiUsageMask DWORD FoffBmiMask DWORD FcbBmiMask DWORD FoffBitsMask DWORD FcbBitsMask DWORD } /* wingdi.h:3906:11 */ type EMRPLGBLT = tagEMRPLGBLT /* wingdi.h:3928:5 */ type PEMRPLGBLT = uintptr /* wingdi.h:3928:15 */ type tagEMRSETDIBITSTODEVICE = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FxSrc LONG FySrc LONG FcxSrc LONG FcySrc LONG FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FiUsageSrc DWORD FiStartScan DWORD FcScans DWORD } /* wingdi.h:3930:11 */ type EMRSETDIBITSTODEVICE = tagEMRSETDIBITSTODEVICE /* wingdi.h:3946:5 */ type PEMRSETDIBITSTODEVICE = uintptr /* wingdi.h:3946:26 */ type tagEMRSTRETCHDIBITS = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FxSrc LONG FySrc LONG FcxSrc LONG FcySrc LONG FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FiUsageSrc DWORD FdwRop DWORD FcxDest LONG FcyDest LONG } /* wingdi.h:3948:11 */ type EMRSTRETCHDIBITS = tagEMRSTRETCHDIBITS /* wingdi.h:3965:5 */ type PEMRSTRETCHDIBITS = uintptr /* wingdi.h:3965:22 */ type tagEMREXTCREATEFONTINDIRECTW = struct { Femr EMR FihFont DWORD Felfw EXTLOGFONTW } /* wingdi.h:3967:11 */ type EMREXTCREATEFONTINDIRECTW = tagEMREXTCREATEFONTINDIRECTW /* wingdi.h:3971:5 */ type PEMREXTCREATEFONTINDIRECTW = uintptr /* wingdi.h:3971:31 */ type tagEMRCREATEPALETTE = struct { Femr EMR FihPal DWORD Flgpl LOGPALETTE } /* wingdi.h:3973:11 */ type EMRCREATEPALETTE = tagEMRCREATEPALETTE /* wingdi.h:3977:5 */ type PEMRCREATEPALETTE = uintptr /* wingdi.h:3977:22 */ type tagEMRCREATEPEN = struct { Femr EMR FihPen DWORD Flopn LOGPEN } /* wingdi.h:3979:11 */ type EMRCREATEPEN = tagEMRCREATEPEN /* wingdi.h:3983:5 */ type PEMRCREATEPEN = uintptr /* wingdi.h:3983:18 */ type tagEMREXTCREATEPEN = struct { Femr EMR FihPen DWORD FoffBmi DWORD FcbBmi DWORD FoffBits DWORD FcbBits DWORD _ [4]byte Felp EXTLOGPEN } /* wingdi.h:3985:11 */ type EMREXTCREATEPEN = tagEMREXTCREATEPEN /* wingdi.h:3993:5 */ type PEMREXTCREATEPEN = uintptr /* wingdi.h:3993:21 */ type tagEMRCREATEBRUSHINDIRECT = struct { Femr EMR FihBrush DWORD Flb LOGBRUSH32 } /* wingdi.h:3995:11 */ type EMRCREATEBRUSHINDIRECT = tagEMRCREATEBRUSHINDIRECT /* wingdi.h:3999:5 */ type PEMRCREATEBRUSHINDIRECT = uintptr /* wingdi.h:3999:28 */ type tagEMRCREATEMONOBRUSH = struct { Femr EMR FihBrush DWORD FiUsage DWORD FoffBmi DWORD FcbBmi DWORD FoffBits DWORD FcbBits DWORD } /* wingdi.h:4001:11 */ type EMRCREATEMONOBRUSH = tagEMRCREATEMONOBRUSH /* wingdi.h:4009:5 */ type PEMRCREATEMONOBRUSH = uintptr /* wingdi.h:4009:24 */ type tagEMRCREATEDIBPATTERNBRUSHPT = struct { Femr EMR FihBrush DWORD FiUsage DWORD FoffBmi DWORD FcbBmi DWORD FoffBits DWORD FcbBits DWORD } /* wingdi.h:4011:11 */ type EMRCREATEDIBPATTERNBRUSHPT = tagEMRCREATEDIBPATTERNBRUSHPT /* wingdi.h:4019:5 */ type PEMRCREATEDIBPATTERNBRUSHPT = uintptr /* wingdi.h:4019:32 */ type tagEMRFORMAT = struct { FdSignature DWORD FnVersion DWORD FcbData DWORD FoffData DWORD } /* wingdi.h:4021:11 */ type EMRFORMAT = tagEMRFORMAT /* wingdi.h:4026:5 */ type PEMRFORMAT = uintptr /* wingdi.h:4026:15 */ type tagEMRGLSRECORD = struct { Femr EMR FcbData DWORD FData [1]BYTE _ [3]byte } /* wingdi.h:4028:11 */ type EMRGLSRECORD = tagEMRGLSRECORD /* wingdi.h:4032:5 */ type PEMRGLSRECORD = uintptr /* wingdi.h:4032:18 */ type tagEMRGLSBOUNDEDRECORD = struct { Femr EMR FrclBounds RECTL FcbData DWORD FData [1]BYTE _ [3]byte } /* wingdi.h:4034:11 */ type EMRGLSBOUNDEDRECORD = tagEMRGLSBOUNDEDRECORD /* wingdi.h:4039:5 */ type PEMRGLSBOUNDEDRECORD = uintptr /* wingdi.h:4039:25 */ type tagEMRPIXELFORMAT = struct { Femr EMR Fpfd PIXELFORMATDESCRIPTOR } /* wingdi.h:4041:11 */ type EMRPIXELFORMAT = tagEMRPIXELFORMAT /* wingdi.h:4044:5 */ type PEMRPIXELFORMAT = uintptr /* wingdi.h:4044:20 */ type tagEMRCREATECOLORSPACE = struct { Femr EMR FihCS DWORD Flcs LOGCOLORSPACEA } /* wingdi.h:4046:11 */ type EMRCREATECOLORSPACE = tagEMRCREATECOLORSPACE /* wingdi.h:4050:5 */ type PEMRCREATECOLORSPACE = uintptr /* wingdi.h:4050:25 */ type tagEMRSETCOLORSPACE = struct { Femr EMR FihCS DWORD } /* wingdi.h:4052:11 */ type EMRSETCOLORSPACE = tagEMRSETCOLORSPACE /* wingdi.h:4055:5 */ type PEMRSETCOLORSPACE = uintptr /* wingdi.h:4055:22 */ type EMRSELECTCOLORSPACE = tagEMRSETCOLORSPACE /* wingdi.h:4055:41 */ type PEMRSELECTCOLORSPACE = uintptr /* wingdi.h:4055:61 */ type EMRDELETECOLORSPACE = tagEMRSETCOLORSPACE /* wingdi.h:4055:83 */ type PEMRDELETECOLORSPACE = uintptr /* wingdi.h:4055:103 */ type tagEMREXTESCAPE = struct { Femr EMR FiEscape INT FcbEscData INT FEscData [1]BYTE _ [3]byte } /* wingdi.h:4057:11 */ type EMREXTESCAPE = tagEMREXTESCAPE /* wingdi.h:4062:5 */ type PEMREXTESCAPE = uintptr /* wingdi.h:4062:18 */ type EMRDRAWESCAPE = tagEMREXTESCAPE /* wingdi.h:4062:33 */ type PEMRDRAWESCAPE = uintptr /* wingdi.h:4062:47 */ type tagEMRNAMEDESCAPE = struct { Femr EMR FiEscape INT FcbDriver INT FcbEscData INT FEscData [1]BYTE _ [3]byte } /* wingdi.h:4064:11 */ type EMRNAMEDESCAPE = tagEMRNAMEDESCAPE /* wingdi.h:4070:5 */ type PEMRNAMEDESCAPE = uintptr /* wingdi.h:4070:20 */ type tagEMRSETICMPROFILE = struct { Femr EMR FdwFlags DWORD FcbName DWORD FcbData DWORD FData [1]BYTE _ [3]byte } /* wingdi.h:4074:11 */ type EMRSETICMPROFILE = tagEMRSETICMPROFILE /* wingdi.h:4080:5 */ type PEMRSETICMPROFILE = uintptr /* wingdi.h:4080:22 */ type EMRSETICMPROFILEA = tagEMRSETICMPROFILE /* wingdi.h:4080:41 */ type PEMRSETICMPROFILEA = uintptr /* wingdi.h:4080:59 */ type EMRSETICMPROFILEW = tagEMRSETICMPROFILE /* wingdi.h:4080:79 */ type PEMRSETICMPROFILEW = uintptr /* wingdi.h:4080:97 */ type tagEMRCREATECOLORSPACEW = struct { Femr EMR FihCS DWORD Flcs LOGCOLORSPACEW FdwFlags DWORD FcbData DWORD FData [1]BYTE _ [3]byte } /* wingdi.h:4084:11 */ type EMRCREATECOLORSPACEW = tagEMRCREATECOLORSPACEW /* wingdi.h:4091:5 */ type PEMRCREATECOLORSPACEW = uintptr /* wingdi.h:4091:26 */ type tagCOLORMATCHTOTARGET = struct { Femr EMR FdwAction DWORD FdwFlags DWORD FcbName DWORD FcbData DWORD FData [1]BYTE _ [3]byte } /* wingdi.h:4095:11 */ type EMRCOLORMATCHTOTARGET = tagCOLORMATCHTOTARGET /* wingdi.h:4102:5 */ type PEMRCOLORMATCHTOTARGET = uintptr /* wingdi.h:4102:27 */ type tagCOLORCORRECTPALETTE = struct { Femr EMR FihPalette DWORD FnFirstEntry DWORD FnPalEntries DWORD FnReserved DWORD } /* wingdi.h:4104:11 */ type EMRCOLORCORRECTPALETTE = tagCOLORCORRECTPALETTE /* wingdi.h:4110:5 */ type PEMRCOLORCORRECTPALETTE = uintptr /* wingdi.h:4110:28 */ type tagEMRALPHABLEND = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FcxDest LONG FcyDest LONG FdwRop DWORD FxSrc LONG FySrc LONG FxformSrc XFORM FcrBkColorSrc COLORREF FiUsageSrc DWORD FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FcxSrc LONG FcySrc LONG } /* wingdi.h:4112:11 */ type EMRALPHABLEND = tagEMRALPHABLEND /* wingdi.h:4131:5 */ type PEMRALPHABLEND = uintptr /* wingdi.h:4131:19 */ type tagEMRGRADIENTFILL = struct { Femr EMR FrclBounds RECTL FnVer DWORD FnTri DWORD FulMode ULONG FVer [1]TRIVERTEX } /* wingdi.h:4133:11 */ type EMRGRADIENTFILL = tagEMRGRADIENTFILL /* wingdi.h:4140:5 */ type PEMRGRADIENTFILL = uintptr /* wingdi.h:4140:21 */ type tagEMRTRANSPARENTBLT = struct { Femr EMR FrclBounds RECTL FxDest LONG FyDest LONG FcxDest LONG FcyDest LONG FdwRop DWORD FxSrc LONG FySrc LONG FxformSrc XFORM FcrBkColorSrc COLORREF FiUsageSrc DWORD FoffBmiSrc DWORD FcbBmiSrc DWORD FoffBitsSrc DWORD FcbBitsSrc DWORD FcxSrc LONG FcySrc LONG } /* wingdi.h:4142:11 */ type EMRTRANSPARENTBLT = tagEMRTRANSPARENTBLT /* wingdi.h:4161:5 */ type PEMRTRANSPARENTBLT = uintptr /* wingdi.h:4161:23 */ type _POINTFLOAT = struct { Fx FLOAT Fy FLOAT } /* wingdi.h:4188:11 */ type POINTFLOAT = _POINTFLOAT /* wingdi.h:4191:5 */ type PPOINTFLOAT = uintptr /* wingdi.h:4191:16 */ type _GLYPHMETRICSFLOAT = struct { FgmfBlackBoxX FLOAT FgmfBlackBoxY FLOAT FgmfptGlyphOrigin POINTFLOAT FgmfCellIncX FLOAT FgmfCellIncY FLOAT } /* wingdi.h:4193:11 */ type GLYPHMETRICSFLOAT = _GLYPHMETRICSFLOAT /* wingdi.h:4199:5 */ type PGLYPHMETRICSFLOAT = uintptr /* wingdi.h:4199:23 */ type LPGLYPHMETRICSFLOAT = uintptr /* wingdi.h:4199:43 */ type tagLAYERPLANEDESCRIPTOR = struct { FnSize WORD FnVersion WORD FdwFlags DWORD FiPixelType BYTE FcColorBits BYTE FcRedBits BYTE FcRedShift BYTE FcGreenBits BYTE FcGreenShift BYTE FcBlueBits BYTE FcBlueShift BYTE FcAlphaBits BYTE FcAlphaShift BYTE FcAccumBits BYTE FcAccumRedBits BYTE FcAccumGreenBits BYTE FcAccumBlueBits BYTE FcAccumAlphaBits BYTE FcDepthBits BYTE FcStencilBits BYTE FcAuxBuffers BYTE FiLayerPlane BYTE FbReserved BYTE FcrTransparent COLORREF } /* wingdi.h:4209:11 */ type LAYERPLANEDESCRIPTOR = tagLAYERPLANEDESCRIPTOR /* wingdi.h:4234:5 */ type PLAYERPLANEDESCRIPTOR = uintptr /* wingdi.h:4234:26 */ type LPLAYERPLANEDESCRIPTOR = uintptr /* wingdi.h:4234:49 */ type _WGLSWAP = struct { Fhdc HDC FuiFlags UINT _ [4]byte } /* wingdi.h:4288:11 */ type WGLSWAP = _WGLSWAP /* wingdi.h:4291:5 */ type PWGLSWAP = uintptr /* wingdi.h:4291:13 */ type LPWGLSWAP = uintptr /* wingdi.h:4291:23 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with GCC; see the file COPYING. If not, write to // the Free Software Foundation, 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. // As a special exception, if you include this header file into source // files compiled by GCC, this header file does not by itself cause // the resulting executable to be covered by the GNU General Public // License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General // Public License. // ISO C Standard: 7.15 Variable arguments // include mingw stuff // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.15 Variable arguments // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type HDWP = HANDLE /* winuser.h:32:18 */ type LPMENUTEMPLATEA = PVOID /* winuser.h:35:17 */ type LPMENUTEMPLATEW = PVOID /* winuser.h:36:17 */ type LPMENUTEMPLATE = LPMENUTEMPLATEA /* winuser.h:39:3 */ type WNDPROC = uintptr /* winuser.h:41:19 */ type DLGPROC = uintptr /* winuser.h:46:19 */ type TIMERPROC = uintptr /* winuser.h:50:16 */ type GRAYSTRINGPROC = uintptr /* winuser.h:51:19 */ type WNDENUMPROC = uintptr /* winuser.h:52:19 */ type HOOKPROC = uintptr /* winuser.h:53:19 */ type SENDASYNCPROC = uintptr /* winuser.h:54:16 */ type PROPENUMPROCA = uintptr /* winuser.h:56:19 */ type PROPENUMPROCW = uintptr /* winuser.h:57:19 */ type PROPENUMPROCEXA = uintptr /* winuser.h:59:19 */ type PROPENUMPROCEXW = uintptr /* winuser.h:60:19 */ type EDITWORDBREAKPROCA = uintptr /* winuser.h:62:15 */ type EDITWORDBREAKPROCW = uintptr /* winuser.h:63:15 */ type DRAWSTATEPROC = uintptr /* winuser.h:65:19 */ type PROPENUMPROC = PROPENUMPROCA /* winuser.h:93:3 */ type PROPENUMPROCEX = PROPENUMPROCEXA /* winuser.h:94:3 */ type EDITWORDBREAKPROC = EDITWORDBREAKPROCA /* winuser.h:95:3 */ type NAMEENUMPROCA = uintptr /* winuser.h:98:19 */ type NAMEENUMPROCW = uintptr /* winuser.h:99:19 */ type WINSTAENUMPROCA = NAMEENUMPROCA /* winuser.h:100:25 */ type WINSTAENUMPROCW = NAMEENUMPROCW /* winuser.h:101:25 */ type DESKTOPENUMPROCA = NAMEENUMPROCA /* winuser.h:102:25 */ type DESKTOPENUMPROCW = NAMEENUMPROCW /* winuser.h:103:25 */ type WINSTAENUMPROC = WINSTAENUMPROCA /* winuser.h:113:3 */ type DESKTOPENUMPROC = DESKTOPENUMPROCA /* winuser.h:114:3 */ type tagCBT_CREATEWNDA = struct { Flpcs uintptr FhwndInsertAfter HWND } /* winuser.h:456:11 */ type tagCREATESTRUCTA = struct { FlpCreateParams LPVOID FhInstance HINSTANCE FhMenu HMENU FhwndParent HWND Fcy int32 Fcx int32 Fy int32 Fx int32 Fstyle LONG _ [4]byte FlpszName LPCSTR FlpszClass LPCSTR FdwExStyle DWORD _ [4]byte } /* winuser.h:456:11 */ type CBT_CREATEWNDA = tagCBT_CREATEWNDA /* winuser.h:459:5 */ type LPCBT_CREATEWNDA = uintptr /* winuser.h:459:20 */ type tagCBT_CREATEWNDW = struct { Flpcs uintptr FhwndInsertAfter HWND } /* winuser.h:461:11 */ type tagCREATESTRUCTW = struct { FlpCreateParams LPVOID FhInstance HINSTANCE FhMenu HMENU FhwndParent HWND Fcy int32 Fcx int32 Fy int32 Fx int32 Fstyle LONG _ [4]byte FlpszName LPCWSTR FlpszClass LPCWSTR FdwExStyle DWORD _ [4]byte } /* winuser.h:461:11 */ type CBT_CREATEWNDW = tagCBT_CREATEWNDW /* winuser.h:464:5 */ type LPCBT_CREATEWNDW = uintptr /* winuser.h:464:20 */ type CBT_CREATEWND = CBT_CREATEWNDA /* winuser.h:466:3 */ type LPCBT_CREATEWND = LPCBT_CREATEWNDA /* winuser.h:467:3 */ type tagCBTACTIVATESTRUCT = struct { FfMouse WINBOOL _ [4]byte FhWndActive HWND } /* winuser.h:469:11 */ type CBTACTIVATESTRUCT = tagCBTACTIVATESTRUCT /* winuser.h:472:5 */ type LPCBTACTIVATESTRUCT = uintptr /* winuser.h:472:23 */ type tagWTSSESSION_NOTIFICATION = struct { FcbSize DWORD FdwSessionId DWORD } /* winuser.h:476:11 */ type WTSSESSION_NOTIFICATION = tagWTSSESSION_NOTIFICATION /* winuser.h:479:5 */ type PWTSSESSION_NOTIFICATION = uintptr /* winuser.h:479:29 */ type SHELLHOOKINFO = struct { Fhwnd HWND Frc RECT } /* winuser.h:600:5 */ type LPSHELLHOOKINFO = uintptr /* winuser.h:600:19 */ type tagEVENTMSG = struct { Fmessage UINT FparamL UINT FparamH UINT Ftime DWORD Fhwnd HWND } /* winuser.h:602:11 */ type EVENTMSG = tagEVENTMSG /* winuser.h:608:5 */ type PEVENTMSGMSG = uintptr /* winuser.h:608:14 */ type NPEVENTMSGMSG = uintptr /* winuser.h:608:28 */ type LPEVENTMSGMSG = uintptr /* winuser.h:608:43 */ type PEVENTMSG = uintptr /* winuser.h:610:30 */ type NPEVENTMSG = uintptr /* winuser.h:610:41 */ type LPEVENTMSG = uintptr /* winuser.h:610:53 */ type tagCWPSTRUCT = struct { FlParam LPARAM FwParam WPARAM Fmessage UINT _ [4]byte Fhwnd HWND } /* winuser.h:612:11 */ type CWPSTRUCT = tagCWPSTRUCT /* winuser.h:617:5 */ type PCWPSTRUCT = uintptr /* winuser.h:617:15 */ type NPCWPSTRUCT = uintptr /* winuser.h:617:27 */ type LPCWPSTRUCT = uintptr /* winuser.h:617:40 */ type tagCWPRETSTRUCT = struct { FlResult LRESULT FlParam LPARAM FwParam WPARAM Fmessage UINT _ [4]byte Fhwnd HWND } /* winuser.h:619:11 */ type CWPRETSTRUCT = tagCWPRETSTRUCT /* winuser.h:625:5 */ type PCWPRETSTRUCT = uintptr /* winuser.h:625:18 */ type NPCWPRETSTRUCT = uintptr /* winuser.h:625:33 */ type LPCWPRETSTRUCT = uintptr /* winuser.h:625:49 */ type tagKBDLLHOOKSTRUCT = struct { FvkCode DWORD FscanCode DWORD Fflags DWORD Ftime DWORD FdwExtraInfo ULONG_PTR } /* winuser.h:636:11 */ type KBDLLHOOKSTRUCT = tagKBDLLHOOKSTRUCT /* winuser.h:642:5 */ type LPKBDLLHOOKSTRUCT = uintptr /* winuser.h:642:21 */ type PKBDLLHOOKSTRUCT = uintptr /* winuser.h:642:40 */ type tagMSLLHOOKSTRUCT = struct { Fpt POINT FmouseData DWORD Fflags DWORD Ftime DWORD _ [4]byte FdwExtraInfo ULONG_PTR } /* winuser.h:644:11 */ type MSLLHOOKSTRUCT = tagMSLLHOOKSTRUCT /* winuser.h:650:5 */ type LPMSLLHOOKSTRUCT = uintptr /* winuser.h:650:20 */ type PMSLLHOOKSTRUCT = uintptr /* winuser.h:650:38 */ type tagDEBUGHOOKINFO = struct { FidThread DWORD FidThreadInstaller DWORD FlParam LPARAM FwParam WPARAM Fcode int32 _ [4]byte } /* winuser.h:652:11 */ type DEBUGHOOKINFO = tagDEBUGHOOKINFO /* winuser.h:658:5 */ type PDEBUGHOOKINFO = uintptr /* winuser.h:658:19 */ type NPDEBUGHOOKINFO = uintptr /* winuser.h:658:35 */ type LPDEBUGHOOKINFO = uintptr /* winuser.h:658:52 */ type tagMOUSEHOOKSTRUCT = struct { Fpt POINT Fhwnd HWND FwHitTestCode UINT _ [4]byte FdwExtraInfo ULONG_PTR } /* winuser.h:660:11 */ type MOUSEHOOKSTRUCT = tagMOUSEHOOKSTRUCT /* winuser.h:665:5 */ type LPMOUSEHOOKSTRUCT = uintptr /* winuser.h:665:21 */ type PMOUSEHOOKSTRUCT = uintptr /* winuser.h:665:40 */ type tagMOUSEHOOKSTRUCTEX = struct { F__unnamed MOUSEHOOKSTRUCT FmouseData DWORD _ [4]byte } /* winuser.h:672:11 */ type MOUSEHOOKSTRUCTEX = tagMOUSEHOOKSTRUCTEX /* winuser.h:675:5 */ type LPMOUSEHOOKSTRUCTEX = uintptr /* winuser.h:675:23 */ type PMOUSEHOOKSTRUCTEX = uintptr /* winuser.h:675:44 */ type tagHARDWAREHOOKSTRUCT = struct { Fhwnd HWND Fmessage UINT _ [4]byte FwParam WPARAM FlParam LPARAM } /* winuser.h:678:11 */ type HARDWAREHOOKSTRUCT = tagHARDWAREHOOKSTRUCT /* winuser.h:683:5 */ type LPHARDWAREHOOKSTRUCT = uintptr /* winuser.h:683:24 */ type PHARDWAREHOOKSTRUCT = uintptr /* winuser.h:683:46 */ type tagMOUSEMOVEPOINT = struct { Fx int32 Fy int32 Ftime DWORD _ [4]byte FdwExtraInfo ULONG_PTR } /* winuser.h:719:11 */ type MOUSEMOVEPOINT = tagMOUSEMOVEPOINT /* winuser.h:724:5 */ type PMOUSEMOVEPOINT = uintptr /* winuser.h:724:20 */ type LPMOUSEMOVEPOINT = uintptr /* winuser.h:724:37 */ type tagUSEROBJECTFLAGS = struct { FfInherit WINBOOL FfReserved WINBOOL FdwFlags DWORD } /* winuser.h:825:11 */ type USEROBJECTFLAGS = tagUSEROBJECTFLAGS /* winuser.h:829:5 */ type PUSEROBJECTFLAGS = uintptr /* winuser.h:829:21 */ type tagWNDCLASSEXA = struct { FcbSize UINT Fstyle UINT FlpfnWndProc WNDPROC FcbClsExtra int32 FcbWndExtra int32 FhInstance HINSTANCE FhIcon HICON FhCursor HCURSOR FhbrBackground HBRUSH FlpszMenuName LPCSTR FlpszClassName LPCSTR FhIconSm HICON } /* winuser.h:842:11 */ type WNDCLASSEXA = tagWNDCLASSEXA /* winuser.h:855:5 */ type PWNDCLASSEXA = uintptr /* winuser.h:855:17 */ type NPWNDCLASSEXA = uintptr /* winuser.h:855:31 */ type LPWNDCLASSEXA = uintptr /* winuser.h:855:46 */ type tagWNDCLASSEXW = struct { FcbSize UINT Fstyle UINT FlpfnWndProc WNDPROC FcbClsExtra int32 FcbWndExtra int32 FhInstance HINSTANCE FhIcon HICON FhCursor HCURSOR FhbrBackground HBRUSH FlpszMenuName LPCWSTR FlpszClassName LPCWSTR FhIconSm HICON } /* winuser.h:857:11 */ type WNDCLASSEXW = tagWNDCLASSEXW /* winuser.h:870:5 */ type PWNDCLASSEXW = uintptr /* winuser.h:870:17 */ type NPWNDCLASSEXW = uintptr /* winuser.h:870:31 */ type LPWNDCLASSEXW = uintptr /* winuser.h:870:46 */ type WNDCLASSEX = WNDCLASSEXA /* winuser.h:872:3 */ type PWNDCLASSEX = PWNDCLASSEXA /* winuser.h:873:3 */ type NPWNDCLASSEX = NPWNDCLASSEXA /* winuser.h:874:3 */ type LPWNDCLASSEX = LPWNDCLASSEXA /* winuser.h:875:3 */ type tagWNDCLASSA = struct { Fstyle UINT _ [4]byte FlpfnWndProc WNDPROC FcbClsExtra int32 FcbWndExtra int32 FhInstance HINSTANCE FhIcon HICON FhCursor HCURSOR FhbrBackground HBRUSH FlpszMenuName LPCSTR FlpszClassName LPCSTR } /* winuser.h:877:11 */ type WNDCLASSA = tagWNDCLASSA /* winuser.h:888:5 */ type PWNDCLASSA = uintptr /* winuser.h:888:15 */ type NPWNDCLASSA = uintptr /* winuser.h:888:27 */ type LPWNDCLASSA = uintptr /* winuser.h:888:40 */ type tagWNDCLASSW = struct { Fstyle UINT _ [4]byte FlpfnWndProc WNDPROC FcbClsExtra int32 FcbWndExtra int32 FhInstance HINSTANCE FhIcon HICON FhCursor HCURSOR FhbrBackground HBRUSH FlpszMenuName LPCWSTR FlpszClassName LPCWSTR } /* winuser.h:890:11 */ type WNDCLASSW = tagWNDCLASSW /* winuser.h:901:5 */ type PWNDCLASSW = uintptr /* winuser.h:901:15 */ type NPWNDCLASSW = uintptr /* winuser.h:901:27 */ type LPWNDCLASSW = uintptr /* winuser.h:901:40 */ type WNDCLASS = WNDCLASSA /* winuser.h:903:3 */ type PWNDCLASS = PWNDCLASSA /* winuser.h:904:3 */ type NPWNDCLASS = NPWNDCLASSA /* winuser.h:905:3 */ type LPWNDCLASS = LPWNDCLASSA /* winuser.h:906:3 */ type tagMSG = struct { Fhwnd HWND Fmessage UINT _ [4]byte FwParam WPARAM FlParam LPARAM Ftime DWORD Fpt POINT _ [4]byte } /* winuser.h:914:11 */ type MSG = tagMSG /* winuser.h:921:5 */ type PMSG = uintptr /* winuser.h:921:9 */ type NPMSG = uintptr /* winuser.h:921:15 */ type LPMSG = uintptr /* winuser.h:921:22 */ type tagMINMAXINFO = struct { FptReserved POINT FptMaxSize POINT FptMaxPosition POINT FptMinTrackSize POINT FptMaxTrackSize POINT } /* winuser.h:1031:11 */ type MINMAXINFO = tagMINMAXINFO /* winuser.h:1037:5 */ type PMINMAXINFO = uintptr /* winuser.h:1037:16 */ type LPMINMAXINFO = uintptr /* winuser.h:1037:29 */ type tagCOPYDATASTRUCT = struct { FdwData ULONG_PTR FcbData DWORD _ [4]byte FlpData PVOID } /* winuser.h:1074:11 */ type COPYDATASTRUCT = tagCOPYDATASTRUCT /* winuser.h:1078:5 */ type PCOPYDATASTRUCT = uintptr /* winuser.h:1078:20 */ type tagMDINEXTMENU = struct { FhmenuIn HMENU FhmenuNext HMENU FhwndNext HWND } /* winuser.h:1080:11 */ type MDINEXTMENU = tagMDINEXTMENU /* winuser.h:1084:5 */ type PMDINEXTMENU = uintptr /* winuser.h:1084:17 */ type LPMDINEXTMENU = uintptr /* winuser.h:1084:31 */ type POWERBROADCAST_SETTING = struct { FPowerSetting GUID FDataLength DWORD FData [1]UCHAR _ [3]byte } /* winuser.h:1268:5 */ type PPOWERBROADCAST_SETTING = uintptr /* winuser.h:1268:28 */ type tagWINDOWPOS = struct { Fhwnd HWND FhwndInsertAfter HWND Fx int32 Fy int32 Fcx int32 Fcy int32 Fflags UINT _ [4]byte } /* winuser.h:1462:11 */ type WINDOWPOS = tagWINDOWPOS /* winuser.h:1470:5 */ type LPWINDOWPOS = uintptr /* winuser.h:1470:15 */ type PWINDOWPOS = uintptr /* winuser.h:1470:28 */ type tagNCCALCSIZE_PARAMS = struct { Frgrc [3]RECT Flppos PWINDOWPOS } /* winuser.h:1472:11 */ type NCCALCSIZE_PARAMS = tagNCCALCSIZE_PARAMS /* winuser.h:1475:5 */ type LPNCCALCSIZE_PARAMS = uintptr /* winuser.h:1475:23 */ type tagTRACKMOUSEEVENT = struct { FcbSize DWORD FdwFlags DWORD FhwndTrack HWND FdwHoverTime DWORD _ [4]byte } /* winuser.h:1509:11 */ type TRACKMOUSEEVENT = tagTRACKMOUSEEVENT /* winuser.h:1514:5 */ type LPTRACKMOUSEEVENT = uintptr /* winuser.h:1514:21 */ type tagACCEL = struct { FfVirt BYTE _ [1]byte Fkey WORD Fcmd WORD } /* winuser.h:1753:11 */ type ACCEL = tagACCEL /* winuser.h:1757:5 */ type LPACCEL = uintptr /* winuser.h:1757:11 */ type tagPAINTSTRUCT = struct { Fhdc HDC FfErase WINBOOL FrcPaint RECT FfRestore WINBOOL FfIncUpdate WINBOOL FrgbReserved [32]BYTE _ [4]byte } /* winuser.h:1759:11 */ type PAINTSTRUCT = tagPAINTSTRUCT /* winuser.h:1766:5 */ type PPAINTSTRUCT = uintptr /* winuser.h:1766:17 */ type NPPAINTSTRUCT = uintptr /* winuser.h:1766:31 */ type LPPAINTSTRUCT = uintptr /* winuser.h:1766:46 */ type CREATESTRUCTA = tagCREATESTRUCTA /* winuser.h:1781:5 */ type LPCREATESTRUCTA = uintptr /* winuser.h:1781:19 */ type CREATESTRUCTW = tagCREATESTRUCTW /* winuser.h:1796:5 */ type LPCREATESTRUCTW = uintptr /* winuser.h:1796:19 */ type CREATESTRUCT = CREATESTRUCTA /* winuser.h:1798:3 */ type LPCREATESTRUCT = LPCREATESTRUCTA /* winuser.h:1799:3 */ type tagWINDOWPLACEMENT = struct { Flength UINT Fflags UINT FshowCmd UINT FptMinPosition POINT FptMaxPosition POINT FrcNormalPosition RECT } /* winuser.h:1801:11 */ type WINDOWPLACEMENT = tagWINDOWPLACEMENT /* winuser.h:1808:5 */ type PWINDOWPLACEMENT = uintptr /* winuser.h:1809:27 */ type LPWINDOWPLACEMENT = uintptr /* winuser.h:1809:45 */ type tagNMHDR = struct { FhwndFrom HWND FidFrom UINT_PTR Fcode UINT _ [4]byte } /* winuser.h:1817:11 */ type NMHDR = tagNMHDR /* winuser.h:1821:5 */ type LPNMHDR = uintptr /* winuser.h:1825:17 */ type tagSTYLESTRUCT = struct { FstyleOld DWORD FstyleNew DWORD } /* winuser.h:1827:11 */ type STYLESTRUCT = tagSTYLESTRUCT /* winuser.h:1830:5 */ type LPSTYLESTRUCT = uintptr /* winuser.h:1830:17 */ type tagMEASUREITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FitemID UINT FitemWidth UINT FitemHeight UINT _ [4]byte FitemData ULONG_PTR } /* winuser.h:1856:11 */ type MEASUREITEMSTRUCT = tagMEASUREITEMSTRUCT /* winuser.h:1863:5 */ type PMEASUREITEMSTRUCT = uintptr /* winuser.h:1863:23 */ type LPMEASUREITEMSTRUCT = uintptr /* winuser.h:1863:43 */ type tagDRAWITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FitemID UINT FitemAction UINT FitemState UINT _ [4]byte FhwndItem HWND FhDC HDC FrcItem RECT FitemData ULONG_PTR } /* winuser.h:1865:11 */ type DRAWITEMSTRUCT = tagDRAWITEMSTRUCT /* winuser.h:1875:5 */ type PDRAWITEMSTRUCT = uintptr /* winuser.h:1875:20 */ type LPDRAWITEMSTRUCT = uintptr /* winuser.h:1875:37 */ type tagDELETEITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FitemID UINT _ [4]byte FhwndItem HWND FitemData ULONG_PTR } /* winuser.h:1877:11 */ type DELETEITEMSTRUCT = tagDELETEITEMSTRUCT /* winuser.h:1883:5 */ type PDELETEITEMSTRUCT = uintptr /* winuser.h:1883:22 */ type LPDELETEITEMSTRUCT = uintptr /* winuser.h:1883:41 */ type tagCOMPAREITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FhwndItem HWND FitemID1 UINT _ [4]byte FitemData1 ULONG_PTR FitemID2 UINT _ [4]byte FitemData2 ULONG_PTR FdwLocaleId DWORD _ [4]byte } /* winuser.h:1885:11 */ type COMPAREITEMSTRUCT = tagCOMPAREITEMSTRUCT /* winuser.h:1894:5 */ type PCOMPAREITEMSTRUCT = uintptr /* winuser.h:1894:23 */ type LPCOMPAREITEMSTRUCT = uintptr /* winuser.h:1894:43 */ type BSMINFO = struct { FcbSize UINT _ [4]byte Fhdesk HDESK Fhwnd HWND Fluid LUID } /* winuser.h:1997:5 */ type PBSMINFO = uintptr /* winuser.h:1997:13 */ type HDEVNOTIFY = PVOID /* winuser.h:2030:17 */ type PHDEVNOTIFY = uintptr /* winuser.h:2031:22 */ type HPOWERNOTIFY = HANDLE /* winuser.h:2054:18 */ type PHPOWERNOTIFY = uintptr /* winuser.h:2055:24 */ type PREGISTERCLASSNAMEW = uintptr /* winuser.h:2132:19 */ type tagUPDATELAYEREDWINDOWINFO = struct { FcbSize DWORD _ [4]byte FhdcDst HDC FpptDst uintptr Fpsize uintptr FhdcSrc HDC FpptSrc uintptr FcrKey COLORREF _ [4]byte Fpblend uintptr FdwFlags DWORD _ [4]byte FprcDirty uintptr } /* winuser.h:2155:11 */ type UPDATELAYEREDWINDOWINFO = tagUPDATELAYEREDWINDOWINFO /* winuser.h:2166:5 */ type PUPDATELAYEREDWINDOWINFO = uintptr /* winuser.h:2166:29 */ type FLASHWINFO = struct { FcbSize UINT _ [4]byte Fhwnd HWND FdwFlags DWORD FuCount UINT FdwTimeout DWORD _ [4]byte } /* winuser.h:2206:5 */ type PFLASHWINFO = uintptr /* winuser.h:2206:16 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type DLGTEMPLATE = struct { Fstyle DWORD FdwExtendedStyle DWORD Fcdit WORD Fx int16 Fy int16 Fcx int16 Fcy int16 _ [2]byte } /* winuser.h:2279:5 */ type LPDLGTEMPLATEA = uintptr /* winuser.h:2283:23 */ type LPDLGTEMPLATEW = uintptr /* winuser.h:2284:23 */ type LPDLGTEMPLATE = LPDLGTEMPLATEA /* winuser.h:2286:3 */ type LPCDLGTEMPLATEA = uintptr /* winuser.h:2290:29 */ type LPCDLGTEMPLATEW = uintptr /* winuser.h:2291:29 */ type LPCDLGTEMPLATE = LPCDLGTEMPLATEA /* winuser.h:2293:3 */ type DLGITEMTEMPLATE = struct { Fstyle DWORD FdwExtendedStyle DWORD Fx int16 Fy int16 Fcx int16 Fcy int16 Fid WORD _ [2]byte } /* winuser.h:2305:5 */ type PDLGITEMTEMPLATEA = uintptr /* winuser.h:2307:27 */ type PDLGITEMTEMPLATEW = uintptr /* winuser.h:2308:27 */ type PDLGITEMTEMPLATE = PDLGITEMTEMPLATEA /* winuser.h:2310:3 */ type LPDLGITEMTEMPLATEA = uintptr /* winuser.h:2312:27 */ type LPDLGITEMTEMPLATEW = uintptr /* winuser.h:2313:27 */ type LPDLGITEMTEMPLATE = LPDLGITEMTEMPLATEA /* winuser.h:2315:3 */ type tagMOUSEINPUT = struct { Fdx LONG Fdy LONG FmouseData DWORD FdwFlags DWORD Ftime DWORD _ [4]byte FdwExtraInfo ULONG_PTR } /* winuser.h:2646:11 */ type MOUSEINPUT = tagMOUSEINPUT /* winuser.h:2653:5 */ type PMOUSEINPUT = uintptr /* winuser.h:2653:16 */ type LPMOUSEINPUT = uintptr /* winuser.h:2653:29 */ type tagKEYBDINPUT = struct { FwVk WORD FwScan WORD FdwFlags DWORD Ftime DWORD _ [4]byte FdwExtraInfo ULONG_PTR } /* winuser.h:2655:11 */ type KEYBDINPUT = tagKEYBDINPUT /* winuser.h:2661:5 */ type PKEYBDINPUT = uintptr /* winuser.h:2661:16 */ type LPKEYBDINPUT = uintptr /* winuser.h:2661:29 */ type tagHARDWAREINPUT = struct { FuMsg DWORD FwParamL WORD FwParamH WORD } /* winuser.h:2663:11 */ type HARDWAREINPUT = tagHARDWAREINPUT /* winuser.h:2667:5 */ type PHARDWAREINPUT = uintptr /* winuser.h:2667:19 */ type LPHARDWAREINPUT = uintptr /* winuser.h:2667:35 */ type tagINPUT = struct { Ftype DWORD _ [4]byte Fu struct{ Fmi MOUSEINPUT } } /* winuser.h:2669:11 */ type INPUT = tagINPUT /* winuser.h:2676:5 */ type PINPUT = uintptr /* winuser.h:2676:11 */ type LPINPUT = uintptr /* winuser.h:2676:19 */ type tagLASTINPUTINFO = struct { FcbSize UINT FdwTime DWORD } /* winuser.h:2830:11 */ type LASTINPUTINFO = tagLASTINPUTINFO /* winuser.h:2833:5 */ type PLASTINPUTINFO = uintptr /* winuser.h:2833:19 */ type tagTPMPARAMS = struct { FcbSize UINT FrcExclude RECT } /* winuser.h:3152:11 */ type TPMPARAMS = tagTPMPARAMS /* winuser.h:3155:5 */ type tagMENUINFO = struct { FcbSize DWORD FfMask DWORD FdwStyle DWORD FcyMax UINT FhbrBack HBRUSH FdwContextHelpID DWORD _ [4]byte FdwMenuData ULONG_PTR } /* winuser.h:3157:11 */ type MENUINFO = tagMENUINFO /* winuser.h:3165:5 */ type LPMENUINFO = uintptr /* winuser.h:3165:14 */ type LPTPMPARAMS = uintptr /* winuser.h:3167:21 */ type LPCMENUINFO = uintptr /* winuser.h:3168:26 */ type tagMENUGETOBJECTINFO = struct { FdwFlags DWORD FuPos UINT Fhmenu HMENU Friid PVOID FpvObj PVOID } /* winuser.h:3178:11 */ type MENUGETOBJECTINFO = tagMENUGETOBJECTINFO /* winuser.h:3184:5 */ type PMENUGETOBJECTINFO = uintptr /* winuser.h:3184:23 */ type tagMENUITEMINFOA = struct { FcbSize UINT FfMask UINT FfType UINT FfState UINT FwID UINT _ [4]byte FhSubMenu HMENU FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData ULONG_PTR FdwTypeData LPSTR Fcch UINT _ [4]byte FhbmpItem HBITMAP } /* winuser.h:3186:11 */ type MENUITEMINFOA = tagMENUITEMINFOA /* winuser.h:3199:5 */ type LPMENUITEMINFOA = uintptr /* winuser.h:3199:19 */ type tagMENUITEMINFOW = struct { FcbSize UINT FfMask UINT FfType UINT FfState UINT FwID UINT _ [4]byte FhSubMenu HMENU FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData ULONG_PTR FdwTypeData LPWSTR Fcch UINT _ [4]byte FhbmpItem HBITMAP } /* winuser.h:3201:11 */ type MENUITEMINFOW = tagMENUITEMINFOW /* winuser.h:3214:5 */ type LPMENUITEMINFOW = uintptr /* winuser.h:3214:19 */ type MENUITEMINFO = MENUITEMINFOA /* winuser.h:3216:3 */ type LPMENUITEMINFO = LPMENUITEMINFOA /* winuser.h:3217:3 */ type LPCMENUITEMINFOA = uintptr /* winuser.h:3219:31 */ type LPCMENUITEMINFOW = uintptr /* winuser.h:3220:31 */ type LPCMENUITEMINFO = LPCMENUITEMINFOA /* winuser.h:3222:3 */ type tagDROPSTRUCT = struct { FhwndSource HWND FhwndSink HWND FwFmt DWORD _ [4]byte FdwData ULONG_PTR FptDrop POINT FdwControlData DWORD _ [4]byte } /* winuser.h:3270:11 */ type DROPSTRUCT = tagDROPSTRUCT /* winuser.h:3277:5 */ type PDROPSTRUCT = uintptr /* winuser.h:3277:16 */ type LPDROPSTRUCT = uintptr /* winuser.h:3277:29 */ type tagDRAWTEXTPARAMS = struct { FcbSize UINT FiTabLength int32 FiLeftMargin int32 FiRightMargin int32 FuiLengthDrawn UINT } /* winuser.h:3324:11 */ type DRAWTEXTPARAMS = tagDRAWTEXTPARAMS /* winuser.h:3330:5 */ type LPDRAWTEXTPARAMS = uintptr /* winuser.h:3330:20 */ type tagHELPINFO = struct { FcbSize UINT FiContextType int32 FiCtrlId int32 _ [4]byte FhItemHandle HANDLE FdwContextId DWORD_PTR FMousePos POINT } /* winuser.h:3507:11 */ type HELPINFO = tagHELPINFO /* winuser.h:3514:5 */ type LPHELPINFO = uintptr /* winuser.h:3514:14 */ type MSGBOXCALLBACK = uintptr /* winuser.h:3571:16 */ type tagMSGBOXPARAMSA = struct { FcbSize UINT _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpszText LPCSTR FlpszCaption LPCSTR FdwStyle DWORD _ [4]byte FlpszIcon LPCSTR FdwContextHelpId DWORD_PTR FlpfnMsgBoxCallback MSGBOXCALLBACK FdwLanguageId DWORD _ [4]byte } /* winuser.h:3573:11 */ type MSGBOXPARAMSA = tagMSGBOXPARAMSA /* winuser.h:3584:5 */ type PMSGBOXPARAMSA = uintptr /* winuser.h:3584:19 */ type LPMSGBOXPARAMSA = uintptr /* winuser.h:3584:35 */ type tagMSGBOXPARAMSW = struct { FcbSize UINT _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpszText LPCWSTR FlpszCaption LPCWSTR FdwStyle DWORD _ [4]byte FlpszIcon LPCWSTR FdwContextHelpId DWORD_PTR FlpfnMsgBoxCallback MSGBOXCALLBACK FdwLanguageId DWORD _ [4]byte } /* winuser.h:3586:11 */ type MSGBOXPARAMSW = tagMSGBOXPARAMSW /* winuser.h:3597:5 */ type PMSGBOXPARAMSW = uintptr /* winuser.h:3597:19 */ type LPMSGBOXPARAMSW = uintptr /* winuser.h:3597:35 */ type MSGBOXPARAMS = MSGBOXPARAMSA /* winuser.h:3599:3 */ type PMSGBOXPARAMS = PMSGBOXPARAMSA /* winuser.h:3600:3 */ type LPMSGBOXPARAMS = LPMSGBOXPARAMSA /* winuser.h:3601:3 */ type MENUITEMTEMPLATEHEADER = struct { FversionNumber WORD Foffset WORD } /* winuser.h:3910:5 */ type PMENUITEMTEMPLATEHEADER = uintptr /* winuser.h:3910:28 */ type MENUITEMTEMPLATE = struct { FmtOption WORD FmtID WORD FmtString [1]WCHAR } /* winuser.h:3916:5 */ type PMENUITEMTEMPLATE = uintptr /* winuser.h:3916:22 */ type _ICONINFO = struct { FfIcon WINBOOL FxHotspot DWORD FyHotspot DWORD _ [4]byte FhbmMask HBITMAP FhbmColor HBITMAP } /* winuser.h:3989:11 */ type ICONINFO = _ICONINFO /* winuser.h:3995:5 */ type PICONINFO = uintptr /* winuser.h:3996:20 */ type tagCURSORSHAPE = struct { FxHotSpot int32 FyHotSpot int32 Fcx int32 Fcy int32 FcbWidth int32 FPlanes BYTE FBitsPixel BYTE _ [2]byte } /* winuser.h:4013:11 */ type CURSORSHAPE = tagCURSORSHAPE /* winuser.h:4021:5 */ type LPCURSORSHAPE = uintptr /* winuser.h:4021:17 */ type tagSCROLLINFO = struct { FcbSize UINT FfMask UINT FnMin int32 FnMax int32 FnPage UINT FnPos int32 FnTrackPos int32 } /* winuser.h:4701:11 */ type SCROLLINFO = tagSCROLLINFO /* winuser.h:4709:5 */ type LPSCROLLINFO = uintptr /* winuser.h:4709:16 */ type LPCSCROLLINFO = uintptr /* winuser.h:4710:28 */ type tagMDICREATESTRUCTA = struct { FszClass LPCSTR FszTitle LPCSTR FhOwner HANDLE Fx int32 Fy int32 Fcx int32 Fcy int32 Fstyle DWORD _ [4]byte FlParam LPARAM } /* winuser.h:4728:11 */ type MDICREATESTRUCTA = tagMDICREATESTRUCTA /* winuser.h:4738:5 */ type LPMDICREATESTRUCTA = uintptr /* winuser.h:4738:22 */ type tagMDICREATESTRUCTW = struct { FszClass LPCWSTR FszTitle LPCWSTR FhOwner HANDLE Fx int32 Fy int32 Fcx int32 Fcy int32 Fstyle DWORD _ [4]byte FlParam LPARAM } /* winuser.h:4740:11 */ type MDICREATESTRUCTW = tagMDICREATESTRUCTW /* winuser.h:4750:5 */ type LPMDICREATESTRUCTW = uintptr /* winuser.h:4750:22 */ type MDICREATESTRUCT = MDICREATESTRUCTA /* winuser.h:4752:3 */ type LPMDICREATESTRUCT = LPMDICREATESTRUCTA /* winuser.h:4753:3 */ type tagCLIENTCREATESTRUCT = struct { FhWindowMenu HANDLE FidFirstChild UINT _ [4]byte } /* winuser.h:4755:11 */ type CLIENTCREATESTRUCT = tagCLIENTCREATESTRUCT /* winuser.h:4758:5 */ type LPCLIENTCREATESTRUCT = uintptr /* winuser.h:4758:24 */ type HELPPOLY = DWORD /* winuser.h:4784:17 */ type tagMULTIKEYHELPA = struct { FmkSize DWORD FmkKeylist CHAR FszKeyphrase [1]CHAR _ [2]byte } /* winuser.h:4786:11 */ type MULTIKEYHELPA = tagMULTIKEYHELPA /* winuser.h:4790:5 */ type PMULTIKEYHELPA = uintptr /* winuser.h:4790:19 */ type LPMULTIKEYHELPA = uintptr /* winuser.h:4790:35 */ type tagMULTIKEYHELPW = struct { FmkSize DWORD FmkKeylist WCHAR FszKeyphrase [1]WCHAR } /* winuser.h:4792:11 */ type MULTIKEYHELPW = tagMULTIKEYHELPW /* winuser.h:4796:5 */ type PMULTIKEYHELPW = uintptr /* winuser.h:4796:19 */ type LPMULTIKEYHELPW = uintptr /* winuser.h:4796:35 */ type MULTIKEYHELP = MULTIKEYHELPA /* winuser.h:4798:3 */ type PMULTIKEYHELP = PMULTIKEYHELPA /* winuser.h:4799:3 */ type LPMULTIKEYHELP = LPMULTIKEYHELPA /* winuser.h:4800:3 */ type tagHELPWININFOA = struct { FwStructSize int32 Fx int32 Fy int32 Fdx int32 Fdy int32 FwMax int32 FrgchMember [2]CHAR _ [2]byte } /* winuser.h:4802:11 */ type HELPWININFOA = tagHELPWININFOA /* winuser.h:4810:5 */ type PHELPWININFOA = uintptr /* winuser.h:4810:18 */ type LPHELPWININFOA = uintptr /* winuser.h:4810:33 */ type tagHELPWININFOW = struct { FwStructSize int32 Fx int32 Fy int32 Fdx int32 Fdy int32 FwMax int32 FrgchMember [2]WCHAR } /* winuser.h:4812:11 */ type HELPWININFOW = tagHELPWININFOW /* winuser.h:4820:5 */ type PHELPWININFOW = uintptr /* winuser.h:4820:18 */ type LPHELPWININFOW = uintptr /* winuser.h:4820:33 */ type HELPWININFO = HELPWININFOA /* winuser.h:4822:3 */ type PHELPWININFO = PHELPWININFOA /* winuser.h:4823:3 */ type LPHELPWININFO = LPHELPWININFOA /* winuser.h:4824:3 */ type tagNONCLIENTMETRICSA = struct { FcbSize UINT FiBorderWidth int32 FiScrollWidth int32 FiScrollHeight int32 FiCaptionWidth int32 FiCaptionHeight int32 FlfCaptionFont LOGFONTA FiSmCaptionWidth int32 FiSmCaptionHeight int32 FlfSmCaptionFont LOGFONTA FiMenuWidth int32 FiMenuHeight int32 FlfMenuFont LOGFONTA FlfStatusFont LOGFONTA FlfMessageFont LOGFONTA } /* winuser.h:5183:11 */ type NONCLIENTMETRICSA = tagNONCLIENTMETRICSA /* winuser.h:5202:5 */ type PNONCLIENTMETRICSA = uintptr /* winuser.h:5202:23 */ type LPNONCLIENTMETRICSA = uintptr /* winuser.h:5202:43 */ type tagNONCLIENTMETRICSW = struct { FcbSize UINT FiBorderWidth int32 FiScrollWidth int32 FiScrollHeight int32 FiCaptionWidth int32 FiCaptionHeight int32 FlfCaptionFont LOGFONTW FiSmCaptionWidth int32 FiSmCaptionHeight int32 FlfSmCaptionFont LOGFONTW FiMenuWidth int32 FiMenuHeight int32 FlfMenuFont LOGFONTW FlfStatusFont LOGFONTW FlfMessageFont LOGFONTW } /* winuser.h:5204:11 */ type NONCLIENTMETRICSW = tagNONCLIENTMETRICSW /* winuser.h:5223:5 */ type PNONCLIENTMETRICSW = uintptr /* winuser.h:5223:23 */ type LPNONCLIENTMETRICSW = uintptr /* winuser.h:5223:43 */ type NONCLIENTMETRICS = NONCLIENTMETRICSA /* winuser.h:5225:3 */ type PNONCLIENTMETRICS = PNONCLIENTMETRICSA /* winuser.h:5226:3 */ type LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA /* winuser.h:5227:3 */ type tagMINIMIZEDMETRICS = struct { FcbSize UINT FiWidth int32 FiHorzGap int32 FiVertGap int32 FiArrange int32 } /* winuser.h:5247:11 */ type MINIMIZEDMETRICS = tagMINIMIZEDMETRICS /* winuser.h:5253:5 */ type PMINIMIZEDMETRICS = uintptr /* winuser.h:5253:22 */ type LPMINIMIZEDMETRICS = uintptr /* winuser.h:5253:41 */ type tagICONMETRICSA = struct { FcbSize UINT FiHorzSpacing int32 FiVertSpacing int32 FiTitleWrap int32 FlfFont LOGFONTA } /* winuser.h:5257:11 */ type ICONMETRICSA = tagICONMETRICSA /* winuser.h:5263:5 */ type PICONMETRICSA = uintptr /* winuser.h:5263:18 */ type LPICONMETRICSA = uintptr /* winuser.h:5263:33 */ type tagICONMETRICSW = struct { FcbSize UINT FiHorzSpacing int32 FiVertSpacing int32 FiTitleWrap int32 FlfFont LOGFONTW } /* winuser.h:5265:11 */ type ICONMETRICSW = tagICONMETRICSW /* winuser.h:5271:5 */ type PICONMETRICSW = uintptr /* winuser.h:5271:18 */ type LPICONMETRICSW = uintptr /* winuser.h:5271:33 */ type ICONMETRICS = ICONMETRICSA /* winuser.h:5273:3 */ type PICONMETRICS = PICONMETRICSA /* winuser.h:5274:3 */ type LPICONMETRICS = LPICONMETRICSA /* winuser.h:5275:3 */ type tagANIMATIONINFO = struct { FcbSize UINT FiMinAnimate int32 } /* winuser.h:5279:11 */ type ANIMATIONINFO = tagANIMATIONINFO /* winuser.h:5282:5 */ type LPANIMATIONINFO = uintptr /* winuser.h:5282:19 */ type tagSERIALKEYSA = struct { FcbSize UINT FdwFlags DWORD FlpszActivePort LPSTR FlpszPort LPSTR FiBaudRate UINT FiPortState UINT FiActive UINT _ [4]byte } /* winuser.h:5284:11 */ type SERIALKEYSA = tagSERIALKEYSA /* winuser.h:5292:5 */ type LPSERIALKEYSA = uintptr /* winuser.h:5292:17 */ type tagSERIALKEYSW = struct { FcbSize UINT FdwFlags DWORD FlpszActivePort LPWSTR FlpszPort LPWSTR FiBaudRate UINT FiPortState UINT FiActive UINT _ [4]byte } /* winuser.h:5294:11 */ type SERIALKEYSW = tagSERIALKEYSW /* winuser.h:5302:5 */ type LPSERIALKEYSW = uintptr /* winuser.h:5302:17 */ type SERIALKEYS = SERIALKEYSA /* winuser.h:5304:3 */ type LPSERIALKEYS = LPSERIALKEYSA /* winuser.h:5305:3 */ type tagHIGHCONTRASTA = struct { FcbSize UINT FdwFlags DWORD FlpszDefaultScheme LPSTR } /* winuser.h:5307:11 */ type HIGHCONTRASTA = tagHIGHCONTRASTA /* winuser.h:5311:5 */ type LPHIGHCONTRASTA = uintptr /* winuser.h:5311:19 */ type tagHIGHCONTRASTW = struct { FcbSize UINT FdwFlags DWORD FlpszDefaultScheme LPWSTR } /* winuser.h:5313:11 */ type HIGHCONTRASTW = tagHIGHCONTRASTW /* winuser.h:5317:5 */ type LPHIGHCONTRASTW = uintptr /* winuser.h:5317:19 */ type HIGHCONTRAST = HIGHCONTRASTA /* winuser.h:5319:3 */ type LPHIGHCONTRAST = LPHIGHCONTRASTA /* winuser.h:5320:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. type _VIDEOPARAMETERS = struct { FGuid GUID FdwOffset ULONG FdwCommand ULONG FdwFlags ULONG FdwMode ULONG FdwTVStandard ULONG FdwAvailableModes ULONG FdwAvailableTVStandard ULONG FdwFlickerFilter ULONG FdwOverScanX ULONG FdwOverScanY ULONG FdwMaxUnscaledX ULONG FdwMaxUnscaledY ULONG FdwPositionX ULONG FdwPositionY ULONG FdwBrightness ULONG FdwContrast ULONG FdwCPType ULONG FdwCPCommand ULONG FdwCPStandard ULONG FdwCPKey ULONG FbCP_APSTriggerBits ULONG FbOEMCopyProtection [256]UCHAR } /* tvout.h:11:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. type VIDEOPARAMETERS = _VIDEOPARAMETERS /* tvout.h:35:3 */ type PVIDEOPARAMETERS = uintptr /* tvout.h:35:19 */ type LPVIDEOPARAMETERS = uintptr /* tvout.h:35:37 */ type tagFILTERKEYS = struct { FcbSize UINT FdwFlags DWORD FiWaitMSec DWORD FiDelayMSec DWORD FiRepeatMSec DWORD FiBounceMSec DWORD } /* winuser.h:5409:11 */ type FILTERKEYS = tagFILTERKEYS /* winuser.h:5416:5 */ type LPFILTERKEYS = uintptr /* winuser.h:5416:16 */ type tagSTICKYKEYS = struct { FcbSize UINT FdwFlags DWORD } /* winuser.h:5428:11 */ type STICKYKEYS = tagSTICKYKEYS /* winuser.h:5431:5 */ type LPSTICKYKEYS = uintptr /* winuser.h:5431:16 */ type tagMOUSEKEYS = struct { FcbSize UINT FdwFlags DWORD FiMaxSpeed DWORD FiTimeToMaxSpeed DWORD FiCtrlSpeed DWORD FdwReserved1 DWORD FdwReserved2 DWORD } /* winuser.h:5461:11 */ type MOUSEKEYS = tagMOUSEKEYS /* winuser.h:5469:5 */ type LPMOUSEKEYS = uintptr /* winuser.h:5469:15 */ type tagACCESSTIMEOUT = struct { FcbSize UINT FdwFlags DWORD FiTimeOutMSec DWORD } /* winuser.h:5487:11 */ type ACCESSTIMEOUT = tagACCESSTIMEOUT /* winuser.h:5491:5 */ type LPACCESSTIMEOUT = uintptr /* winuser.h:5491:19 */ type tagSOUNDSENTRYA = struct { FcbSize UINT FdwFlags DWORD FiFSTextEffect DWORD FiFSTextEffectMSec DWORD FiFSTextEffectColorBits DWORD FiFSGrafEffect DWORD FiFSGrafEffectMSec DWORD FiFSGrafEffectColor DWORD FiWindowsEffect DWORD FiWindowsEffectMSec DWORD FlpszWindowsEffectDLL LPSTR FiWindowsEffectOrdinal DWORD _ [4]byte } /* winuser.h:5512:11 */ type SOUNDSENTRYA = tagSOUNDSENTRYA /* winuser.h:5525:5 */ type LPSOUNDSENTRYA = uintptr /* winuser.h:5525:18 */ type tagSOUNDSENTRYW = struct { FcbSize UINT FdwFlags DWORD FiFSTextEffect DWORD FiFSTextEffectMSec DWORD FiFSTextEffectColorBits DWORD FiFSGrafEffect DWORD FiFSGrafEffectMSec DWORD FiFSGrafEffectColor DWORD FiWindowsEffect DWORD FiWindowsEffectMSec DWORD FlpszWindowsEffectDLL LPWSTR FiWindowsEffectOrdinal DWORD _ [4]byte } /* winuser.h:5527:11 */ type SOUNDSENTRYW = tagSOUNDSENTRYW /* winuser.h:5540:5 */ type LPSOUNDSENTRYW = uintptr /* winuser.h:5540:18 */ type SOUNDSENTRY = SOUNDSENTRYA /* winuser.h:5542:3 */ type LPSOUNDSENTRY = LPSOUNDSENTRYA /* winuser.h:5543:3 */ type tagTOGGLEKEYS = struct { FcbSize UINT FdwFlags DWORD } /* winuser.h:5555:11 */ type TOGGLEKEYS = tagTOGGLEKEYS /* winuser.h:5558:5 */ type LPTOGGLEKEYS = uintptr /* winuser.h:5558:16 */ type tagMONITORINFO = struct { FcbSize DWORD FrcMonitor RECT FrcWork RECT FdwFlags DWORD } /* winuser.h:5560:11 */ type MONITORINFO = tagMONITORINFO /* winuser.h:5565:5 */ type LPMONITORINFO = uintptr /* winuser.h:5565:17 */ type tagMONITORINFOEXA = struct { F__0 struct { FcbSize DWORD FrcMonitor RECT FrcWork RECT FdwFlags DWORD } FszDevice [32]CHAR } /* winuser.h:5587:11 */ type MONITORINFOEXA = tagMONITORINFOEXA /* winuser.h:5595:5 */ type LPMONITORINFOEXA = uintptr /* winuser.h:5595:20 */ type tagMONITORINFOEXW = struct { F__0 struct { FcbSize DWORD FrcMonitor RECT FrcWork RECT FdwFlags DWORD } FszDevice [32]WCHAR } /* winuser.h:5597:11 */ type MONITORINFOEXW = tagMONITORINFOEXW /* winuser.h:5605:5 */ type LPMONITORINFOEXW = uintptr /* winuser.h:5605:20 */ type MONITORINFOEX = MONITORINFOEXA /* winuser.h:5607:3 */ type LPMONITORINFOEX = LPMONITORINFOEXA /* winuser.h:5608:3 */ type MONITORENUMPROC = uintptr /* winuser.h:5611:19 */ type WINEVENTPROC = uintptr /* winuser.h:5653:16 */ type tagGUITHREADINFO = struct { FcbSize DWORD Fflags DWORD FhwndActive HWND FhwndFocus HWND FhwndCapture HWND FhwndMenuOwner HWND FhwndMoveSize HWND FhwndCaret HWND FrcCaret RECT } /* winuser.h:5830:11 */ type GUITHREADINFO = tagGUITHREADINFO /* winuser.h:5840:5 */ type PGUITHREADINFO = uintptr /* winuser.h:5840:19 */ type LPGUITHREADINFO = uintptr /* winuser.h:5840:35 */ type tagCURSORINFO = struct { FcbSize DWORD Fflags DWORD FhCursor HCURSOR FptScreenPos POINT } /* winuser.h:5908:11 */ type CURSORINFO = tagCURSORINFO /* winuser.h:5913:5 */ type PCURSORINFO = uintptr /* winuser.h:5913:16 */ type LPCURSORINFO = uintptr /* winuser.h:5913:29 */ type tagWINDOWINFO = struct { FcbSize DWORD FrcWindow RECT FrcClient RECT FdwStyle DWORD FdwExStyle DWORD FdwWindowStatus DWORD FcxWindowBorders UINT FcyWindowBorders UINT FatomWindowType ATOM FwCreatorVersion WORD } /* winuser.h:5922:11 */ type WINDOWINFO = tagWINDOWINFO /* winuser.h:5933:5 */ type PWINDOWINFO = uintptr /* winuser.h:5933:16 */ type LPWINDOWINFO = uintptr /* winuser.h:5933:29 */ type tagTITLEBARINFO = struct { FcbSize DWORD FrcTitleBar RECT Frgstate [6]DWORD } /* winuser.h:5939:11 */ type TITLEBARINFO = tagTITLEBARINFO /* winuser.h:5943:5 */ type PTITLEBARINFO = uintptr /* winuser.h:5943:18 */ type LPTITLEBARINFO = uintptr /* winuser.h:5943:33 */ type tagMENUBARINFO = struct { FcbSize DWORD FrcBar RECT _ [4]byte FhMenu HMENU FhwndMenu HWND FfBarFocused uint8 /* WINBOOL fBarFocused: 1, WINBOOL fFocused: 1 */ _ [7]byte } /* winuser.h:5956:11 */ type MENUBARINFO = tagMENUBARINFO /* winuser.h:5963:5 */ type PMENUBARINFO = uintptr /* winuser.h:5963:17 */ type LPMENUBARINFO = uintptr /* winuser.h:5963:31 */ type tagSCROLLBARINFO = struct { FcbSize DWORD FrcScrollBar RECT FdxyLineButton int32 FxyThumbTop int32 FxyThumbBottom int32 Freserved int32 Frgstate [6]DWORD } /* winuser.h:5967:11 */ type SCROLLBARINFO = tagSCROLLBARINFO /* winuser.h:5975:5 */ type PSCROLLBARINFO = uintptr /* winuser.h:5975:19 */ type LPSCROLLBARINFO = uintptr /* winuser.h:5975:35 */ type tagCOMBOBOXINFO = struct { FcbSize DWORD FrcItem RECT FrcButton RECT FstateButton DWORD FhwndCombo HWND FhwndItem HWND FhwndList HWND } /* winuser.h:5979:11 */ type COMBOBOXINFO = tagCOMBOBOXINFO /* winuser.h:5987:5 */ type PCOMBOBOXINFO = uintptr /* winuser.h:5987:18 */ type LPCOMBOBOXINFO = uintptr /* winuser.h:5987:33 */ type tagALTTABINFO = struct { FcbSize DWORD FcItems int32 FcColumns int32 FcRows int32 FiColFocus int32 FiRowFocus int32 FcxItem int32 FcyItem int32 FptStart POINT } /* winuser.h:6004:11 */ type ALTTABINFO = tagALTTABINFO /* winuser.h:6014:5 */ type PALTTABINFO = uintptr /* winuser.h:6014:16 */ type LPALTTABINFO = uintptr /* winuser.h:6014:29 */ type HRAWINPUT__ = struct{ Funused int32 } /* winuser.h:6028:3 */ type HRAWINPUT = uintptr /* winuser.h:6028:3 */ type tagRAWINPUTHEADER = struct { FdwType DWORD FdwSize DWORD FhDevice HANDLE FwParam WPARAM } /* winuser.h:6037:11 */ type RAWINPUTHEADER = tagRAWINPUTHEADER /* winuser.h:6042:5 */ type PRAWINPUTHEADER = uintptr /* winuser.h:6042:20 */ type LPRAWINPUTHEADER = uintptr /* winuser.h:6042:37 */ type tagRAWMOUSE = struct { FusFlags USHORT _ [2]byte F__4 struct{ FulButtons ULONG } FulRawButtons ULONG FlLastX LONG FlLastY LONG FulExtraInformation ULONG } /* winuser.h:6050:11 */ type RAWMOUSE = tagRAWMOUSE /* winuser.h:6063:5 */ type PRAWMOUSE = uintptr /* winuser.h:6063:14 */ type LPRAWMOUSE = uintptr /* winuser.h:6063:25 */ type tagRAWKEYBOARD = struct { FMakeCode USHORT FFlags USHORT FReserved USHORT FVKey USHORT FMessage UINT FExtraInformation ULONG } /* winuser.h:6094:11 */ type RAWKEYBOARD = tagRAWKEYBOARD /* winuser.h:6101:5 */ type PRAWKEYBOARD = uintptr /* winuser.h:6101:17 */ type LPRAWKEYBOARD = uintptr /* winuser.h:6101:31 */ type tagRAWHID = struct { FdwSizeHid DWORD FdwCount DWORD FbRawData [1]BYTE _ [3]byte } /* winuser.h:6114:11 */ type RAWHID = tagRAWHID /* winuser.h:6118:5 */ type PRAWHID = uintptr /* winuser.h:6118:12 */ type LPRAWHID = uintptr /* winuser.h:6118:21 */ type tagRAWINPUT = struct { Fheader RAWINPUTHEADER Fdata struct{ Fmouse RAWMOUSE } } /* winuser.h:6120:11 */ type RAWINPUT = tagRAWINPUT /* winuser.h:6127:5 */ type PRAWINPUT = uintptr /* winuser.h:6127:14 */ type LPRAWINPUT = uintptr /* winuser.h:6127:25 */ type tagRID_DEVICE_INFO_MOUSE = struct { FdwId DWORD FdwNumberOfButtons DWORD FdwSampleRate DWORD FfHasHorizontalWheel WINBOOL } /* winuser.h:6150:11 */ type RID_DEVICE_INFO_MOUSE = tagRID_DEVICE_INFO_MOUSE /* winuser.h:6155:5 */ type PRID_DEVICE_INFO_MOUSE = uintptr /* winuser.h:6155:27 */ type tagRID_DEVICE_INFO_KEYBOARD = struct { FdwType DWORD FdwSubType DWORD FdwKeyboardMode DWORD FdwNumberOfFunctionKeys DWORD FdwNumberOfIndicators DWORD FdwNumberOfKeysTotal DWORD } /* winuser.h:6157:11 */ type RID_DEVICE_INFO_KEYBOARD = tagRID_DEVICE_INFO_KEYBOARD /* winuser.h:6164:5 */ type PRID_DEVICE_INFO_KEYBOARD = uintptr /* winuser.h:6164:30 */ type tagRID_DEVICE_INFO_HID = struct { FdwVendorId DWORD FdwProductId DWORD FdwVersionNumber DWORD FusUsagePage USHORT FusUsage USHORT } /* winuser.h:6166:11 */ type RID_DEVICE_INFO_HID = tagRID_DEVICE_INFO_HID /* winuser.h:6172:5 */ type PRID_DEVICE_INFO_HID = uintptr /* winuser.h:6172:25 */ type tagRID_DEVICE_INFO = struct { FcbSize DWORD FdwType DWORD Fu struct { Fmouse RID_DEVICE_INFO_MOUSE _ [8]byte } } /* winuser.h:6174:11 */ type RID_DEVICE_INFO = tagRID_DEVICE_INFO /* winuser.h:6182:5 */ type PRID_DEVICE_INFO = uintptr /* winuser.h:6182:21 */ type LPRID_DEVICE_INFO = uintptr /* winuser.h:6182:39 */ type tagRAWINPUTDEVICE = struct { FusUsagePage USHORT FusUsage USHORT FdwFlags DWORD FhwndTarget HWND } /* winuser.h:6190:11 */ type RAWINPUTDEVICE = tagRAWINPUTDEVICE /* winuser.h:6195:5 */ type PRAWINPUTDEVICE = uintptr /* winuser.h:6195:20 */ type LPRAWINPUTDEVICE = uintptr /* winuser.h:6195:37 */ type PCRAWINPUTDEVICE = uintptr /* winuser.h:6197:32 */ type tagRAWINPUTDEVICELIST = struct { FhDevice HANDLE FdwType DWORD _ [4]byte } /* winuser.h:6224:11 */ type RAWINPUTDEVICELIST = tagRAWINPUTDEVICELIST /* winuser.h:6227:5 */ type PRAWINPUTDEVICELIST = uintptr /* winuser.h:6227:24 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type LGRPID = DWORD /* winnls.h:644:17 */ type LCTYPE = DWORD /* winnls.h:645:17 */ type CALTYPE = DWORD /* winnls.h:646:17 */ type CALID = DWORD /* winnls.h:647:17 */ type _cpinfo = struct { FMaxCharSize UINT FDefaultChar [2]BYTE FLeadByte [12]BYTE _ [2]byte } /* winnls.h:649:11 */ type CPINFO = _cpinfo /* winnls.h:653:5 */ type LPCPINFO = uintptr /* winnls.h:653:12 */ type _cpinfoexA = struct { FMaxCharSize UINT FDefaultChar [2]BYTE FLeadByte [12]BYTE FUnicodeDefaultChar WCHAR FCodePage UINT FCodePageName [260]CHAR } /* winnls.h:654:11 */ type CPINFOEXA = _cpinfoexA /* winnls.h:661:5 */ type LPCPINFOEXA = uintptr /* winnls.h:661:15 */ type _cpinfoexW = struct { FMaxCharSize UINT FDefaultChar [2]BYTE FLeadByte [12]BYTE FUnicodeDefaultChar WCHAR FCodePage UINT FCodePageName [260]WCHAR } /* winnls.h:663:11 */ type CPINFOEXW = _cpinfoexW /* winnls.h:670:5 */ type LPCPINFOEXW = uintptr /* winnls.h:670:15 */ type CPINFOEX = CPINFOEXA /* winnls.h:672:3 */ type LPCPINFOEX = LPCPINFOEXA /* winnls.h:673:3 */ type _numberfmtA = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT _ [4]byte FlpDecimalSep LPSTR FlpThousandSep LPSTR FNegativeOrder UINT _ [4]byte } /* winnls.h:675:11 */ type NUMBERFMTA = _numberfmtA /* winnls.h:682:5 */ type LPNUMBERFMTA = uintptr /* winnls.h:682:16 */ type _numberfmtW = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT _ [4]byte FlpDecimalSep LPWSTR FlpThousandSep LPWSTR FNegativeOrder UINT _ [4]byte } /* winnls.h:683:11 */ type NUMBERFMTW = _numberfmtW /* winnls.h:690:5 */ type LPNUMBERFMTW = uintptr /* winnls.h:690:16 */ type NUMBERFMT = NUMBERFMTA /* winnls.h:692:3 */ type LPNUMBERFMT = LPNUMBERFMTA /* winnls.h:693:3 */ type _currencyfmtA = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT _ [4]byte FlpDecimalSep LPSTR FlpThousandSep LPSTR FNegativeOrder UINT FPositiveOrder UINT FlpCurrencySymbol LPSTR } /* winnls.h:695:11 */ type CURRENCYFMTA = _currencyfmtA /* winnls.h:704:5 */ type LPCURRENCYFMTA = uintptr /* winnls.h:704:18 */ type _currencyfmtW = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT _ [4]byte FlpDecimalSep LPWSTR FlpThousandSep LPWSTR FNegativeOrder UINT FPositiveOrder UINT FlpCurrencySymbol LPWSTR } /* winnls.h:706:11 */ type CURRENCYFMTW = _currencyfmtW /* winnls.h:715:5 */ type LPCURRENCYFMTW = uintptr /* winnls.h:715:18 */ type CURRENCYFMT = CURRENCYFMTA /* winnls.h:717:3 */ type LPCURRENCYFMT = LPCURRENCYFMTA /* winnls.h:718:3 */ type NLS_FUNCTION = DWORD /* winnls.h:724:17 */ type _nlsversioninfo = struct { FdwNLSVersionInfoSize DWORD FdwNLSVersion DWORD FdwDefinedVersion DWORD } /* winnls.h:735:11 */ type NLSVERSIONINFO = _nlsversioninfo /* winnls.h:739:5 */ type LPNLSVERSIONINFO = uintptr /* winnls.h:739:20 */ type _nlsversioninfoex = struct { FdwNLSVersionInfoSize DWORD FdwNLSVersion DWORD FdwDefinedVersion DWORD FdwEffectiveId DWORD FguidCustomVersion GUID } /* winnls.h:742:11 */ type NLSVERSIONINFOEX = _nlsversioninfoex /* winnls.h:748:5 */ type LPNLSVERSIONINFOEX = uintptr /* winnls.h:748:22 */ type GEOID = LONG /* winnls.h:750:16 */ type GEOTYPE = DWORD /* winnls.h:751:17 */ type GEOCLASS = DWORD /* winnls.h:752:17 */ type LANGUAGEGROUP_ENUMPROCA = uintptr /* winnls.h:798:19 */ type LANGGROUPLOCALE_ENUMPROCA = uintptr /* winnls.h:799:19 */ type UILANGUAGE_ENUMPROCA = uintptr /* winnls.h:800:19 */ type CODEPAGE_ENUMPROCA = uintptr /* winnls.h:801:19 */ type DATEFMT_ENUMPROCA = uintptr /* winnls.h:802:19 */ type DATEFMT_ENUMPROCEXA = uintptr /* winnls.h:803:19 */ type TIMEFMT_ENUMPROCA = uintptr /* winnls.h:804:19 */ type CALINFO_ENUMPROCA = uintptr /* winnls.h:805:19 */ type CALINFO_ENUMPROCEXA = uintptr /* winnls.h:806:19 */ type LOCALE_ENUMPROCA = uintptr /* winnls.h:807:19 */ type LOCALE_ENUMPROCW = uintptr /* winnls.h:808:19 */ type LANGUAGEGROUP_ENUMPROCW = uintptr /* winnls.h:809:19 */ type LANGGROUPLOCALE_ENUMPROCW = uintptr /* winnls.h:810:19 */ type UILANGUAGE_ENUMPROCW = uintptr /* winnls.h:811:19 */ type CODEPAGE_ENUMPROCW = uintptr /* winnls.h:812:19 */ type DATEFMT_ENUMPROCW = uintptr /* winnls.h:813:19 */ type DATEFMT_ENUMPROCEXW = uintptr /* winnls.h:814:19 */ type TIMEFMT_ENUMPROCW = uintptr /* winnls.h:815:19 */ type CALINFO_ENUMPROCW = uintptr /* winnls.h:816:19 */ type CALINFO_ENUMPROCEXW = uintptr /* winnls.h:817:19 */ type GEO_ENUMPROC = uintptr /* winnls.h:818:19 */ type _FILEMUIINFO = struct { FdwSize DWORD FdwVersion DWORD FdwFileType DWORD FpChecksum [16]BYTE FpServiceChecksum [16]BYTE FdwLanguageNameOffset DWORD FdwTypeIDMainSize DWORD FdwTypeIDMainOffset DWORD FdwTypeNameMainOffset DWORD FdwTypeIDMUISize DWORD FdwTypeIDMUIOffset DWORD FdwTypeNameMUIOffset DWORD FabBuffer [8]BYTE } /* winnls.h:869:11 */ type FILEMUIINFO = _FILEMUIINFO /* winnls.h:883:5 */ type PFILEMUIINFO = uintptr /* winnls.h:883:17 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _COORD = struct { FX SHORT FY SHORT } /* wincon.h:17:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type COORD = _COORD /* wincon.h:20:5 */ type PCOORD = uintptr /* wincon.h:20:11 */ type _SMALL_RECT = struct { FLeft SHORT FTop SHORT FRight SHORT FBottom SHORT } /* wincon.h:22:11 */ type SMALL_RECT = _SMALL_RECT /* wincon.h:27:5 */ type PSMALL_RECT = uintptr /* wincon.h:27:16 */ type _KEY_EVENT_RECORD = struct { FbKeyDown WINBOOL FwRepeatCount WORD FwVirtualKeyCode WORD FwVirtualScanCode WORD FuChar struct{ FUnicodeChar WCHAR } FdwControlKeyState DWORD } /* wincon.h:29:11 */ type KEY_EVENT_RECORD = _KEY_EVENT_RECORD /* wincon.h:39:5 */ type PKEY_EVENT_RECORD = uintptr /* wincon.h:39:22 */ type _MOUSE_EVENT_RECORD = struct { FdwMousePosition COORD FdwButtonState DWORD FdwControlKeyState DWORD FdwEventFlags DWORD } /* wincon.h:58:11 */ type MOUSE_EVENT_RECORD = _MOUSE_EVENT_RECORD /* wincon.h:63:5 */ type PMOUSE_EVENT_RECORD = uintptr /* wincon.h:63:24 */ type _WINDOW_BUFFER_SIZE_RECORD = struct{ FdwSize COORD } /* wincon.h:78:11 */ type WINDOW_BUFFER_SIZE_RECORD = _WINDOW_BUFFER_SIZE_RECORD /* wincon.h:80:5 */ type PWINDOW_BUFFER_SIZE_RECORD = uintptr /* wincon.h:80:31 */ type _MENU_EVENT_RECORD = struct{ FdwCommandId UINT } /* wincon.h:82:11 */ type MENU_EVENT_RECORD = _MENU_EVENT_RECORD /* wincon.h:84:5 */ type PMENU_EVENT_RECORD = uintptr /* wincon.h:84:23 */ type _FOCUS_EVENT_RECORD = struct{ FbSetFocus WINBOOL } /* wincon.h:86:11 */ type FOCUS_EVENT_RECORD = _FOCUS_EVENT_RECORD /* wincon.h:88:5 */ type PFOCUS_EVENT_RECORD = uintptr /* wincon.h:88:24 */ type _INPUT_RECORD = struct { FEventType WORD _ [2]byte FEvent struct{ FKeyEvent KEY_EVENT_RECORD } } /* wincon.h:90:11 */ type INPUT_RECORD = _INPUT_RECORD /* wincon.h:99:5 */ type PINPUT_RECORD = uintptr /* wincon.h:99:18 */ type _CHAR_INFO = struct { FChar struct{ FUnicodeChar WCHAR } FAttributes WORD } /* wincon.h:107:11 */ type CHAR_INFO = _CHAR_INFO /* wincon.h:113:5 */ type PCHAR_INFO = uintptr /* wincon.h:113:15 */ type _CONSOLE_SCREEN_BUFFER_INFO = struct { FdwSize COORD FdwCursorPosition COORD FwAttributes WORD FsrWindow SMALL_RECT FdwMaximumWindowSize COORD } /* wincon.h:133:11 */ type CONSOLE_SCREEN_BUFFER_INFO = _CONSOLE_SCREEN_BUFFER_INFO /* wincon.h:139:5 */ type PCONSOLE_SCREEN_BUFFER_INFO = uintptr /* wincon.h:139:32 */ type _CONSOLE_CURSOR_INFO = struct { FdwSize DWORD FbVisible WINBOOL } /* wincon.h:141:11 */ type CONSOLE_CURSOR_INFO = _CONSOLE_CURSOR_INFO /* wincon.h:144:5 */ type PCONSOLE_CURSOR_INFO = uintptr /* wincon.h:144:25 */ type _CONSOLE_FONT_INFO = struct { FnFont DWORD FdwFontSize COORD } /* wincon.h:146:11 */ type CONSOLE_FONT_INFO = _CONSOLE_FONT_INFO /* wincon.h:149:5 */ type PCONSOLE_FONT_INFO = uintptr /* wincon.h:149:23 */ type _CONSOLE_SELECTION_INFO = struct { FdwFlags DWORD FdwSelectionAnchor COORD FsrSelection SMALL_RECT } /* wincon.h:151:11 */ type CONSOLE_SELECTION_INFO = _CONSOLE_SELECTION_INFO /* wincon.h:155:5 */ type PCONSOLE_SELECTION_INFO = uintptr /* wincon.h:155:28 */ type PHANDLER_ROUTINE = uintptr /* wincon.h:163:19 */ type _CONSOLE_FONT_INFOEX = struct { FcbSize ULONG FnFont DWORD FdwFontSize COORD FFontFamily UINT FFontWeight UINT FFaceName [32]WCHAR } /* wincon.h:297:9 */ type CONSOLE_FONT_INFOEX = _CONSOLE_FONT_INFOEX /* wincon.h:304:3 */ type PCONSOLE_FONT_INFOEX = uintptr /* wincon.h:304:24 */ type _CONSOLE_HISTORY_INFO = struct { FcbSize UINT FHistoryBufferSize UINT FNumberOfHistoryBuffers UINT FdwFlags DWORD } /* wincon.h:306:9 */ type CONSOLE_HISTORY_INFO = _CONSOLE_HISTORY_INFO /* wincon.h:311:3 */ type PCONSOLE_HISTORY_INFO = uintptr /* wincon.h:311:25 */ type _CONSOLE_READCONSOLE_CONTROL = struct { FnLength ULONG FnInitialChars ULONG FdwCtrlWakeupMask ULONG FdwControlKeyState ULONG } /* wincon.h:313:9 */ type CONSOLE_READCONSOLE_CONTROL = _CONSOLE_READCONSOLE_CONTROL /* wincon.h:318:3 */ type PCONSOLE_READCONSOLE_CONTROL = uintptr /* wincon.h:318:32 */ type _CONSOLE_SCREEN_BUFFER_INFOEX = struct { FcbSize ULONG FdwSize COORD FdwCursorPosition COORD FwAttributes WORD FsrWindow SMALL_RECT FdwMaximumWindowSize COORD FwPopupAttributes WORD FbFullscreenSupported WINBOOL FColorTable [16]COLORREF } /* wincon.h:320:9 */ type CONSOLE_SCREEN_BUFFER_INFOEX = _CONSOLE_SCREEN_BUFFER_INFOEX /* wincon.h:330:3 */ type PCONSOLE_SCREEN_BUFFER_INFOEX = uintptr /* wincon.h:330:33 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagVS_FIXEDFILEINFO = struct { FdwSignature DWORD FdwStrucVersion DWORD FdwFileVersionMS DWORD FdwFileVersionLS DWORD FdwProductVersionMS DWORD FdwProductVersionLS DWORD FdwFileFlagsMask DWORD FdwFileFlags DWORD FdwFileOS DWORD FdwFileType DWORD FdwFileSubtype DWORD FdwFileDateMS DWORD FdwFileDateLS DWORD } /* winver.h:113:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type VS_FIXEDFILEINFO = tagVS_FIXEDFILEINFO /* winver.h:128:5 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type REGSAM = ACCESS_MASK /* winreg.h:35:23 */ type LSTATUS = LONG /* winreg.h:36:16 */ type val_context = struct { Fvaluelen int32 _ [4]byte Fvalue_context LPVOID Fval_buff_ptr LPVOID } /* winreg.h:54:3 */ type PVALCONTEXT = uintptr /* winreg.h:60:30 */ type pvalueA = struct { Fpv_valuename LPSTR Fpv_valuelen int32 _ [4]byte Fpv_value_context LPVOID Fpv_type DWORD _ [4]byte } /* winreg.h:62:11 */ type PVALUEA = pvalueA /* winreg.h:67:4 */ type PPVALUEA = uintptr /* winreg.h:67:12 */ type pvalueW = struct { Fpv_valuename LPWSTR Fpv_valuelen int32 _ [4]byte Fpv_value_context LPVOID Fpv_type DWORD _ [4]byte } /* winreg.h:69:11 */ type PVALUEW = pvalueW /* winreg.h:74:4 */ type PPVALUEW = uintptr /* winreg.h:74:12 */ type PVALUE = PVALUEA /* winreg.h:76:3 */ type PPVALUE = PPVALUEA /* winreg.h:77:3 */ type PQUERYHANDLER = uintptr /* winreg.h:81:24 */ type provider_info = struct { Fpi_R0_1val PQUERYHANDLER Fpi_R0_allvals PQUERYHANDLER Fpi_R3_1val PQUERYHANDLER Fpi_R3_allvals PQUERYHANDLER Fpi_flags DWORD _ [4]byte Fpi_key_context LPVOID } /* winreg.h:83:11 */ type REG_PROVIDER = provider_info /* winreg.h:90:5 */ type PPROVIDER = uintptr /* winreg.h:92:32 */ type value_entA = struct { Fve_valuename LPSTR Fve_valuelen DWORD _ [4]byte Fve_valueptr DWORD_PTR Fve_type DWORD _ [4]byte } /* winreg.h:94:11 */ type VALENTA = value_entA /* winreg.h:99:5 */ type PVALENTA = uintptr /* winreg.h:99:13 */ type value_entW = struct { Fve_valuename LPWSTR Fve_valuelen DWORD _ [4]byte Fve_valueptr DWORD_PTR Fve_type DWORD _ [4]byte } /* winreg.h:101:11 */ type VALENTW = value_entW /* winreg.h:106:5 */ type PVALENTW = uintptr /* winreg.h:106:13 */ type VALENT = VALENTA /* winreg.h:108:3 */ type PVALENT = PVALENTA /* winreg.h:109:3 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _NETRESOURCEA = struct { FdwScope DWORD FdwType DWORD FdwDisplayType DWORD FdwUsage DWORD FlpLocalName LPSTR FlpRemoteName LPSTR FlpComment LPSTR FlpProvider LPSTR } /* winnetwk.h:53:11 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type NETRESOURCEA = _NETRESOURCEA /* winnetwk.h:62:5 */ type LPNETRESOURCEA = uintptr /* winnetwk.h:62:18 */ type _NETRESOURCEW = struct { FdwScope DWORD FdwType DWORD FdwDisplayType DWORD FdwUsage DWORD FlpLocalName LPWSTR FlpRemoteName LPWSTR FlpComment LPWSTR FlpProvider LPWSTR } /* winnetwk.h:63:11 */ type NETRESOURCEW = _NETRESOURCEW /* winnetwk.h:72:5 */ type LPNETRESOURCEW = uintptr /* winnetwk.h:72:18 */ type NETRESOURCE = NETRESOURCEA /* winnetwk.h:74:3 */ type LPNETRESOURCE = LPNETRESOURCEA /* winnetwk.h:75:3 */ type _CONNECTDLGSTRUCTA = struct { FcbStructure DWORD _ [4]byte FhwndOwner HWND FlpConnRes LPNETRESOURCEA FdwFlags DWORD FdwDevNum DWORD } /* winnetwk.h:129:11 */ type CONNECTDLGSTRUCTA = _CONNECTDLGSTRUCTA /* winnetwk.h:135:5 */ type LPCONNECTDLGSTRUCTA = uintptr /* winnetwk.h:135:23 */ type _CONNECTDLGSTRUCTW = struct { FcbStructure DWORD _ [4]byte FhwndOwner HWND FlpConnRes LPNETRESOURCEW FdwFlags DWORD FdwDevNum DWORD } /* winnetwk.h:137:11 */ type CONNECTDLGSTRUCTW = _CONNECTDLGSTRUCTW /* winnetwk.h:143:5 */ type LPCONNECTDLGSTRUCTW = uintptr /* winnetwk.h:143:23 */ type CONNECTDLGSTRUCT = CONNECTDLGSTRUCTA /* winnetwk.h:145:3 */ type LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTA /* winnetwk.h:146:3 */ type _DISCDLGSTRUCTA = struct { FcbStructure DWORD _ [4]byte FhwndOwner HWND FlpLocalName LPSTR FlpRemoteName LPSTR FdwFlags DWORD _ [4]byte } /* winnetwk.h:161:11 */ type DISCDLGSTRUCTA = _DISCDLGSTRUCTA /* winnetwk.h:167:5 */ type LPDISCDLGSTRUCTA = uintptr /* winnetwk.h:167:20 */ type _DISCDLGSTRUCTW = struct { FcbStructure DWORD _ [4]byte FhwndOwner HWND FlpLocalName LPWSTR FlpRemoteName LPWSTR FdwFlags DWORD _ [4]byte } /* winnetwk.h:169:11 */ type DISCDLGSTRUCTW = _DISCDLGSTRUCTW /* winnetwk.h:175:5 */ type LPDISCDLGSTRUCTW = uintptr /* winnetwk.h:175:20 */ type DISCDLGSTRUCT = DISCDLGSTRUCTA /* winnetwk.h:177:3 */ type LPDISCDLGSTRUCT = LPDISCDLGSTRUCTA /* winnetwk.h:178:3 */ type _UNIVERSAL_NAME_INFOA = struct{ FlpUniversalName LPSTR } /* winnetwk.h:204:11 */ type UNIVERSAL_NAME_INFOA = _UNIVERSAL_NAME_INFOA /* winnetwk.h:206:5 */ type LPUNIVERSAL_NAME_INFOA = uintptr /* winnetwk.h:206:26 */ type _UNIVERSAL_NAME_INFOW = struct{ FlpUniversalName LPWSTR } /* winnetwk.h:208:11 */ type UNIVERSAL_NAME_INFOW = _UNIVERSAL_NAME_INFOW /* winnetwk.h:210:5 */ type LPUNIVERSAL_NAME_INFOW = uintptr /* winnetwk.h:210:26 */ type UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOA /* winnetwk.h:212:3 */ type LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOA /* winnetwk.h:213:3 */ type _REMOTE_NAME_INFOA = struct { FlpUniversalName LPSTR FlpConnectionName LPSTR FlpRemainingPath LPSTR } /* winnetwk.h:215:11 */ type REMOTE_NAME_INFOA = _REMOTE_NAME_INFOA /* winnetwk.h:219:5 */ type LPREMOTE_NAME_INFOA = uintptr /* winnetwk.h:219:23 */ type _REMOTE_NAME_INFOW = struct { FlpUniversalName LPWSTR FlpConnectionName LPWSTR FlpRemainingPath LPWSTR } /* winnetwk.h:221:11 */ type REMOTE_NAME_INFOW = _REMOTE_NAME_INFOW /* winnetwk.h:225:5 */ type LPREMOTE_NAME_INFOW = uintptr /* winnetwk.h:225:23 */ type REMOTE_NAME_INFO = REMOTE_NAME_INFOA /* winnetwk.h:227:3 */ type LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOA /* winnetwk.h:228:3 */ type _NETINFOSTRUCT = struct { FcbStructure DWORD FdwProviderVersion DWORD FdwStatus DWORD FdwCharacteristics DWORD FdwHandle ULONG_PTR FwNetType WORD _ [2]byte FdwPrinters DWORD FdwDrives DWORD _ [4]byte } /* winnetwk.h:247:11 */ type NETINFOSTRUCT = _NETINFOSTRUCT /* winnetwk.h:256:5 */ type LPNETINFOSTRUCT = uintptr /* winnetwk.h:256:19 */ type PFNGETPROFILEPATHA = uintptr /* winnetwk.h:267:16 */ type PFNGETPROFILEPATHW = uintptr /* winnetwk.h:268:16 */ type PFNRECONCILEPROFILEA = uintptr /* winnetwk.h:272:16 */ type PFNRECONCILEPROFILEW = uintptr /* winnetwk.h:273:16 */ type PFNPROCESSPOLICIESA = uintptr /* winnetwk.h:280:19 */ type PFNPROCESSPOLICIESW = uintptr /* winnetwk.h:281:19 */ type _NETCONNECTINFOSTRUCT = struct { FcbStructure DWORD FdwFlags DWORD FdwSpeed DWORD FdwDelay DWORD FdwOptDataSize DWORD } /* winnetwk.h:335:11 */ type NETCONNECTINFOSTRUCT = _NETCONNECTINFOSTRUCT /* winnetwk.h:341:5 */ type LPNETCONNECTINFOSTRUCT = uintptr /* winnetwk.h:341:26 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type DDEACK = struct { _ [0]uint16 FbAppReturnCode uint16 /* unsigned short bAppReturnCode: 8, unsigned short reserved: 6, unsigned short fBusy: 1, unsigned short fAck: 1 */ } /* dde.h:29:5 */ type DDEADVISE = struct { Freserved uint16 /* unsigned short reserved: 14, unsigned short fDeferUpd: 1, unsigned short fAckReq: 1 */ _ [2]byte FcfFormat int16 } /* dde.h:34:5 */ type DDEDATA = struct { Funused uint16 /* unsigned short unused: 12, unsigned short fResponse: 1, unsigned short fRelease: 1, unsigned short reserved: 1, unsigned short fAckReq: 1 */ _ [2]byte FcfFormat int16 FValue [1]BYTE _ [1]byte } /* dde.h:40:5 */ type DDEPOKE = struct { Funused uint16 /* unsigned short unused: 13, unsigned short fRelease: 1, unsigned short fReserved: 2 */ _ [2]byte FcfFormat int16 FValue [1]BYTE _ [1]byte } /* dde.h:47:5 */ type DDELN = struct { Funused uint16 /* unsigned short unused: 13, unsigned short fRelease: 1, unsigned short fDeferUpd: 1, unsigned short fAckReq: 1 */ _ [2]byte FcfFormat int16 } /* dde.h:52:5 */ type DDEUP = struct { Funused uint16 /* unsigned short unused: 12, unsigned short fAck: 1, unsigned short fRelease: 1, unsigned short fReserved: 1, unsigned short fAckReq: 1 */ _ [2]byte FcfFormat int16 Frgb [1]BYTE _ [1]byte } /* dde.h:58:5 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type HCONVLIST__ = struct{ Funused int32 } /* ddeml.h:15:3 */ type HCONVLIST = uintptr /* ddeml.h:15:3 */ type HCONV__ = struct{ Funused int32 } /* ddeml.h:16:3 */ type HCONV = uintptr /* ddeml.h:16:3 */ type HSZ__ = struct{ Funused int32 } /* ddeml.h:17:3 */ type HSZ = uintptr /* ddeml.h:17:3 */ type HDDEDATA__ = struct{ Funused int32 } /* ddeml.h:18:3 */ type HDDEDATA = uintptr /* ddeml.h:18:3 */ type tagHSZPAIR = struct { FhszSvc HSZ FhszTopic HSZ } /* ddeml.h:21:11 */ type HSZPAIR = tagHSZPAIR /* ddeml.h:24:5 */ type PHSZPAIR = uintptr /* ddeml.h:24:14 */ type tagCONVCONTEXT = struct { Fcb UINT FwFlags UINT FwCountryID UINT FiCodePage int32 FdwLangID DWORD FdwSecurity DWORD Fqos SECURITY_QUALITY_OF_SERVICE } /* ddeml.h:26:11 */ type CONVCONTEXT = tagCONVCONTEXT /* ddeml.h:34:5 */ type PCONVCONTEXT = uintptr /* ddeml.h:34:18 */ type tagCONVINFO = struct { Fcb DWORD _ [4]byte FhUser DWORD_PTR FhConvPartner HCONV FhszSvcPartner HSZ FhszServiceReq HSZ FhszTopic HSZ FhszItem HSZ FwFmt UINT FwType UINT FwStatus UINT FwConvst UINT FwLastError UINT _ [4]byte FhConvList HCONVLIST FConvCtxt CONVCONTEXT _ [4]byte Fhwnd HWND FhwndPartner HWND } /* ddeml.h:36:11 */ type CONVINFO = tagCONVINFO /* ddeml.h:53:5 */ type PCONVINFO = uintptr /* ddeml.h:53:15 */ type PFNCALLBACK = uintptr /* ddeml.h:155:20 */ type tagDDEML_MSG_HOOK_DATA = struct { FuiLo UINT_PTR FuiHi UINT_PTR FcbData DWORD FData [8]DWORD _ [4]byte } /* ddeml.h:256:11 */ type DDEML_MSG_HOOK_DATA = tagDDEML_MSG_HOOK_DATA /* ddeml.h:261:5 */ type PDDEML_MSG_HOOK_DATA = uintptr /* ddeml.h:261:25 */ type tagMONMSGSTRUCT = struct { Fcb UINT _ [4]byte FhwndTo HWND FdwTime DWORD _ [4]byte FhTask HANDLE FwMsg UINT _ [4]byte FwParam WPARAM FlParam LPARAM Fdmhd DDEML_MSG_HOOK_DATA } /* ddeml.h:263:11 */ type MONMSGSTRUCT = tagMONMSGSTRUCT /* ddeml.h:272:5 */ type PMONMSGSTRUCT = uintptr /* ddeml.h:272:18 */ type tagMONCBSTRUCT = struct { Fcb UINT FdwTime DWORD FhTask HANDLE FdwRet DWORD FwType UINT FwFmt UINT _ [4]byte FhConv HCONV Fhsz1 HSZ Fhsz2 HSZ FhData HDDEDATA FdwData1 ULONG_PTR FdwData2 ULONG_PTR Fcc CONVCONTEXT FcbData DWORD FData [8]DWORD } /* ddeml.h:274:11 */ type MONCBSTRUCT = tagMONCBSTRUCT /* ddeml.h:290:5 */ type PMONCBSTRUCT = uintptr /* ddeml.h:290:17 */ type tagMONHSZSTRUCTA = struct { Fcb UINT FfsAction WINBOOL FdwTime DWORD _ [4]byte Fhsz HSZ FhTask HANDLE Fstr [1]CHAR _ [7]byte } /* ddeml.h:292:11 */ type MONHSZSTRUCTA = tagMONHSZSTRUCTA /* ddeml.h:299:5 */ type PMONHSZSTRUCTA = uintptr /* ddeml.h:299:19 */ type tagMONHSZSTRUCTW = struct { Fcb UINT FfsAction WINBOOL FdwTime DWORD _ [4]byte Fhsz HSZ FhTask HANDLE Fstr [1]WCHAR _ [6]byte } /* ddeml.h:301:11 */ type MONHSZSTRUCTW = tagMONHSZSTRUCTW /* ddeml.h:308:5 */ type PMONHSZSTRUCTW = uintptr /* ddeml.h:308:19 */ type MONHSZSTRUCT = MONHSZSTRUCTA /* ddeml.h:310:3 */ type PMONHSZSTRUCT = PMONHSZSTRUCTA /* ddeml.h:311:3 */ type tagMONERRSTRUCT = struct { Fcb UINT FwLastError UINT FdwTime DWORD _ [4]byte FhTask HANDLE } /* ddeml.h:318:11 */ type MONERRSTRUCT = tagMONERRSTRUCT /* ddeml.h:323:5 */ type PMONERRSTRUCT = uintptr /* ddeml.h:323:18 */ type tagMONLINKSTRUCT = struct { Fcb UINT FdwTime DWORD FhTask HANDLE FfEstablished WINBOOL FfNoData WINBOOL FhszSvc HSZ FhszTopic HSZ FhszItem HSZ FwFmt UINT FfServer WINBOOL FhConvServer HCONV FhConvClient HCONV } /* ddeml.h:325:11 */ type MONLINKSTRUCT = tagMONLINKSTRUCT /* ddeml.h:338:5 */ type PMONLINKSTRUCT = uintptr /* ddeml.h:338:19 */ type tagMONCONVSTRUCT = struct { Fcb UINT FfConnect WINBOOL FdwTime DWORD _ [4]byte FhTask HANDLE FhszSvc HSZ FhszTopic HSZ FhConvClient HCONV FhConvServer HCONV } /* ddeml.h:340:11 */ type MONCONVSTRUCT = tagMONCONVSTRUCT /* ddeml.h:349:5 */ type PMONCONVSTRUCT = uintptr /* ddeml.h:349:19 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type tagCRGB = struct { FbRed BYTE FbGreen BYTE FbBlue BYTE FbExtra BYTE } /* dlgs.h:194:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type CRGB = tagCRGB /* dlgs.h:199:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type MMVERSION = UINT /* mmsystem.h:28:16 */ type MMRESULT = UINT /* mmsystem.h:29:16 */ type LPUINT = uintptr /* mmsystem.h:35:16 */ type mmtime_tag = struct { FwType UINT Fu struct { Fms DWORD _ [4]byte } } /* mmsystem.h:38:11 */ type MMTIME = mmtime_tag /* mmsystem.h:58:5 */ type PMMTIME = uintptr /* mmsystem.h:58:12 */ type NPMMTIME = uintptr /* mmsystem.h:58:26 */ type LPMMTIME = uintptr /* mmsystem.h:58:36 */ type HDRVR__ = struct{ Funused int32 } /* mmsystem.h:165:3 */ type HDRVR = uintptr /* mmsystem.h:165:3 */ type DRVCONFIGINFOEX1 = struct { FdwDCISize DWORD _ [4]byte FlpszDCISectionName LPCWSTR FlpszDCIAliasName LPCWSTR FdnDevNode DWORD _ [4]byte } /* mmsystem.h:169:11 */ type DRVCONFIGINFOEX = DRVCONFIGINFOEX1 /* mmsystem.h:174:5 */ type PDRVCONFIGINFOEX = uintptr /* mmsystem.h:174:21 */ type NPDRVCONFIGINFOEX = uintptr /* mmsystem.h:174:44 */ type LPDRVCONFIGINFOEX = uintptr /* mmsystem.h:174:63 */ type tagDRVCONFIGINFO = struct { FdwDCISize DWORD _ [4]byte FlpszDCISectionName LPCWSTR FlpszDCIAliasName LPCWSTR } /* mmsystem.h:192:11 */ type DRVCONFIGINFO = tagDRVCONFIGINFO /* mmsystem.h:196:5 */ type PDRVCONFIGINFO = uintptr /* mmsystem.h:196:19 */ type NPDRVCONFIGINFO = uintptr /* mmsystem.h:196:40 */ type LPDRVCONFIGINFO = uintptr /* mmsystem.h:196:57 */ type DRIVERPROC = uintptr /* mmsystem.h:202:19 */ type LPDRVCALLBACK = uintptr /* mmsystem.h:228:23 */ type PDRVCALLBACK = uintptr /* mmsystem.h:229:23 */ type HWAVE__ = struct{ Funused int32 } /* mmsystem.h:283:3 */ type HWAVE = uintptr /* mmsystem.h:283:3 */ type HWAVEIN__ = struct{ Funused int32 } /* mmsystem.h:284:3 */ type HWAVEIN = uintptr /* mmsystem.h:284:3 */ type HWAVEOUT__ = struct{ Funused int32 } /* mmsystem.h:285:3 */ type HWAVEOUT = uintptr /* mmsystem.h:285:3 */ type LPHWAVEIN = uintptr /* mmsystem.h:286:19 */ type LPHWAVEOUT = uintptr /* mmsystem.h:287:20 */ type LPWAVECALLBACK = uintptr /* mmsystem.h:289:24 */ type wavehdr_tag = struct { FlpData LPSTR FdwBufferLength DWORD FdwBytesRecorded DWORD FdwUser DWORD_PTR FdwFlags DWORD FdwLoops DWORD FlpNext uintptr Freserved DWORD_PTR } /* mmsystem.h:306:11 */ type WAVEHDR = wavehdr_tag /* mmsystem.h:315:5 */ type PWAVEHDR = uintptr /* mmsystem.h:315:13 */ type NPWAVEHDR = uintptr /* mmsystem.h:315:28 */ type LPWAVEHDR = uintptr /* mmsystem.h:315:39 */ type tagWAVEOUTCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FdwSupport DWORD } /* mmsystem.h:323:11 */ type WAVEOUTCAPSA = tagWAVEOUTCAPSA /* mmsystem.h:332:5 */ type PWAVEOUTCAPSA = uintptr /* mmsystem.h:332:18 */ type NPWAVEOUTCAPSA = uintptr /* mmsystem.h:332:33 */ type LPWAVEOUTCAPSA = uintptr /* mmsystem.h:332:49 */ type tagWAVEOUTCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FdwSupport DWORD } /* mmsystem.h:334:11 */ type WAVEOUTCAPSW = tagWAVEOUTCAPSW /* mmsystem.h:343:5 */ type PWAVEOUTCAPSW = uintptr /* mmsystem.h:343:18 */ type NPWAVEOUTCAPSW = uintptr /* mmsystem.h:343:33 */ type LPWAVEOUTCAPSW = uintptr /* mmsystem.h:343:49 */ type WAVEOUTCAPS = WAVEOUTCAPSA /* mmsystem.h:345:3 */ type PWAVEOUTCAPS = PWAVEOUTCAPSA /* mmsystem.h:346:3 */ type NPWAVEOUTCAPS = NPWAVEOUTCAPSA /* mmsystem.h:347:3 */ type LPWAVEOUTCAPS = LPWAVEOUTCAPSA /* mmsystem.h:348:3 */ type tagWAVEOUTCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:350:11 */ type WAVEOUTCAPS2A = tagWAVEOUTCAPS2A /* mmsystem.h:362:5 */ type PWAVEOUTCAPS2A = uintptr /* mmsystem.h:362:19 */ type NPWAVEOUTCAPS2A = uintptr /* mmsystem.h:362:35 */ type LPWAVEOUTCAPS2A = uintptr /* mmsystem.h:362:52 */ type tagWAVEOUTCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:364:11 */ type WAVEOUTCAPS2W = tagWAVEOUTCAPS2W /* mmsystem.h:376:5 */ type PWAVEOUTCAPS2W = uintptr /* mmsystem.h:376:19 */ type NPWAVEOUTCAPS2W = uintptr /* mmsystem.h:376:35 */ type LPWAVEOUTCAPS2W = uintptr /* mmsystem.h:376:52 */ type WAVEOUTCAPS2 = WAVEOUTCAPS2A /* mmsystem.h:378:3 */ type PWAVEOUTCAPS2 = PWAVEOUTCAPS2A /* mmsystem.h:379:3 */ type NPWAVEOUTCAPS2 = NPWAVEOUTCAPS2A /* mmsystem.h:380:3 */ type LPWAVEOUTCAPS2 = LPWAVEOUTCAPS2A /* mmsystem.h:381:3 */ type tagWAVEINCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD } /* mmsystem.h:390:11 */ type WAVEINCAPSA = tagWAVEINCAPSA /* mmsystem.h:398:5 */ type PWAVEINCAPSA = uintptr /* mmsystem.h:398:17 */ type NPWAVEINCAPSA = uintptr /* mmsystem.h:398:31 */ type LPWAVEINCAPSA = uintptr /* mmsystem.h:398:46 */ type tagWAVEINCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD } /* mmsystem.h:400:11 */ type WAVEINCAPSW = tagWAVEINCAPSW /* mmsystem.h:408:5 */ type PWAVEINCAPSW = uintptr /* mmsystem.h:408:17 */ type NPWAVEINCAPSW = uintptr /* mmsystem.h:408:31 */ type LPWAVEINCAPSW = uintptr /* mmsystem.h:408:46 */ type WAVEINCAPS = WAVEINCAPSA /* mmsystem.h:410:3 */ type PWAVEINCAPS = PWAVEINCAPSA /* mmsystem.h:411:3 */ type NPWAVEINCAPS = NPWAVEINCAPSA /* mmsystem.h:412:3 */ type LPWAVEINCAPS = LPWAVEINCAPSA /* mmsystem.h:413:3 */ type tagWAVEINCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:415:11 */ type WAVEINCAPS2A = tagWAVEINCAPS2A /* mmsystem.h:426:5 */ type PWAVEINCAPS2A = uintptr /* mmsystem.h:426:18 */ type NPWAVEINCAPS2A = uintptr /* mmsystem.h:426:33 */ type LPWAVEINCAPS2A = uintptr /* mmsystem.h:426:49 */ type tagWAVEINCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:428:11 */ type WAVEINCAPS2W = tagWAVEINCAPS2W /* mmsystem.h:439:5 */ type PWAVEINCAPS2W = uintptr /* mmsystem.h:439:18 */ type NPWAVEINCAPS2W = uintptr /* mmsystem.h:439:33 */ type LPWAVEINCAPS2W = uintptr /* mmsystem.h:439:49 */ type WAVEINCAPS2 = WAVEINCAPS2A /* mmsystem.h:441:3 */ type PWAVEINCAPS2 = PWAVEINCAPS2A /* mmsystem.h:442:3 */ type NPWAVEINCAPS2 = NPWAVEINCAPS2A /* mmsystem.h:443:3 */ type LPWAVEINCAPS2 = LPWAVEINCAPS2A /* mmsystem.h:444:3 */ type waveformat_tag = struct { FwFormatTag WORD FnChannels WORD FnSamplesPerSec DWORD FnAvgBytesPerSec DWORD FnBlockAlign WORD _ [2]byte } /* mmsystem.h:474:11 */ type WAVEFORMAT = waveformat_tag /* mmsystem.h:480:5 */ type PWAVEFORMAT = uintptr /* mmsystem.h:480:16 */ type NPWAVEFORMAT = uintptr /* mmsystem.h:480:34 */ type LPWAVEFORMAT = uintptr /* mmsystem.h:480:48 */ type pcmwaveformat_tag = struct { Fwf WAVEFORMAT FwBitsPerSample WORD _ [2]byte } /* mmsystem.h:484:11 */ type PCMWAVEFORMAT = pcmwaveformat_tag /* mmsystem.h:487:5 */ type PPCMWAVEFORMAT = uintptr /* mmsystem.h:487:19 */ type NPPCMWAVEFORMAT = uintptr /* mmsystem.h:487:40 */ type LPPCMWAVEFORMAT = uintptr /* mmsystem.h:487:57 */ type tWAVEFORMATEX = struct { FwFormatTag WORD FnChannels WORD FnSamplesPerSec DWORD FnAvgBytesPerSec DWORD FnBlockAlign WORD FwBitsPerSample WORD FcbSize WORD _ [2]byte } /* mmsystem.h:493:11 */ type WAVEFORMATEX = tWAVEFORMATEX /* mmsystem.h:501:5 */ type PWAVEFORMATEX = uintptr /* mmsystem.h:501:18 */ type NPWAVEFORMATEX = uintptr /* mmsystem.h:501:38 */ type LPWAVEFORMATEX = uintptr /* mmsystem.h:501:54 */ type LPCWAVEFORMATEX = uintptr /* mmsystem.h:503:30 */ type HMIDI__ = struct{ Funused int32 } /* mmsystem.h:570:3 */ type HMIDI = uintptr /* mmsystem.h:570:3 */ type HMIDIIN__ = struct{ Funused int32 } /* mmsystem.h:571:3 */ type HMIDIIN = uintptr /* mmsystem.h:571:3 */ type HMIDIOUT__ = struct{ Funused int32 } /* mmsystem.h:572:3 */ type HMIDIOUT = uintptr /* mmsystem.h:572:3 */ type HMIDISTRM__ = struct{ Funused int32 } /* mmsystem.h:573:3 */ type HMIDISTRM = uintptr /* mmsystem.h:573:3 */ type LPHMIDI = uintptr /* mmsystem.h:574:17 */ type LPHMIDIIN = uintptr /* mmsystem.h:575:19 */ type LPHMIDIOUT = uintptr /* mmsystem.h:576:20 */ type LPHMIDISTRM = uintptr /* mmsystem.h:577:21 */ type LPMIDICALLBACK = uintptr /* mmsystem.h:579:24 */ type PATCHARRAY = [128]WORD /* mmsystem.h:581:16 */ type LPPATCHARRAY = uintptr /* mmsystem.h:582:16 */ type KEYARRAY = [128]WORD /* mmsystem.h:583:16 */ type LPKEYARRAY = uintptr /* mmsystem.h:584:16 */ type tagMIDIOUTCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FwTechnology WORD FwVoices WORD FwNotes WORD FwChannelMask WORD FdwSupport DWORD } /* mmsystem.h:609:11 */ type MIDIOUTCAPSA = tagMIDIOUTCAPSA /* mmsystem.h:619:5 */ type PMIDIOUTCAPSA = uintptr /* mmsystem.h:619:18 */ type NPMIDIOUTCAPSA = uintptr /* mmsystem.h:619:33 */ type LPMIDIOUTCAPSA = uintptr /* mmsystem.h:619:49 */ type tagMIDIOUTCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FwTechnology WORD FwVoices WORD FwNotes WORD FwChannelMask WORD FdwSupport DWORD } /* mmsystem.h:621:11 */ type MIDIOUTCAPSW = tagMIDIOUTCAPSW /* mmsystem.h:631:5 */ type PMIDIOUTCAPSW = uintptr /* mmsystem.h:631:18 */ type NPMIDIOUTCAPSW = uintptr /* mmsystem.h:631:33 */ type LPMIDIOUTCAPSW = uintptr /* mmsystem.h:631:49 */ type MIDIOUTCAPS = MIDIOUTCAPSA /* mmsystem.h:633:3 */ type PMIDIOUTCAPS = PMIDIOUTCAPSA /* mmsystem.h:634:3 */ type NPMIDIOUTCAPS = NPMIDIOUTCAPSA /* mmsystem.h:635:3 */ type LPMIDIOUTCAPS = LPMIDIOUTCAPSA /* mmsystem.h:636:3 */ type tagMIDIOUTCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FwTechnology WORD FwVoices WORD FwNotes WORD FwChannelMask WORD FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:638:11 */ type MIDIOUTCAPS2A = tagMIDIOUTCAPS2A /* mmsystem.h:651:5 */ type PMIDIOUTCAPS2A = uintptr /* mmsystem.h:651:19 */ type NPMIDIOUTCAPS2A = uintptr /* mmsystem.h:651:35 */ type LPMIDIOUTCAPS2A = uintptr /* mmsystem.h:651:52 */ type tagMIDIOUTCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FwTechnology WORD FwVoices WORD FwNotes WORD FwChannelMask WORD FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:653:11 */ type MIDIOUTCAPS2W = tagMIDIOUTCAPS2W /* mmsystem.h:666:5 */ type PMIDIOUTCAPS2W = uintptr /* mmsystem.h:666:19 */ type NPMIDIOUTCAPS2W = uintptr /* mmsystem.h:666:35 */ type LPMIDIOUTCAPS2W = uintptr /* mmsystem.h:666:52 */ type MIDIOUTCAPS2 = MIDIOUTCAPS2A /* mmsystem.h:668:3 */ type PMIDIOUTCAPS2 = PMIDIOUTCAPS2A /* mmsystem.h:669:3 */ type NPMIDIOUTCAPS2 = NPMIDIOUTCAPS2A /* mmsystem.h:670:3 */ type LPMIDIOUTCAPS2 = LPMIDIOUTCAPS2A /* mmsystem.h:671:3 */ type tagMIDIINCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwSupport DWORD } /* mmsystem.h:686:11 */ type MIDIINCAPSA = tagMIDIINCAPSA /* mmsystem.h:692:5 */ type PMIDIINCAPSA = uintptr /* mmsystem.h:692:17 */ type NPMIDIINCAPSA = uintptr /* mmsystem.h:692:31 */ type LPMIDIINCAPSA = uintptr /* mmsystem.h:692:46 */ type tagMIDIINCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwSupport DWORD } /* mmsystem.h:694:11 */ type MIDIINCAPSW = tagMIDIINCAPSW /* mmsystem.h:700:5 */ type PMIDIINCAPSW = uintptr /* mmsystem.h:700:17 */ type NPMIDIINCAPSW = uintptr /* mmsystem.h:700:31 */ type LPMIDIINCAPSW = uintptr /* mmsystem.h:700:46 */ type MIDIINCAPS = MIDIINCAPSA /* mmsystem.h:702:3 */ type PMIDIINCAPS = PMIDIINCAPSA /* mmsystem.h:703:3 */ type NPMIDIINCAPS = NPMIDIINCAPSA /* mmsystem.h:704:3 */ type LPMIDIINCAPS = LPMIDIINCAPSA /* mmsystem.h:705:3 */ type tagMIDIINCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:707:11 */ type MIDIINCAPS2A = tagMIDIINCAPS2A /* mmsystem.h:716:5 */ type PMIDIINCAPS2A = uintptr /* mmsystem.h:716:18 */ type NPMIDIINCAPS2A = uintptr /* mmsystem.h:716:33 */ type LPMIDIINCAPS2A = uintptr /* mmsystem.h:716:49 */ type tagMIDIINCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:718:11 */ type MIDIINCAPS2W = tagMIDIINCAPS2W /* mmsystem.h:727:5 */ type PMIDIINCAPS2W = uintptr /* mmsystem.h:727:18 */ type NPMIDIINCAPS2W = uintptr /* mmsystem.h:727:33 */ type LPMIDIINCAPS2W = uintptr /* mmsystem.h:727:49 */ type MIDIINCAPS2 = MIDIINCAPS2A /* mmsystem.h:729:3 */ type PMIDIINCAPS2 = PMIDIINCAPS2A /* mmsystem.h:730:3 */ type NPMIDIINCAPS2 = NPMIDIINCAPS2A /* mmsystem.h:731:3 */ type LPMIDIINCAPS2 = LPMIDIINCAPS2A /* mmsystem.h:732:3 */ type midihdr_tag = struct { FlpData LPSTR FdwBufferLength DWORD FdwBytesRecorded DWORD FdwUser DWORD_PTR FdwFlags DWORD _ [4]byte FlpNext uintptr Freserved DWORD_PTR FdwOffset DWORD _ [4]byte FdwReserved [8]DWORD_PTR } /* mmsystem.h:734:11 */ type MIDIHDR = midihdr_tag /* mmsystem.h:744:5 */ type PMIDIHDR = uintptr /* mmsystem.h:744:13 */ type NPMIDIHDR = uintptr /* mmsystem.h:744:28 */ type LPMIDIHDR = uintptr /* mmsystem.h:744:39 */ type midievent_tag = struct { FdwDeltaTime DWORD FdwStreamID DWORD FdwEvent DWORD FdwParms [1]DWORD } /* mmsystem.h:746:11 */ type MIDIEVENT = midievent_tag /* mmsystem.h:751:5 */ type midistrmbuffver_tag = struct { FdwVersion DWORD FdwMid DWORD FdwOEMVersion DWORD } /* mmsystem.h:753:11 */ type MIDISTRMBUFFVER = midistrmbuffver_tag /* mmsystem.h:757:5 */ type midiproptimediv_tag = struct { FcbStruct DWORD FdwTimeDiv DWORD } /* mmsystem.h:787:11 */ type MIDIPROPTIMEDIV = midiproptimediv_tag /* mmsystem.h:790:5 */ type LPMIDIPROPTIMEDIV = uintptr /* mmsystem.h:790:21 */ type midiproptempo_tag = struct { FcbStruct DWORD FdwTempo DWORD } /* mmsystem.h:792:11 */ type MIDIPROPTEMPO = midiproptempo_tag /* mmsystem.h:795:5 */ type LPMIDIPROPTEMPO = uintptr /* mmsystem.h:795:19 */ type tagAUXCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FwTechnology WORD FwReserved1 WORD FdwSupport DWORD } /* mmsystem.h:858:11 */ type AUXCAPSA = tagAUXCAPSA /* mmsystem.h:866:5 */ type PAUXCAPSA = uintptr /* mmsystem.h:866:14 */ type NPAUXCAPSA = uintptr /* mmsystem.h:866:25 */ type LPAUXCAPSA = uintptr /* mmsystem.h:866:37 */ type tagAUXCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FwTechnology WORD FwReserved1 WORD FdwSupport DWORD } /* mmsystem.h:868:11 */ type AUXCAPSW = tagAUXCAPSW /* mmsystem.h:876:5 */ type PAUXCAPSW = uintptr /* mmsystem.h:876:14 */ type NPAUXCAPSW = uintptr /* mmsystem.h:876:25 */ type LPAUXCAPSW = uintptr /* mmsystem.h:876:37 */ type AUXCAPS = AUXCAPSA /* mmsystem.h:878:3 */ type PAUXCAPS = PAUXCAPSA /* mmsystem.h:879:3 */ type NPAUXCAPS = NPAUXCAPSA /* mmsystem.h:880:3 */ type LPAUXCAPS = LPAUXCAPSA /* mmsystem.h:881:3 */ type tagAUXCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FwTechnology WORD FwReserved1 WORD FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:883:11 */ type AUXCAPS2A = tagAUXCAPS2A /* mmsystem.h:894:5 */ type PAUXCAPS2A = uintptr /* mmsystem.h:894:15 */ type NPAUXCAPS2A = uintptr /* mmsystem.h:894:27 */ type LPAUXCAPS2A = uintptr /* mmsystem.h:894:40 */ type tagAUXCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FwTechnology WORD FwReserved1 WORD FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:896:11 */ type AUXCAPS2W = tagAUXCAPS2W /* mmsystem.h:907:5 */ type PAUXCAPS2W = uintptr /* mmsystem.h:907:15 */ type NPAUXCAPS2W = uintptr /* mmsystem.h:907:27 */ type LPAUXCAPS2W = uintptr /* mmsystem.h:907:40 */ type AUXCAPS2 = AUXCAPS2A /* mmsystem.h:909:3 */ type PAUXCAPS2 = PAUXCAPS2A /* mmsystem.h:910:3 */ type NPAUXCAPS2 = NPAUXCAPS2A /* mmsystem.h:911:3 */ type LPAUXCAPS2 = LPAUXCAPS2A /* mmsystem.h:912:3 */ type HMIXEROBJ__ = struct{ Funused int32 } /* mmsystem.h:933:3 */ type HMIXEROBJ = uintptr /* mmsystem.h:933:3 */ type LPHMIXEROBJ = uintptr /* mmsystem.h:934:21 */ type HMIXER__ = struct{ Funused int32 } /* mmsystem.h:936:3 */ type HMIXER = uintptr /* mmsystem.h:936:3 */ type LPHMIXER = uintptr /* mmsystem.h:937:18 */ type tagMIXERCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FfdwSupport DWORD FcDestinations DWORD } /* mmsystem.h:962:11 */ type MIXERCAPSA = tagMIXERCAPSA /* mmsystem.h:969:5 */ type PMIXERCAPSA = uintptr /* mmsystem.h:969:16 */ type LPMIXERCAPSA = uintptr /* mmsystem.h:969:29 */ type tagMIXERCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FfdwSupport DWORD FcDestinations DWORD } /* mmsystem.h:971:11 */ type MIXERCAPSW = tagMIXERCAPSW /* mmsystem.h:978:5 */ type PMIXERCAPSW = uintptr /* mmsystem.h:978:16 */ type LPMIXERCAPSW = uintptr /* mmsystem.h:978:29 */ type MIXERCAPS = MIXERCAPSA /* mmsystem.h:980:3 */ type PMIXERCAPS = PMIXERCAPSA /* mmsystem.h:981:3 */ type LPMIXERCAPS = LPMIXERCAPSA /* mmsystem.h:982:3 */ type tagMIXERCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FfdwSupport DWORD FcDestinations DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:984:11 */ type MIXERCAPS2A = tagMIXERCAPS2A /* mmsystem.h:994:5 */ type PMIXERCAPS2A = uintptr /* mmsystem.h:994:17 */ type LPMIXERCAPS2A = uintptr /* mmsystem.h:994:31 */ type tagMIXERCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FfdwSupport DWORD FcDestinations DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:996:11 */ type MIXERCAPS2W = tagMIXERCAPS2W /* mmsystem.h:1006:5 */ type PMIXERCAPS2W = uintptr /* mmsystem.h:1006:17 */ type LPMIXERCAPS2W = uintptr /* mmsystem.h:1006:31 */ type MIXERCAPS2 = MIXERCAPS2A /* mmsystem.h:1008:3 */ type PMIXERCAPS2 = PMIXERCAPS2A /* mmsystem.h:1009:3 */ type LPMIXERCAPS2 = LPMIXERCAPS2A /* mmsystem.h:1010:3 */ type tagMIXERLINEA = struct { FcbStruct DWORD FdwDestination DWORD FdwSource DWORD FdwLineID DWORD FfdwLine DWORD _ [4]byte FdwUser DWORD_PTR FdwComponentType DWORD FcChannels DWORD FcConnections DWORD FcControls DWORD FszShortName [16]CHAR FszName [64]CHAR FTarget struct { FdwType DWORD FdwDeviceID DWORD FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR } } /* mmsystem.h:1021:11 */ type MIXERLINEA = tagMIXERLINEA /* mmsystem.h:1042:5 */ type PMIXERLINEA = uintptr /* mmsystem.h:1042:16 */ type LPMIXERLINEA = uintptr /* mmsystem.h:1042:29 */ type tagMIXERLINEW = struct { FcbStruct DWORD FdwDestination DWORD FdwSource DWORD FdwLineID DWORD FfdwLine DWORD _ [4]byte FdwUser DWORD_PTR FdwComponentType DWORD FcChannels DWORD FcConnections DWORD FcControls DWORD FszShortName [16]WCHAR FszName [64]WCHAR FTarget struct { FdwType DWORD FdwDeviceID DWORD FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR } } /* mmsystem.h:1044:11 */ type MIXERLINEW = tagMIXERLINEW /* mmsystem.h:1065:5 */ type PMIXERLINEW = uintptr /* mmsystem.h:1065:16 */ type LPMIXERLINEW = uintptr /* mmsystem.h:1065:29 */ type MIXERLINE = MIXERLINEA /* mmsystem.h:1067:3 */ type PMIXERLINE = PMIXERLINEA /* mmsystem.h:1068:3 */ type LPMIXERLINE = LPMIXERLINEA /* mmsystem.h:1069:3 */ type tagMIXERCONTROLA = struct { FcbStruct DWORD FdwControlID DWORD FdwControlType DWORD FfdwControl DWORD FcMultipleItems DWORD FszShortName [16]CHAR FszName [64]CHAR FBounds struct { Fs struct { FlMinimum LONG FlMaximum LONG } _ [16]byte } FMetrics struct { FcSteps DWORD _ [20]byte } } /* mmsystem.h:1122:11 */ type MIXERCONTROLA = tagMIXERCONTROLA /* mmsystem.h:1146:5 */ type PMIXERCONTROLA = uintptr /* mmsystem.h:1146:19 */ type LPMIXERCONTROLA = uintptr /* mmsystem.h:1146:35 */ type tagMIXERCONTROLW = struct { FcbStruct DWORD FdwControlID DWORD FdwControlType DWORD FfdwControl DWORD FcMultipleItems DWORD FszShortName [16]WCHAR FszName [64]WCHAR FBounds struct { Fs struct { FlMinimum LONG FlMaximum LONG } _ [16]byte } FMetrics struct { FcSteps DWORD _ [20]byte } } /* mmsystem.h:1148:11 */ type MIXERCONTROLW = tagMIXERCONTROLW /* mmsystem.h:1172:5 */ type PMIXERCONTROLW = uintptr /* mmsystem.h:1172:19 */ type LPMIXERCONTROLW = uintptr /* mmsystem.h:1172:35 */ type MIXERCONTROL = MIXERCONTROLA /* mmsystem.h:1174:3 */ type PMIXERCONTROL = PMIXERCONTROLA /* mmsystem.h:1175:3 */ type LPMIXERCONTROL = LPMIXERCONTROLA /* mmsystem.h:1176:3 */ type tagMIXERLINECONTROLSA = struct { FcbStruct DWORD FdwLineID DWORD Fu struct{ FdwControlID DWORD } FcControls DWORD Fcbmxctrl DWORD _ [4]byte Fpamxctrl LPMIXERCONTROLA } /* mmsystem.h:1245:11 */ type MIXERLINECONTROLSA = tagMIXERLINECONTROLSA /* mmsystem.h:1255:5 */ type PMIXERLINECONTROLSA = uintptr /* mmsystem.h:1255:24 */ type LPMIXERLINECONTROLSA = uintptr /* mmsystem.h:1255:45 */ type tagMIXERLINECONTROLSW = struct { FcbStruct DWORD FdwLineID DWORD Fu struct{ FdwControlID DWORD } FcControls DWORD Fcbmxctrl DWORD _ [4]byte Fpamxctrl LPMIXERCONTROLW } /* mmsystem.h:1257:11 */ type MIXERLINECONTROLSW = tagMIXERLINECONTROLSW /* mmsystem.h:1267:5 */ type PMIXERLINECONTROLSW = uintptr /* mmsystem.h:1267:24 */ type LPMIXERLINECONTROLSW = uintptr /* mmsystem.h:1267:45 */ type MIXERLINECONTROLS = MIXERLINECONTROLSA /* mmsystem.h:1269:3 */ type PMIXERLINECONTROLS = PMIXERLINECONTROLSA /* mmsystem.h:1270:3 */ type LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA /* mmsystem.h:1271:3 */ type tMIXERCONTROLDETAILS = struct { FcbStruct DWORD FdwControlID DWORD FcChannels DWORD _ [4]byte Fu struct{ FhwndOwner HWND } FcbDetails DWORD _ [4]byte FpaDetails LPVOID } /* mmsystem.h:1284:11 */ type MIXERCONTROLDETAILS = tMIXERCONTROLDETAILS /* mmsystem.h:1294:5 */ type PMIXERCONTROLDETAILS = uintptr /* mmsystem.h:1294:25 */ type LPMIXERCONTROLDETAILS = uintptr /* mmsystem.h:1294:47 */ type tagMIXERCONTROLDETAILS_LISTTEXTA = struct { FdwParam1 DWORD FdwParam2 DWORD FszName [64]CHAR } /* mmsystem.h:1296:11 */ type MIXERCONTROLDETAILS_LISTTEXTA = tagMIXERCONTROLDETAILS_LISTTEXTA /* mmsystem.h:1300:5 */ type PMIXERCONTROLDETAILS_LISTTEXTA = uintptr /* mmsystem.h:1300:35 */ type LPMIXERCONTROLDETAILS_LISTTEXTA = uintptr /* mmsystem.h:1300:67 */ type tagMIXERCONTROLDETAILS_LISTTEXTW = struct { FdwParam1 DWORD FdwParam2 DWORD FszName [64]WCHAR } /* mmsystem.h:1301:11 */ type MIXERCONTROLDETAILS_LISTTEXTW = tagMIXERCONTROLDETAILS_LISTTEXTW /* mmsystem.h:1305:5 */ type PMIXERCONTROLDETAILS_LISTTEXTW = uintptr /* mmsystem.h:1305:35 */ type LPMIXERCONTROLDETAILS_LISTTEXTW = uintptr /* mmsystem.h:1305:67 */ type MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA /* mmsystem.h:1307:3 */ type PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA /* mmsystem.h:1308:3 */ type LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA /* mmsystem.h:1309:3 */ type tMIXERCONTROLDETAILS_BOOLEAN = struct{ FfValue LONG } /* mmsystem.h:1311:11 */ type MIXERCONTROLDETAILS_BOOLEAN = tMIXERCONTROLDETAILS_BOOLEAN /* mmsystem.h:1313:5 */ type PMIXERCONTROLDETAILS_BOOLEAN = uintptr /* mmsystem.h:1313:33 */ type LPMIXERCONTROLDETAILS_BOOLEAN = uintptr /* mmsystem.h:1313:63 */ type tMIXERCONTROLDETAILS_SIGNED = struct{ FlValue LONG } /* mmsystem.h:1315:11 */ type MIXERCONTROLDETAILS_SIGNED = tMIXERCONTROLDETAILS_SIGNED /* mmsystem.h:1317:5 */ type PMIXERCONTROLDETAILS_SIGNED = uintptr /* mmsystem.h:1317:32 */ type LPMIXERCONTROLDETAILS_SIGNED = uintptr /* mmsystem.h:1317:61 */ type tMIXERCONTROLDETAILS_UNSIGNED = struct{ FdwValue DWORD } /* mmsystem.h:1319:11 */ type MIXERCONTROLDETAILS_UNSIGNED = tMIXERCONTROLDETAILS_UNSIGNED /* mmsystem.h:1321:5 */ type PMIXERCONTROLDETAILS_UNSIGNED = uintptr /* mmsystem.h:1321:34 */ type LPMIXERCONTROLDETAILS_UNSIGNED = uintptr /* mmsystem.h:1321:65 */ type LPTIMECALLBACK = uintptr /* mmsystem.h:1348:24 */ type timecaps_tag = struct { FwPeriodMin UINT FwPeriodMax UINT } /* mmsystem.h:1358:11 */ type TIMECAPS = timecaps_tag /* mmsystem.h:1361:5 */ type PTIMECAPS = uintptr /* mmsystem.h:1361:14 */ type NPTIMECAPS = uintptr /* mmsystem.h:1361:30 */ type LPTIMECAPS = uintptr /* mmsystem.h:1361:42 */ type tagJOYCAPSA = struct { FwMid WORD FwPid WORD FszPname [32]CHAR FwXmin UINT FwXmax UINT FwYmin UINT FwYmax UINT FwZmin UINT FwZmax UINT FwNumButtons UINT FwPeriodMin UINT FwPeriodMax UINT FwRmin UINT FwRmax UINT FwUmin UINT FwUmax UINT FwVmin UINT FwVmax UINT FwCaps UINT FwMaxAxes UINT FwNumAxes UINT FwMaxButtons UINT FszRegKey [32]CHAR FszOEMVxD [260]CHAR } /* mmsystem.h:1460:11 */ type JOYCAPSA = tagJOYCAPSA /* mmsystem.h:1485:5 */ type PJOYCAPSA = uintptr /* mmsystem.h:1485:14 */ type NPJOYCAPSA = uintptr /* mmsystem.h:1485:25 */ type LPJOYCAPSA = uintptr /* mmsystem.h:1485:37 */ type tagJOYCAPSW = struct { FwMid WORD FwPid WORD FszPname [32]WCHAR FwXmin UINT FwXmax UINT FwYmin UINT FwYmax UINT FwZmin UINT FwZmax UINT FwNumButtons UINT FwPeriodMin UINT FwPeriodMax UINT FwRmin UINT FwRmax UINT FwUmin UINT FwUmax UINT FwVmin UINT FwVmax UINT FwCaps UINT FwMaxAxes UINT FwNumAxes UINT FwMaxButtons UINT FszRegKey [32]WCHAR FszOEMVxD [260]WCHAR } /* mmsystem.h:1487:11 */ type JOYCAPSW = tagJOYCAPSW /* mmsystem.h:1512:5 */ type PJOYCAPSW = uintptr /* mmsystem.h:1512:14 */ type NPJOYCAPSW = uintptr /* mmsystem.h:1512:25 */ type LPJOYCAPSW = uintptr /* mmsystem.h:1512:37 */ type JOYCAPS = JOYCAPSA /* mmsystem.h:1514:3 */ type PJOYCAPS = PJOYCAPSA /* mmsystem.h:1515:3 */ type NPJOYCAPS = NPJOYCAPSA /* mmsystem.h:1516:3 */ type LPJOYCAPS = LPJOYCAPSA /* mmsystem.h:1517:3 */ type tagJOYCAPS2A = struct { FwMid WORD FwPid WORD FszPname [32]CHAR FwXmin UINT FwXmax UINT FwYmin UINT FwYmax UINT FwZmin UINT FwZmax UINT FwNumButtons UINT FwPeriodMin UINT FwPeriodMax UINT FwRmin UINT FwRmax UINT FwUmin UINT FwUmax UINT FwVmin UINT FwVmax UINT FwCaps UINT FwMaxAxes UINT FwNumAxes UINT FwMaxButtons UINT FszRegKey [32]CHAR FszOEMVxD [260]CHAR FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:1519:11 */ type JOYCAPS2A = tagJOYCAPS2A /* mmsystem.h:1547:5 */ type PJOYCAPS2A = uintptr /* mmsystem.h:1547:15 */ type NPJOYCAPS2A = uintptr /* mmsystem.h:1547:27 */ type LPJOYCAPS2A = uintptr /* mmsystem.h:1547:40 */ type tagJOYCAPS2W = struct { FwMid WORD FwPid WORD FszPname [32]WCHAR FwXmin UINT FwXmax UINT FwYmin UINT FwYmax UINT FwZmin UINT FwZmax UINT FwNumButtons UINT FwPeriodMin UINT FwPeriodMax UINT FwRmin UINT FwRmax UINT FwUmin UINT FwUmax UINT FwVmin UINT FwVmax UINT FwCaps UINT FwMaxAxes UINT FwNumAxes UINT FwMaxButtons UINT FszRegKey [32]WCHAR FszOEMVxD [260]WCHAR FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* mmsystem.h:1549:11 */ type JOYCAPS2W = tagJOYCAPS2W /* mmsystem.h:1577:5 */ type PJOYCAPS2W = uintptr /* mmsystem.h:1577:15 */ type NPJOYCAPS2W = uintptr /* mmsystem.h:1577:27 */ type LPJOYCAPS2W = uintptr /* mmsystem.h:1577:40 */ type JOYCAPS2 = JOYCAPS2A /* mmsystem.h:1579:3 */ type PJOYCAPS2 = PJOYCAPS2A /* mmsystem.h:1580:3 */ type NPJOYCAPS2 = NPJOYCAPS2A /* mmsystem.h:1581:3 */ type LPJOYCAPS2 = LPJOYCAPS2A /* mmsystem.h:1582:3 */ type joyinfo_tag = struct { FwXpos UINT FwYpos UINT FwZpos UINT FwButtons UINT } /* mmsystem.h:1584:11 */ type JOYINFO = joyinfo_tag /* mmsystem.h:1589:5 */ type PJOYINFO = uintptr /* mmsystem.h:1589:13 */ type NPJOYINFO = uintptr /* mmsystem.h:1589:28 */ type LPJOYINFO = uintptr /* mmsystem.h:1589:39 */ type joyinfoex_tag = struct { FdwSize DWORD FdwFlags DWORD FdwXpos DWORD FdwYpos DWORD FdwZpos DWORD FdwRpos DWORD FdwUpos DWORD FdwVpos DWORD FdwButtons DWORD FdwButtonNumber DWORD FdwPOV DWORD FdwReserved1 DWORD FdwReserved2 DWORD } /* mmsystem.h:1591:11 */ type JOYINFOEX = joyinfoex_tag /* mmsystem.h:1605:5 */ type PJOYINFOEX = uintptr /* mmsystem.h:1605:15 */ type NPJOYINFOEX = uintptr /* mmsystem.h:1605:32 */ type LPJOYINFOEX = uintptr /* mmsystem.h:1605:45 */ type FOURCC = DWORD /* mmsystem.h:1643:17 */ type HPSTR = uintptr /* mmsystem.h:1644:22 */ type HMMIO__ = struct{ Funused int32 } /* mmsystem.h:1645:3 */ type HMMIO = uintptr /* mmsystem.h:1645:3 */ type LPMMIOPROC = uintptr /* mmsystem.h:1647:20 */ type _MMIOINFO = struct { FdwFlags DWORD FfccIOProc FOURCC FpIOProc LPMMIOPROC FwErrorRet UINT _ [4]byte Fhtask HTASK FcchBuffer LONG _ [4]byte FpchBuffer HPSTR FpchNext HPSTR FpchEndRead HPSTR FpchEndWrite HPSTR FlBufOffset LONG FlDiskOffset LONG FadwInfo [3]DWORD FdwReserved1 DWORD FdwReserved2 DWORD _ [4]byte Fhmmio HMMIO } /* mmsystem.h:1649:11 */ type MMIOINFO = _MMIOINFO /* mmsystem.h:1666:5 */ type PMMIOINFO = uintptr /* mmsystem.h:1666:14 */ type NPMMIOINFO = uintptr /* mmsystem.h:1666:30 */ type LPMMIOINFO = uintptr /* mmsystem.h:1666:42 */ type LPCMMIOINFO = uintptr /* mmsystem.h:1668:26 */ type _MMCKINFO = struct { Fckid FOURCC Fcksize DWORD FfccType FOURCC FdwDataOffset DWORD FdwFlags DWORD } /* mmsystem.h:1670:11 */ type MMCKINFO = _MMCKINFO /* mmsystem.h:1676:5 */ type PMMCKINFO = uintptr /* mmsystem.h:1676:14 */ type NPMMCKINFO = uintptr /* mmsystem.h:1676:30 */ type LPMMCKINFO = uintptr /* mmsystem.h:1676:42 */ type LPCMMCKINFO = uintptr /* mmsystem.h:1678:26 */ type MCIERROR = DWORD /* mmsystem.h:1781:17 */ type MCIDEVICEID = UINT /* mmsystem.h:1786:16 */ type YIELDPROC = uintptr /* mmsystem.h:1789:16 */ type tagMCI_GENERIC_PARMS = struct{ FdwCallback DWORD_PTR } /* mmsystem.h:2072:11 */ type MCI_GENERIC_PARMS = tagMCI_GENERIC_PARMS /* mmsystem.h:2074:5 */ type PMCI_GENERIC_PARMS = uintptr /* mmsystem.h:2074:23 */ type LPMCI_GENERIC_PARMS = uintptr /* mmsystem.h:2074:43 */ type tagMCI_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR } /* mmsystem.h:2076:11 */ type MCI_OPEN_PARMSA = tagMCI_OPEN_PARMSA /* mmsystem.h:2082:5 */ type PMCI_OPEN_PARMSA = uintptr /* mmsystem.h:2082:21 */ type LPMCI_OPEN_PARMSA = uintptr /* mmsystem.h:2082:39 */ type tagMCI_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR } /* mmsystem.h:2084:11 */ type MCI_OPEN_PARMSW = tagMCI_OPEN_PARMSW /* mmsystem.h:2090:5 */ type PMCI_OPEN_PARMSW = uintptr /* mmsystem.h:2090:21 */ type LPMCI_OPEN_PARMSW = uintptr /* mmsystem.h:2090:39 */ type MCI_OPEN_PARMS = MCI_OPEN_PARMSA /* mmsystem.h:2092:3 */ type PMCI_OPEN_PARMS = PMCI_OPEN_PARMSA /* mmsystem.h:2093:3 */ type LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSA /* mmsystem.h:2094:3 */ type tagMCI_PLAY_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD } /* mmsystem.h:2096:11 */ type MCI_PLAY_PARMS = tagMCI_PLAY_PARMS /* mmsystem.h:2100:5 */ type PMCI_PLAY_PARMS = uintptr /* mmsystem.h:2100:20 */ type LPMCI_PLAY_PARMS = uintptr /* mmsystem.h:2100:37 */ type tagMCI_SEEK_PARMS = struct { FdwCallback DWORD_PTR FdwTo DWORD _ [4]byte } /* mmsystem.h:2102:11 */ type MCI_SEEK_PARMS = tagMCI_SEEK_PARMS /* mmsystem.h:2105:5 */ type PMCI_SEEK_PARMS = uintptr /* mmsystem.h:2105:20 */ type LPMCI_SEEK_PARMS = uintptr /* mmsystem.h:2105:37 */ type tagMCI_STATUS_PARMS = struct { FdwCallback DWORD_PTR FdwReturn DWORD_PTR FdwItem DWORD FdwTrack DWORD } /* mmsystem.h:2107:11 */ type MCI_STATUS_PARMS = tagMCI_STATUS_PARMS /* mmsystem.h:2112:5 */ type PMCI_STATUS_PARMS = uintptr /* mmsystem.h:2112:22 */ type LPMCI_STATUS_PARMS = uintptr /* mmsystem.h:2112:41 */ type tagMCI_INFO_PARMSA = struct { FdwCallback DWORD_PTR FlpstrReturn LPSTR FdwRetSize DWORD _ [4]byte } /* mmsystem.h:2114:11 */ type MCI_INFO_PARMSA = tagMCI_INFO_PARMSA /* mmsystem.h:2118:5 */ type LPMCI_INFO_PARMSA = uintptr /* mmsystem.h:2118:21 */ type tagMCI_INFO_PARMSW = struct { FdwCallback DWORD_PTR FlpstrReturn LPWSTR FdwRetSize DWORD _ [4]byte } /* mmsystem.h:2119:11 */ type MCI_INFO_PARMSW = tagMCI_INFO_PARMSW /* mmsystem.h:2123:5 */ type LPMCI_INFO_PARMSW = uintptr /* mmsystem.h:2123:21 */ type MCI_INFO_PARMS = MCI_INFO_PARMSA /* mmsystem.h:2125:3 */ type LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA /* mmsystem.h:2126:3 */ type tagMCI_GETDEVCAPS_PARMS = struct { FdwCallback DWORD_PTR FdwReturn DWORD FdwItem DWORD } /* mmsystem.h:2128:11 */ type MCI_GETDEVCAPS_PARMS = tagMCI_GETDEVCAPS_PARMS /* mmsystem.h:2132:5 */ type PMCI_GETDEVCAPS_PARMS = uintptr /* mmsystem.h:2132:26 */ type LPMCI_GETDEVCAPS_PARMS = uintptr /* mmsystem.h:2132:49 */ type tagMCI_SYSINFO_PARMSA = struct { FdwCallback DWORD_PTR FlpstrReturn LPSTR FdwRetSize DWORD FdwNumber DWORD FwDeviceType UINT _ [4]byte } /* mmsystem.h:2134:11 */ type MCI_SYSINFO_PARMSA = tagMCI_SYSINFO_PARMSA /* mmsystem.h:2140:5 */ type PMCI_SYSINFO_PARMSA = uintptr /* mmsystem.h:2140:24 */ type LPMCI_SYSINFO_PARMSA = uintptr /* mmsystem.h:2140:45 */ type tagMCI_SYSINFO_PARMSW = struct { FdwCallback DWORD_PTR FlpstrReturn LPWSTR FdwRetSize DWORD FdwNumber DWORD FwDeviceType UINT _ [4]byte } /* mmsystem.h:2142:11 */ type MCI_SYSINFO_PARMSW = tagMCI_SYSINFO_PARMSW /* mmsystem.h:2148:5 */ type PMCI_SYSINFO_PARMSW = uintptr /* mmsystem.h:2148:24 */ type LPMCI_SYSINFO_PARMSW = uintptr /* mmsystem.h:2148:45 */ type MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSA /* mmsystem.h:2150:3 */ type PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA /* mmsystem.h:2151:3 */ type LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA /* mmsystem.h:2152:3 */ type tagMCI_SET_PARMS = struct { FdwCallback DWORD_PTR FdwTimeFormat DWORD FdwAudio DWORD } /* mmsystem.h:2154:11 */ type MCI_SET_PARMS = tagMCI_SET_PARMS /* mmsystem.h:2158:5 */ type PMCI_SET_PARMS = uintptr /* mmsystem.h:2158:19 */ type LPMCI_SET_PARMS = uintptr /* mmsystem.h:2158:35 */ type tagMCI_BREAK_PARMS = struct { FdwCallback DWORD_PTR FnVirtKey int32 _ [4]byte FhwndBreak HWND } /* mmsystem.h:2160:11 */ type MCI_BREAK_PARMS = tagMCI_BREAK_PARMS /* mmsystem.h:2164:5 */ type PMCI_BREAK_PARMS = uintptr /* mmsystem.h:2164:21 */ type LPMCI_BREAK_PARMS = uintptr /* mmsystem.h:2164:39 */ type tagMCI_SAVE_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR } /* mmsystem.h:2166:11 */ type MCI_SAVE_PARMSA = tagMCI_SAVE_PARMSA /* mmsystem.h:2169:5 */ type PMCI_SAVE_PARMSA = uintptr /* mmsystem.h:2169:21 */ type LPMCI_SAVE_PARMSA = uintptr /* mmsystem.h:2169:39 */ type tagMCI_SAVE_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR } /* mmsystem.h:2171:11 */ type MCI_SAVE_PARMSW = tagMCI_SAVE_PARMSW /* mmsystem.h:2174:5 */ type PMCI_SAVE_PARMSW = uintptr /* mmsystem.h:2174:21 */ type LPMCI_SAVE_PARMSW = uintptr /* mmsystem.h:2174:39 */ type MCI_SAVE_PARMS = MCI_SAVE_PARMSA /* mmsystem.h:2176:3 */ type PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA /* mmsystem.h:2177:3 */ type LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA /* mmsystem.h:2178:3 */ type tagMCI_LOAD_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR } /* mmsystem.h:2180:11 */ type MCI_LOAD_PARMSA = tagMCI_LOAD_PARMSA /* mmsystem.h:2183:5 */ type PMCI_LOAD_PARMSA = uintptr /* mmsystem.h:2183:21 */ type LPMCI_LOAD_PARMSA = uintptr /* mmsystem.h:2183:39 */ type tagMCI_LOAD_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR } /* mmsystem.h:2185:11 */ type MCI_LOAD_PARMSW = tagMCI_LOAD_PARMSW /* mmsystem.h:2188:5 */ type PMCI_LOAD_PARMSW = uintptr /* mmsystem.h:2188:21 */ type LPMCI_LOAD_PARMSW = uintptr /* mmsystem.h:2188:39 */ type MCI_LOAD_PARMS = MCI_LOAD_PARMSA /* mmsystem.h:2190:3 */ type PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA /* mmsystem.h:2191:3 */ type LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA /* mmsystem.h:2192:3 */ type tagMCI_RECORD_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD } /* mmsystem.h:2194:11 */ type MCI_RECORD_PARMS = tagMCI_RECORD_PARMS /* mmsystem.h:2198:5 */ type LPMCI_RECORD_PARMS = uintptr /* mmsystem.h:2198:22 */ type tagMCI_VD_PLAY_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD FdwSpeed DWORD _ [4]byte } /* mmsystem.h:2238:11 */ type MCI_VD_PLAY_PARMS = tagMCI_VD_PLAY_PARMS /* mmsystem.h:2243:5 */ type PMCI_VD_PLAY_PARMS = uintptr /* mmsystem.h:2243:23 */ type LPMCI_VD_PLAY_PARMS = uintptr /* mmsystem.h:2243:43 */ type tagMCI_VD_STEP_PARMS = struct { FdwCallback DWORD_PTR FdwFrames DWORD _ [4]byte } /* mmsystem.h:2245:11 */ type MCI_VD_STEP_PARMS = tagMCI_VD_STEP_PARMS /* mmsystem.h:2248:5 */ type PMCI_VD_STEP_PARMS = uintptr /* mmsystem.h:2248:23 */ type LPMCI_VD_STEP_PARMS = uintptr /* mmsystem.h:2248:43 */ type tagMCI_VD_ESCAPE_PARMSA = struct { FdwCallback DWORD_PTR FlpstrCommand LPCSTR } /* mmsystem.h:2250:11 */ type MCI_VD_ESCAPE_PARMSA = tagMCI_VD_ESCAPE_PARMSA /* mmsystem.h:2253:5 */ type PMCI_VD_ESCAPE_PARMSA = uintptr /* mmsystem.h:2253:26 */ type LPMCI_VD_ESCAPE_PARMSA = uintptr /* mmsystem.h:2253:49 */ type tagMCI_VD_ESCAPE_PARMSW = struct { FdwCallback DWORD_PTR FlpstrCommand LPCWSTR } /* mmsystem.h:2255:11 */ type MCI_VD_ESCAPE_PARMSW = tagMCI_VD_ESCAPE_PARMSW /* mmsystem.h:2258:5 */ type PMCI_VD_ESCAPE_PARMSW = uintptr /* mmsystem.h:2258:26 */ type LPMCI_VD_ESCAPE_PARMSW = uintptr /* mmsystem.h:2258:49 */ type MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA /* mmsystem.h:2260:3 */ type PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA /* mmsystem.h:2261:3 */ type LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA /* mmsystem.h:2262:3 */ type tagMCI_WAVE_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR FdwBufferSeconds DWORD _ [4]byte } /* mmsystem.h:2297:11 */ type MCI_WAVE_OPEN_PARMSA = tagMCI_WAVE_OPEN_PARMSA /* mmsystem.h:2304:5 */ type PMCI_WAVE_OPEN_PARMSA = uintptr /* mmsystem.h:2304:26 */ type LPMCI_WAVE_OPEN_PARMSA = uintptr /* mmsystem.h:2304:49 */ type tagMCI_WAVE_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR FdwBufferSeconds DWORD _ [4]byte } /* mmsystem.h:2306:11 */ type MCI_WAVE_OPEN_PARMSW = tagMCI_WAVE_OPEN_PARMSW /* mmsystem.h:2313:5 */ type PMCI_WAVE_OPEN_PARMSW = uintptr /* mmsystem.h:2313:26 */ type LPMCI_WAVE_OPEN_PARMSW = uintptr /* mmsystem.h:2313:49 */ type MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA /* mmsystem.h:2315:3 */ type PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA /* mmsystem.h:2316:3 */ type LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA /* mmsystem.h:2317:3 */ type tagMCI_WAVE_DELETE_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD } /* mmsystem.h:2319:11 */ type MCI_WAVE_DELETE_PARMS = tagMCI_WAVE_DELETE_PARMS /* mmsystem.h:2323:5 */ type PMCI_WAVE_DELETE_PARMS = uintptr /* mmsystem.h:2323:27 */ type LPMCI_WAVE_DELETE_PARMS = uintptr /* mmsystem.h:2323:51 */ type tagMCI_WAVE_SET_PARMS = struct { FdwCallback DWORD_PTR FdwTimeFormat DWORD FdwAudio DWORD FwInput UINT FwOutput UINT FwFormatTag WORD FwReserved2 WORD FnChannels WORD FwReserved3 WORD FnSamplesPerSec DWORD FnAvgBytesPerSec DWORD FnBlockAlign WORD FwReserved4 WORD FwBitsPerSample WORD FwReserved5 WORD } /* mmsystem.h:2325:11 */ type MCI_WAVE_SET_PARMS = tagMCI_WAVE_SET_PARMS /* mmsystem.h:2341:5 */ type PMCI_WAVE_SET_PARMS = uintptr /* mmsystem.h:2341:24 */ type LPMCI_WAVE_SET_PARMS = uintptr /* mmsystem.h:2341:45 */ type tagMCI_SEQ_SET_PARMS = struct { FdwCallback DWORD_PTR FdwTimeFormat DWORD FdwAudio DWORD FdwTempo DWORD FdwPort DWORD FdwSlave DWORD FdwMaster DWORD FdwOffset DWORD _ [4]byte } /* mmsystem.h:2371:11 */ type MCI_SEQ_SET_PARMS = tagMCI_SEQ_SET_PARMS /* mmsystem.h:2380:5 */ type PMCI_SEQ_SET_PARMS = uintptr /* mmsystem.h:2380:23 */ type LPMCI_SEQ_SET_PARMS = uintptr /* mmsystem.h:2380:43 */ type tagMCI_ANIM_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR FdwStyle DWORD _ [4]byte FhWndParent HWND } /* mmsystem.h:2431:11 */ type MCI_ANIM_OPEN_PARMSA = tagMCI_ANIM_OPEN_PARMSA /* mmsystem.h:2439:5 */ type PMCI_ANIM_OPEN_PARMSA = uintptr /* mmsystem.h:2439:26 */ type LPMCI_ANIM_OPEN_PARMSA = uintptr /* mmsystem.h:2439:49 */ type tagMCI_ANIM_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR FdwStyle DWORD _ [4]byte FhWndParent HWND } /* mmsystem.h:2441:11 */ type MCI_ANIM_OPEN_PARMSW = tagMCI_ANIM_OPEN_PARMSW /* mmsystem.h:2449:5 */ type PMCI_ANIM_OPEN_PARMSW = uintptr /* mmsystem.h:2449:26 */ type LPMCI_ANIM_OPEN_PARMSW = uintptr /* mmsystem.h:2449:49 */ type MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA /* mmsystem.h:2451:3 */ type PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA /* mmsystem.h:2452:3 */ type LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA /* mmsystem.h:2453:3 */ type tagMCI_ANIM_PLAY_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD FdwSpeed DWORD _ [4]byte } /* mmsystem.h:2455:11 */ type MCI_ANIM_PLAY_PARMS = tagMCI_ANIM_PLAY_PARMS /* mmsystem.h:2460:5 */ type PMCI_ANIM_PLAY_PARMS = uintptr /* mmsystem.h:2460:25 */ type LPMCI_ANIM_PLAY_PARMS = uintptr /* mmsystem.h:2460:47 */ type tagMCI_ANIM_STEP_PARMS = struct { FdwCallback DWORD_PTR FdwFrames DWORD _ [4]byte } /* mmsystem.h:2462:11 */ type MCI_ANIM_STEP_PARMS = tagMCI_ANIM_STEP_PARMS /* mmsystem.h:2465:5 */ type PMCI_ANIM_STEP_PARMS = uintptr /* mmsystem.h:2465:25 */ type LPMCI_ANIM_STEP_PARMS = uintptr /* mmsystem.h:2465:47 */ type tagMCI_ANIM_WINDOW_PARMSA = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT _ [4]byte FlpstrText LPCSTR } /* mmsystem.h:2467:11 */ type MCI_ANIM_WINDOW_PARMSA = tagMCI_ANIM_WINDOW_PARMSA /* mmsystem.h:2472:5 */ type PMCI_ANIM_WINDOW_PARMSA = uintptr /* mmsystem.h:2472:28 */ type LPMCI_ANIM_WINDOW_PARMSA = uintptr /* mmsystem.h:2472:53 */ type tagMCI_ANIM_WINDOW_PARMSW = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT _ [4]byte FlpstrText LPCWSTR } /* mmsystem.h:2474:11 */ type MCI_ANIM_WINDOW_PARMSW = tagMCI_ANIM_WINDOW_PARMSW /* mmsystem.h:2479:5 */ type PMCI_ANIM_WINDOW_PARMSW = uintptr /* mmsystem.h:2479:28 */ type LPMCI_ANIM_WINDOW_PARMSW = uintptr /* mmsystem.h:2479:53 */ type MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSA /* mmsystem.h:2481:3 */ type PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA /* mmsystem.h:2482:3 */ type LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA /* mmsystem.h:2483:3 */ type tagMCI_ANIM_RECT_PARMS = struct { FdwCallback DWORD_PTR Frc RECT } /* mmsystem.h:2485:11 */ type MCI_ANIM_RECT_PARMS = tagMCI_ANIM_RECT_PARMS /* mmsystem.h:2493:5 */ type PMCI_ANIM_RECT_PARMS = uintptr /* mmsystem.h:2495:31 */ type LPMCI_ANIM_RECT_PARMS = uintptr /* mmsystem.h:2496:31 */ type tagMCI_ANIM_UPDATE_PARMS = struct { FdwCallback DWORD_PTR Frc RECT FhDC HDC } /* mmsystem.h:2498:11 */ type MCI_ANIM_UPDATE_PARMS = tagMCI_ANIM_UPDATE_PARMS /* mmsystem.h:2502:5 */ type PMCI_ANIM_UPDATE_PARMS = uintptr /* mmsystem.h:2502:27 */ type LPMCI_ANIM_UPDATE_PARMS = uintptr /* mmsystem.h:2502:51 */ type tagMCI_OVLY_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR FdwStyle DWORD _ [4]byte FhWndParent HWND } /* mmsystem.h:2535:11 */ type MCI_OVLY_OPEN_PARMSA = tagMCI_OVLY_OPEN_PARMSA /* mmsystem.h:2543:5 */ type PMCI_OVLY_OPEN_PARMSA = uintptr /* mmsystem.h:2543:26 */ type LPMCI_OVLY_OPEN_PARMSA = uintptr /* mmsystem.h:2543:49 */ type tagMCI_OVLY_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID _ [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR FdwStyle DWORD _ [4]byte FhWndParent HWND } /* mmsystem.h:2545:11 */ type MCI_OVLY_OPEN_PARMSW = tagMCI_OVLY_OPEN_PARMSW /* mmsystem.h:2553:5 */ type PMCI_OVLY_OPEN_PARMSW = uintptr /* mmsystem.h:2553:26 */ type LPMCI_OVLY_OPEN_PARMSW = uintptr /* mmsystem.h:2553:49 */ type MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA /* mmsystem.h:2555:3 */ type PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA /* mmsystem.h:2556:3 */ type LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA /* mmsystem.h:2557:3 */ type tagMCI_OVLY_WINDOW_PARMSA = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT _ [4]byte FlpstrText LPCSTR } /* mmsystem.h:2559:11 */ type MCI_OVLY_WINDOW_PARMSA = tagMCI_OVLY_WINDOW_PARMSA /* mmsystem.h:2564:5 */ type PMCI_OVLY_WINDOW_PARMSA = uintptr /* mmsystem.h:2564:28 */ type LPMCI_OVLY_WINDOW_PARMSA = uintptr /* mmsystem.h:2564:53 */ type tagMCI_OVLY_WINDOW_PARMSW = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT _ [4]byte FlpstrText LPCWSTR } /* mmsystem.h:2566:11 */ type MCI_OVLY_WINDOW_PARMSW = tagMCI_OVLY_WINDOW_PARMSW /* mmsystem.h:2571:5 */ type PMCI_OVLY_WINDOW_PARMSW = uintptr /* mmsystem.h:2571:28 */ type LPMCI_OVLY_WINDOW_PARMSW = uintptr /* mmsystem.h:2571:53 */ type MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA /* mmsystem.h:2573:3 */ type PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA /* mmsystem.h:2574:3 */ type LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA /* mmsystem.h:2575:3 */ type tagMCI_OVLY_RECT_PARMS = struct { FdwCallback DWORD_PTR Frc RECT } /* mmsystem.h:2577:11 */ type MCI_OVLY_RECT_PARMS = tagMCI_OVLY_RECT_PARMS /* mmsystem.h:2585:5 */ type PMCI_OVLY_RECT_PARMS = uintptr /* mmsystem.h:2585:25 */ type LPMCI_OVLY_RECT_PARMS = uintptr /* mmsystem.h:2585:47 */ type tagMCI_OVLY_SAVE_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR Frc RECT } /* mmsystem.h:2587:11 */ type MCI_OVLY_SAVE_PARMSA = tagMCI_OVLY_SAVE_PARMSA /* mmsystem.h:2591:5 */ type PMCI_OVLY_SAVE_PARMSA = uintptr /* mmsystem.h:2591:26 */ type LPMCI_OVLY_SAVE_PARMSA = uintptr /* mmsystem.h:2591:49 */ type tagMCI_OVLY_SAVE_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR Frc RECT } /* mmsystem.h:2593:11 */ type MCI_OVLY_SAVE_PARMSW = tagMCI_OVLY_SAVE_PARMSW /* mmsystem.h:2597:5 */ type PMCI_OVLY_SAVE_PARMSW = uintptr /* mmsystem.h:2597:26 */ type LPMCI_OVLY_SAVE_PARMSW = uintptr /* mmsystem.h:2597:49 */ type MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA /* mmsystem.h:2599:3 */ type PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA /* mmsystem.h:2600:3 */ type LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA /* mmsystem.h:2601:3 */ type tagMCI_OVLY_LOAD_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR Frc RECT } /* mmsystem.h:2603:11 */ type MCI_OVLY_LOAD_PARMSA = tagMCI_OVLY_LOAD_PARMSA /* mmsystem.h:2607:5 */ type PMCI_OVLY_LOAD_PARMSA = uintptr /* mmsystem.h:2607:26 */ type LPMCI_OVLY_LOAD_PARMSA = uintptr /* mmsystem.h:2607:49 */ type tagMCI_OVLY_LOAD_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR Frc RECT } /* mmsystem.h:2609:11 */ type MCI_OVLY_LOAD_PARMSW = tagMCI_OVLY_LOAD_PARMSW /* mmsystem.h:2613:5 */ type PMCI_OVLY_LOAD_PARMSW = uintptr /* mmsystem.h:2613:26 */ type LPMCI_OVLY_LOAD_PARMSW = uintptr /* mmsystem.h:2613:49 */ type MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSA /* mmsystem.h:2615:3 */ type PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSA /* mmsystem.h:2616:3 */ type LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSA /* mmsystem.h:2617:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _NCB = struct { Fncb_command UCHAR Fncb_retcode UCHAR Fncb_lsn UCHAR Fncb_num UCHAR _ [4]byte Fncb_buffer PUCHAR Fncb_length WORD Fncb_callname [16]UCHAR Fncb_name [16]UCHAR Fncb_rto UCHAR Fncb_sto UCHAR _ [4]byte Fncb_post uintptr Fncb_lana_num UCHAR Fncb_cmd_cplt UCHAR Fncb_reserve [18]UCHAR _ [4]byte Fncb_event HANDLE } /* nb30.h:16:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type NCB = _NCB /* nb30.h:37:5 */ type PNCB = uintptr /* nb30.h:37:9 */ type _ADAPTER_STATUS = struct { Fadapter_address [6]UCHAR Frev_major UCHAR Freserved0 UCHAR Fadapter_type UCHAR Frev_minor UCHAR Fduration WORD Ffrmr_recv WORD Ffrmr_xmit WORD Fiframe_recv_err WORD Fxmit_aborts WORD Fxmit_success DWORD Frecv_success DWORD Fiframe_xmit_err WORD Frecv_buff_unavail WORD Ft1_timeouts WORD Fti_timeouts WORD Freserved1 DWORD Ffree_ncbs WORD Fmax_cfg_ncbs WORD Fmax_ncbs WORD Fxmit_buf_unavail WORD Fmax_dgram_size WORD Fpending_sess WORD Fmax_cfg_sess WORD Fmax_sess WORD Fmax_sess_pkt_size WORD Fname_count WORD } /* nb30.h:39:11 */ type ADAPTER_STATUS = _ADAPTER_STATUS /* nb30.h:67:5 */ type PADAPTER_STATUS = uintptr /* nb30.h:67:20 */ type _NAME_BUFFER = struct { Fname [16]UCHAR Fname_num UCHAR Fname_flags UCHAR } /* nb30.h:69:11 */ type NAME_BUFFER = _NAME_BUFFER /* nb30.h:73:5 */ type PNAME_BUFFER = uintptr /* nb30.h:73:17 */ type _SESSION_HEADER = struct { Fsess_name UCHAR Fnum_sess UCHAR Frcv_dg_outstanding UCHAR Frcv_any_outstanding UCHAR } /* nb30.h:86:11 */ type SESSION_HEADER = _SESSION_HEADER /* nb30.h:91:5 */ type PSESSION_HEADER = uintptr /* nb30.h:91:20 */ type _SESSION_BUFFER = struct { Flsn UCHAR Fstate UCHAR Flocal_name [16]UCHAR Fremote_name [16]UCHAR Frcvs_outstanding UCHAR Fsends_outstanding UCHAR } /* nb30.h:93:11 */ type SESSION_BUFFER = _SESSION_BUFFER /* nb30.h:100:5 */ type PSESSION_BUFFER = uintptr /* nb30.h:100:20 */ type _LANA_ENUM = struct { Flength UCHAR Flana [255]UCHAR } /* nb30.h:109:11 */ type LANA_ENUM = _LANA_ENUM /* nb30.h:112:5 */ type PLANA_ENUM = uintptr /* nb30.h:112:15 */ type _FIND_NAME_HEADER = struct { Fnode_count WORD Freserved UCHAR Funique_group UCHAR } /* nb30.h:114:11 */ type FIND_NAME_HEADER = _FIND_NAME_HEADER /* nb30.h:118:5 */ type PFIND_NAME_HEADER = uintptr /* nb30.h:118:22 */ type _FIND_NAME_BUFFER = struct { Flength UCHAR Faccess_control UCHAR Fframe_control UCHAR Fdestination_addr [6]UCHAR Fsource_addr [6]UCHAR Frouting_info [18]UCHAR } /* nb30.h:120:11 */ type FIND_NAME_BUFFER = _FIND_NAME_BUFFER /* nb30.h:127:5 */ type PFIND_NAME_BUFFER = uintptr /* nb30.h:127:22 */ type _ACTION_HEADER = struct { Ftransport_id ULONG Faction_code USHORT Freserved USHORT } /* nb30.h:129:11 */ type ACTION_HEADER = _ACTION_HEADER /* nb30.h:133:5 */ type PACTION_HEADER = uintptr /* nb30.h:133:19 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type I_RPC_HANDLE = uintptr /* rpc.h:48:16 */ type RPC_STATUS = int32 /* rpc.h:49:20 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RPC_CSTR = uintptr /* rpcdce.h:33:25 */ type RPC_WSTR = uintptr /* rpcdce.h:34:26 */ type RPC_BINDING_HANDLE = I_RPC_HANDLE /* rpcdce.h:35:24 */ type handle_t = RPC_BINDING_HANDLE /* rpcdce.h:36:30 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. type UUID = GUID /* rpcdce.h:44:16 */ type _RPC_BINDING_VECTOR = struct { FCount uint32 _ [4]byte FBindingH [1]RPC_BINDING_HANDLE } /* rpcdce.h:50:11 */ type RPC_BINDING_VECTOR = _RPC_BINDING_VECTOR /* rpcdce.h:53:5 */ type _UUID_VECTOR = struct { FCount uint32 _ [4]byte FUuid [1]uintptr } /* rpcdce.h:58:11 */ type UUID_VECTOR = _UUID_VECTOR /* rpcdce.h:61:5 */ type RPC_IF_HANDLE = uintptr /* rpcdce.h:66:16 */ type _RPC_IF_ID = struct { FUuid UUID FVersMajor uint16 FVersMinor uint16 } /* rpcdce.h:70:11 */ type RPC_IF_ID = _RPC_IF_ID /* rpcdce.h:74:5 */ type _RPC_PROTSEQ_VECTORA = struct { FCount uint32 _ [4]byte FProtseq [1]uintptr } /* rpcdce.h:124:11 */ type RPC_PROTSEQ_VECTORA = _RPC_PROTSEQ_VECTORA /* rpcdce.h:127:5 */ type _RPC_PROTSEQ_VECTORW = struct { FCount uint32 _ [4]byte FProtseq [1]uintptr } /* rpcdce.h:129:11 */ type RPC_PROTSEQ_VECTORW = _RPC_PROTSEQ_VECTORW /* rpcdce.h:132:5 */ type _RPC_POLICY = struct { FLength uint32 FEndpointFlags uint32 FNICFlags uint32 } /* rpcdce.h:136:11 */ type RPC_POLICY = _RPC_POLICY /* rpcdce.h:140:5 */ type PRPC_POLICY = uintptr /* rpcdce.h:140:16 */ type RPC_STATS_VECTOR = struct { FCount uint32 FStats [1]uint32 } /* rpcdce.h:151:5 */ type RPC_IF_ID_VECTOR = struct { FCount uint32 _ [4]byte FIfId [1]uintptr } /* rpcdce.h:161:5 */ type RPC_AUTH_IDENTITY_HANDLE = uintptr /* rpcdce.h:257:16 */ type RPC_AUTHZ_HANDLE = uintptr /* rpcdce.h:258:16 */ type _RPC_SECURITY_QOS = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 } /* rpcdce.h:311:11 */ type RPC_SECURITY_QOS = _RPC_SECURITY_QOS /* rpcdce.h:316:5 */ type PRPC_SECURITY_QOS = uintptr /* rpcdce.h:316:22 */ type _SEC_WINNT_AUTH_IDENTITY_W = struct { FUser uintptr FUserLength uint32 _ [4]byte FDomain uintptr FDomainLength uint32 _ [4]byte FPassword uintptr FPasswordLength uint32 FFlags uint32 } /* rpcdce.h:324:11 */ type SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W /* rpcdce.h:332:5 */ type PSEC_WINNT_AUTH_IDENTITY_W = uintptr /* rpcdce.h:332:31 */ type _SEC_WINNT_AUTH_IDENTITY_A = struct { FUser uintptr FUserLength uint32 _ [4]byte FDomain uintptr FDomainLength uint32 _ [4]byte FPassword uintptr FPasswordLength uint32 FFlags uint32 } /* rpcdce.h:334:11 */ type SEC_WINNT_AUTH_IDENTITY_A = _SEC_WINNT_AUTH_IDENTITY_A /* rpcdce.h:342:5 */ type PSEC_WINNT_AUTH_IDENTITY_A = uintptr /* rpcdce.h:342:31 */ type _RPC_HTTP_TRANSPORT_CREDENTIALS_W = struct { FTransportCredentials uintptr FFlags uint32 FAuthenticationTarget uint32 FNumberOfAuthnSchemes uint32 _ [4]byte FAuthnSchemes uintptr FServerCertificateSubject uintptr } /* rpcdce.h:366:11 */ type RPC_HTTP_TRANSPORT_CREDENTIALS_W = _RPC_HTTP_TRANSPORT_CREDENTIALS_W /* rpcdce.h:373:5 */ type PRPC_HTTP_TRANSPORT_CREDENTIALS_W = uintptr /* rpcdce.h:373:38 */ type _RPC_HTTP_TRANSPORT_CREDENTIALS_A = struct { FTransportCredentials uintptr FFlags uint32 FAuthenticationTarget uint32 FNumberOfAuthnSchemes uint32 _ [4]byte FAuthnSchemes uintptr FServerCertificateSubject uintptr } /* rpcdce.h:375:11 */ type RPC_HTTP_TRANSPORT_CREDENTIALS_A = _RPC_HTTP_TRANSPORT_CREDENTIALS_A /* rpcdce.h:382:5 */ type PRPC_HTTP_TRANSPORT_CREDENTIALS_A = uintptr /* rpcdce.h:382:38 */ type _RPC_SECURITY_QOS_V2_W = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 _ [4]byte Fu struct{ FHttpCredentials uintptr } } /* rpcdce.h:384:11 */ type RPC_SECURITY_QOS_V2_W = _RPC_SECURITY_QOS_V2_W /* rpcdce.h:393:5 */ type PRPC_SECURITY_QOS_V2_W = uintptr /* rpcdce.h:393:27 */ type _RPC_SECURITY_QOS_V2_A = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 _ [4]byte Fu struct{ FHttpCredentials uintptr } } /* rpcdce.h:395:11 */ type RPC_SECURITY_QOS_V2_A = _RPC_SECURITY_QOS_V2_A /* rpcdce.h:404:5 */ type PRPC_SECURITY_QOS_V2_A = uintptr /* rpcdce.h:404:27 */ type _RPC_SECURITY_QOS_V3_W = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 _ [4]byte Fu struct{ FHttpCredentials uintptr } FSid uintptr } /* rpcdce.h:408:11 */ type RPC_SECURITY_QOS_V3_W = _RPC_SECURITY_QOS_V3_W /* rpcdce.h:418:5 */ type PRPC_SECURITY_QOS_V3_W = uintptr /* rpcdce.h:418:27 */ type _RPC_SECURITY_QOS_V3_A = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 _ [4]byte Fu struct{ FHttpCredentials uintptr } FSid uintptr } /* rpcdce.h:420:11 */ type RPC_SECURITY_QOS_V3_A = _RPC_SECURITY_QOS_V3_A /* rpcdce.h:430:5 */ type PRPC_SECURITY_QOS_V3_A = uintptr /* rpcdce.h:430:27 */ type RPC_HTTP_REDIRECTOR_STAGE = uint32 /* rpcdce.h:445:5 */ type RPC_NEW_HTTP_PROXY_CHANNEL = uintptr /* rpcdce.h:447:22 */ type RPC_HTTP_PROXY_FREE_STRING = uintptr /* rpcdce.h:448:16 */ type RPC_AUTH_KEY_RETRIEVAL_FN = uintptr /* rpcdce.h:471:16 */ type RPC_CLIENT_INFORMATION1 = struct { FUserName uintptr FComputerName uintptr FPrivilege uint16 _ [2]byte FAuthFlags uint32 } /* rpcdce.h:490:5 */ type PRPC_CLIENT_INFORMATION1 = uintptr /* rpcdce.h:490:29 */ type RPC_EP_INQ_HANDLE = uintptr /* rpcdce.h:526:24 */ type RPC_MGMT_AUTHORIZATION_FN = uintptr /* rpcdce.h:547:15 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _RPC_VERSION = struct { FMajorVersion uint16 FMinorVersion uint16 } /* rpcdcep.h:15:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RPC_VERSION = _RPC_VERSION /* rpcdcep.h:18:5 */ type _RPC_SYNTAX_IDENTIFIER = struct { FSyntaxGUID GUID FSyntaxVersion RPC_VERSION } /* rpcdcep.h:20:11 */ type RPC_SYNTAX_IDENTIFIER = _RPC_SYNTAX_IDENTIFIER /* rpcdcep.h:23:5 */ type PRPC_SYNTAX_IDENTIFIER = uintptr /* rpcdcep.h:23:27 */ type _RPC_MESSAGE = struct { FHandle RPC_BINDING_HANDLE FDataRepresentation uint32 _ [4]byte FBuffer uintptr FBufferLength uint32 FProcNum uint32 FTransferSyntax PRPC_SYNTAX_IDENTIFIER FRpcInterfaceInformation uintptr FReservedForRuntime uintptr FManagerEpv uintptr FImportContext uintptr FRpcFlags uint32 _ [4]byte } /* rpcdcep.h:25:11 */ type RPC_MESSAGE = _RPC_MESSAGE /* rpcdcep.h:37:5 */ type PRPC_MESSAGE = uintptr /* rpcdcep.h:37:17 */ type RPC_DISPATCH_FUNCTION = uintptr /* rpcdcep.h:77:16 */ type RPC_DISPATCH_TABLE = struct { FDispatchTableCount uint32 _ [4]byte FDispatchTable uintptr FReserved LONG_PTR } /* rpcdcep.h:83:5 */ type PRPC_DISPATCH_TABLE = uintptr /* rpcdcep.h:83:24 */ type _RPC_PROTSEQ_ENDPOINT = struct { FRpcProtocolSequence uintptr FEndpoint uintptr } /* rpcdcep.h:85:11 */ type RPC_PROTSEQ_ENDPOINT = _RPC_PROTSEQ_ENDPOINT /* rpcdcep.h:88:5 */ type PRPC_PROTSEQ_ENDPOINT = uintptr /* rpcdcep.h:88:26 */ type _RPC_SERVER_INTERFACE = struct { FLength uint32 FInterfaceId RPC_SYNTAX_IDENTIFIER FTransferSyntax RPC_SYNTAX_IDENTIFIER _ [4]byte FDispatchTable PRPC_DISPATCH_TABLE FRpcProtseqEndpointCount uint32 _ [4]byte FRpcProtseqEndpoint PRPC_PROTSEQ_ENDPOINT FDefaultManagerEpv uintptr FInterpreterInfo uintptr FFlags uint32 _ [4]byte } /* rpcdcep.h:93:11 */ type RPC_SERVER_INTERFACE = _RPC_SERVER_INTERFACE /* rpcdcep.h:103:5 */ type PRPC_SERVER_INTERFACE = uintptr /* rpcdcep.h:103:26 */ type _RPC_CLIENT_INTERFACE = struct { FLength uint32 FInterfaceId RPC_SYNTAX_IDENTIFIER FTransferSyntax RPC_SYNTAX_IDENTIFIER _ [4]byte FDispatchTable PRPC_DISPATCH_TABLE FRpcProtseqEndpointCount uint32 _ [4]byte FRpcProtseqEndpoint PRPC_PROTSEQ_ENDPOINT FReserved ULONG_PTR FInterpreterInfo uintptr FFlags uint32 _ [4]byte } /* rpcdcep.h:105:11 */ type RPC_CLIENT_INTERFACE = _RPC_CLIENT_INTERFACE /* rpcdcep.h:115:5 */ type PRPC_CLIENT_INTERFACE = uintptr /* rpcdcep.h:115:26 */ type I_RPC_MUTEX = uintptr /* rpcdcep.h:127:16 */ type PRPC_RUNDOWN = uintptr /* rpcdcep.h:142:16 */ type _RPC_TRANSFER_SYNTAX = struct { FUuid UUID FVersMajor uint16 FVersMinor uint16 } /* rpcdcep.h:175:11 */ type RPC_TRANSFER_SYNTAX = _RPC_TRANSFER_SYNTAX /* rpcdcep.h:179:5 */ type RPCLT_PDU_FILTER_FUNC = uintptr /* rpcdcep.h:201:16 */ type RPC_SETFILTER_FUNC = uintptr /* rpcdcep.h:202:16 */ type _RPC_C_OPT_METADATA_DESCRIPTOR = struct { FBufferSize uint32 _ [4]byte FBuffer uintptr } /* rpcdcep.h:222:11 */ type RPC_C_OPT_METADATA_DESCRIPTOR = _RPC_C_OPT_METADATA_DESCRIPTOR /* rpcdcep.h:225:5 */ type _RDR_CALLOUT_STATE = struct { FLastError RPC_STATUS _ [4]byte FLastEEInfo uintptr FLastCalledStage RPC_HTTP_REDIRECTOR_STAGE _ [4]byte FServerName uintptr FServerPort uintptr FRemoteUser uintptr FAuthType uintptr FResourceTypePresent uint8 FMetadataPresent uint8 FSessionIdPresent uint8 FInterfacePresent uint8 FResourceType UUID _ [4]byte FMetadata RPC_C_OPT_METADATA_DESCRIPTOR FSessionId UUID FInterface RPC_SYNTAX_IDENTIFIER _ [4]byte FCertContext uintptr } /* rpcdcep.h:227:11 */ type RDR_CALLOUT_STATE = _RDR_CALLOUT_STATE /* rpcdcep.h:244:5 */ type I_RpcProxyIsValidMachineFn = uintptr /* rpcdcep.h:246:22 */ type I_RpcProxyGetClientAddressFn = uintptr /* rpcdcep.h:247:22 */ type I_RpcProxyGetConnectionTimeoutFn = uintptr /* rpcdcep.h:248:22 */ type I_RpcPerformCalloutFn = uintptr /* rpcdcep.h:249:22 */ type I_RpcFreeCalloutStateFn = uintptr /* rpcdcep.h:250:16 */ type tagI_RpcProxyCallbackInterface = struct { FIsValidMachineFn I_RpcProxyIsValidMachineFn FGetClientAddressFn I_RpcProxyGetClientAddressFn FGetConnectionTimeoutFn I_RpcProxyGetConnectionTimeoutFn FPerformCalloutFn I_RpcPerformCalloutFn FFreeCalloutStateFn I_RpcFreeCalloutStateFn } /* rpcdcep.h:252:11 */ type I_RpcProxyCallbackInterface = tagI_RpcProxyCallbackInterface /* rpcdcep.h:258:5 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RPC_NS_HANDLE = uintptr /* rpcnsi.h:11:14 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // TODO: This isn't actual working on gcc. Either we need to implement // their __try/__except/__finally feature, or we need to do at least for x64 // emulation-code via inline-assembler ... // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RPC_NOTIFICATION_TYPES = uint32 /* rpcasync.h:23:5 */ type RPC_ASYNC_EVENT = uint32 /* rpcasync.h:27:5 */ type _RPC_ASYNC_STATE = struct { FSize uint32 FSignature uint32 FLock int32 FFlags uint32 FStubInfo uintptr FUserInfo uintptr FRuntimeInfo uintptr FEvent RPC_ASYNC_EVENT FNotificationType RPC_NOTIFICATION_TYPES Fu struct { FAPC struct { FNotificationRoutine PFN_RPCNOTIFICATION_ROUTINE FhThread HANDLE } _ [16]byte } FReserved [4]LONG_PTR } /* rpcasync.h:29:3 */ type PFN_RPCNOTIFICATION_ROUTINE = uintptr /* rpcasync.h:32:35 */ type RPC_ASYNC_STATE = _RPC_ASYNC_STATE /* rpcasync.h:63:5 */ type PRPC_ASYNC_STATE = uintptr /* rpcasync.h:63:21 */ type ExtendedErrorParamTypes = uint32 /* rpcasync.h:80:5 */ type tagBinaryParam = struct { FBuffer uintptr FSize int16 _ [6]byte } /* rpcasync.h:85:11 */ type BinaryParam = tagBinaryParam /* rpcasync.h:88:5 */ type tagRPC_EE_INFO_PARAM = struct { FParameterType ExtendedErrorParamTypes _ [4]byte Fu struct { FAnsiString LPSTR _ [8]byte } } /* rpcasync.h:90:11 */ type RPC_EE_INFO_PARAM = tagRPC_EE_INFO_PARAM /* rpcasync.h:100:5 */ type tagRPC_EXTENDED_ERROR_INFO = struct { FVersion ULONG _ [4]byte FComputerName LPWSTR FProcessID ULONG Fu struct { _ [0]uint32 FSystemTime SYSTEMTIME } FGeneratingComponent ULONG FStatus ULONG FDetectionLocation USHORT FFlags USHORT FNumberOfParameters int32 _ [4]byte FParameters [4]RPC_EE_INFO_PARAM } /* rpcasync.h:109:11 */ type RPC_EXTENDED_ERROR_INFO = tagRPC_EXTENDED_ERROR_INFO /* rpcasync.h:123:5 */ type tagRPC_ERROR_ENUM_HANDLE = struct { FSignature ULONG _ [4]byte FCurrentPos uintptr FHead uintptr } /* rpcasync.h:125:11 */ type RPC_ERROR_ENUM_HANDLE = tagRPC_ERROR_ENUM_HANDLE /* rpcasync.h:129:5 */ type tagRPC_CALL_ATTRIBUTES_V1_W = struct { FVersion uint32 FFlags uint32 FServerPrincipalNameBufferLength uint32 _ [4]byte FServerPrincipalName uintptr FClientPrincipalNameBufferLength uint32 _ [4]byte FClientPrincipalName uintptr FAuthenticationLevel uint32 FAuthenticationService uint32 FNullSession WINBOOL _ [4]byte } /* rpcasync.h:149:11 */ type RPC_CALL_ATTRIBUTES_V1_W = tagRPC_CALL_ATTRIBUTES_V1_W /* rpcasync.h:159:5 */ type tagRPC_CALL_ATTRIBUTES_V1_A = struct { FVersion uint32 FFlags uint32 FServerPrincipalNameBufferLength uint32 _ [4]byte FServerPrincipalName uintptr FClientPrincipalNameBufferLength uint32 _ [4]byte FClientPrincipalName uintptr FAuthenticationLevel uint32 FAuthenticationService uint32 FNullSession WINBOOL _ [4]byte } /* rpcasync.h:161:11 */ type RPC_CALL_ATTRIBUTES_V1_A = tagRPC_CALL_ATTRIBUTES_V1_A /* rpcasync.h:171:5 */ type RPC_CALL_ATTRIBUTES = RPC_CALL_ATTRIBUTES_V1_A /* rpcasync.h:179:34 */ type _RPC_ASYNC_NOTIFICATION_INFO = struct { FAPC struct { FNotificationRoutine PFN_RPCNOTIFICATION_ROUTINE FhThread HANDLE } _ [16]byte } /* rpcasync.h:185:9 */ type RPC_ASYNC_NOTIFICATION_INFO = _RPC_ASYNC_NOTIFICATION_INFO /* rpcasync.h:202:3 */ type PRPC_ASYNC_NOTIFICATION_INFO = uintptr /* rpcasync.h:202:32 */ type RpcCallType = uint32 /* rpcasync.h:219:3 */ type RpcLocalAddressFormat = uint32 /* rpcasync.h:225:3 */ type RPC_NOTIFICATIONS = uint32 /* rpcasync.h:231:3 */ type RpcCallClientLocality = uint32 /* rpcasync.h:238:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type HDROP__ = struct{ Funused int32 } /* shellapi.h:60:3 */ type HDROP = uintptr /* shellapi.h:60:3 */ type _DRAGINFOA = struct { FuSize UINT Fpt POINT FfNC WINBOOL FlpFileList LPSTR FgrfKeyState DWORD _ [4]byte } /* shellapi.h:90:11 */ type DRAGINFOA = _DRAGINFOA /* shellapi.h:96:5 */ type LPDRAGINFOA = uintptr /* shellapi.h:96:15 */ type _DRAGINFOW = struct { FuSize UINT Fpt POINT FfNC WINBOOL FlpFileList LPWSTR FgrfKeyState DWORD _ [4]byte } /* shellapi.h:98:11 */ type DRAGINFOW = _DRAGINFOW /* shellapi.h:104:5 */ type LPDRAGINFOW = uintptr /* shellapi.h:104:15 */ type DRAGINFO = DRAGINFOA /* shellapi.h:106:3 */ type LPDRAGINFO = LPDRAGINFOA /* shellapi.h:107:3 */ type _AppBarData = struct { FcbSize DWORD _ [4]byte FhWnd HWND FuCallbackMessage UINT FuEdge UINT Frc RECT FlParam LPARAM } /* shellapi.h:139:11 */ type APPBARDATA = _AppBarData /* shellapi.h:146:5 */ type PAPPBARDATA = uintptr /* shellapi.h:146:16 */ type FILEOP_FLAGS = WORD /* shellapi.h:183:16 */ type PRINTEROP_FLAGS = WORD /* shellapi.h:191:16 */ type _SHFILEOPSTRUCTA = struct { Fhwnd HWND FwFunc UINT _ [4]byte FpFrom LPCSTR FpTo LPCSTR FfFlags FILEOP_FLAGS _ [2]byte FfAnyOperationsAborted WINBOOL FhNameMappings LPVOID FlpszProgressTitle PCSTR } /* shellapi.h:193:11 */ type SHFILEOPSTRUCTA = _SHFILEOPSTRUCTA /* shellapi.h:202:5 */ type LPSHFILEOPSTRUCTA = uintptr /* shellapi.h:202:21 */ type _SHFILEOPSTRUCTW = struct { Fhwnd HWND FwFunc UINT _ [4]byte FpFrom LPCWSTR FpTo LPCWSTR FfFlags FILEOP_FLAGS _ [2]byte FfAnyOperationsAborted WINBOOL FhNameMappings LPVOID FlpszProgressTitle PCWSTR } /* shellapi.h:204:11 */ type SHFILEOPSTRUCTW = _SHFILEOPSTRUCTW /* shellapi.h:213:5 */ type LPSHFILEOPSTRUCTW = uintptr /* shellapi.h:213:21 */ type SHFILEOPSTRUCT = SHFILEOPSTRUCTA /* shellapi.h:215:3 */ type LPSHFILEOPSTRUCT = LPSHFILEOPSTRUCTA /* shellapi.h:216:3 */ type _SHNAMEMAPPINGA = struct { FpszOldPath LPSTR FpszNewPath LPSTR FcchOldPath int32 FcchNewPath int32 } /* shellapi.h:225:11 */ type SHNAMEMAPPINGA = _SHNAMEMAPPINGA /* shellapi.h:230:5 */ type LPSHNAMEMAPPINGA = uintptr /* shellapi.h:230:20 */ type _SHNAMEMAPPINGW = struct { FpszOldPath LPWSTR FpszNewPath LPWSTR FcchOldPath int32 FcchNewPath int32 } /* shellapi.h:232:11 */ type SHNAMEMAPPINGW = _SHNAMEMAPPINGW /* shellapi.h:237:5 */ type LPSHNAMEMAPPINGW = uintptr /* shellapi.h:237:20 */ type SHNAMEMAPPING = SHNAMEMAPPINGA /* shellapi.h:240:3 */ type LPSHNAMEMAPPING = LPSHNAMEMAPPINGA /* shellapi.h:241:3 */ type _SHELLEXECUTEINFOA = struct { FcbSize DWORD FfMask ULONG Fhwnd HWND FlpVerb LPCSTR FlpFile LPCSTR FlpParameters LPCSTR FlpDirectory LPCSTR FnShow int32 _ [4]byte FhInstApp HINSTANCE FlpIDList uintptr FlpClass LPCSTR FhkeyClass HKEY FdwHotKey DWORD _ [4]byte Fu struct{ FhIcon HANDLE } FhProcess HANDLE } /* shellapi.h:302:11 */ type SHELLEXECUTEINFOA = _SHELLEXECUTEINFOA /* shellapi.h:321:5 */ type LPSHELLEXECUTEINFOA = uintptr /* shellapi.h:321:23 */ type _SHELLEXECUTEINFOW = struct { FcbSize DWORD FfMask ULONG Fhwnd HWND FlpVerb LPCWSTR FlpFile LPCWSTR FlpParameters LPCWSTR FlpDirectory LPCWSTR FnShow int32 _ [4]byte FhInstApp HINSTANCE FlpIDList uintptr FlpClass LPCWSTR FhkeyClass HKEY FdwHotKey DWORD _ [4]byte Fu struct{ FhIcon HANDLE } FhProcess HANDLE } /* shellapi.h:323:11 */ type SHELLEXECUTEINFOW = _SHELLEXECUTEINFOW /* shellapi.h:342:5 */ type LPSHELLEXECUTEINFOW = uintptr /* shellapi.h:342:23 */ type SHELLEXECUTEINFO = SHELLEXECUTEINFOA /* shellapi.h:344:3 */ type LPSHELLEXECUTEINFO = LPSHELLEXECUTEINFOA /* shellapi.h:345:3 */ type _SHCREATEPROCESSINFOW = struct { FcbSize DWORD FfMask ULONG Fhwnd HWND FpszFile LPCWSTR FpszParameters LPCWSTR FpszCurrentDirectory LPCWSTR FhUserToken HANDLE FlpProcessAttributes LPSECURITY_ATTRIBUTES FlpThreadAttributes LPSECURITY_ATTRIBUTES FbInheritHandles WINBOOL FdwCreationFlags DWORD FlpStartupInfo LPSTARTUPINFOW FlpProcessInformation LPPROCESS_INFORMATION } /* shellapi.h:352:11 */ type SHCREATEPROCESSINFOW = _SHCREATEPROCESSINFOW /* shellapi.h:366:5 */ type PSHCREATEPROCESSINFOW = uintptr /* shellapi.h:366:26 */ type _SHQUERYRBINFO = struct { FcbSize DWORD _ [4]byte Fi64Size int64 Fi64NumItems int64 } /* shellapi.h:399:11 */ type SHQUERYRBINFO = _SHQUERYRBINFO /* shellapi.h:403:5 */ type LPSHQUERYRBINFO = uintptr /* shellapi.h:403:19 */ type _NOTIFYICONDATAA = struct { FcbSize DWORD _ [4]byte FhWnd HWND FuID UINT FuFlags UINT FuCallbackMessage UINT _ [4]byte FhIcon HICON FszTip [128]CHAR FdwState DWORD FdwStateMask DWORD FszInfo [256]CHAR Fu struct{ FuTimeout UINT } FszInfoTitle [64]CHAR FdwInfoFlags DWORD FguidItem GUID } /* shellapi.h:443:11 */ type NOTIFYICONDATAA = _NOTIFYICONDATAA /* shellapi.h:464:5 */ type PNOTIFYICONDATAA = uintptr /* shellapi.h:464:21 */ type _NOTIFYICONDATAW = struct { FcbSize DWORD _ [4]byte FhWnd HWND FuID UINT FuFlags UINT FuCallbackMessage UINT _ [4]byte FhIcon HICON FszTip [128]WCHAR FdwState DWORD FdwStateMask DWORD FszInfo [256]WCHAR Fu struct{ FuTimeout UINT } FszInfoTitle [64]WCHAR FdwInfoFlags DWORD FguidItem GUID } /* shellapi.h:466:11 */ type NOTIFYICONDATAW = _NOTIFYICONDATAW /* shellapi.h:487:5 */ type PNOTIFYICONDATAW = uintptr /* shellapi.h:487:21 */ type NOTIFYICONDATA = NOTIFYICONDATAA /* shellapi.h:489:3 */ type PNOTIFYICONDATA = PNOTIFYICONDATAA /* shellapi.h:490:3 */ type _NOTIFYICONIDENTIFIER = struct { FcbSize DWORD _ [4]byte FhWnd HWND FuID UINT FguidItem GUID _ [4]byte } /* shellapi.h:557:11 */ type NOTIFYICONIDENTIFIER = _NOTIFYICONIDENTIFIER /* shellapi.h:562:5 */ type PNOTIFYICONIDENTIFIER = uintptr /* shellapi.h:562:26 */ type _SHFILEINFOA = struct { FhIcon HICON FiIcon int32 FdwAttributes DWORD FszDisplayName [260]CHAR FszTypeName [80]CHAR _ [4]byte } /* shellapi.h:576:11 */ type SHFILEINFOA = _SHFILEINFOA /* shellapi.h:582:5 */ type _SHFILEINFOW = struct { FhIcon HICON FiIcon int32 FdwAttributes DWORD FszDisplayName [260]WCHAR FszTypeName [80]WCHAR } /* shellapi.h:584:11 */ type SHFILEINFOW = _SHFILEINFOW /* shellapi.h:590:5 */ type SHFILEINFO = SHFILEINFOA /* shellapi.h:592:3 */ type PFNCANSHAREFOLDERW = uintptr /* shellapi.h:861:19 */ type PFNSHOWSHAREFOLDERUIW = uintptr /* shellapi.h:862:19 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _PERF_DATA_BLOCK = struct { FSignature [4]WCHAR FLittleEndian DWORD FVersion DWORD FRevision DWORD FTotalByteLength DWORD FHeaderLength DWORD FNumObjectTypes DWORD FDefaultObject LONG FSystemTime SYSTEMTIME _ [4]byte FPerfTime LARGE_INTEGER FPerfFreq LARGE_INTEGER FPerfTime100nSec LARGE_INTEGER FSystemNameLength DWORD FSystemNameOffset DWORD } /* winperf.h:14:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type PERF_DATA_BLOCK = _PERF_DATA_BLOCK /* winperf.h:29:3 */ type PPERF_DATA_BLOCK = uintptr /* winperf.h:29:19 */ type _PERF_OBJECT_TYPE = struct { FTotalByteLength DWORD FDefinitionLength DWORD FHeaderLength DWORD FObjectNameTitleIndex DWORD FObjectNameTitle DWORD FObjectHelpTitleIndex DWORD FObjectHelpTitle DWORD FDetailLevel DWORD FNumCounters DWORD FDefaultCounter LONG FNumInstances LONG FCodePage DWORD FPerfTime LARGE_INTEGER FPerfFreq LARGE_INTEGER } /* winperf.h:31:9 */ type PERF_OBJECT_TYPE = _PERF_OBJECT_TYPE /* winperf.h:54:3 */ type PPERF_OBJECT_TYPE = uintptr /* winperf.h:54:20 */ type _PERF_COUNTER_DEFINITION = struct { FByteLength DWORD FCounterNameTitleIndex DWORD FCounterNameTitle DWORD FCounterHelpTitleIndex DWORD FCounterHelpTitle DWORD FDefaultScale LONG FDetailLevel DWORD FCounterType DWORD FCounterSize DWORD FCounterOffset DWORD } /* winperf.h:139:9 */ type PERF_COUNTER_DEFINITION = _PERF_COUNTER_DEFINITION /* winperf.h:158:3 */ type PPERF_COUNTER_DEFINITION = uintptr /* winperf.h:158:27 */ type _PERF_INSTANCE_DEFINITION = struct { FByteLength DWORD FParentObjectTitleIndex DWORD FParentObjectInstance DWORD FUniqueID LONG FNameOffset DWORD FNameLength DWORD } /* winperf.h:162:9 */ type PERF_INSTANCE_DEFINITION = _PERF_INSTANCE_DEFINITION /* winperf.h:169:3 */ type PPERF_INSTANCE_DEFINITION = uintptr /* winperf.h:169:28 */ type _PERF_COUNTER_BLOCK = struct{ FByteLength DWORD } /* winperf.h:171:9 */ type PERF_COUNTER_BLOCK = _PERF_COUNTER_BLOCK /* winperf.h:174:3 */ type PPERF_COUNTER_BLOCK = uintptr /* winperf.h:174:22 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // define WINSOCK_API_LINKAGE and WSAAPI for less // diff output between winsock.h and winsock2.h, but // remember to undefine them at the end of file // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type timeval = struct { Ftv_sec int32 Ftv_usec int32 } /* _timeval.h:10:1 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure __LONG32 is defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type u_char = uint8 /* _bsd_types.h:13:23 */ type u_short = uint16 /* _bsd_types.h:14:24 */ type u_int = uint32 /* _bsd_types.h:15:22 */ type u_long = uint32 /* _bsd_types.h:18:23 */ type u_int64 = uint64 /* _bsd_types.h:25:28 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type in_addr = struct { FS_un struct { _ [0]uint32 FS_un_b struct { Fs_b1 u_char Fs_b2 u_char Fs_b3 u_char Fs_b4 u_char } } } /* inaddr.h:17:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IN_ADDR = in_addr /* inaddr.h:23:3 */ type PIN_ADDR = uintptr /* inaddr.h:23:12 */ type LPIN_ADDR = uintptr /* inaddr.h:23:23 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type SOCKET = UINT_PTR /* _socket_types.h:11:18 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // fd_set may have been defined by the newlib // if __USE_W32_SOCKETS not defined. type fd_set1 = struct { Ffd_count u_int _ [4]byte Ffd_array [64]SOCKET } /* _fd_types.h:21:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // fd_set may have been defined by the newlib // if __USE_W32_SOCKETS not defined. type fd_set = fd_set1 /* _fd_types.h:25:3 */ // FD_SET is differently implement in winsock.h and winsock2.h. If we // encounter that we are going to redefine it, and if the original definition // is from winsock.h, make sure to undef FD_SET so it can be redefined to // the winsock2.h version. type FD_SET = fd_set1 /* _fd_types.h:104:23 */ type PFD_SET = uintptr /* _fd_types.h:105:23 */ type LPFD_SET = uintptr /* _fd_types.h:106:23 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type hostent = struct { Fh_name uintptr Fh_aliases uintptr Fh_addrtype int16 Fh_length int16 _ [4]byte Fh_addr_list uintptr } /* _ip_types.h:25:1 */ type netent = struct { Fn_name uintptr Fn_aliases uintptr Fn_addrtype int16 _ [2]byte Fn_net u_long } /* _ip_types.h:33:1 */ type servent = struct { Fs_name uintptr Fs_aliases uintptr Fs_proto uintptr Fs_port int16 _ [6]byte } /* _ip_types.h:40:1 */ type protoent = struct { Fp_name uintptr Fp_aliases uintptr Fp_proto int16 _ [6]byte } /* _ip_types.h:52:1 */ type sockproto = struct { Fsp_family u_short Fsp_protocol u_short } /* _ip_types.h:58:1 */ type linger = struct { Fl_onoff u_short Fl_linger u_short } /* _ip_types.h:63:1 */ type sockaddr = struct { Fsa_family u_short Fsa_data [14]int8 } /* _ip_types.h:70:1 */ type sockaddr_in = struct { Fsin_family int16 Fsin_port u_short Fsin_addr struct { FS_un struct { _ [0]uint32 FS_un_b struct { Fs_b1 u_char Fs_b2 u_char Fs_b3 u_char Fs_b4 u_char } } } Fsin_zero [8]int8 } /* _ip_types.h:75:1 */ type HOSTENT = hostent /* _ip_types.h:82:25 */ type PHOSTENT = uintptr /* _ip_types.h:83:25 */ type LPHOSTENT = uintptr /* _ip_types.h:84:25 */ type SERVENT = servent /* _ip_types.h:86:25 */ type PSERVENT = uintptr /* _ip_types.h:87:25 */ type LPSERVENT = uintptr /* _ip_types.h:88:25 */ type PROTOENT = protoent /* _ip_types.h:90:26 */ type PPROTOENT = uintptr /* _ip_types.h:91:26 */ type LPPROTOENT = uintptr /* _ip_types.h:92:26 */ type SOCKADDR = sockaddr /* _ip_types.h:94:26 */ type PSOCKADDR = uintptr /* _ip_types.h:95:26 */ type LPSOCKADDR = uintptr /* _ip_types.h:96:26 */ type SOCKADDR_IN = sockaddr_in /* _ip_types.h:98:28 */ type PSOCKADDR_IN = uintptr /* _ip_types.h:99:28 */ type LPSOCKADDR_IN = uintptr /* _ip_types.h:100:28 */ type LINGER = linger /* _ip_types.h:102:24 */ type PLINGER = uintptr /* _ip_types.h:103:24 */ type LPLINGER = uintptr /* _ip_types.h:104:24 */ type TIMEVAL = timeval /* _ip_types.h:115:25 */ type PTIMEVAL = uintptr /* _ip_types.h:116:25 */ type LPTIMEVAL = uintptr /* _ip_types.h:117:25 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type ip_mreq = struct { Fimr_multiaddr struct { FS_un struct { _ [0]uint32 FS_un_b struct { Fs_b1 u_char Fs_b2 u_char Fs_b3 u_char Fs_b4 u_char } } } Fimr_interface struct { FS_un struct { _ [0]uint32 FS_un_b struct { Fs_b1 u_char Fs_b2 u_char Fs_b3 u_char Fs_b4 u_char } } } } /* _ip_mreq1.h:12:1 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type WSAData = struct { FwVersion WORD FwHighVersion WORD FiMaxSockets uint16 FiMaxUdpDg uint16 FlpVendorInfo uintptr FszDescription [257]int8 FszSystemStatus [129]int8 _ [6]byte } /* _wsadata.h:13:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type WSADATA = WSAData /* _wsadata.h:29:3 */ type LPWSADATA = uintptr /* _wsadata.h:29:12 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _TRANSMIT_FILE_BUFFERS = struct { FHead LPVOID FHeadLength DWORD _ [4]byte FTail LPVOID FTailLength DWORD _ [4]byte } /* _xmitfile.h:10:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS /* _xmitfile.h:15:3 */ type PTRANSMIT_FILE_BUFFERS = uintptr /* _xmitfile.h:15:26 */ type LPTRANSMIT_FILE_BUFFERS = uintptr /* _xmitfile.h:15:51 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type ALG_ID = uint32 /* wincrypt.h:182:24 */ // In ncrypt.h too type HCRYPTHASH = ULONG_PTR /* wincrypt.h:238:21 */ type HCRYPTKEY = ULONG_PTR /* wincrypt.h:239:21 */ type HCRYPTPROV = ULONG_PTR /* wincrypt.h:240:21 */ type _CMS_KEY_INFO = struct { FdwVersion DWORD FAlgid ALG_ID FpbOID uintptr FcbOID DWORD _ [4]byte } /* wincrypt.h:553:11 */ type CMS_KEY_INFO = _CMS_KEY_INFO /* wincrypt.h:558:5 */ type PCMS_KEY_INFO = uintptr /* wincrypt.h:558:18 */ type _HMAC_Info = struct { FHashAlgid ALG_ID _ [4]byte FpbInnerString uintptr FcbInnerString DWORD _ [4]byte FpbOuterString uintptr FcbOuterString DWORD _ [4]byte } /* wincrypt.h:560:11 */ type HMAC_INFO = _HMAC_Info /* wincrypt.h:566:5 */ type PHMAC_INFO = uintptr /* wincrypt.h:566:15 */ type _SCHANNEL_ALG = struct { FdwUse DWORD FAlgid ALG_ID FcBits DWORD FdwFlags DWORD FdwReserved DWORD } /* wincrypt.h:568:11 */ type SCHANNEL_ALG = _SCHANNEL_ALG /* wincrypt.h:574:5 */ type PSCHANNEL_ALG = uintptr /* wincrypt.h:574:18 */ type _PROV_ENUMALGS = struct { FaiAlgid ALG_ID FdwBitLen DWORD FdwNameLen DWORD FszName [20]CHAR } /* wincrypt.h:580:11 */ type PROV_ENUMALGS = _PROV_ENUMALGS /* wincrypt.h:585:5 */ type _PROV_ENUMALGS_EX = struct { FaiAlgid ALG_ID FdwDefaultLen DWORD FdwMinLen DWORD FdwMaxLen DWORD FdwProtocols DWORD FdwNameLen DWORD FszName [20]CHAR FdwLongNameLen DWORD FszLongName [40]CHAR } /* wincrypt.h:587:11 */ type PROV_ENUMALGS_EX = _PROV_ENUMALGS_EX /* wincrypt.h:597:5 */ type _PUBLICKEYSTRUC = struct { FbType BYTE FbVersion BYTE Freserved WORD FaiKeyAlg ALG_ID } /* wincrypt.h:599:11 */ type BLOBHEADER = _PUBLICKEYSTRUC /* wincrypt.h:604:5 */ type PUBLICKEYSTRUC = _PUBLICKEYSTRUC /* wincrypt.h:604:16 */ type _RSAPUBKEY = struct { Fmagic DWORD Fbitlen DWORD Fpubexp DWORD } /* wincrypt.h:606:11 */ type RSAPUBKEY = _RSAPUBKEY /* wincrypt.h:610:5 */ type _PUBKEY = struct { Fmagic DWORD Fbitlen DWORD } /* wincrypt.h:612:11 */ type DHPUBKEY = _PUBKEY /* wincrypt.h:615:5 */ type DSSPUBKEY = _PUBKEY /* wincrypt.h:615:14 */ type KEAPUBKEY = _PUBKEY /* wincrypt.h:615:24 */ type TEKPUBKEY = _PUBKEY /* wincrypt.h:615:34 */ type _DSSSEED = struct { Fcounter DWORD Fseed [20]BYTE } /* wincrypt.h:617:11 */ type DSSSEED = _DSSSEED /* wincrypt.h:620:5 */ type _PUBKEYVER3 = struct { Fmagic DWORD FbitlenP DWORD FbitlenQ DWORD FbitlenJ DWORD FDSSSeed DSSSEED } /* wincrypt.h:622:11 */ type DHPUBKEY_VER3 = _PUBKEYVER3 /* wincrypt.h:628:5 */ type DSSPUBKEY_VER3 = _PUBKEYVER3 /* wincrypt.h:628:20 */ type _PRIVKEYVER3 = struct { Fmagic DWORD FbitlenP DWORD FbitlenQ DWORD FbitlenJ DWORD FbitlenX DWORD FDSSSeed DSSSEED } /* wincrypt.h:630:11 */ type DHPRIVKEY_VER3 = _PRIVKEYVER3 /* wincrypt.h:637:5 */ type DSSPRIVKEY_VER3 = _PRIVKEYVER3 /* wincrypt.h:637:20 */ type _KEY_TYPE_SUBTYPE = struct { FdwKeySpec DWORD FType GUID FSubtype GUID } /* wincrypt.h:639:11 */ type KEY_TYPE_SUBTYPE = _KEY_TYPE_SUBTYPE /* wincrypt.h:643:5 */ type PKEY_TYPE_SUBTYPE = uintptr /* wincrypt.h:643:22 */ type _CERT_FORTEZZA_DATA_PROP = struct { FSerialNumber [8]uint8 FCertIndex int32 FCertLabel [36]uint8 } /* wincrypt.h:645:11 */ type CERT_FORTEZZA_DATA_PROP = _CERT_FORTEZZA_DATA_PROP /* wincrypt.h:649:5 */ type _CRYPT_RC4_KEY_STATE = struct { FKey [16]uint8 FSBox [256]uint8 Fi uint8 Fj uint8 } /* wincrypt.h:651:11 */ type CRYPT_RC4_KEY_STATE = _CRYPT_RC4_KEY_STATE /* wincrypt.h:656:5 */ type PCRYPT_RC4_KEY_STATE = uintptr /* wincrypt.h:656:25 */ type _CRYPT_DES_KEY_STATE = struct { FKey [8]uint8 FIV [8]uint8 FFeedback [8]uint8 } /* wincrypt.h:658:11 */ type CRYPT_DES_KEY_STATE = _CRYPT_DES_KEY_STATE /* wincrypt.h:662:5 */ type PCRYPT_DES_KEY_STATE = uintptr /* wincrypt.h:662:25 */ type _CRYPT_3DES_KEY_STATE = struct { FKey [24]uint8 FIV [8]uint8 FFeedback [8]uint8 } /* wincrypt.h:664:11 */ type CRYPT_3DES_KEY_STATE = _CRYPT_3DES_KEY_STATE /* wincrypt.h:668:5 */ type PCRYPT_3DES_KEY_STATE = uintptr /* wincrypt.h:668:26 */ type _CRYPTOAPI_BLOB = struct { FcbData DWORD _ [4]byte FpbData uintptr } /* wincrypt.h:693:11 */ type CRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:5 */ type PCRYPT_INTEGER_BLOB = uintptr /* wincrypt.h:696:24 */ type CRYPT_UINT_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:45 */ type PCRYPT_UINT_BLOB = uintptr /* wincrypt.h:696:61 */ type CRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:79 */ type PCRYPT_OBJID_BLOB = uintptr /* wincrypt.h:696:96 */ type CERT_NAME_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:115 */ type PCERT_NAME_BLOB = uintptr /* wincrypt.h:696:130 */ type CERT_RDN_VALUE_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:147 */ type PCERT_RDN_VALUE_BLOB = uintptr /* wincrypt.h:696:167 */ type CERT_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:189 */ type PCERT_BLOB = uintptr /* wincrypt.h:696:199 */ type CRL_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:211 */ type PCRL_BLOB = uintptr /* wincrypt.h:696:220 */ type DATA_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:231 */ type PDATA_BLOB = uintptr /* wincrypt.h:696:241 */ type CRYPT_DATA_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:253 */ type PCRYPT_DATA_BLOB = uintptr /* wincrypt.h:696:269 */ type CRYPT_HASH_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:287 */ type PCRYPT_HASH_BLOB = uintptr /* wincrypt.h:696:303 */ type CRYPT_DIGEST_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:321 */ type PCRYPT_DIGEST_BLOB = uintptr /* wincrypt.h:696:339 */ type CRYPT_DER_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:359 */ type PCRYPT_DER_BLOB = uintptr /* wincrypt.h:696:374 */ type CRYPT_ATTR_BLOB = _CRYPTOAPI_BLOB /* wincrypt.h:696:391 */ type PCRYPT_ATTR_BLOB = uintptr /* wincrypt.h:696:407 */ type _CMS_DH_KEY_INFO = struct { FdwVersion DWORD FAlgid ALG_ID FpszContentEncObjId LPSTR FPubInfo CRYPT_DATA_BLOB FpReserved uintptr } /* wincrypt.h:708:11 */ type CMS_DH_KEY_INFO = _CMS_DH_KEY_INFO /* wincrypt.h:714:5 */ type PCMS_DH_KEY_INFO = uintptr /* wincrypt.h:714:21 */ type HCRYPTPROV_OR_NCRYPT_KEY_HANDLE = ULONG_PTR /* wincrypt.h:763:21 */ type HCRYPTPROV_LEGACY = ULONG_PTR /* wincrypt.h:764:21 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type NTSTATUS = LONG /* bcrypt.h:27:16 */ type PNTSTATUS = uintptr /* bcrypt.h:27:25 */ type __BCRYPT_KEY_LENGTHS_STRUCT = struct { FdwMinLength ULONG FdwMaxLength ULONG FdwIncrement ULONG } /* bcrypt.h:142:11 */ type BCRYPT_KEY_LENGTHS_STRUCT = __BCRYPT_KEY_LENGTHS_STRUCT /* bcrypt.h:146:5 */ type BCRYPT_AUTH_TAG_LENGTHS_STRUCT = BCRYPT_KEY_LENGTHS_STRUCT /* bcrypt.h:148:37 */ type _BCRYPT_OID = struct { FcbOID ULONG _ [4]byte FpbOID PUCHAR } /* bcrypt.h:150:11 */ type BCRYPT_OID = _BCRYPT_OID /* bcrypt.h:153:5 */ type _BCRYPT_OID_LIST = struct { FdwOIDCount ULONG _ [4]byte FpOIDs uintptr } /* bcrypt.h:155:11 */ type BCRYPT_OID_LIST = _BCRYPT_OID_LIST /* bcrypt.h:158:5 */ type _BCRYPT_PKCS1_PADDING_INFO = struct{ FpszAlgId LPCWSTR } /* bcrypt.h:160:11 */ type BCRYPT_PKCS1_PADDING_INFO = _BCRYPT_PKCS1_PADDING_INFO /* bcrypt.h:162:5 */ type _BCRYPT_PSS_PADDING_INFO = struct { FpszAlgId LPCWSTR FcbSalt ULONG _ [4]byte } /* bcrypt.h:164:11 */ type BCRYPT_PSS_PADDING_INFO = _BCRYPT_PSS_PADDING_INFO /* bcrypt.h:167:5 */ type _BCRYPT_OAEP_PADDING_INFO = struct { FpszAlgId LPCWSTR FpbLabel PUCHAR FcbLabel ULONG _ [4]byte } /* bcrypt.h:169:11 */ type BCRYPT_OAEP_PADDING_INFO = _BCRYPT_OAEP_PADDING_INFO /* bcrypt.h:173:5 */ type _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = struct { FcbSize ULONG FdwInfoVersion ULONG FpbNonce PUCHAR FcbNonce ULONG _ [4]byte FpbAuthData PUCHAR FcbAuthData ULONG _ [4]byte FpbTag PUCHAR FcbTag ULONG _ [4]byte FpbMacContext PUCHAR FcbMacContext ULONG FcbAAD ULONG FcbData ULONGLONG FdwFlags ULONG _ [4]byte } /* bcrypt.h:175:11 */ type BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO /* bcrypt.h:189:5 */ type PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = uintptr /* bcrypt.h:189:43 */ type _BCryptBuffer = struct { FcbBuffer ULONG FBufferType ULONG FpvBuffer PVOID } /* bcrypt.h:193:11 */ type BCryptBuffer = _BCryptBuffer /* bcrypt.h:197:5 */ type PBCryptBuffer = uintptr /* bcrypt.h:197:18 */ type _BCryptBufferDesc = struct { FulVersion ULONG FcBuffers ULONG FpBuffers PBCryptBuffer } /* bcrypt.h:199:11 */ type BCryptBufferDesc = _BCryptBufferDesc /* bcrypt.h:203:5 */ type PBCryptBufferDesc = uintptr /* bcrypt.h:203:22 */ type BCRYPT_HANDLE = PVOID /* bcrypt.h:374:15 */ type BCRYPT_ALG_HANDLE = PVOID /* bcrypt.h:375:17 */ type BCRYPT_KEY_HANDLE = PVOID /* bcrypt.h:376:17 */ type BCRYPT_HASH_HANDLE = PVOID /* bcrypt.h:377:17 */ type BCRYPT_SECRET_HANDLE = PVOID /* bcrypt.h:378:17 */ type _BCRYPT_KEY_BLOB = struct{ FMagic ULONG } /* bcrypt.h:380:11 */ type BCRYPT_KEY_BLOB = _BCRYPT_KEY_BLOB /* bcrypt.h:382:5 */ type _BCRYPT_RSAKEY_BLOB = struct { FMagic ULONG FBitLength ULONG FcbPublicExp ULONG FcbModulus ULONG FcbPrime1 ULONG FcbPrime2 ULONG } /* bcrypt.h:384:11 */ type BCRYPT_RSAKEY_BLOB = _BCRYPT_RSAKEY_BLOB /* bcrypt.h:391:5 */ type _BCRYPT_ECCKEY_BLOB = struct { FdwMagic ULONG FcbKey ULONG } /* bcrypt.h:393:11 */ type BCRYPT_ECCKEY_BLOB = _BCRYPT_ECCKEY_BLOB /* bcrypt.h:396:5 */ type PBCRYPT_ECCKEY_BLOB = uintptr /* bcrypt.h:396:24 */ type _BCRYPT_DH_KEY_BLOB = struct { FdwMagic ULONG FcbKey ULONG } /* bcrypt.h:398:11 */ type BCRYPT_DH_KEY_BLOB = _BCRYPT_DH_KEY_BLOB /* bcrypt.h:401:5 */ type PBCRYPT_DH_KEY_BLOB = uintptr /* bcrypt.h:401:24 */ type _BCRYPT_DH_PARAMETER_HEADER = struct { FcbLength ULONG FdwMagic ULONG FcbKeyLength ULONG } /* bcrypt.h:403:11 */ type BCRYPT_DH_PARAMETER_HEADER = _BCRYPT_DH_PARAMETER_HEADER /* bcrypt.h:407:5 */ type _BCRYPT_DSA_KEY_BLOB = struct { FdwMagic ULONG FcbKey ULONG FCount [4]UCHAR FSeed [20]UCHAR Fq [20]UCHAR } /* bcrypt.h:409:11 */ type BCRYPT_DSA_KEY_BLOB = _BCRYPT_DSA_KEY_BLOB /* bcrypt.h:415:5 */ type PBCRYPT_DSA_KEY_BLOB = uintptr /* bcrypt.h:415:25 */ type HASHALGORITHM_ENUM = uint32 /* bcrypt.h:421:5 */ type DSAFIPSVERSION_ENUM = uint32 /* bcrypt.h:426:5 */ type _BCRYPT_DSA_KEY_BLOB_V2 = struct { FdwMagic ULONG FcbKey ULONG FhashAlgorithm HASHALGORITHM_ENUM FstandardVersion DSAFIPSVERSION_ENUM FcbSeedLength ULONG FcbGroupSize ULONG FCount [4]UCHAR } /* bcrypt.h:427:11 */ type BCRYPT_DSA_KEY_BLOB_V2 = _BCRYPT_DSA_KEY_BLOB_V2 /* bcrypt.h:435:5 */ type PBCRYPT_DSA_KEY_BLOB_V2 = uintptr /* bcrypt.h:435:28 */ type _BCRYPT_KEY_DATA_BLOB_HEADER = struct { FdwMagic ULONG FdwVersion ULONG FcbKeyData ULONG } /* bcrypt.h:437:11 */ type BCRYPT_KEY_DATA_BLOB_HEADER = _BCRYPT_KEY_DATA_BLOB_HEADER /* bcrypt.h:441:5 */ type PBCRYPT_KEY_DATA_BLOB_HEADER = uintptr /* bcrypt.h:441:33 */ type _BCRYPT_DSA_PARAMETER_HEADER = struct { FcbLength ULONG FdwMagic ULONG FcbKeyLength ULONG FCount [4]UCHAR FSeed [20]UCHAR Fq [20]UCHAR } /* bcrypt.h:443:11 */ type BCRYPT_DSA_PARAMETER_HEADER = _BCRYPT_DSA_PARAMETER_HEADER /* bcrypt.h:450:5 */ type _BCRYPT_DSA_PARAMETER_HEADER_V2 = struct { FcbLength ULONG FdwMagic ULONG FcbKeyLength ULONG FhashAlgorithm HASHALGORITHM_ENUM FstandardVersion DSAFIPSVERSION_ENUM FcbSeedLength ULONG FcbGroupSize ULONG FCount [4]UCHAR } /* bcrypt.h:452:11 */ type BCRYPT_DSA_PARAMETER_HEADER_V2 = _BCRYPT_DSA_PARAMETER_HEADER_V2 /* bcrypt.h:461:5 */ type _BCRYPT_ALGORITHM_IDENTIFIER = struct { FpszName LPWSTR FdwClass ULONG FdwFlags ULONG } /* bcrypt.h:463:11 */ type BCRYPT_ALGORITHM_IDENTIFIER = _BCRYPT_ALGORITHM_IDENTIFIER /* bcrypt.h:467:5 */ type _BCRYPT_PROVIDER_NAME = struct{ FpszProviderName LPWSTR } /* bcrypt.h:469:11 */ type BCRYPT_PROVIDER_NAME = _BCRYPT_PROVIDER_NAME /* bcrypt.h:471:5 */ type _BCRYPT_INTERFACE_VERSION = struct { FMajorVersion USHORT FMinorVersion USHORT } /* bcrypt.h:473:11 */ type BCRYPT_INTERFACE_VERSION = _BCRYPT_INTERFACE_VERSION /* bcrypt.h:476:5 */ type PBCRYPT_INTERFACE_VERSION = uintptr /* bcrypt.h:476:30 */ type _CRYPT_INTERFACE_REG = struct { FdwInterface ULONG FdwFlags ULONG FcFunctions ULONG _ [4]byte FrgpszFunctions uintptr } /* bcrypt.h:478:11 */ type CRYPT_INTERFACE_REG = _CRYPT_INTERFACE_REG /* bcrypt.h:483:5 */ type PCRYPT_INTERFACE_REG = uintptr /* bcrypt.h:483:25 */ type _CRYPT_IMAGE_REG = struct { FpszImage PWSTR FcInterfaces ULONG _ [4]byte FrgpInterfaces uintptr } /* bcrypt.h:485:11 */ type CRYPT_IMAGE_REG = _CRYPT_IMAGE_REG /* bcrypt.h:489:5 */ type PCRYPT_IMAGE_REG = uintptr /* bcrypt.h:489:21 */ type _CRYPT_PROVIDER_REG = struct { FcAliases ULONG _ [4]byte FrgpszAliases uintptr FpUM PCRYPT_IMAGE_REG FpKM PCRYPT_IMAGE_REG } /* bcrypt.h:491:11 */ type CRYPT_PROVIDER_REG = _CRYPT_PROVIDER_REG /* bcrypt.h:496:5 */ type PCRYPT_PROVIDER_REG = uintptr /* bcrypt.h:496:24 */ type _CRYPT_PROVIDERS = struct { FcProviders ULONG _ [4]byte FrgpszProviders uintptr } /* bcrypt.h:498:11 */ type CRYPT_PROVIDERS = _CRYPT_PROVIDERS /* bcrypt.h:501:5 */ type PCRYPT_PROVIDERS = uintptr /* bcrypt.h:501:21 */ type _CRYPT_CONTEXT_CONFIG = struct { FdwFlags ULONG FdwReserved ULONG } /* bcrypt.h:503:11 */ type CRYPT_CONTEXT_CONFIG = _CRYPT_CONTEXT_CONFIG /* bcrypt.h:506:5 */ type PCRYPT_CONTEXT_CONFIG = uintptr /* bcrypt.h:506:26 */ type _CRYPT_CONTEXT_FUNCTION_CONFIG = struct { FdwFlags ULONG FdwReserved ULONG } /* bcrypt.h:508:11 */ type CRYPT_CONTEXT_FUNCTION_CONFIG = _CRYPT_CONTEXT_FUNCTION_CONFIG /* bcrypt.h:511:5 */ type PCRYPT_CONTEXT_FUNCTION_CONFIG = uintptr /* bcrypt.h:511:35 */ type _CRYPT_CONTEXTS = struct { FcContexts ULONG _ [4]byte FrgpszContexts uintptr } /* bcrypt.h:513:11 */ type CRYPT_CONTEXTS = _CRYPT_CONTEXTS /* bcrypt.h:516:5 */ type PCRYPT_CONTEXTS = uintptr /* bcrypt.h:516:20 */ type _CRYPT_CONTEXT_FUNCTIONS = struct { FcFunctions ULONG _ [4]byte FrgpszFunctions uintptr } /* bcrypt.h:518:11 */ type CRYPT_CONTEXT_FUNCTIONS = _CRYPT_CONTEXT_FUNCTIONS /* bcrypt.h:521:5 */ type PCRYPT_CONTEXT_FUNCTIONS = uintptr /* bcrypt.h:521:29 */ type _CRYPT_CONTEXT_FUNCTION_PROVIDERS = struct { FcProviders ULONG _ [4]byte FrgpszProviders uintptr } /* bcrypt.h:523:11 */ type CRYPT_CONTEXT_FUNCTION_PROVIDERS = _CRYPT_CONTEXT_FUNCTION_PROVIDERS /* bcrypt.h:526:5 */ type PCRYPT_CONTEXT_FUNCTION_PROVIDERS = uintptr /* bcrypt.h:526:38 */ type _CRYPT_PROPERTY_REF = struct { FpszProperty PWSTR FcbValue ULONG _ [4]byte FpbValue PUCHAR } /* bcrypt.h:528:11 */ type CRYPT_PROPERTY_REF = _CRYPT_PROPERTY_REF /* bcrypt.h:532:5 */ type PCRYPT_PROPERTY_REF = uintptr /* bcrypt.h:532:24 */ type _CRYPT_IMAGE_REF = struct { FpszImage PWSTR FdwFlags ULONG _ [4]byte } /* bcrypt.h:534:11 */ type CRYPT_IMAGE_REF = _CRYPT_IMAGE_REF /* bcrypt.h:537:5 */ type PCRYPT_IMAGE_REF = uintptr /* bcrypt.h:537:21 */ type _CRYPT_PROVIDER_REF = struct { FdwInterface ULONG _ [4]byte FpszFunction PWSTR FpszProvider PWSTR FcProperties ULONG _ [4]byte FrgpProperties uintptr FpUM PCRYPT_IMAGE_REF FpKM PCRYPT_IMAGE_REF } /* bcrypt.h:539:11 */ type CRYPT_PROVIDER_REF = _CRYPT_PROVIDER_REF /* bcrypt.h:547:5 */ type PCRYPT_PROVIDER_REF = uintptr /* bcrypt.h:547:24 */ type _CRYPT_PROVIDER_REFS = struct { FcProviders ULONG _ [4]byte FrgpProviders uintptr } /* bcrypt.h:549:11 */ type CRYPT_PROVIDER_REFS = _CRYPT_PROVIDER_REFS /* bcrypt.h:552:5 */ type PCRYPT_PROVIDER_REFS = uintptr /* bcrypt.h:552:25 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type SECURITY_STATUS = LONG /* ncrypt.h:23:16 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type PFN_NCRYPT_ALLOC = uintptr /* ncrypt.h:138:18 */ type PFN_NCRYPT_FREE = uintptr /* ncrypt.h:139:16 */ type NCRYPT_ALLOC_PARA1 = struct { FcbSize DWORD _ [4]byte FpfnAlloc PFN_NCRYPT_ALLOC FpfnFree PFN_NCRYPT_FREE } /* ncrypt.h:141:11 */ type NCRYPT_ALLOC_PARA = NCRYPT_ALLOC_PARA1 /* ncrypt.h:145:5 */ type NCryptBuffer = BCryptBuffer /* ncrypt.h:147:24 */ type PNCryptBuffer = uintptr /* ncrypt.h:148:24 */ type NCryptBufferDesc = BCryptBufferDesc /* ncrypt.h:149:28 */ type PNCryptBufferDesc = uintptr /* ncrypt.h:150:28 */ type NCRYPT_HANDLE = ULONG_PTR /* ncrypt.h:152:21 */ type NCRYPT_PROV_HANDLE = ULONG_PTR /* ncrypt.h:153:21 */ type NCRYPT_KEY_HANDLE = ULONG_PTR /* ncrypt.h:154:21 */ type NCRYPT_HASH_HANDLE = ULONG_PTR /* ncrypt.h:155:21 */ type NCRYPT_SECRET_HANDLE = ULONG_PTR /* ncrypt.h:156:21 */ type _NCryptAlgorithmName = struct { FpszName LPWSTR FdwClass DWORD FdwAlgOperations DWORD FdwFlags DWORD _ [4]byte } /* ncrypt.h:202:11 */ type NCryptAlgorithmName = _NCryptAlgorithmName /* ncrypt.h:207:5 */ type NCryptKeyName1 = struct { FpszName LPWSTR FpszAlgid LPWSTR FdwLegacyKeySpec DWORD FdwFlags DWORD } /* ncrypt.h:209:11 */ type NCryptKeyName = NCryptKeyName1 /* ncrypt.h:214:5 */ type NCryptProviderName1 = struct { FpszName LPWSTR FpszComment LPWSTR } /* ncrypt.h:216:11 */ type NCryptProviderName = NCryptProviderName1 /* ncrypt.h:219:5 */ type __NCRYPT_UI_POLICY = struct { FdwVersion DWORD FdwFlags DWORD FpszCreationTitle LPCWSTR FpszFriendlyName LPCWSTR FpszDescription LPCWSTR } /* ncrypt.h:335:9 */ type NCRYPT_UI_POLICY = __NCRYPT_UI_POLICY /* ncrypt.h:341:5 */ type __NCRYPT_SUPPORTED_LENGTHS = struct { FdwMinLength DWORD FdwMaxLength DWORD FdwIncrement DWORD FdwDefaultLength DWORD } /* ncrypt.h:343:11 */ type NCRYPT_SUPPORTED_LENGTHS = __NCRYPT_SUPPORTED_LENGTHS /* ncrypt.h:348:5 */ type _CRYPT_BIT_BLOB = struct { FcbData DWORD _ [4]byte FpbData uintptr FcUnusedBits DWORD _ [4]byte } /* wincrypt.h:771:11 */ type CRYPT_BIT_BLOB = _CRYPT_BIT_BLOB /* wincrypt.h:775:5 */ type PCRYPT_BIT_BLOB = uintptr /* wincrypt.h:775:20 */ type _CRYPT_ALGORITHM_IDENTIFIER = struct { FpszObjId LPSTR FParameters CRYPT_OBJID_BLOB } /* wincrypt.h:777:11 */ type CRYPT_ALGORITHM_IDENTIFIER = _CRYPT_ALGORITHM_IDENTIFIER /* wincrypt.h:780:5 */ type PCRYPT_ALGORITHM_IDENTIFIER = uintptr /* wincrypt.h:780:32 */ type _CRYPT_OBJID_TABLE = struct { FdwAlgId DWORD _ [4]byte FpszObjId LPCSTR } /* wincrypt.h:957:11 */ type CRYPT_OBJID_TABLE = _CRYPT_OBJID_TABLE /* wincrypt.h:960:5 */ type PCRYPT_OBJID_TABLE = uintptr /* wincrypt.h:960:23 */ type _CRYPT_HASH_INFO = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHash CRYPT_HASH_BLOB } /* wincrypt.h:962:11 */ type CRYPT_HASH_INFO = _CRYPT_HASH_INFO /* wincrypt.h:965:5 */ type PCRYPT_HASH_INFO = uintptr /* wincrypt.h:965:21 */ type _CERT_EXTENSION = struct { FpszObjId LPSTR FfCritical WINBOOL _ [4]byte FValue CRYPT_OBJID_BLOB } /* wincrypt.h:969:11 */ type CERT_EXTENSION = _CERT_EXTENSION /* wincrypt.h:973:5 */ type PCERT_EXTENSION = uintptr /* wincrypt.h:973:20 */ type PCCERT_EXTENSION = uintptr /* wincrypt.h:975:32 */ type _CRYPT_ATTRIBUTE_TYPE_VALUE = struct { FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* wincrypt.h:978:11 */ type CRYPT_ATTRIBUTE_TYPE_VALUE = _CRYPT_ATTRIBUTE_TYPE_VALUE /* wincrypt.h:981:5 */ type PCRYPT_ATTRIBUTE_TYPE_VALUE = uintptr /* wincrypt.h:981:32 */ type _CRYPT_ATTRIBUTE = struct { FpszObjId LPSTR FcValue DWORD _ [4]byte FrgValue PCRYPT_ATTR_BLOB } /* wincrypt.h:983:11 */ type CRYPT_ATTRIBUTE = _CRYPT_ATTRIBUTE /* wincrypt.h:987:5 */ type PCRYPT_ATTRIBUTE = uintptr /* wincrypt.h:987:21 */ type _CRYPT_ATTRIBUTES = struct { FcAttr DWORD _ [4]byte FrgAttr PCRYPT_ATTRIBUTE } /* wincrypt.h:989:11 */ type CRYPT_ATTRIBUTES = _CRYPT_ATTRIBUTES /* wincrypt.h:992:5 */ type PCRYPT_ATTRIBUTES = uintptr /* wincrypt.h:992:22 */ type _CERT_RDN_ATTR = struct { FpszObjId LPSTR FdwValueType DWORD _ [4]byte FValue CERT_RDN_VALUE_BLOB } /* wincrypt.h:994:11 */ type CERT_RDN_ATTR = _CERT_RDN_ATTR /* wincrypt.h:998:5 */ type PCERT_RDN_ATTR = uintptr /* wincrypt.h:998:19 */ type _CERT_RDN = struct { FcRDNAttr DWORD _ [4]byte FrgRDNAttr PCERT_RDN_ATTR } /* wincrypt.h:1088:11 */ type CERT_RDN = _CERT_RDN /* wincrypt.h:1091:5 */ type PCERT_RDN = uintptr /* wincrypt.h:1091:14 */ type _CERT_NAME_INFO = struct { FcRDN DWORD _ [4]byte FrgRDN PCERT_RDN } /* wincrypt.h:1093:11 */ type CERT_NAME_INFO = _CERT_NAME_INFO /* wincrypt.h:1096:5 */ type PCERT_NAME_INFO = uintptr /* wincrypt.h:1096:20 */ type _CERT_NAME_VALUE = struct { FdwValueType DWORD _ [4]byte FValue CERT_RDN_VALUE_BLOB } /* wincrypt.h:1098:11 */ type CERT_NAME_VALUE = _CERT_NAME_VALUE /* wincrypt.h:1101:5 */ type PCERT_NAME_VALUE = uintptr /* wincrypt.h:1101:21 */ type _CERT_PUBLIC_KEY_INFO = struct { FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FPublicKey CRYPT_BIT_BLOB } /* wincrypt.h:1104:11 */ type CERT_PUBLIC_KEY_INFO = _CERT_PUBLIC_KEY_INFO /* wincrypt.h:1107:5 */ type PCERT_PUBLIC_KEY_INFO = uintptr /* wincrypt.h:1107:26 */ type _CRYPT_ECC_PRIVATE_KEY_INFO = struct { FdwVersion DWORD _ [4]byte FPrivateKey CRYPT_DER_BLOB FszCurveOid LPSTR FPublicKey CRYPT_BIT_BLOB } /* wincrypt.h:1115:11 */ type CRYPT_ECC_PRIVATE_KEY_INFO = _CRYPT_ECC_PRIVATE_KEY_INFO /* wincrypt.h:1120:5 */ type PCRYPT_ECC_PRIVATE_KEY_INFO = uintptr /* wincrypt.h:1120:32 */ type _CRYPT_PRIVATE_KEY_INFO = struct { FVersion DWORD _ [4]byte FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FPrivateKey CRYPT_DER_BLOB FpAttributes PCRYPT_ATTRIBUTES } /* wincrypt.h:1124:11 */ type CRYPT_PRIVATE_KEY_INFO = _CRYPT_PRIVATE_KEY_INFO /* wincrypt.h:1129:5 */ type PCRYPT_PRIVATE_KEY_INFO = uintptr /* wincrypt.h:1129:28 */ type _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = struct { FEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedPrivateKey CRYPT_DATA_BLOB } /* wincrypt.h:1131:11 */ type CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO /* wincrypt.h:1134:5 */ type PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = uintptr /* wincrypt.h:1134:38 */ type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = uintptr /* wincrypt.h:1136:19 */ type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = uintptr /* wincrypt.h:1137:19 */ type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = uintptr /* wincrypt.h:1138:19 */ type _CRYPT_PKCS8_IMPORT_PARAMS = struct { FPrivateKey CRYPT_DIGEST_BLOB FpResolvehCryptProvFunc PCRYPT_RESOLVE_HCRYPTPROV_FUNC FpVoidResolveFunc LPVOID FpDecryptPrivateKeyFunc PCRYPT_DECRYPT_PRIVATE_KEY_FUNC FpVoidDecryptFunc LPVOID } /* wincrypt.h:1140:11 */ type CRYPT_PKCS8_IMPORT_PARAMS = _CRYPT_PKCS8_IMPORT_PARAMS /* wincrypt.h:1146:5 */ type PCRYPT_PKCS8_IMPORT_PARAMS = uintptr /* wincrypt.h:1146:31 */ type CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = _CRYPT_PKCS8_IMPORT_PARAMS /* wincrypt.h:1146:60 */ type PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = uintptr /* wincrypt.h:1146:94 */ type _CRYPT_PKCS8_EXPORT_PARAMS = struct { FhCryptProv HCRYPTPROV FdwKeySpec DWORD _ [4]byte FpszPrivateKeyObjId LPSTR FpEncryptPrivateKeyFunc PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC FpVoidEncryptFunc LPVOID } /* wincrypt.h:1148:11 */ type CRYPT_PKCS8_EXPORT_PARAMS = _CRYPT_PKCS8_EXPORT_PARAMS /* wincrypt.h:1154:5 */ type PCRYPT_PKCS8_EXPORT_PARAMS = uintptr /* wincrypt.h:1154:31 */ type _CERT_INFO = struct { FdwVersion DWORD _ [4]byte FSerialNumber CRYPT_INTEGER_BLOB FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FIssuer CERT_NAME_BLOB FNotBefore FILETIME FNotAfter FILETIME FSubject CERT_NAME_BLOB FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO FIssuerUniqueId CRYPT_BIT_BLOB FSubjectUniqueId CRYPT_BIT_BLOB FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:1158:11 */ type CERT_INFO = _CERT_INFO /* wincrypt.h:1171:5 */ type PCERT_INFO = uintptr /* wincrypt.h:1171:15 */ type _CRL_ENTRY = struct { FSerialNumber CRYPT_INTEGER_BLOB FRevocationDate FILETIME FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:1190:11 */ type CRL_ENTRY = _CRL_ENTRY /* wincrypt.h:1195:5 */ type PCRL_ENTRY = uintptr /* wincrypt.h:1195:15 */ type _CRL_INFO = struct { FdwVersion DWORD _ [4]byte FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FIssuer CERT_NAME_BLOB FThisUpdate FILETIME FNextUpdate FILETIME FcCRLEntry DWORD _ [4]byte FrgCRLEntry PCRL_ENTRY FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:1197:11 */ type CRL_INFO = _CRL_INFO /* wincrypt.h:1207:5 */ type PCRL_INFO = uintptr /* wincrypt.h:1207:14 */ type _CERT_OR_CRL_BLOB = struct { FdwChoice DWORD FcbEncoded DWORD FpbEncoded uintptr } /* wincrypt.h:1215:11 */ type CERT_OR_CRL_BLOB = _CERT_OR_CRL_BLOB /* wincrypt.h:1219:5 */ type PCERT_OR_CRL_BLOB = uintptr /* wincrypt.h:1219:22 */ type _CERT_OR_CRL_BUNDLE = struct { FcItem DWORD _ [4]byte FrgItem PCERT_OR_CRL_BLOB } /* wincrypt.h:1221:11 */ type CERT_OR_CRL_BUNDLE = _CERT_OR_CRL_BUNDLE /* wincrypt.h:1224:5 */ type PCERT_OR_CRL_BUNDLE = uintptr /* wincrypt.h:1224:24 */ type _CERT_REQUEST_INFO = struct { FdwVersion DWORD _ [4]byte FSubject CERT_NAME_BLOB FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO FcAttribute DWORD _ [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* wincrypt.h:1226:11 */ type CERT_REQUEST_INFO = _CERT_REQUEST_INFO /* wincrypt.h:1232:5 */ type PCERT_REQUEST_INFO = uintptr /* wincrypt.h:1232:23 */ type _CERT_KEYGEN_REQUEST_INFO = struct { FdwVersion DWORD _ [4]byte FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO FpwszChallengeString LPWSTR } /* wincrypt.h:1236:11 */ type CERT_KEYGEN_REQUEST_INFO = _CERT_KEYGEN_REQUEST_INFO /* wincrypt.h:1240:5 */ type PCERT_KEYGEN_REQUEST_INFO = uintptr /* wincrypt.h:1240:30 */ type _CERT_SIGNED_CONTENT_INFO = struct { FToBeSigned CRYPT_DER_BLOB FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FSignature CRYPT_BIT_BLOB } /* wincrypt.h:1244:11 */ type CERT_SIGNED_CONTENT_INFO = _CERT_SIGNED_CONTENT_INFO /* wincrypt.h:1248:5 */ type PCERT_SIGNED_CONTENT_INFO = uintptr /* wincrypt.h:1248:30 */ type _CTL_USAGE = struct { FcUsageIdentifier DWORD _ [4]byte FrgpszUsageIdentifier uintptr } /* wincrypt.h:1250:11 */ type CTL_USAGE = _CTL_USAGE /* wincrypt.h:1253:5 */ type PCTL_USAGE = uintptr /* wincrypt.h:1253:15 */ type CERT_ENHKEY_USAGE = _CTL_USAGE /* wincrypt.h:1253:27 */ type PCERT_ENHKEY_USAGE = uintptr /* wincrypt.h:1253:45 */ type PCCTL_USAGE = uintptr /* wincrypt.h:1255:27 */ type PCCERT_ENHKEY_USAGE = uintptr /* wincrypt.h:1256:35 */ type _CTL_ENTRY = struct { FSubjectIdentifier CRYPT_DATA_BLOB FcAttribute DWORD _ [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* wincrypt.h:1258:11 */ type CTL_ENTRY = _CTL_ENTRY /* wincrypt.h:1262:5 */ type PCTL_ENTRY = uintptr /* wincrypt.h:1262:15 */ type _CTL_INFO = struct { FdwVersion DWORD _ [4]byte FSubjectUsage CTL_USAGE FListIdentifier CRYPT_DATA_BLOB FSequenceNumber CRYPT_INTEGER_BLOB FThisUpdate FILETIME FNextUpdate FILETIME FSubjectAlgorithm CRYPT_ALGORITHM_IDENTIFIER FcCTLEntry DWORD _ [4]byte FrgCTLEntry PCTL_ENTRY FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:1264:11 */ type CTL_INFO = _CTL_INFO /* wincrypt.h:1276:5 */ type PCTL_INFO = uintptr /* wincrypt.h:1276:14 */ type _CRYPT_TIME_STAMP_REQUEST_INFO = struct { FpszTimeStampAlgorithm LPSTR FpszContentType LPSTR FContent CRYPT_OBJID_BLOB FcAttribute DWORD _ [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* wincrypt.h:1280:11 */ type CRYPT_TIME_STAMP_REQUEST_INFO = _CRYPT_TIME_STAMP_REQUEST_INFO /* wincrypt.h:1286:5 */ type PCRYPT_TIME_STAMP_REQUEST_INFO = uintptr /* wincrypt.h:1286:35 */ type _CRYPT_ENROLLMENT_NAME_VALUE_PAIR = struct { FpwszName LPWSTR FpwszValue LPWSTR } /* wincrypt.h:1288:11 */ type CRYPT_ENROLLMENT_NAME_VALUE_PAIR = _CRYPT_ENROLLMENT_NAME_VALUE_PAIR /* wincrypt.h:1291:5 */ type PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = uintptr /* wincrypt.h:1291:38 */ type _CRYPT_CSP_PROVIDER = struct { FdwKeySpec DWORD _ [4]byte FpwszProviderName LPWSTR FSignature CRYPT_BIT_BLOB } /* wincrypt.h:1293:11 */ type CRYPT_CSP_PROVIDER = _CRYPT_CSP_PROVIDER /* wincrypt.h:1297:5 */ type PCRYPT_CSP_PROVIDER = uintptr /* wincrypt.h:1297:24 */ type PFN_CRYPT_ALLOC = uintptr /* wincrypt.h:1327:18 */ type PFN_CRYPT_FREE = uintptr /* wincrypt.h:1328:16 */ type _CRYPT_ENCODE_PARA = struct { FcbSize DWORD _ [4]byte FpfnAlloc PFN_CRYPT_ALLOC FpfnFree PFN_CRYPT_FREE } /* wincrypt.h:1330:11 */ type CRYPT_ENCODE_PARA = _CRYPT_ENCODE_PARA /* wincrypt.h:1334:5 */ type PCRYPT_ENCODE_PARA = uintptr /* wincrypt.h:1334:23 */ type _CRYPT_DECODE_PARA = struct { FcbSize DWORD _ [4]byte FpfnAlloc PFN_CRYPT_ALLOC FpfnFree PFN_CRYPT_FREE } /* wincrypt.h:1350:11 */ type CRYPT_DECODE_PARA = _CRYPT_DECODE_PARA /* wincrypt.h:1354:5 */ type PCRYPT_DECODE_PARA = uintptr /* wincrypt.h:1354:23 */ // szOID_KEY_USAGE is defined incorrectly in msdn as 2.5.29.4 -- // http://www.oid-info.com/get/2.5.29.15 RFC3280 type _CERT_EXTENSIONS = struct { FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:1667:11 */ // szOID_KEY_USAGE is defined incorrectly in msdn as 2.5.29.4 -- // http://www.oid-info.com/get/2.5.29.15 RFC3280 type CERT_EXTENSIONS = _CERT_EXTENSIONS /* wincrypt.h:1670:5 */ type PCERT_EXTENSIONS = uintptr /* wincrypt.h:1670:21 */ type _CERT_AUTHORITY_KEY_ID_INFO = struct { FKeyId CRYPT_DATA_BLOB FCertIssuer CERT_NAME_BLOB FCertSerialNumber CRYPT_INTEGER_BLOB } /* wincrypt.h:1683:11 */ type CERT_AUTHORITY_KEY_ID_INFO = _CERT_AUTHORITY_KEY_ID_INFO /* wincrypt.h:1687:5 */ type PCERT_AUTHORITY_KEY_ID_INFO = uintptr /* wincrypt.h:1687:32 */ type _CERT_PRIVATE_KEY_VALIDITY = struct { FNotBefore FILETIME FNotAfter FILETIME } /* wincrypt.h:1689:11 */ type CERT_PRIVATE_KEY_VALIDITY = _CERT_PRIVATE_KEY_VALIDITY /* wincrypt.h:1692:5 */ type PCERT_PRIVATE_KEY_VALIDITY = uintptr /* wincrypt.h:1692:31 */ type _CERT_KEY_ATTRIBUTES_INFO = struct { FKeyId CRYPT_DATA_BLOB FIntendedKeyUsage CRYPT_BIT_BLOB FpPrivateKeyUsagePeriod PCERT_PRIVATE_KEY_VALIDITY } /* wincrypt.h:1694:11 */ type CERT_KEY_ATTRIBUTES_INFO = _CERT_KEY_ATTRIBUTES_INFO /* wincrypt.h:1698:5 */ type PCERT_KEY_ATTRIBUTES_INFO = uintptr /* wincrypt.h:1698:30 */ type _CERT_POLICY_ID = struct { FcCertPolicyElementId DWORD _ [4]byte FrgpszCertPolicyElementId uintptr } /* wincrypt.h:1711:11 */ type CERT_POLICY_ID = _CERT_POLICY_ID /* wincrypt.h:1714:5 */ type PCERT_POLICY_ID = uintptr /* wincrypt.h:1714:20 */ type _CERT_KEY_USAGE_RESTRICTION_INFO = struct { FcCertPolicyId DWORD _ [4]byte FrgCertPolicyId PCERT_POLICY_ID FRestrictedKeyUsage CRYPT_BIT_BLOB } /* wincrypt.h:1716:11 */ type CERT_KEY_USAGE_RESTRICTION_INFO = _CERT_KEY_USAGE_RESTRICTION_INFO /* wincrypt.h:1720:5 */ type PCERT_KEY_USAGE_RESTRICTION_INFO = uintptr /* wincrypt.h:1720:37 */ type _CERT_OTHER_NAME = struct { FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* wincrypt.h:1722:11 */ type CERT_OTHER_NAME = _CERT_OTHER_NAME /* wincrypt.h:1725:5 */ type PCERT_OTHER_NAME = uintptr /* wincrypt.h:1725:21 */ type _CERT_ALT_NAME_ENTRY = struct { FdwAltNameChoice DWORD _ [4]byte F__8 struct { FpOtherName PCERT_OTHER_NAME _ [8]byte } } /* wincrypt.h:1727:11 */ type CERT_ALT_NAME_ENTRY = _CERT_ALT_NAME_ENTRY /* wincrypt.h:1749:5 */ type PCERT_ALT_NAME_ENTRY = uintptr /* wincrypt.h:1749:25 */ type _CERT_ALT_NAME_INFO = struct { FcAltEntry DWORD _ [4]byte FrgAltEntry PCERT_ALT_NAME_ENTRY } /* wincrypt.h:1761:11 */ type CERT_ALT_NAME_INFO = _CERT_ALT_NAME_INFO /* wincrypt.h:1764:5 */ type PCERT_ALT_NAME_INFO = uintptr /* wincrypt.h:1764:24 */ type _CERT_BASIC_CONSTRAINTS_INFO = struct { FSubjectType CRYPT_BIT_BLOB FfPathLenConstraint WINBOOL FdwPathLenConstraint DWORD FcSubtreesConstraint DWORD _ [4]byte FrgSubtreesConstraint uintptr } /* wincrypt.h:1773:11 */ type CERT_BASIC_CONSTRAINTS_INFO = _CERT_BASIC_CONSTRAINTS_INFO /* wincrypt.h:1779:5 */ type PCERT_BASIC_CONSTRAINTS_INFO = uintptr /* wincrypt.h:1779:34 */ type _CERT_BASIC_CONSTRAINTS2_INFO = struct { FfCA WINBOOL FfPathLenConstraint WINBOOL FdwPathLenConstraint DWORD } /* wincrypt.h:1784:11 */ type CERT_BASIC_CONSTRAINTS2_INFO = _CERT_BASIC_CONSTRAINTS2_INFO /* wincrypt.h:1788:5 */ type PCERT_BASIC_CONSTRAINTS2_INFO = uintptr /* wincrypt.h:1788:34 */ type _CERT_POLICY_QUALIFIER_INFO = struct { FpszPolicyQualifierId LPSTR FQualifier CRYPT_OBJID_BLOB } /* wincrypt.h:1790:11 */ type CERT_POLICY_QUALIFIER_INFO = _CERT_POLICY_QUALIFIER_INFO /* wincrypt.h:1793:5 */ type PCERT_POLICY_QUALIFIER_INFO = uintptr /* wincrypt.h:1793:32 */ type _CERT_POLICY_INFO = struct { FpszPolicyIdentifier LPSTR FcPolicyQualifier DWORD _ [4]byte FrgPolicyQualifier uintptr } /* wincrypt.h:1795:11 */ type CERT_POLICY_INFO = _CERT_POLICY_INFO /* wincrypt.h:1799:5 */ type PCERT_POLICY_INFO = uintptr /* wincrypt.h:1799:22 */ type _CERT_POLICIES_INFO = struct { FcPolicyInfo DWORD _ [4]byte FrgPolicyInfo uintptr } /* wincrypt.h:1801:11 */ type CERT_POLICIES_INFO = _CERT_POLICIES_INFO /* wincrypt.h:1804:5 */ type PCERT_POLICIES_INFO = uintptr /* wincrypt.h:1804:24 */ type _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = struct { FpszOrganization LPSTR FcNoticeNumbers DWORD _ [4]byte FrgNoticeNumbers uintptr } /* wincrypt.h:1806:11 */ type CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE /* wincrypt.h:1810:5 */ type PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE = uintptr /* wincrypt.h:1810:44 */ type _CERT_POLICY_QUALIFIER_USER_NOTICE = struct { FpNoticeReference uintptr FpszDisplayText LPWSTR } /* wincrypt.h:1812:11 */ type CERT_POLICY_QUALIFIER_USER_NOTICE = _CERT_POLICY_QUALIFIER_USER_NOTICE /* wincrypt.h:1815:5 */ type PCERT_POLICY_QUALIFIER_USER_NOTICE = uintptr /* wincrypt.h:1815:39 */ type _CPS_URLS = struct { FpszURL LPWSTR FpAlgorithm uintptr FpDigest uintptr } /* wincrypt.h:1817:11 */ type CPS_URLS = _CPS_URLS /* wincrypt.h:1821:5 */ type PCPS_URLS = uintptr /* wincrypt.h:1821:14 */ type _CERT_POLICY95_QUALIFIER1 = struct { FpszPracticesReference LPWSTR FpszNoticeIdentifier LPSTR FpszNSINoticeIdentifier LPSTR FcCPSURLs DWORD _ [4]byte FrgCPSURLs uintptr } /* wincrypt.h:1823:11 */ type CERT_POLICY95_QUALIFIER1 = _CERT_POLICY95_QUALIFIER1 /* wincrypt.h:1829:5 */ type PCERT_POLICY95_QUALIFIER1 = uintptr /* wincrypt.h:1829:30 */ type _CERT_POLICY_MAPPING = struct { FpszIssuerDomainPolicy LPSTR FpszSubjectDomainPolicy LPSTR } /* wincrypt.h:1831:11 */ type CERT_POLICY_MAPPING = _CERT_POLICY_MAPPING /* wincrypt.h:1834:5 */ type PCERT_POLICY_MAPPING = uintptr /* wincrypt.h:1834:25 */ type _CERT_POLICY_MAPPINGS_INFO = struct { FcPolicyMapping DWORD _ [4]byte FrgPolicyMapping PCERT_POLICY_MAPPING } /* wincrypt.h:1836:11 */ type CERT_POLICY_MAPPINGS_INFO = _CERT_POLICY_MAPPINGS_INFO /* wincrypt.h:1839:5 */ type PCERT_POLICY_MAPPINGS_INFO = uintptr /* wincrypt.h:1839:31 */ type _CERT_POLICY_CONSTRAINTS_INFO = struct { FfRequireExplicitPolicy WINBOOL FdwRequireExplicitPolicySkipCerts DWORD FfInhibitPolicyMapping WINBOOL FdwInhibitPolicyMappingSkipCerts DWORD } /* wincrypt.h:1841:11 */ type CERT_POLICY_CONSTRAINTS_INFO = _CERT_POLICY_CONSTRAINTS_INFO /* wincrypt.h:1846:5 */ type PCERT_POLICY_CONSTRAINTS_INFO = uintptr /* wincrypt.h:1846:34 */ type _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = struct { FpszObjId LPSTR FcValue DWORD _ [4]byte FrgValue PCRYPT_DER_BLOB } /* wincrypt.h:1848:11 */ type CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY /* wincrypt.h:1852:5 */ type PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = uintptr /* wincrypt.h:1852:40 */ type _CRYPT_CONTENT_INFO = struct { FpszObjId LPSTR FContent CRYPT_DER_BLOB } /* wincrypt.h:1854:11 */ type CRYPT_CONTENT_INFO = _CRYPT_CONTENT_INFO /* wincrypt.h:1857:5 */ type PCRYPT_CONTENT_INFO = uintptr /* wincrypt.h:1857:24 */ type _CRYPT_SEQUENCE_OF_ANY = struct { FcValue DWORD _ [4]byte FrgValue PCRYPT_DER_BLOB } /* wincrypt.h:1859:11 */ type CRYPT_SEQUENCE_OF_ANY = _CRYPT_SEQUENCE_OF_ANY /* wincrypt.h:1862:5 */ type PCRYPT_SEQUENCE_OF_ANY = uintptr /* wincrypt.h:1862:27 */ type _CERT_AUTHORITY_KEY_ID2_INFO = struct { FKeyId CRYPT_DATA_BLOB FAuthorityCertIssuer CERT_ALT_NAME_INFO FAuthorityCertSerialNumber CRYPT_INTEGER_BLOB } /* wincrypt.h:1864:11 */ type CERT_AUTHORITY_KEY_ID2_INFO = _CERT_AUTHORITY_KEY_ID2_INFO /* wincrypt.h:1868:5 */ type PCERT_AUTHORITY_KEY_ID2_INFO = uintptr /* wincrypt.h:1868:33 */ type _CERT_ACCESS_DESCRIPTION = struct { FpszAccessMethod LPSTR FAccessLocation CERT_ALT_NAME_ENTRY } /* wincrypt.h:1870:11 */ type CERT_ACCESS_DESCRIPTION = _CERT_ACCESS_DESCRIPTION /* wincrypt.h:1873:5 */ type PCERT_ACCESS_DESCRIPTION = uintptr /* wincrypt.h:1873:29 */ type _CERT_AUTHORITY_INFO_ACCESS = struct { FcAccDescr DWORD _ [4]byte FrgAccDescr PCERT_ACCESS_DESCRIPTION } /* wincrypt.h:1875:11 */ type CERT_AUTHORITY_INFO_ACCESS = _CERT_AUTHORITY_INFO_ACCESS /* wincrypt.h:1878:5 */ type PCERT_AUTHORITY_INFO_ACCESS = uintptr /* wincrypt.h:1878:32 */ type CERT_SUBJECT_INFO_ACCESS = CERT_AUTHORITY_INFO_ACCESS /* wincrypt.h:1880:38 */ type PCERT_SUBJECT_INFO_ACCESS = uintptr /* wincrypt.h:1880:63 */ type _CRL_DIST_POINT_NAME = struct { FdwDistPointNameChoice DWORD _ [4]byte F__8 struct{ FFullName CERT_ALT_NAME_INFO } } /* wincrypt.h:1897:11 */ type CRL_DIST_POINT_NAME = _CRL_DIST_POINT_NAME /* wincrypt.h:1902:5 */ type PCRL_DIST_POINT_NAME = uintptr /* wincrypt.h:1902:25 */ type _CRL_DIST_POINT = struct { FDistPointName CRL_DIST_POINT_NAME FReasonFlags CRYPT_BIT_BLOB FCRLIssuer CERT_ALT_NAME_INFO } /* wincrypt.h:1908:11 */ type CRL_DIST_POINT = _CRL_DIST_POINT /* wincrypt.h:1912:5 */ type PCRL_DIST_POINT = uintptr /* wincrypt.h:1912:20 */ type _CRL_DIST_POINTS_INFO = struct { FcDistPoint DWORD _ [4]byte FrgDistPoint PCRL_DIST_POINT } /* wincrypt.h:1922:11 */ type CRL_DIST_POINTS_INFO = _CRL_DIST_POINTS_INFO /* wincrypt.h:1925:5 */ type PCRL_DIST_POINTS_INFO = uintptr /* wincrypt.h:1925:26 */ type _CROSS_CERT_DIST_POINTS_INFO = struct { FdwSyncDeltaTime DWORD FcDistPoint DWORD FrgDistPoint PCERT_ALT_NAME_INFO } /* wincrypt.h:1934:11 */ type CROSS_CERT_DIST_POINTS_INFO = _CROSS_CERT_DIST_POINTS_INFO /* wincrypt.h:1938:5 */ type PCROSS_CERT_DIST_POINTS_INFO = uintptr /* wincrypt.h:1938:33 */ type _CERT_PAIR = struct { FForward CERT_BLOB FReverse CERT_BLOB } /* wincrypt.h:1944:11 */ type CERT_PAIR = _CERT_PAIR /* wincrypt.h:1947:5 */ type PCERT_PAIR = uintptr /* wincrypt.h:1947:15 */ type _CRL_ISSUING_DIST_POINT = struct { FDistPointName CRL_DIST_POINT_NAME FfOnlyContainsUserCerts WINBOOL FfOnlyContainsCACerts WINBOOL FOnlySomeReasonFlags CRYPT_BIT_BLOB FfIndirectCRL WINBOOL _ [4]byte } /* wincrypt.h:1949:11 */ type CRL_ISSUING_DIST_POINT = _CRL_ISSUING_DIST_POINT /* wincrypt.h:1955:5 */ type PCRL_ISSUING_DIST_POINT = uintptr /* wincrypt.h:1955:28 */ type _CERT_GENERAL_SUBTREE = struct { FBase CERT_ALT_NAME_ENTRY FdwMinimum DWORD FfMaximum WINBOOL FdwMaximum DWORD _ [4]byte } /* wincrypt.h:1957:11 */ type CERT_GENERAL_SUBTREE = _CERT_GENERAL_SUBTREE /* wincrypt.h:1962:5 */ type PCERT_GENERAL_SUBTREE = uintptr /* wincrypt.h:1962:26 */ type _CERT_NAME_CONSTRAINTS_INFO = struct { FcPermittedSubtree DWORD _ [4]byte FrgPermittedSubtree PCERT_GENERAL_SUBTREE FcExcludedSubtree DWORD _ [4]byte FrgExcludedSubtree PCERT_GENERAL_SUBTREE } /* wincrypt.h:1964:11 */ type CERT_NAME_CONSTRAINTS_INFO = _CERT_NAME_CONSTRAINTS_INFO /* wincrypt.h:1969:5 */ type PCERT_NAME_CONSTRAINTS_INFO = uintptr /* wincrypt.h:1969:32 */ type _CERT_DSS_PARAMETERS = struct { Fp CRYPT_UINT_BLOB Fq CRYPT_UINT_BLOB Fg CRYPT_UINT_BLOB } /* wincrypt.h:1981:11 */ type CERT_DSS_PARAMETERS = _CERT_DSS_PARAMETERS /* wincrypt.h:1985:5 */ type PCERT_DSS_PARAMETERS = uintptr /* wincrypt.h:1985:25 */ type _CERT_DH_PARAMETERS = struct { Fp CRYPT_UINT_BLOB Fg CRYPT_UINT_BLOB } /* wincrypt.h:1993:11 */ type CERT_DH_PARAMETERS = _CERT_DH_PARAMETERS /* wincrypt.h:1996:5 */ type PCERT_DH_PARAMETERS = uintptr /* wincrypt.h:1996:24 */ type _CERT_ECC_SIGNATURE = struct { Fr CRYPT_UINT_BLOB Fs CRYPT_UINT_BLOB } /* wincrypt.h:1998:11 */ type CERT_ECC_SIGNATURE = _CERT_ECC_SIGNATURE /* wincrypt.h:2001:5 */ type PCERT_ECC_SIGNATURE = uintptr /* wincrypt.h:2001:24 */ type _CERT_X942_DH_VALIDATION_PARAMS = struct { Fseed CRYPT_BIT_BLOB FpgenCounter DWORD _ [4]byte } /* wincrypt.h:2003:11 */ type CERT_X942_DH_VALIDATION_PARAMS = _CERT_X942_DH_VALIDATION_PARAMS /* wincrypt.h:2006:5 */ type PCERT_X942_DH_VALIDATION_PARAMS = uintptr /* wincrypt.h:2006:36 */ type _CERT_X942_DH_PARAMETERS = struct { Fp CRYPT_UINT_BLOB Fg CRYPT_UINT_BLOB Fq CRYPT_UINT_BLOB Fj CRYPT_UINT_BLOB FpValidationParams PCERT_X942_DH_VALIDATION_PARAMS } /* wincrypt.h:2008:11 */ type CERT_X942_DH_PARAMETERS = _CERT_X942_DH_PARAMETERS /* wincrypt.h:2014:5 */ type PCERT_X942_DH_PARAMETERS = uintptr /* wincrypt.h:2014:29 */ type _CRYPT_X942_OTHER_INFO = struct { FpszContentEncryptionObjId LPSTR FrgbCounter [4]BYTE FrgbKeyLength [4]BYTE FPubInfo CRYPT_DATA_BLOB } /* wincrypt.h:2020:11 */ type CRYPT_X942_OTHER_INFO = _CRYPT_X942_OTHER_INFO /* wincrypt.h:2025:5 */ type PCRYPT_X942_OTHER_INFO = uintptr /* wincrypt.h:2025:27 */ type _CRYPT_ECC_CMS_SHARED_INFO = struct { FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEntityUInfo CRYPT_DATA_BLOB FrgbSuppPubInfo [4]BYTE _ [4]byte } /* wincrypt.h:2029:11 */ type CRYPT_ECC_CMS_SHARED_INFO = _CRYPT_ECC_CMS_SHARED_INFO /* wincrypt.h:2033:5 */ type PCRYPT_ECC_CMS_SHARED_INFO = uintptr /* wincrypt.h:2033:31 */ type _CRYPT_RC2_CBC_PARAMETERS = struct { FdwVersion DWORD FfIV WINBOOL FrgbIV [8]BYTE } /* wincrypt.h:2035:11 */ type CRYPT_RC2_CBC_PARAMETERS = _CRYPT_RC2_CBC_PARAMETERS /* wincrypt.h:2039:5 */ type PCRYPT_RC2_CBC_PARAMETERS = uintptr /* wincrypt.h:2039:30 */ type _CRYPT_SMIME_CAPABILITY = struct { FpszObjId LPSTR FParameters CRYPT_OBJID_BLOB } /* wincrypt.h:2046:11 */ type CRYPT_SMIME_CAPABILITY = _CRYPT_SMIME_CAPABILITY /* wincrypt.h:2049:5 */ type PCRYPT_SMIME_CAPABILITY = uintptr /* wincrypt.h:2049:28 */ type _CRYPT_SMIME_CAPABILITIES = struct { FcCapability DWORD _ [4]byte FrgCapability PCRYPT_SMIME_CAPABILITY } /* wincrypt.h:2051:11 */ type CRYPT_SMIME_CAPABILITIES = _CRYPT_SMIME_CAPABILITIES /* wincrypt.h:2054:5 */ type PCRYPT_SMIME_CAPABILITIES = uintptr /* wincrypt.h:2054:30 */ type _CERT_QC_STATEMENT = struct { FpszStatementId LPSTR FStatementInfo CRYPT_OBJID_BLOB } /* wincrypt.h:2056:11 */ type CERT_QC_STATEMENT = _CERT_QC_STATEMENT /* wincrypt.h:2059:5 */ type PCERT_QC_STATEMENT = uintptr /* wincrypt.h:2059:23 */ type _CERT_QC_STATEMENTS_EXT_INFO = struct { FcStatement DWORD _ [4]byte FrgStatement PCERT_QC_STATEMENT } /* wincrypt.h:2061:11 */ type CERT_QC_STATEMENTS_EXT_INFO = _CERT_QC_STATEMENTS_EXT_INFO /* wincrypt.h:2064:5 */ type PCERT_QC_STATEMENTS_EXT_INFO = uintptr /* wincrypt.h:2064:33 */ type _CRYPT_MASK_GEN_ALGORITHM = struct { FpszObjId LPSTR FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER } /* wincrypt.h:2069:11 */ type CRYPT_MASK_GEN_ALGORITHM = _CRYPT_MASK_GEN_ALGORITHM /* wincrypt.h:2072:5 */ type PCRYPT_MASK_GEN_ALGORITHM = uintptr /* wincrypt.h:2072:30 */ type _CRYPT_RSA_SSA_PSS_PARAMETERS = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FMaskGenAlgorithm CRYPT_MASK_GEN_ALGORITHM FdwSaltLength DWORD FdwTrailerField DWORD } /* wincrypt.h:2074:11 */ type CRYPT_RSA_SSA_PSS_PARAMETERS = _CRYPT_RSA_SSA_PSS_PARAMETERS /* wincrypt.h:2079:5 */ type PCRYPT_RSA_SSA_PSS_PARAMETERS = uintptr /* wincrypt.h:2079:34 */ type _CRYPT_PSOURCE_ALGORITHM = struct { FpszObjId LPSTR FEncodingParameters CRYPT_DATA_BLOB } /* wincrypt.h:2083:11 */ type CRYPT_PSOURCE_ALGORITHM = _CRYPT_PSOURCE_ALGORITHM /* wincrypt.h:2086:5 */ type PCRYPT_PSOURCE_ALGORITHM = uintptr /* wincrypt.h:2086:29 */ type _CRYPT_RSAES_OAEP_PARAMETERS = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FMaskGenAlgorithm CRYPT_MASK_GEN_ALGORITHM FPSourceAlgorithm CRYPT_PSOURCE_ALGORITHM } /* wincrypt.h:2088:11 */ type CRYPT_RSAES_OAEP_PARAMETERS = _CRYPT_RSAES_OAEP_PARAMETERS /* wincrypt.h:2092:5 */ type PCRYPT_RSAES_OAEP_PARAMETERS = uintptr /* wincrypt.h:2092:33 */ type _CMC_TAGGED_ATTRIBUTE = struct { FdwBodyPartID DWORD _ [4]byte FAttribute CRYPT_ATTRIBUTE } /* wincrypt.h:2151:11 */ type CMC_TAGGED_ATTRIBUTE = _CMC_TAGGED_ATTRIBUTE /* wincrypt.h:2154:5 */ type PCMC_TAGGED_ATTRIBUTE = uintptr /* wincrypt.h:2154:26 */ type _CMC_TAGGED_CERT_REQUEST = struct { FdwBodyPartID DWORD _ [4]byte FSignedCertRequest CRYPT_DER_BLOB } /* wincrypt.h:2156:11 */ type CMC_TAGGED_CERT_REQUEST = _CMC_TAGGED_CERT_REQUEST /* wincrypt.h:2159:5 */ type PCMC_TAGGED_CERT_REQUEST = uintptr /* wincrypt.h:2159:29 */ type _CMC_TAGGED_REQUEST = struct { FdwTaggedRequestChoice DWORD _ [4]byte F__8 struct{ FpTaggedCertRequest PCMC_TAGGED_CERT_REQUEST } } /* wincrypt.h:2161:11 */ type CMC_TAGGED_REQUEST = _CMC_TAGGED_REQUEST /* wincrypt.h:2166:5 */ type PCMC_TAGGED_REQUEST = uintptr /* wincrypt.h:2166:24 */ type _CMC_TAGGED_CONTENT_INFO = struct { FdwBodyPartID DWORD _ [4]byte FEncodedContentInfo CRYPT_DER_BLOB } /* wincrypt.h:2170:11 */ type CMC_TAGGED_CONTENT_INFO = _CMC_TAGGED_CONTENT_INFO /* wincrypt.h:2173:5 */ type PCMC_TAGGED_CONTENT_INFO = uintptr /* wincrypt.h:2173:29 */ type _CMC_TAGGED_OTHER_MSG = struct { FdwBodyPartID DWORD _ [4]byte FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* wincrypt.h:2175:11 */ type CMC_TAGGED_OTHER_MSG = _CMC_TAGGED_OTHER_MSG /* wincrypt.h:2179:5 */ type PCMC_TAGGED_OTHER_MSG = uintptr /* wincrypt.h:2179:26 */ type _CMC_DATA_INFO = struct { FcTaggedAttribute DWORD _ [4]byte FrgTaggedAttribute PCMC_TAGGED_ATTRIBUTE FcTaggedRequest DWORD _ [4]byte FrgTaggedRequest PCMC_TAGGED_REQUEST FcTaggedContentInfo DWORD _ [4]byte FrgTaggedContentInfo PCMC_TAGGED_CONTENT_INFO FcTaggedOtherMsg DWORD _ [4]byte FrgTaggedOtherMsg PCMC_TAGGED_OTHER_MSG } /* wincrypt.h:2181:11 */ type CMC_DATA_INFO = _CMC_DATA_INFO /* wincrypt.h:2190:5 */ type PCMC_DATA_INFO = uintptr /* wincrypt.h:2190:19 */ type _CMC_RESPONSE_INFO = struct { FcTaggedAttribute DWORD _ [4]byte FrgTaggedAttribute PCMC_TAGGED_ATTRIBUTE FcTaggedContentInfo DWORD _ [4]byte FrgTaggedContentInfo PCMC_TAGGED_CONTENT_INFO FcTaggedOtherMsg DWORD _ [4]byte FrgTaggedOtherMsg PCMC_TAGGED_OTHER_MSG } /* wincrypt.h:2192:11 */ type CMC_RESPONSE_INFO = _CMC_RESPONSE_INFO /* wincrypt.h:2199:5 */ type PCMC_RESPONSE_INFO = uintptr /* wincrypt.h:2199:23 */ type _CMC_PEND_INFO = struct { FPendToken CRYPT_DATA_BLOB FPendTime FILETIME } /* wincrypt.h:2201:11 */ type CMC_PEND_INFO = _CMC_PEND_INFO /* wincrypt.h:2204:5 */ type PCMC_PEND_INFO = uintptr /* wincrypt.h:2204:19 */ type _CMC_STATUS_INFO = struct { FdwStatus DWORD FcBodyList DWORD FrgdwBodyList uintptr FpwszStatusString LPWSTR FdwOtherInfoChoice DWORD _ [4]byte F__32 struct { _ [0]uint64 FdwFailInfo DWORD _ [4]byte } } /* wincrypt.h:2206:11 */ type CMC_STATUS_INFO = _CMC_STATUS_INFO /* wincrypt.h:2216:5 */ type PCMC_STATUS_INFO = uintptr /* wincrypt.h:2216:21 */ type _CMC_ADD_EXTENSIONS_INFO = struct { FdwCmcDataReference DWORD FcCertReference DWORD FrgdwCertReference uintptr FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:2242:11 */ type CMC_ADD_EXTENSIONS_INFO = _CMC_ADD_EXTENSIONS_INFO /* wincrypt.h:2248:5 */ type PCMC_ADD_EXTENSIONS_INFO = uintptr /* wincrypt.h:2248:29 */ type _CMC_ADD_ATTRIBUTES_INFO = struct { FdwCmcDataReference DWORD FcCertReference DWORD FrgdwCertReference uintptr FcAttribute DWORD _ [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* wincrypt.h:2250:11 */ type CMC_ADD_ATTRIBUTES_INFO = _CMC_ADD_ATTRIBUTES_INFO /* wincrypt.h:2256:5 */ type PCMC_ADD_ATTRIBUTES_INFO = uintptr /* wincrypt.h:2256:29 */ type _CERT_TEMPLATE_EXT = struct { FpszObjId LPSTR FdwMajorVersion DWORD FfMinorVersion WINBOOL FdwMinorVersion DWORD _ [4]byte } /* wincrypt.h:2258:11 */ type CERT_TEMPLATE_EXT = _CERT_TEMPLATE_EXT /* wincrypt.h:2263:5 */ type PCERT_TEMPLATE_EXT = uintptr /* wincrypt.h:2263:23 */ type _CERT_HASHED_URL = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHash CRYPT_HASH_BLOB FpwszUrl LPWSTR } /* wincrypt.h:2265:11 */ type CERT_HASHED_URL = _CERT_HASHED_URL /* wincrypt.h:2269:5 */ type PCERT_HASHED_URL = uintptr /* wincrypt.h:2269:21 */ type _CERT_LOGOTYPE_DETAILS = struct { FpwszMimeType LPWSTR FcHashedUrl DWORD _ [4]byte FrgHashedUrl PCERT_HASHED_URL } /* wincrypt.h:2271:11 */ type CERT_LOGOTYPE_DETAILS = _CERT_LOGOTYPE_DETAILS /* wincrypt.h:2275:5 */ type PCERT_LOGOTYPE_DETAILS = uintptr /* wincrypt.h:2275:27 */ type _CERT_LOGOTYPE_REFERENCE = struct { FcHashedUrl DWORD _ [4]byte FrgHashedUrl PCERT_HASHED_URL } /* wincrypt.h:2277:11 */ type CERT_LOGOTYPE_REFERENCE = _CERT_LOGOTYPE_REFERENCE /* wincrypt.h:2280:5 */ type PCERT_LOGOTYPE_REFERENCE = uintptr /* wincrypt.h:2280:29 */ type _CERT_LOGOTYPE_IMAGE_INFO = struct { FdwLogotypeImageInfoChoice DWORD FdwFileSize DWORD FdwXSize DWORD FdwYSize DWORD FdwLogotypeImageResolutionChoice DWORD F__20 struct{ FdwNumBits DWORD } FpwszLanguage LPWSTR } /* wincrypt.h:2282:11 */ type CERT_LOGOTYPE_IMAGE_INFO = _CERT_LOGOTYPE_IMAGE_INFO /* wincrypt.h:2293:5 */ type PCERT_LOGOTYPE_IMAGE_INFO = uintptr /* wincrypt.h:2293:30 */ type _CERT_LOGOTYPE_IMAGE = struct { FLogotypeDetails CERT_LOGOTYPE_DETAILS FpLogotypeImageInfo PCERT_LOGOTYPE_IMAGE_INFO } /* wincrypt.h:2302:11 */ type CERT_LOGOTYPE_IMAGE = _CERT_LOGOTYPE_IMAGE /* wincrypt.h:2305:5 */ type PCERT_LOGOTYPE_IMAGE = uintptr /* wincrypt.h:2305:25 */ type _CERT_LOGOTYPE_AUDIO_INFO = struct { FdwFileSize DWORD FdwPlayTime DWORD FdwChannels DWORD FdwSampleRate DWORD FpwszLanguage LPWSTR } /* wincrypt.h:2307:11 */ type CERT_LOGOTYPE_AUDIO_INFO = _CERT_LOGOTYPE_AUDIO_INFO /* wincrypt.h:2313:5 */ type PCERT_LOGOTYPE_AUDIO_INFO = uintptr /* wincrypt.h:2313:30 */ type _CERT_LOGOTYPE_AUDIO = struct { FLogotypeDetails CERT_LOGOTYPE_DETAILS FpLogotypeAudioInfo PCERT_LOGOTYPE_AUDIO_INFO } /* wincrypt.h:2315:11 */ type CERT_LOGOTYPE_AUDIO = _CERT_LOGOTYPE_AUDIO /* wincrypt.h:2318:5 */ type PCERT_LOGOTYPE_AUDIO = uintptr /* wincrypt.h:2318:25 */ type _CERT_LOGOTYPE_DATA = struct { FcLogotypeImage DWORD _ [4]byte FrgLogotypeImage PCERT_LOGOTYPE_IMAGE FcLogotypeAudio DWORD _ [4]byte FrgLogotypeAudio PCERT_LOGOTYPE_AUDIO } /* wincrypt.h:2320:11 */ type CERT_LOGOTYPE_DATA = _CERT_LOGOTYPE_DATA /* wincrypt.h:2325:5 */ type PCERT_LOGOTYPE_DATA = uintptr /* wincrypt.h:2325:24 */ type _CERT_LOGOTYPE_INFO = struct { FdwLogotypeInfoChoice DWORD _ [4]byte F__8 struct{ FpLogotypeDirectInfo PCERT_LOGOTYPE_DATA } } /* wincrypt.h:2327:11 */ type CERT_LOGOTYPE_INFO = _CERT_LOGOTYPE_INFO /* wincrypt.h:2333:5 */ type PCERT_LOGOTYPE_INFO = uintptr /* wincrypt.h:2333:24 */ type _CERT_OTHER_LOGOTYPE_INFO = struct { FpszObjId LPSTR FLogotypeInfo CERT_LOGOTYPE_INFO } /* wincrypt.h:2338:11 */ type CERT_OTHER_LOGOTYPE_INFO = _CERT_OTHER_LOGOTYPE_INFO /* wincrypt.h:2341:5 */ type PCERT_OTHER_LOGOTYPE_INFO = uintptr /* wincrypt.h:2341:30 */ type _CERT_LOGOTYPE_EXT_INFO = struct { FcCommunityLogo DWORD _ [4]byte FrgCommunityLogo PCERT_LOGOTYPE_INFO FpIssuerLogo PCERT_LOGOTYPE_INFO FpSubjectLogo PCERT_LOGOTYPE_INFO FcOtherLogo DWORD _ [4]byte FrgOtherLogo PCERT_OTHER_LOGOTYPE_INFO } /* wincrypt.h:2346:11 */ type CERT_LOGOTYPE_EXT_INFO = _CERT_LOGOTYPE_EXT_INFO /* wincrypt.h:2353:5 */ type PCERT_LOGOTYPE_EXT_INFO = uintptr /* wincrypt.h:2353:28 */ type _CERT_BIOMETRIC_DATA = struct { FdwTypeOfBiometricDataChoice DWORD _ [4]byte F__8 struct { _ [0]uint64 FdwPredefined DWORD _ [4]byte } FHashedUrl CERT_HASHED_URL } /* wincrypt.h:2355:11 */ type CERT_BIOMETRIC_DATA = _CERT_BIOMETRIC_DATA /* wincrypt.h:2362:5 */ type PCERT_BIOMETRIC_DATA = uintptr /* wincrypt.h:2362:25 */ type _CERT_BIOMETRIC_EXT_INFO = struct { FcBiometricData DWORD _ [4]byte FrgBiometricData PCERT_BIOMETRIC_DATA } /* wincrypt.h:2370:11 */ type CERT_BIOMETRIC_EXT_INFO = _CERT_BIOMETRIC_EXT_INFO /* wincrypt.h:2373:5 */ type PCERT_BIOMETRIC_EXT_INFO = uintptr /* wincrypt.h:2373:29 */ type _OCSP_SIGNATURE_INFO = struct { FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FSignature CRYPT_BIT_BLOB FcCertEncoded DWORD _ [4]byte FrgCertEncoded PCERT_BLOB } /* wincrypt.h:2375:11 */ type OCSP_SIGNATURE_INFO = _OCSP_SIGNATURE_INFO /* wincrypt.h:2380:5 */ type POCSP_SIGNATURE_INFO = uintptr /* wincrypt.h:2380:25 */ type _OCSP_SIGNED_REQUEST_INFO = struct { FToBeSigned CRYPT_DER_BLOB FpOptionalSignatureInfo POCSP_SIGNATURE_INFO } /* wincrypt.h:2382:11 */ type OCSP_SIGNED_REQUEST_INFO = _OCSP_SIGNED_REQUEST_INFO /* wincrypt.h:2385:5 */ type POCSP_SIGNED_REQUEST_INFO = uintptr /* wincrypt.h:2385:30 */ type _OCSP_CERT_ID = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FIssuerNameHash CRYPT_HASH_BLOB FIssuerKeyHash CRYPT_HASH_BLOB FSerialNumber CRYPT_INTEGER_BLOB } /* wincrypt.h:2387:11 */ type OCSP_CERT_ID = _OCSP_CERT_ID /* wincrypt.h:2392:5 */ type POCSP_CERT_ID = uintptr /* wincrypt.h:2392:18 */ type _OCSP_REQUEST_ENTRY = struct { FCertId OCSP_CERT_ID FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:2394:11 */ type OCSP_REQUEST_ENTRY = _OCSP_REQUEST_ENTRY /* wincrypt.h:2398:5 */ type POCSP_REQUEST_ENTRY = uintptr /* wincrypt.h:2398:24 */ type _OCSP_REQUEST_INFO = struct { FdwVersion DWORD _ [4]byte FpRequestorName PCERT_ALT_NAME_ENTRY FcRequestEntry DWORD _ [4]byte FrgRequestEntry POCSP_REQUEST_ENTRY FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:2400:11 */ type OCSP_REQUEST_INFO = _OCSP_REQUEST_INFO /* wincrypt.h:2407:5 */ type POCSP_REQUEST_INFO = uintptr /* wincrypt.h:2407:23 */ type _OCSP_RESPONSE_INFO = struct { FdwStatus DWORD _ [4]byte FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* wincrypt.h:2411:11 */ type OCSP_RESPONSE_INFO = _OCSP_RESPONSE_INFO /* wincrypt.h:2415:5 */ type POCSP_RESPONSE_INFO = uintptr /* wincrypt.h:2415:24 */ type _OCSP_BASIC_SIGNED_RESPONSE_INFO = struct { FToBeSigned CRYPT_DER_BLOB FSignatureInfo OCSP_SIGNATURE_INFO } /* wincrypt.h:2426:11 */ type OCSP_BASIC_SIGNED_RESPONSE_INFO = _OCSP_BASIC_SIGNED_RESPONSE_INFO /* wincrypt.h:2429:5 */ type POCSP_BASIC_SIGNED_RESPONSE_INFO = uintptr /* wincrypt.h:2429:37 */ type _OCSP_BASIC_REVOKED_INFO = struct { FRevocationDate FILETIME FdwCrlReasonCode DWORD } /* wincrypt.h:2431:11 */ type OCSP_BASIC_REVOKED_INFO = _OCSP_BASIC_REVOKED_INFO /* wincrypt.h:2434:5 */ type POCSP_BASIC_REVOKED_INFO = uintptr /* wincrypt.h:2434:29 */ type _OCSP_BASIC_RESPONSE_ENTRY = struct { FCertId OCSP_CERT_ID FdwCertStatus DWORD _ [4]byte F__80 struct{ FpRevokedInfo POCSP_BASIC_REVOKED_INFO } FThisUpdate FILETIME FNextUpdate FILETIME FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:2436:11 */ type OCSP_BASIC_RESPONSE_ENTRY = _OCSP_BASIC_RESPONSE_ENTRY /* wincrypt.h:2446:5 */ type POCSP_BASIC_RESPONSE_ENTRY = uintptr /* wincrypt.h:2446:31 */ type _OCSP_BASIC_RESPONSE_INFO = struct { FdwVersion DWORD FdwResponderIdChoice DWORD F__8 struct{ FByNameResponderId CERT_NAME_BLOB } FProducedAt FILETIME FcResponseEntry DWORD _ [4]byte FrgResponseEntry POCSP_BASIC_RESPONSE_ENTRY FcExtension DWORD _ [4]byte FrgExtension PCERT_EXTENSION } /* wincrypt.h:2452:11 */ type OCSP_BASIC_RESPONSE_INFO = _OCSP_BASIC_RESPONSE_INFO /* wincrypt.h:2464:5 */ type POCSP_BASIC_RESPONSE_INFO = uintptr /* wincrypt.h:2464:30 */ type HCRYPTOIDFUNCSET = uintptr /* wincrypt.h:2470:16 */ type HCRYPTOIDFUNCADDR = uintptr /* wincrypt.h:2471:16 */ type _CRYPT_OID_FUNC_ENTRY = struct { FpszOID LPCSTR FpvFuncAddr uintptr } /* wincrypt.h:2494:11 */ type CRYPT_OID_FUNC_ENTRY = _CRYPT_OID_FUNC_ENTRY /* wincrypt.h:2497:5 */ type PCRYPT_OID_FUNC_ENTRY = uintptr /* wincrypt.h:2497:26 */ type PFN_CRYPT_ENUM_OID_FUNC = uintptr /* wincrypt.h:2518:19 */ type _CRYPT_OID_INFO = struct { FcbSize DWORD _ [4]byte FpszOID LPCSTR FpwszName LPCWSTR FdwGroupId DWORD F__28 struct{ FdwValue DWORD } FExtraInfo CRYPT_DATA_BLOB } /* wincrypt.h:2535:11 */ type CRYPT_OID_INFO = _CRYPT_OID_INFO /* wincrypt.h:2550:5 */ type PCRYPT_OID_INFO = uintptr /* wincrypt.h:2550:20 */ type CCRYPT_OID_INFO = CRYPT_OID_INFO /* wincrypt.h:2552:32 */ type PCCRYPT_OID_INFO = uintptr /* wincrypt.h:2552:48 */ type PFN_CRYPT_ENUM_OID_INFO = uintptr /* wincrypt.h:2600:19 */ type _CERT_STRONG_SIGN_SERIALIZED_INFO = struct { FdwFlags DWORD _ [4]byte FpwszCNGSignHashAlgids LPWSTR FpwszCNGPubKeyMinBitLengths LPWSTR } /* wincrypt.h:2612:11 */ type CERT_STRONG_SIGN_SERIALIZED_INFO = _CERT_STRONG_SIGN_SERIALIZED_INFO /* wincrypt.h:2616:5 */ type PCERT_STRONG_SIGN_SERIALIZED_INFO = uintptr /* wincrypt.h:2616:38 */ type _CERT_STRONG_SIGN_PARA = struct { FcbSize DWORD FdwInfoChoice DWORD F__8 struct{ FpvInfo uintptr } } /* wincrypt.h:2618:11 */ type CERT_STRONG_SIGN_PARA = _CERT_STRONG_SIGN_PARA /* wincrypt.h:2626:5 */ type PCERT_STRONG_SIGN_PARA = uintptr /* wincrypt.h:2626:27 */ type PCCERT_STRONG_SIGN_PARA = uintptr /* wincrypt.h:2628:39 */ type HCRYPTMSG = uintptr /* wincrypt.h:2651:16 */ type _CERT_ISSUER_SERIAL_NUMBER = struct { FIssuer CERT_NAME_BLOB FSerialNumber CRYPT_INTEGER_BLOB } /* wincrypt.h:2678:11 */ type CERT_ISSUER_SERIAL_NUMBER = _CERT_ISSUER_SERIAL_NUMBER /* wincrypt.h:2681:5 */ type PCERT_ISSUER_SERIAL_NUMBER = uintptr /* wincrypt.h:2681:31 */ type _CERT_ID = struct { FdwIdChoice DWORD _ [4]byte F__8 struct{ FIssuerSerialNumber CERT_ISSUER_SERIAL_NUMBER } } /* wincrypt.h:2683:11 */ type CERT_ID = _CERT_ID /* wincrypt.h:2690:5 */ type PCERT_ID = uintptr /* wincrypt.h:2690:13 */ type _CMSG_SIGNER_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FpCertInfo PCERT_INFO F__16 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD _ [4]byte FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr FcAuthAttr DWORD _ [4]byte FrgAuthAttr PCRYPT_ATTRIBUTE FcUnauthAttr DWORD _ [4]byte FrgUnauthAttr PCRYPT_ATTRIBUTE } /* wincrypt.h:2696:11 */ type CMSG_SIGNER_ENCODE_INFO = _CMSG_SIGNER_ENCODE_INFO /* wincrypt.h:2715:5 */ type PCMSG_SIGNER_ENCODE_INFO = uintptr /* wincrypt.h:2715:29 */ type _CMSG_SIGNED_ENCODE_INFO = struct { FcbSize DWORD FcSigners DWORD FrgSigners PCMSG_SIGNER_ENCODE_INFO FcCertEncoded DWORD _ [4]byte FrgCertEncoded PCERT_BLOB FcCrlEncoded DWORD _ [4]byte FrgCrlEncoded PCRL_BLOB } /* wincrypt.h:2717:11 */ type CMSG_SIGNED_ENCODE_INFO = _CMSG_SIGNED_ENCODE_INFO /* wincrypt.h:2729:5 */ type PCMSG_SIGNED_ENCODE_INFO = uintptr /* wincrypt.h:2729:29 */ type _CMSG_RECIPIENT_ENCODE_INFO = struct { FdwRecipientChoice DWORD _ [4]byte F__8 struct { FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO } } /* wincrypt.h:2731:11 */ type CMSG_RECIPIENT_ENCODE_INFO = _CMSG_RECIPIENT_ENCODE_INFO /* wincrypt.h:2731:46 */ type PCMSG_RECIPIENT_ENCODE_INFO = uintptr /* wincrypt.h:2731:73 */ type _CMSG_ENVELOPED_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FhCryptProv HCRYPTPROV_LEGACY FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr FcRecipients DWORD _ [4]byte FrgpRecipients uintptr } /* wincrypt.h:2733:11 */ type CMSG_ENVELOPED_ENCODE_INFO = _CMSG_ENVELOPED_ENCODE_INFO /* wincrypt.h:2751:5 */ type PCMSG_ENVELOPED_ENCODE_INFO = uintptr /* wincrypt.h:2751:32 */ type _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvKeyEncryptionAuxInfo uintptr FhCryptProv HCRYPTPROV_LEGACY FRecipientPublicKey CRYPT_BIT_BLOB FRecipientId CERT_ID } /* wincrypt.h:2753:11 */ type CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO /* wincrypt.h:2760:5 */ type PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = uintptr /* wincrypt.h:2760:42 */ type _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FRecipientPublicKey CRYPT_BIT_BLOB FRecipientId CERT_ID FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* wincrypt.h:2762:11 */ type CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO /* wincrypt.h:2768:5 */ type PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = uintptr /* wincrypt.h:2768:46 */ type _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvKeyEncryptionAuxInfo uintptr FKeyWrapAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvKeyWrapAuxInfo uintptr FhCryptProv HCRYPTPROV_LEGACY FdwKeySpec DWORD FdwKeyChoice DWORD F__88 struct{ FpEphemeralAlgorithm PCRYPT_ALGORITHM_IDENTIFIER } FUserKeyingMaterial CRYPT_DATA_BLOB FcRecipientEncryptedKeys DWORD _ [4]byte FrgpRecipientEncryptedKeys uintptr } /* wincrypt.h:2770:11 */ type CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO /* wincrypt.h:2786:5 */ type PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = uintptr /* wincrypt.h:2786:42 */ type _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvKeyEncryptionAuxInfo uintptr FhCryptProv HCRYPTPROV FdwKeyChoice DWORD _ [4]byte F__56 struct{ FhKeyEncryptionKey HCRYPTKEY } FKeyId CRYPT_DATA_BLOB FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* wincrypt.h:2791:11 */ type CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO /* wincrypt.h:2804:5 */ type PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = uintptr /* wincrypt.h:2804:42 */ type _CMSG_RC2_AUX_INFO = struct { FcbSize DWORD FdwBitLen DWORD } /* wincrypt.h:2824:11 */ type CMSG_RC2_AUX_INFO = _CMSG_RC2_AUX_INFO /* wincrypt.h:2827:5 */ type PCMSG_RC2_AUX_INFO = uintptr /* wincrypt.h:2827:23 */ type _CMSG_SP3_COMPATIBLE_AUX_INFO = struct { FcbSize DWORD FdwFlags DWORD } /* wincrypt.h:2829:11 */ type CMSG_SP3_COMPATIBLE_AUX_INFO = _CMSG_SP3_COMPATIBLE_AUX_INFO /* wincrypt.h:2832:5 */ type PCMSG_SP3_COMPATIBLE_AUX_INFO = uintptr /* wincrypt.h:2832:34 */ type _CMSG_RC4_AUX_INFO = struct { FcbSize DWORD FdwBitLen DWORD } /* wincrypt.h:2834:11 */ type CMSG_RC4_AUX_INFO = _CMSG_RC4_AUX_INFO /* wincrypt.h:2837:5 */ type PCMSG_RC4_AUX_INFO = uintptr /* wincrypt.h:2837:23 */ type _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FSignedInfo CMSG_SIGNED_ENCODE_INFO FEnvelopedInfo CMSG_ENVELOPED_ENCODE_INFO } /* wincrypt.h:2839:11 */ type CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO /* wincrypt.h:2843:5 */ type PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = uintptr /* wincrypt.h:2843:43 */ type _CMSG_HASHED_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FhCryptProv HCRYPTPROV_LEGACY FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr } /* wincrypt.h:2845:11 */ type CMSG_HASHED_ENCODE_INFO = _CMSG_HASHED_ENCODE_INFO /* wincrypt.h:2850:5 */ type PCMSG_HASHED_ENCODE_INFO = uintptr /* wincrypt.h:2850:29 */ type _CMSG_ENCRYPTED_ENCODE_INFO = struct { FcbSize DWORD _ [4]byte FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr } /* wincrypt.h:2852:11 */ type CMSG_ENCRYPTED_ENCODE_INFO = _CMSG_ENCRYPTED_ENCODE_INFO /* wincrypt.h:2856:5 */ type PCMSG_ENCRYPTED_ENCODE_INFO = uintptr /* wincrypt.h:2856:32 */ type PFN_CMSG_STREAM_OUTPUT = uintptr /* wincrypt.h:2858:19 */ type _CMSG_STREAM_INFO = struct { FcbContent DWORD _ [4]byte FpfnStreamOutput PFN_CMSG_STREAM_OUTPUT FpvArg uintptr } /* wincrypt.h:2862:11 */ type CMSG_STREAM_INFO = _CMSG_STREAM_INFO /* wincrypt.h:2866:5 */ type PCMSG_STREAM_INFO = uintptr /* wincrypt.h:2866:22 */ type _CMSG_SIGNER_INFO = struct { FdwVersion DWORD _ [4]byte FIssuer CERT_NAME_BLOB FSerialNumber CRYPT_INTEGER_BLOB FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHashEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedHash CRYPT_DATA_BLOB FAuthAttrs CRYPT_ATTRIBUTES FUnauthAttrs CRYPT_ATTRIBUTES } /* wincrypt.h:2921:11 */ type CMSG_SIGNER_INFO = _CMSG_SIGNER_INFO /* wincrypt.h:2930:5 */ type PCMSG_SIGNER_INFO = uintptr /* wincrypt.h:2930:22 */ type _CMSG_CMS_SIGNER_INFO = struct { FdwVersion DWORD _ [4]byte FSignerId CERT_ID FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHashEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedHash CRYPT_DATA_BLOB FAuthAttrs CRYPT_ATTRIBUTES FUnauthAttrs CRYPT_ATTRIBUTES } /* wincrypt.h:2932:11 */ type CMSG_CMS_SIGNER_INFO = _CMSG_CMS_SIGNER_INFO /* wincrypt.h:2940:5 */ type PCMSG_CMS_SIGNER_INFO = uintptr /* wincrypt.h:2940:26 */ type CMSG_ATTR = CRYPT_ATTRIBUTES /* wincrypt.h:2942:28 */ type PCMSG_ATTR = uintptr /* wincrypt.h:2943:28 */ type _CMSG_KEY_TRANS_RECIPIENT_INFO = struct { FdwVersion DWORD _ [4]byte FRecipientId CERT_ID FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB } /* wincrypt.h:2965:11 */ type CMSG_KEY_TRANS_RECIPIENT_INFO = _CMSG_KEY_TRANS_RECIPIENT_INFO /* wincrypt.h:2970:5 */ type PCMSG_KEY_TRANS_RECIPIENT_INFO = uintptr /* wincrypt.h:2970:35 */ type _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = struct { FRecipientId CERT_ID FEncryptedKey CRYPT_DATA_BLOB FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* wincrypt.h:2972:11 */ type CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO /* wincrypt.h:2977:5 */ type PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO = uintptr /* wincrypt.h:2977:39 */ type _CMSG_KEY_AGREE_RECIPIENT_INFO = struct { FdwVersion DWORD FdwOriginatorChoice DWORD F__8 struct { FOriginatorCertId CERT_ID _ [8]byte } FUserKeyingMaterial CRYPT_DATA_BLOB FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FcRecipientEncryptedKeys DWORD _ [4]byte FrgpRecipientEncryptedKeys uintptr } /* wincrypt.h:2979:11 */ type CMSG_KEY_AGREE_RECIPIENT_INFO = _CMSG_KEY_AGREE_RECIPIENT_INFO /* wincrypt.h:2990:5 */ type PCMSG_KEY_AGREE_RECIPIENT_INFO = uintptr /* wincrypt.h:2990:35 */ type _CMSG_MAIL_LIST_RECIPIENT_INFO = struct { FdwVersion DWORD _ [4]byte FKeyId CRYPT_DATA_BLOB FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* wincrypt.h:2995:11 */ type CMSG_MAIL_LIST_RECIPIENT_INFO = _CMSG_MAIL_LIST_RECIPIENT_INFO /* wincrypt.h:3002:5 */ type PCMSG_MAIL_LIST_RECIPIENT_INFO = uintptr /* wincrypt.h:3002:35 */ type _CMSG_CMS_RECIPIENT_INFO = struct { FdwRecipientChoice DWORD _ [4]byte F__8 struct { FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_INFO } } /* wincrypt.h:3004:11 */ type CMSG_CMS_RECIPIENT_INFO = _CMSG_CMS_RECIPIENT_INFO /* wincrypt.h:3011:5 */ type PCMSG_CMS_RECIPIENT_INFO = uintptr /* wincrypt.h:3011:29 */ type _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = struct { FcbSize DWORD _ [4]byte FhCryptProv HCRYPTPROV_LEGACY FdwSignerIndex DWORD FdwSignerType DWORD FpvSigner uintptr } /* wincrypt.h:3044:11 */ type CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA /* wincrypt.h:3050:5 */ type PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = uintptr /* wincrypt.h:3050:40 */ type _CMSG_CTRL_DECRYPT_PARA = struct { FcbSize DWORD _ [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD FdwRecipientIndex DWORD } /* wincrypt.h:3057:11 */ type CMSG_CTRL_DECRYPT_PARA = _CMSG_CTRL_DECRYPT_PARA /* wincrypt.h:3065:5 */ type PCMSG_CTRL_DECRYPT_PARA = uintptr /* wincrypt.h:3065:28 */ type _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = struct { FcbSize DWORD _ [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD _ [4]byte FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_INFO FdwRecipientIndex DWORD _ [4]byte } /* wincrypt.h:3067:11 */ type CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA /* wincrypt.h:3076:5 */ type PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA = uintptr /* wincrypt.h:3076:38 */ type _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = struct { FcbSize DWORD _ [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD _ [4]byte FpKeyAgree PCMSG_KEY_AGREE_RECIPIENT_INFO FdwRecipientIndex DWORD FdwRecipientEncryptedKeyIndex DWORD FOriginatorPublicKey CRYPT_BIT_BLOB } /* wincrypt.h:3078:11 */ type CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA /* wincrypt.h:3089:5 */ type PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA = uintptr /* wincrypt.h:3089:38 */ type _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = struct { FcbSize DWORD _ [4]byte FhCryptProv HCRYPTPROV FpMailList PCMSG_MAIL_LIST_RECIPIENT_INFO FdwRecipientIndex DWORD FdwKeyChoice DWORD F__32 struct{ FhKeyEncryptionKey HCRYPTKEY } } /* wincrypt.h:3091:11 */ type CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA /* wincrypt.h:3101:5 */ type PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA = uintptr /* wincrypt.h:3101:38 */ type _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = struct { FcbSize DWORD FdwSignerIndex DWORD Fblob CRYPT_DATA_BLOB } /* wincrypt.h:3103:11 */ type CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA /* wincrypt.h:3107:5 */ type PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = uintptr /* wincrypt.h:3107:43 */ type _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = struct { FcbSize DWORD FdwSignerIndex DWORD FdwUnauthAttrIndex DWORD } /* wincrypt.h:3109:11 */ type CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA /* wincrypt.h:3113:5 */ type PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = uintptr /* wincrypt.h:3113:43 */ type PFN_CMSG_ALLOC = uintptr /* wincrypt.h:3122:16 */ type PFN_CMSG_FREE = uintptr /* wincrypt.h:3123:16 */ type PFN_CMSG_GEN_ENCRYPT_KEY = uintptr /* wincrypt.h:3129:19 */ type PFN_CMSG_EXPORT_ENCRYPT_KEY = uintptr /* wincrypt.h:3130:19 */ type PFN_CMSG_IMPORT_ENCRYPT_KEY = uintptr /* wincrypt.h:3131:19 */ type _CMSG_CONTENT_ENCRYPT_INFO = struct { FcbSize DWORD _ [4]byte FhCryptProv HCRYPTPROV_LEGACY FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr FcRecipients DWORD _ [4]byte FrgCmsRecipients PCMSG_RECIPIENT_ENCODE_INFO FpfnAlloc PFN_CMSG_ALLOC FpfnFree PFN_CMSG_FREE FdwEncryptFlags DWORD _ [4]byte F__88 struct{ FhContentEncryptKey HCRYPTKEY } FdwFlags DWORD FfCNG WINBOOL FpbCNGContentEncryptKeyObject uintptr FpbContentEncryptKey uintptr FcbContentEncryptKey DWORD _ [4]byte } /* wincrypt.h:3137:11 */ type CMSG_CONTENT_ENCRYPT_INFO = _CMSG_CONTENT_ENCRYPT_INFO /* wincrypt.h:3156:5 */ type PCMSG_CONTENT_ENCRYPT_INFO = uintptr /* wincrypt.h:3156:31 */ type PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY = uintptr /* wincrypt.h:3168:19 */ type _CMSG_KEY_TRANS_ENCRYPT_INFO = struct { FcbSize DWORD FdwRecipientIndex DWORD FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB FdwFlags DWORD _ [4]byte } /* wincrypt.h:3170:11 */ type CMSG_KEY_TRANS_ENCRYPT_INFO = _CMSG_KEY_TRANS_ENCRYPT_INFO /* wincrypt.h:3176:5 */ type PCMSG_KEY_TRANS_ENCRYPT_INFO = uintptr /* wincrypt.h:3176:33 */ type PFN_CMSG_EXPORT_KEY_TRANS = uintptr /* wincrypt.h:3185:19 */ type _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = struct { FcbSize DWORD _ [4]byte FEncryptedKey CRYPT_DATA_BLOB } /* wincrypt.h:3187:11 */ type CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO /* wincrypt.h:3190:5 */ type PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = uintptr /* wincrypt.h:3190:37 */ type _CMSG_KEY_AGREE_ENCRYPT_INFO = struct { FcbSize DWORD FdwRecipientIndex DWORD FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FUserKeyingMaterial CRYPT_DATA_BLOB FdwOriginatorChoice DWORD _ [4]byte F__56 struct { FOriginatorCertId CERT_ID _ [8]byte } FcKeyAgreeKeyEncryptInfo DWORD _ [4]byte FrgpKeyAgreeKeyEncryptInfo uintptr FdwFlags DWORD _ [4]byte } /* wincrypt.h:3192:11 */ type CMSG_KEY_AGREE_ENCRYPT_INFO = _CMSG_KEY_AGREE_ENCRYPT_INFO /* wincrypt.h:3205:5 */ type PCMSG_KEY_AGREE_ENCRYPT_INFO = uintptr /* wincrypt.h:3205:33 */ type PFN_CMSG_EXPORT_KEY_AGREE = uintptr /* wincrypt.h:3218:19 */ type _CMSG_MAIL_LIST_ENCRYPT_INFO = struct { FcbSize DWORD FdwRecipientIndex DWORD FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB FdwFlags DWORD _ [4]byte } /* wincrypt.h:3220:11 */ type CMSG_MAIL_LIST_ENCRYPT_INFO = _CMSG_MAIL_LIST_ENCRYPT_INFO /* wincrypt.h:3226:5 */ type PCMSG_MAIL_LIST_ENCRYPT_INFO = uintptr /* wincrypt.h:3226:33 */ type PFN_CMSG_EXPORT_MAIL_LIST = uintptr /* wincrypt.h:3240:19 */ type PFN_CMSG_IMPORT_KEY_TRANS = uintptr /* wincrypt.h:3241:19 */ type PFN_CMSG_IMPORT_KEY_AGREE = uintptr /* wincrypt.h:3242:19 */ type PFN_CMSG_IMPORT_MAIL_LIST = uintptr /* wincrypt.h:3243:19 */ type _CMSG_CNG_CONTENT_DECRYPT_INFO = struct { FcbSize DWORD _ [4]byte FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpfnAlloc PFN_CMSG_ALLOC FpfnFree PFN_CMSG_FREE FhNCryptKey NCRYPT_KEY_HANDLE FpbContentEncryptKey uintptr FcbContentEncryptKey DWORD _ [4]byte FhCNGContentEncryptKey BCRYPT_KEY_HANDLE FpbCNGContentEncryptKeyObject uintptr } /* wincrypt.h:3245:11 */ type CMSG_CNG_CONTENT_DECRYPT_INFO = _CMSG_CNG_CONTENT_DECRYPT_INFO /* wincrypt.h:3255:5 */ type PCMSG_CNG_CONTENT_DECRYPT_INFO = uintptr /* wincrypt.h:3255:35 */ type PFN_CMSG_CNG_IMPORT_KEY_TRANS = uintptr /* wincrypt.h:3261:19 */ type PFN_CMSG_CNG_IMPORT_KEY_AGREE = uintptr /* wincrypt.h:3262:19 */ type PFN_CMSG_CNG_IMPORT_CONTENT_ENCRYPT_KEY = uintptr /* wincrypt.h:3263:19 */ type HCERTSTORE = uintptr /* wincrypt.h:3267:16 */ type _CERT_CONTEXT = struct { FdwCertEncodingType DWORD _ [4]byte FpbCertEncoded uintptr FcbCertEncoded DWORD _ [4]byte FpCertInfo PCERT_INFO FhCertStore HCERTSTORE } /* wincrypt.h:3269:11 */ type CERT_CONTEXT = _CERT_CONTEXT /* wincrypt.h:3275:5 */ type PCERT_CONTEXT = uintptr /* wincrypt.h:3275:18 */ type PCCERT_CONTEXT = uintptr /* wincrypt.h:3277:30 */ type _CRL_CONTEXT = struct { FdwCertEncodingType DWORD _ [4]byte FpbCrlEncoded uintptr FcbCrlEncoded DWORD _ [4]byte FpCrlInfo PCRL_INFO FhCertStore HCERTSTORE } /* wincrypt.h:3280:11 */ type CRL_CONTEXT = _CRL_CONTEXT /* wincrypt.h:3286:5 */ type PCRL_CONTEXT = uintptr /* wincrypt.h:3286:17 */ type PCCRL_CONTEXT = uintptr /* wincrypt.h:3288:29 */ type _CTL_CONTEXT = struct { FdwMsgAndCertEncodingType DWORD _ [4]byte FpbCtlEncoded uintptr FcbCtlEncoded DWORD _ [4]byte FpCtlInfo PCTL_INFO FhCertStore HCERTSTORE FhCryptMsg HCRYPTMSG FpbCtlContent uintptr FcbCtlContent DWORD _ [4]byte } /* wincrypt.h:3290:11 */ type CTL_CONTEXT = _CTL_CONTEXT /* wincrypt.h:3299:5 */ type PCTL_CONTEXT = uintptr /* wincrypt.h:3299:17 */ type PCCTL_CONTEXT = uintptr /* wincrypt.h:3301:29 */ type _CRYPT_KEY_PROV_PARAM = struct { FdwParam DWORD _ [4]byte FpbData uintptr FcbData DWORD FdwFlags DWORD } /* wincrypt.h:3414:11 */ type CRYPT_KEY_PROV_PARAM = _CRYPT_KEY_PROV_PARAM /* wincrypt.h:3419:5 */ type PCRYPT_KEY_PROV_PARAM = uintptr /* wincrypt.h:3419:26 */ type _CRYPT_KEY_PROV_INFO = struct { FpwszContainerName LPWSTR FpwszProvName LPWSTR FdwProvType DWORD FdwFlags DWORD FcProvParam DWORD _ [4]byte FrgProvParam PCRYPT_KEY_PROV_PARAM FdwKeySpec DWORD _ [4]byte } /* wincrypt.h:3421:11 */ type CRYPT_KEY_PROV_INFO = _CRYPT_KEY_PROV_INFO /* wincrypt.h:3429:5 */ type PCRYPT_KEY_PROV_INFO = uintptr /* wincrypt.h:3429:25 */ type _CERT_KEY_CONTEXT = struct { FcbSize DWORD _ [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD _ [4]byte } /* wincrypt.h:3436:11 */ type CERT_KEY_CONTEXT = _CERT_KEY_CONTEXT /* wincrypt.h:3443:5 */ type PCERT_KEY_CONTEXT = uintptr /* wincrypt.h:3443:22 */ type _ROOT_INFO_LUID = struct { FLowPart DWORD FHighPart LONG } /* wincrypt.h:3445:11 */ type ROOT_INFO_LUID = _ROOT_INFO_LUID /* wincrypt.h:3448:5 */ type PROOT_INFO_LUID = uintptr /* wincrypt.h:3448:20 */ type _CRYPT_SMART_CARD_ROOT_INFO = struct { FrgbCardID [16]BYTE Fluid ROOT_INFO_LUID } /* wincrypt.h:3450:11 */ type CRYPT_SMART_CARD_ROOT_INFO = _CRYPT_SMART_CARD_ROOT_INFO /* wincrypt.h:3453:5 */ type PCRYPT_SMART_CARD_ROOT_INFO = uintptr /* wincrypt.h:3453:32 */ type _CERT_SYSTEM_STORE_RELOCATE_PARA = struct { F__0 struct{ FhKeyBase HKEY } F__8 struct{ FpvSystemStore uintptr } } /* wincrypt.h:3529:11 */ type CERT_SYSTEM_STORE_RELOCATE_PARA = _CERT_SYSTEM_STORE_RELOCATE_PARA /* wincrypt.h:3539:5 */ type PCERT_SYSTEM_STORE_RELOCATE_PARA = uintptr /* wincrypt.h:3539:37 */ type _CERT_REGISTRY_STORE_CLIENT_GPT_PARA = struct { FhKeyBase HKEY FpwszRegPath LPWSTR } /* wincrypt.h:3633:11 */ type CERT_REGISTRY_STORE_CLIENT_GPT_PARA = _CERT_REGISTRY_STORE_CLIENT_GPT_PARA /* wincrypt.h:3636:5 */ type PCERT_REGISTRY_STORE_CLIENT_GPT_PARA = uintptr /* wincrypt.h:3636:41 */ type _CERT_REGISTRY_STORE_ROAMING_PARA = struct { FhKey HKEY FpwszStoreDirectory LPWSTR } /* wincrypt.h:3640:11 */ type CERT_REGISTRY_STORE_ROAMING_PARA = _CERT_REGISTRY_STORE_ROAMING_PARA /* wincrypt.h:3643:5 */ type PCERT_REGISTRY_STORE_ROAMING_PARA = uintptr /* wincrypt.h:3643:38 */ type _CERT_LDAP_STORE_OPENED_PARA = struct { FpvLdapSessionHandle uintptr FpwszLdapUrl LPCWSTR } /* wincrypt.h:3655:11 */ type CERT_LDAP_STORE_OPENED_PARA = _CERT_LDAP_STORE_OPENED_PARA /* wincrypt.h:3658:5 */ type PCERT_LDAP_STORE_OPENED_PARA = uintptr /* wincrypt.h:3658:33 */ type HCERTSTOREPROV = uintptr /* wincrypt.h:3664:16 */ type _CERT_STORE_PROV_INFO = struct { FcbSize DWORD FcStoreProvFunc DWORD FrgpvStoreProvFunc uintptr FhStoreProv HCERTSTOREPROV FdwStoreProvFlags DWORD _ [4]byte FhStoreProvFuncAddr2 HCRYPTOIDFUNCADDR } /* wincrypt.h:3668:11 */ type CERT_STORE_PROV_INFO = _CERT_STORE_PROV_INFO /* wincrypt.h:3675:5 */ type PCERT_STORE_PROV_INFO = uintptr /* wincrypt.h:3675:26 */ type PFN_CERT_DLL_OPEN_STORE_PROV_FUNC = uintptr /* wincrypt.h:3677:19 */ type PFN_CERT_STORE_PROV_CLOSE = uintptr /* wincrypt.h:3713:16 */ type PFN_CERT_STORE_PROV_READ_CERT = uintptr /* wincrypt.h:3714:19 */ type PFN_CERT_STORE_PROV_WRITE_CERT = uintptr /* wincrypt.h:3715:19 */ type PFN_CERT_STORE_PROV_DELETE_CERT = uintptr /* wincrypt.h:3716:19 */ type PFN_CERT_STORE_PROV_SET_CERT_PROPERTY = uintptr /* wincrypt.h:3717:19 */ type PFN_CERT_STORE_PROV_READ_CRL = uintptr /* wincrypt.h:3718:19 */ type PFN_CERT_STORE_PROV_WRITE_CRL = uintptr /* wincrypt.h:3719:19 */ type PFN_CERT_STORE_PROV_DELETE_CRL = uintptr /* wincrypt.h:3720:19 */ type PFN_CERT_STORE_PROV_SET_CRL_PROPERTY = uintptr /* wincrypt.h:3721:19 */ type PFN_CERT_STORE_PROV_READ_CTL = uintptr /* wincrypt.h:3722:19 */ type PFN_CERT_STORE_PROV_WRITE_CTL = uintptr /* wincrypt.h:3723:19 */ type PFN_CERT_STORE_PROV_DELETE_CTL = uintptr /* wincrypt.h:3724:19 */ type PFN_CERT_STORE_PROV_SET_CTL_PROPERTY = uintptr /* wincrypt.h:3725:19 */ type PFN_CERT_STORE_PROV_CONTROL = uintptr /* wincrypt.h:3726:19 */ type _CERT_STORE_PROV_FIND_INFO = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD FdwFindFlags DWORD FdwFindType DWORD FpvFindPara uintptr } /* wincrypt.h:3728:11 */ type CERT_STORE_PROV_FIND_INFO = _CERT_STORE_PROV_FIND_INFO /* wincrypt.h:3734:5 */ type PCERT_STORE_PROV_FIND_INFO = uintptr /* wincrypt.h:3734:31 */ type CCERT_STORE_PROV_FIND_INFO = CERT_STORE_PROV_FIND_INFO /* wincrypt.h:3736:43 */ type PCCERT_STORE_PROV_FIND_INFO = uintptr /* wincrypt.h:3736:70 */ type PFN_CERT_STORE_PROV_FIND_CERT = uintptr /* wincrypt.h:3738:19 */ type PFN_CERT_STORE_PROV_FREE_FIND_CERT = uintptr /* wincrypt.h:3739:19 */ type PFN_CERT_STORE_PROV_GET_CERT_PROPERTY = uintptr /* wincrypt.h:3740:19 */ type PFN_CERT_STORE_PROV_FIND_CRL = uintptr /* wincrypt.h:3741:19 */ type PFN_CERT_STORE_PROV_FREE_FIND_CRL = uintptr /* wincrypt.h:3742:19 */ type PFN_CERT_STORE_PROV_GET_CRL_PROPERTY = uintptr /* wincrypt.h:3743:19 */ type PFN_CERT_STORE_PROV_FIND_CTL = uintptr /* wincrypt.h:3744:19 */ type PFN_CERT_STORE_PROV_FREE_FIND_CTL = uintptr /* wincrypt.h:3745:19 */ type PFN_CERT_STORE_PROV_GET_CTL_PROPERTY = uintptr /* wincrypt.h:3746:19 */ type _CRL_FIND_ISSUED_FOR_PARA = struct { FpSubjectCert PCCERT_CONTEXT FpIssuerCert PCCERT_CONTEXT } /* wincrypt.h:3848:11 */ type CRL_FIND_ISSUED_FOR_PARA = _CRL_FIND_ISSUED_FOR_PARA /* wincrypt.h:3851:5 */ type PCRL_FIND_ISSUED_FOR_PARA = uintptr /* wincrypt.h:3851:30 */ type _CTL_ANY_SUBJECT_INFO = struct { FSubjectAlgorithm CRYPT_ALGORITHM_IDENTIFIER FSubjectIdentifier CRYPT_DATA_BLOB } /* wincrypt.h:3853:11 */ type CTL_ANY_SUBJECT_INFO = _CTL_ANY_SUBJECT_INFO /* wincrypt.h:3856:5 */ type PCTL_ANY_SUBJECT_INFO = uintptr /* wincrypt.h:3856:26 */ type _CTL_FIND_USAGE_PARA = struct { FcbSize DWORD _ [4]byte FSubjectUsage CTL_USAGE FListIdentifier CRYPT_DATA_BLOB FpSigner PCERT_INFO } /* wincrypt.h:3968:11 */ type CTL_FIND_USAGE_PARA = _CTL_FIND_USAGE_PARA /* wincrypt.h:3973:5 */ type PCTL_FIND_USAGE_PARA = uintptr /* wincrypt.h:3973:25 */ type _CTL_FIND_SUBJECT_PARA = struct { FcbSize DWORD _ [4]byte FpUsagePara PCTL_FIND_USAGE_PARA FdwSubjectType DWORD _ [4]byte FpvSubject uintptr } /* wincrypt.h:3975:11 */ type CTL_FIND_SUBJECT_PARA = _CTL_FIND_SUBJECT_PARA /* wincrypt.h:3980:5 */ type PCTL_FIND_SUBJECT_PARA = uintptr /* wincrypt.h:3980:27 */ type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = uintptr /* wincrypt.h:3982:19 */ type _CERT_CREATE_CONTEXT_PARA = struct { FcbSize DWORD _ [4]byte FpfnFree PFN_CRYPT_FREE FpvFree uintptr FpfnSort PFN_CERT_CREATE_CONTEXT_SORT_FUNC FpvSort uintptr } /* wincrypt.h:3984:11 */ type CERT_CREATE_CONTEXT_PARA = _CERT_CREATE_CONTEXT_PARA /* wincrypt.h:3990:5 */ type PCERT_CREATE_CONTEXT_PARA = uintptr /* wincrypt.h:3990:30 */ type _CERT_SYSTEM_STORE_INFO = struct{ FcbSize DWORD } /* wincrypt.h:3992:11 */ type CERT_SYSTEM_STORE_INFO = _CERT_SYSTEM_STORE_INFO /* wincrypt.h:3994:5 */ type PCERT_SYSTEM_STORE_INFO = uintptr /* wincrypt.h:3994:28 */ type _CERT_PHYSICAL_STORE_INFO = struct { FcbSize DWORD _ [4]byte FpszOpenStoreProvider LPSTR FdwOpenEncodingType DWORD FdwOpenFlags DWORD FOpenParameters CRYPT_DATA_BLOB FdwFlags DWORD FdwPriority DWORD } /* wincrypt.h:3996:11 */ type CERT_PHYSICAL_STORE_INFO = _CERT_PHYSICAL_STORE_INFO /* wincrypt.h:4004:5 */ type PCERT_PHYSICAL_STORE_INFO = uintptr /* wincrypt.h:4004:30 */ type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = uintptr /* wincrypt.h:4024:19 */ type PFN_CERT_ENUM_SYSTEM_STORE = uintptr /* wincrypt.h:4025:19 */ type PFN_CERT_ENUM_PHYSICAL_STORE = uintptr /* wincrypt.h:4026:19 */ type _CTL_VERIFY_USAGE_PARA = struct { FcbSize DWORD _ [4]byte FListIdentifier CRYPT_DATA_BLOB FcCtlStore DWORD _ [4]byte FrghCtlStore uintptr FcSignerStore DWORD _ [4]byte FrghSignerStore uintptr } /* wincrypt.h:4071:11 */ type CTL_VERIFY_USAGE_PARA = _CTL_VERIFY_USAGE_PARA /* wincrypt.h:4078:5 */ type PCTL_VERIFY_USAGE_PARA = uintptr /* wincrypt.h:4078:27 */ type _CTL_VERIFY_USAGE_STATUS = struct { FcbSize DWORD FdwError DWORD FdwFlags DWORD _ [4]byte FppCtl uintptr FdwCtlEntryIndex DWORD _ [4]byte FppSigner uintptr FdwSignerIndex DWORD _ [4]byte } /* wincrypt.h:4080:11 */ type CTL_VERIFY_USAGE_STATUS = _CTL_VERIFY_USAGE_STATUS /* wincrypt.h:4088:5 */ type PCTL_VERIFY_USAGE_STATUS = uintptr /* wincrypt.h:4088:29 */ type _CERT_REVOCATION_CRL_INFO = struct { FcbSize DWORD _ [4]byte FpBaseCrlContext PCCRL_CONTEXT FpDeltaCrlContext PCCRL_CONTEXT FpCrlEntry PCRL_ENTRY FfDeltaCrlEntry WINBOOL _ [4]byte } /* wincrypt.h:4099:11 */ type CERT_REVOCATION_CRL_INFO = _CERT_REVOCATION_CRL_INFO /* wincrypt.h:4105:5 */ type PCERT_REVOCATION_CRL_INFO = uintptr /* wincrypt.h:4105:30 */ type _CERT_REVOCATION_CHAIN_PARA = struct { FcbSize DWORD _ [4]byte FhChainEngine HCERTCHAINENGINE FhAdditionalStore HCERTSTORE FdwChainFlags DWORD FdwUrlRetrievalTimeout DWORD FpftCurrentTime LPFILETIME FpftCacheResync LPFILETIME FcbMaxUrlRetrievalByteCount DWORD _ [4]byte } /* wincrypt.h:4107:11 */ type CERT_REVOCATION_CHAIN_PARA = _CERT_REVOCATION_CHAIN_PARA /* wincrypt.h:4107:46 */ type PCERT_REVOCATION_CHAIN_PARA = uintptr /* wincrypt.h:4107:73 */ type _CERT_REVOCATION_PARA = struct { FcbSize DWORD _ [4]byte FpIssuerCert PCCERT_CONTEXT FcCertStore DWORD _ [4]byte FrgCertStore uintptr FhCrlStore HCERTSTORE FpftTimeToUse LPFILETIME } /* wincrypt.h:4109:11 */ type CERT_REVOCATION_PARA = _CERT_REVOCATION_PARA /* wincrypt.h:4125:5 */ type PCERT_REVOCATION_PARA = uintptr /* wincrypt.h:4125:26 */ type _CERT_REVOCATION_STATUS = struct { FcbSize DWORD FdwIndex DWORD FdwError DWORD FdwReason DWORD FfHasFreshnessTime WINBOOL FdwFreshnessTime DWORD } /* wincrypt.h:4127:11 */ type CERT_REVOCATION_STATUS = _CERT_REVOCATION_STATUS /* wincrypt.h:4134:5 */ type PCERT_REVOCATION_STATUS = uintptr /* wincrypt.h:4134:28 */ type _CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = struct { FCertSignHashCNGAlgPropData CRYPT_DATA_BLOB FCertIssuerPubKeyBitLengthPropData CRYPT_DATA_BLOB } /* wincrypt.h:4171:11 */ type CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = _CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO /* wincrypt.h:4174:5 */ type PCRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = uintptr /* wincrypt.h:4174:52 */ type PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC = uintptr /* wincrypt.h:4176:19 */ type PFN_CRYPT_SIGN_AND_ENCODE_HASH_FUNC = uintptr /* wincrypt.h:4177:19 */ type PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC = uintptr /* wincrypt.h:4178:19 */ type HCRYPTDEFAULTCONTEXT = uintptr /* wincrypt.h:4180:16 */ type _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = struct { FcOID DWORD _ [4]byte FrgpszOID uintptr } /* wincrypt.h:4182:11 */ type CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA /* wincrypt.h:4185:5 */ type PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = uintptr /* wincrypt.h:4185:42 */ type PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC = uintptr /* wincrypt.h:4222:19 */ type PFN_IMPORT_PRIV_KEY_FUNC = uintptr /* wincrypt.h:4254:19 */ type PFN_EXPORT_PRIV_KEY_FUNC = uintptr /* wincrypt.h:4255:19 */ type PFN_CRYPT_GET_SIGNER_CERTIFICATE = uintptr /* wincrypt.h:4323:26 */ type _CRYPT_SIGN_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FpSigningCert PCCERT_CONTEXT FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr FcMsgCert DWORD _ [4]byte FrgpMsgCert uintptr FcMsgCrl DWORD _ [4]byte FrgpMsgCrl uintptr FcAuthAttr DWORD _ [4]byte FrgAuthAttr PCRYPT_ATTRIBUTE FcUnauthAttr DWORD _ [4]byte FrgUnauthAttr PCRYPT_ATTRIBUTE FdwFlags DWORD FdwInnerContentType DWORD } /* wincrypt.h:4325:11 */ type CRYPT_SIGN_MESSAGE_PARA = _CRYPT_SIGN_MESSAGE_PARA /* wincrypt.h:4345:5 */ type PCRYPT_SIGN_MESSAGE_PARA = uintptr /* wincrypt.h:4345:29 */ type _CRYPT_VERIFY_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY FpfnGetSignerCertificate PFN_CRYPT_GET_SIGNER_CERTIFICATE FpvGetArg uintptr } /* wincrypt.h:4352:11 */ type CRYPT_VERIFY_MESSAGE_PARA = _CRYPT_VERIFY_MESSAGE_PARA /* wincrypt.h:4361:5 */ type PCRYPT_VERIFY_MESSAGE_PARA = uintptr /* wincrypt.h:4361:31 */ type _CRYPT_ENCRYPT_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr FdwFlags DWORD FdwInnerContentType DWORD } /* wincrypt.h:4363:11 */ type CRYPT_ENCRYPT_MESSAGE_PARA = _CRYPT_ENCRYPT_MESSAGE_PARA /* wincrypt.h:4371:5 */ type PCRYPT_ENCRYPT_MESSAGE_PARA = uintptr /* wincrypt.h:4371:32 */ type _CRYPT_DECRYPT_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD FcCertStore DWORD _ [4]byte FrghCertStore uintptr } /* wincrypt.h:4375:11 */ type CRYPT_DECRYPT_MESSAGE_PARA = _CRYPT_DECRYPT_MESSAGE_PARA /* wincrypt.h:4383:5 */ type PCRYPT_DECRYPT_MESSAGE_PARA = uintptr /* wincrypt.h:4383:32 */ type _CRYPT_HASH_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr } /* wincrypt.h:4385:11 */ type CRYPT_HASH_MESSAGE_PARA = _CRYPT_HASH_MESSAGE_PARA /* wincrypt.h:4391:5 */ type PCRYPT_HASH_MESSAGE_PARA = uintptr /* wincrypt.h:4391:29 */ type _CRYPT_KEY_SIGN_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD _ [4]byte FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr FPubKeyAlgorithm CRYPT_ALGORITHM_IDENTIFIER } /* wincrypt.h:4393:11 */ type CRYPT_KEY_SIGN_MESSAGE_PARA = _CRYPT_KEY_SIGN_MESSAGE_PARA /* wincrypt.h:4404:5 */ type PCRYPT_KEY_SIGN_MESSAGE_PARA = uintptr /* wincrypt.h:4404:33 */ type _CRYPT_KEY_VERIFY_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY } /* wincrypt.h:4406:11 */ type CRYPT_KEY_VERIFY_MESSAGE_PARA = _CRYPT_KEY_VERIFY_MESSAGE_PARA /* wincrypt.h:4410:5 */ type PCRYPT_KEY_VERIFY_MESSAGE_PARA = uintptr /* wincrypt.h:4410:35 */ type _CERT_CHAIN = struct { FcCerts DWORD _ [4]byte Fcerts PCERT_BLOB FkeyLocatorInfo CRYPT_KEY_PROV_INFO } /* wincrypt.h:4412:11 */ type CERT_CHAIN = _CERT_CHAIN /* wincrypt.h:4416:5 */ type PCERT_CHAIN = uintptr /* wincrypt.h:4416:16 */ type HCRYPTASYNC = HANDLE /* wincrypt.h:4489:18 */ type PHCRYPTASYNC = uintptr /* wincrypt.h:4489:30 */ type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = uintptr /* wincrypt.h:4490:16 */ type _CRYPT_BLOB_ARRAY = struct { FcBlob DWORD _ [4]byte FrgBlob PCRYPT_DATA_BLOB } /* wincrypt.h:4500:11 */ type CRYPT_BLOB_ARRAY = _CRYPT_BLOB_ARRAY /* wincrypt.h:4503:5 */ type PCRYPT_BLOB_ARRAY = uintptr /* wincrypt.h:4503:22 */ type _CRYPT_CREDENTIALS = struct { FcbSize DWORD _ [4]byte FpszCredentialsOid LPCSTR FpvCredentials LPVOID } /* wincrypt.h:4505:11 */ type CRYPT_CREDENTIALS = _CRYPT_CREDENTIALS /* wincrypt.h:4509:5 */ type PCRYPT_CREDENTIALS = uintptr /* wincrypt.h:4509:23 */ type _CRYPT_PASSWORD_CREDENTIALSA = struct { FcbSize DWORD _ [4]byte FpszUsername LPSTR FpszPassword LPSTR } /* wincrypt.h:4516:11 */ type CRYPT_PASSWORD_CREDENTIALSA = _CRYPT_PASSWORD_CREDENTIALSA /* wincrypt.h:4520:5 */ type PCRYPT_PASSWORD_CREDENTIALSA = uintptr /* wincrypt.h:4520:33 */ type _CRYPT_PASSWORD_CREDENTIALSW = struct { FcbSize DWORD _ [4]byte FpszUsername LPWSTR FpszPassword LPWSTR } /* wincrypt.h:4522:11 */ type CRYPT_PASSWORD_CREDENTIALSW = _CRYPT_PASSWORD_CREDENTIALSW /* wincrypt.h:4526:5 */ type PCRYPT_PASSWORD_CREDENTIALSW = uintptr /* wincrypt.h:4526:33 */ type CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSA /* wincrypt.h:4528:55 */ type PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSA /* wincrypt.h:4529:56 */ type PFN_FREE_ENCODED_OBJECT_FUNC = uintptr /* wincrypt.h:4535:16 */ type _CRYPTNET_URL_CACHE_PRE_FETCH_INFO = struct { FcbSize DWORD FdwObjectType DWORD FdwError DWORD FdwReserved DWORD FThisUpdateTime FILETIME FNextUpdateTime FILETIME FPublishTime FILETIME } /* wincrypt.h:4572:11 */ type CRYPTNET_URL_CACHE_PRE_FETCH_INFO = _CRYPTNET_URL_CACHE_PRE_FETCH_INFO /* wincrypt.h:4580:5 */ type PCRYPTNET_URL_CACHE_PRE_FETCH_INFO = uintptr /* wincrypt.h:4580:39 */ type _CRYPTNET_URL_CACHE_FLUSH_INFO = struct { FcbSize DWORD FdwExemptSeconds DWORD FExpireTime FILETIME } /* wincrypt.h:4589:11 */ type CRYPTNET_URL_CACHE_FLUSH_INFO = _CRYPTNET_URL_CACHE_FLUSH_INFO /* wincrypt.h:4593:5 */ type PCRYPTNET_URL_CACHE_FLUSH_INFO = uintptr /* wincrypt.h:4593:35 */ type _CRYPTNET_URL_CACHE_RESPONSE_INFO = struct { FcbSize DWORD FwResponseType WORD FwResponseFlags WORD FLastModifiedTime FILETIME FdwMaxAge DWORD _ [4]byte FpwszETag LPCWSTR FdwProxyId DWORD _ [4]byte } /* wincrypt.h:4598:11 */ type CRYPTNET_URL_CACHE_RESPONSE_INFO = _CRYPTNET_URL_CACHE_RESPONSE_INFO /* wincrypt.h:4606:5 */ type PCRYPTNET_URL_CACHE_RESPONSE_INFO = uintptr /* wincrypt.h:4606:38 */ type _CRYPT_RETRIEVE_AUX_INFO = struct { FcbSize DWORD _ [4]byte FpLastSyncTime uintptr FdwMaxUrlRetrievalByteCount DWORD _ [4]byte FpPreFetchInfo PCRYPTNET_URL_CACHE_PRE_FETCH_INFO FpFlushInfo PCRYPTNET_URL_CACHE_FLUSH_INFO FppResponseInfo uintptr FpwszCacheFileNamePrefix LPWSTR FpftCacheResync LPFILETIME FfProxyCacheRetrieval WINBOOL FdwHttpStatusCode DWORD } /* wincrypt.h:4613:11 */ type CRYPT_RETRIEVE_AUX_INFO = _CRYPT_RETRIEVE_AUX_INFO /* wincrypt.h:4624:5 */ type PCRYPT_RETRIEVE_AUX_INFO = uintptr /* wincrypt.h:4624:29 */ type PFN_CRYPT_CANCEL_RETRIEVAL = uintptr /* wincrypt.h:4631:19 */ type PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC = uintptr /* wincrypt.h:4639:16 */ type _CRYPT_ASYNC_RETRIEVAL_COMPLETION = struct { FpfnCompletion PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC FpvCompletion LPVOID } /* wincrypt.h:4641:11 */ type CRYPT_ASYNC_RETRIEVAL_COMPLETION = _CRYPT_ASYNC_RETRIEVAL_COMPLETION /* wincrypt.h:4644:5 */ type PCRYPT_ASYNC_RETRIEVAL_COMPLETION = uintptr /* wincrypt.h:4644:38 */ type PFN_CANCEL_ASYNC_RETRIEVAL_FUNC = uintptr /* wincrypt.h:4648:19 */ type _CRYPT_URL_ARRAY = struct { FcUrl DWORD _ [4]byte FrgwszUrl uintptr } /* wincrypt.h:4655:11 */ type CRYPT_URL_ARRAY = _CRYPT_URL_ARRAY /* wincrypt.h:4658:5 */ type PCRYPT_URL_ARRAY = uintptr /* wincrypt.h:4658:21 */ type _CRYPT_URL_INFO = struct { FcbSize DWORD FdwSyncDeltaTime DWORD FcGroup DWORD _ [4]byte FrgcGroupEntry uintptr } /* wincrypt.h:4660:11 */ type CRYPT_URL_INFO = _CRYPT_URL_INFO /* wincrypt.h:4665:5 */ type PCRYPT_URL_INFO = uintptr /* wincrypt.h:4665:20 */ type _CERT_CRL_CONTEXT_PAIR = struct { FpCertContext PCCERT_CONTEXT FpCrlContext PCCRL_CONTEXT } /* wincrypt.h:4685:11 */ type CERT_CRL_CONTEXT_PAIR = _CERT_CRL_CONTEXT_PAIR /* wincrypt.h:4688:5 */ type PCERT_CRL_CONTEXT_PAIR = uintptr /* wincrypt.h:4688:27 */ type PCCERT_CRL_CONTEXT_PAIR = uintptr /* wincrypt.h:4690:39 */ type _CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = struct { FcbSize DWORD FiDeltaCrlIndicator int32 FpftCacheResync LPFILETIME FpLastSyncTime LPFILETIME FpMaxAgeTime LPFILETIME FpChainPara PCERT_REVOCATION_CHAIN_PARA FpDeltaCrlIndicator PCRYPT_INTEGER_BLOB } /* wincrypt.h:4692:11 */ type CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = _CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO /* wincrypt.h:4700:5 */ type PCRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = uintptr /* wincrypt.h:4700:45 */ type PFN_CRYPT_ENUM_KEYID_PROP = uintptr /* wincrypt.h:4702:19 */ type HCERTCHAINENGINE = HANDLE /* wincrypt.h:4838:18 */ type _CERT_CHAIN_ENGINE_CONFIG = struct { FcbSize DWORD _ [4]byte FhRestrictedRoot HCERTSTORE FhRestrictedTrust HCERTSTORE FhRestrictedOther HCERTSTORE FcAdditionalStore DWORD _ [4]byte FrghAdditionalStore uintptr FdwFlags DWORD FdwUrlRetrievalTimeout DWORD FMaximumCachedCertificates DWORD FCycleDetectionModulus DWORD } /* wincrypt.h:4840:11 */ type CERT_CHAIN_ENGINE_CONFIG = _CERT_CHAIN_ENGINE_CONFIG /* wincrypt.h:4858:5 */ type PCERT_CHAIN_ENGINE_CONFIG = uintptr /* wincrypt.h:4858:30 */ type _CERT_TRUST_STATUS = struct { FdwErrorStatus DWORD FdwInfoStatus DWORD } /* wincrypt.h:4868:11 */ type CERT_TRUST_STATUS = _CERT_TRUST_STATUS /* wincrypt.h:4871:5 */ type PCERT_TRUST_STATUS = uintptr /* wincrypt.h:4871:23 */ type _CERT_REVOCATION_INFO = struct { FcbSize DWORD FdwRevocationResult DWORD FpszRevocationOid LPCSTR FpvOidSpecificInfo LPVOID FfHasFreshnessTime WINBOOL FdwFreshnessTime DWORD FpCrlInfo PCERT_REVOCATION_CRL_INFO } /* wincrypt.h:4918:11 */ type CERT_REVOCATION_INFO = _CERT_REVOCATION_INFO /* wincrypt.h:4926:5 */ type PCERT_REVOCATION_INFO = uintptr /* wincrypt.h:4926:26 */ type _CERT_TRUST_LIST_INFO = struct { FcbSize DWORD _ [4]byte FpCtlEntry PCTL_ENTRY FpCtlContext PCCTL_CONTEXT } /* wincrypt.h:4928:11 */ type CERT_TRUST_LIST_INFO = _CERT_TRUST_LIST_INFO /* wincrypt.h:4932:5 */ type PCERT_TRUST_LIST_INFO = uintptr /* wincrypt.h:4932:26 */ type _CERT_CHAIN_ELEMENT = struct { FcbSize DWORD _ [4]byte FpCertContext PCCERT_CONTEXT FTrustStatus CERT_TRUST_STATUS FpRevocationInfo PCERT_REVOCATION_INFO FpIssuanceUsage PCERT_ENHKEY_USAGE FpApplicationUsage PCERT_ENHKEY_USAGE FpwszExtendedErrorInfo LPCWSTR } /* wincrypt.h:4934:11 */ type CERT_CHAIN_ELEMENT = _CERT_CHAIN_ELEMENT /* wincrypt.h:4942:5 */ type PCERT_CHAIN_ELEMENT = uintptr /* wincrypt.h:4942:24 */ type PCCERT_CHAIN_ELEMENT = uintptr /* wincrypt.h:4944:36 */ type _CERT_SIMPLE_CHAIN = struct { FcbSize DWORD FTrustStatus CERT_TRUST_STATUS FcElement DWORD FrgpElement uintptr FpTrustListInfo PCERT_TRUST_LIST_INFO FfHasRevocationFreshnessTime WINBOOL FdwRevocationFreshnessTime DWORD } /* wincrypt.h:4946:11 */ type CERT_SIMPLE_CHAIN = _CERT_SIMPLE_CHAIN /* wincrypt.h:4954:5 */ type PCERT_SIMPLE_CHAIN = uintptr /* wincrypt.h:4954:23 */ type PCCERT_SIMPLE_CHAIN = uintptr /* wincrypt.h:4956:35 */ type _CERT_CHAIN_CONTEXT = struct { FcbSize DWORD FTrustStatus CERT_TRUST_STATUS FcChain DWORD FrgpChain uintptr FcLowerQualityChainContext DWORD _ [4]byte FrgpLowerQualityChainContext uintptr FfHasRevocationFreshnessTime WINBOOL FdwRevocationFreshnessTime DWORD FdwCreateFlags DWORD FChainId GUID _ [4]byte } /* wincrypt.h:4958:11 */ type CERT_CHAIN_CONTEXT = _CERT_CHAIN_CONTEXT /* wincrypt.h:4958:38 */ type PCERT_CHAIN_CONTEXT = uintptr /* wincrypt.h:4958:57 */ type PCCERT_CHAIN_CONTEXT = uintptr /* wincrypt.h:4959:36 */ type _CERT_USAGE_MATCH = struct { FdwType DWORD _ [4]byte FUsage CERT_ENHKEY_USAGE } /* wincrypt.h:4977:11 */ type CERT_USAGE_MATCH = _CERT_USAGE_MATCH /* wincrypt.h:4980:5 */ type PCERT_USAGE_MATCH = uintptr /* wincrypt.h:4980:22 */ type _CTL_USAGE_MATCH = struct { FdwType DWORD _ [4]byte FUsage CTL_USAGE } /* wincrypt.h:4982:11 */ type CTL_USAGE_MATCH = _CTL_USAGE_MATCH /* wincrypt.h:4985:5 */ type PCTL_USAGE_MATCH = uintptr /* wincrypt.h:4985:21 */ type _CERT_CHAIN_PARA = struct { FcbSize DWORD _ [4]byte FRequestedUsage CERT_USAGE_MATCH } /* wincrypt.h:4987:11 */ type CERT_CHAIN_PARA = _CERT_CHAIN_PARA /* wincrypt.h:4999:5 */ type PCERT_CHAIN_PARA = uintptr /* wincrypt.h:4999:21 */ type _CRL_REVOCATION_INFO = struct { FpCrlEntry PCRL_ENTRY FpCrlContext PCCRL_CONTEXT FpCrlIssuerChain PCCERT_CHAIN_CONTEXT } /* wincrypt.h:5033:11 */ type CRL_REVOCATION_INFO = _CRL_REVOCATION_INFO /* wincrypt.h:5037:5 */ type PCRL_REVOCATION_INFO = uintptr /* wincrypt.h:5037:25 */ type PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK = uintptr /* wincrypt.h:5043:19 */ type _CERT_CHAIN_FIND_BY_ISSUER_PARA = struct { FcbSize DWORD _ [4]byte FpszUsageIdentifier LPCSTR FdwKeySpec DWORD FdwAcquirePrivateKeyFlags DWORD FcIssuer DWORD _ [4]byte FrgIssuer uintptr FpfnFindCallback PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK FpvFindArg uintptr } /* wincrypt.h:5045:11 */ type CERT_CHAIN_FIND_ISSUER_PARA = _CERT_CHAIN_FIND_BY_ISSUER_PARA /* wincrypt.h:5058:5 */ type PCERT_CHAIN_FIND_ISSUER_PARA = uintptr /* wincrypt.h:5058:33 */ type CERT_CHAIN_FIND_BY_ISSUER_PARA = _CERT_CHAIN_FIND_BY_ISSUER_PARA /* wincrypt.h:5058:63 */ type PCERT_CHAIN_FIND_BY_ISSUER_PARA = uintptr /* wincrypt.h:5058:94 */ type _CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwFlags DWORD FpvExtraPolicyPara uintptr } /* wincrypt.h:5067:11 */ type CERT_CHAIN_POLICY_PARA = _CERT_CHAIN_POLICY_PARA /* wincrypt.h:5071:5 */ type PCERT_CHAIN_POLICY_PARA = uintptr /* wincrypt.h:5071:28 */ type _CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FdwError DWORD FlChainIndex LONG FlElementIndex LONG FpvExtraPolicyStatus uintptr } /* wincrypt.h:5073:11 */ type CERT_CHAIN_POLICY_STATUS = _CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5079:5 */ type PCERT_CHAIN_POLICY_STATUS = uintptr /* wincrypt.h:5079:30 */ type _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwRegPolicySettings DWORD FpSignerInfo PCMSG_SIGNER_INFO } /* wincrypt.h:5118:11 */ type AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5122:5 */ type PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* wincrypt.h:5122:48 */ type _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FfCommercial WINBOOL } /* wincrypt.h:5124:11 */ type AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5127:5 */ type PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr /* wincrypt.h:5127:50 */ type _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwRegPolicySettings DWORD FfCommercial WINBOOL } /* wincrypt.h:5129:11 */ type AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5133:5 */ type PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* wincrypt.h:5133:50 */ type _HTTPSPolicyCallbackData = struct { F__0 struct{ FcbStruct DWORD } FdwAuthType DWORD FfdwChecks DWORD _ [4]byte FpwszServerName uintptr } /* wincrypt.h:5138:11 */ type HTTPSPolicyCallbackData = _HTTPSPolicyCallbackData /* wincrypt.h:5146:5 */ type PHTTPSPolicyCallbackData = uintptr /* wincrypt.h:5146:29 */ type SSL_EXTRA_CERT_CHAIN_POLICY_PARA = _HTTPSPolicyCallbackData /* wincrypt.h:5146:55 */ type PSSL_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* wincrypt.h:5146:88 */ type _EV_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwRootProgramQualifierFlags DWORD } /* wincrypt.h:5153:11 */ type EV_EXTRA_CERT_CHAIN_POLICY_PARA = _EV_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5156:5 */ type PEV_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* wincrypt.h:5156:37 */ type _EV_EXTRA_CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FdwQualifiers DWORD FdwIssuanceUsageIndex DWORD } /* wincrypt.h:5158:11 */ type EV_EXTRA_CERT_CHAIN_POLICY_STATUS = _EV_EXTRA_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5162:5 */ type PEV_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr /* wincrypt.h:5162:39 */ type _CRYPT_PKCS12_PBE_PARAMS = struct { FiIterations int32 FcbSalt ULONG } /* wincrypt.h:5199:11 */ type CRYPT_PKCS12_PBE_PARAMS = _CRYPT_PKCS12_PBE_PARAMS /* wincrypt.h:5202:5 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _CRYPTPROTECT_PROMPTSTRUCT = struct { FcbSize DWORD FdwPromptFlags DWORD FhwndApp HWND FszPrompt LPCWSTR } /* dpapi.h:65:11 */ // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type CRYPTPROTECT_PROMPTSTRUCT = _CRYPTPROTECT_PROMPTSTRUCT /* dpapi.h:70:5 */ type PCRYPTPROTECT_PROMPTSTRUCT = uintptr /* dpapi.h:70:31 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _CERTIFICATE_BLOB = struct { FdwCertEncodingType DWORD FcbData DWORD FpbData PBYTE } /* winefs.h:18:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type EFS_CERTIFICATE_BLOB = _CERTIFICATE_BLOB /* winefs.h:22:5 */ type PEFS_CERTIFICATE_BLOB = uintptr /* winefs.h:22:26 */ type _EFS_HASH_BLOB = struct { FcbData DWORD _ [4]byte FpbData PBYTE } /* winefs.h:24:11 */ type EFS_HASH_BLOB = _EFS_HASH_BLOB /* winefs.h:27:5 */ type PEFS_HASH_BLOB = uintptr /* winefs.h:27:19 */ type _EFS_RPC_BLOB = struct { FcbData DWORD _ [4]byte FpbData PBYTE } /* winefs.h:29:11 */ type EFS_RPC_BLOB = _EFS_RPC_BLOB /* winefs.h:32:5 */ type PEFS_RPC_BLOB = uintptr /* winefs.h:32:18 */ type _EFS_KEY_INFO = struct { FdwVersion DWORD FEntropy ULONG FAlgorithm ALG_ID FKeyLength ULONG } /* winefs.h:34:11 */ type EFS_KEY_INFO = _EFS_KEY_INFO /* winefs.h:39:5 */ type PEFS_KEY_INFO = uintptr /* winefs.h:39:18 */ type _ENCRYPTION_CERTIFICATE = struct { FcbTotalLength DWORD _ [4]byte FpUserSid uintptr FpCertBlob PEFS_CERTIFICATE_BLOB } /* winefs.h:41:11 */ type ENCRYPTION_CERTIFICATE = _ENCRYPTION_CERTIFICATE /* winefs.h:45:5 */ type PENCRYPTION_CERTIFICATE = uintptr /* winefs.h:45:28 */ type _ENCRYPTION_CERTIFICATE_HASH = struct { FcbTotalLength DWORD _ [4]byte FpUserSid uintptr FpHash PEFS_HASH_BLOB FlpDisplayInformation LPWSTR } /* winefs.h:49:11 */ type ENCRYPTION_CERTIFICATE_HASH = _ENCRYPTION_CERTIFICATE_HASH /* winefs.h:54:5 */ type PENCRYPTION_CERTIFICATE_HASH = uintptr /* winefs.h:54:33 */ type _ENCRYPTION_CERTIFICATE_HASH_LIST = struct { FnCert_Hash DWORD _ [4]byte FpUsers uintptr } /* winefs.h:56:11 */ type ENCRYPTION_CERTIFICATE_HASH_LIST = _ENCRYPTION_CERTIFICATE_HASH_LIST /* winefs.h:59:5 */ type PENCRYPTION_CERTIFICATE_HASH_LIST = uintptr /* winefs.h:59:38 */ type _ENCRYPTION_CERTIFICATE_LIST = struct { FnUsers DWORD _ [4]byte FpUsers uintptr } /* winefs.h:61:11 */ type ENCRYPTION_CERTIFICATE_LIST = _ENCRYPTION_CERTIFICATE_LIST /* winefs.h:64:5 */ type PENCRYPTION_CERTIFICATE_LIST = uintptr /* winefs.h:64:33 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. //** Autogenerated by WIDL 1.6 from include/wtypes.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type RPC_IMPORT_CONTEXT_P = struct { FLookupContext RPC_NS_HANDLE FProposedHandle RPC_BINDING_HANDLE FBindings uintptr } /* rpcnsip.h:17:5 */ type PRPC_IMPORT_CONTEXT_P = uintptr /* rpcnsip.h:17:26 */ // Copyright (C) 2011 Francois Gouget // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA type byte = uint8 /* rpcndr.h:63:25 */ type cs_byte = byte /* rpcndr.h:64:16 */ type boolean = uint8 /* rpcndr.h:65:25 */ type NDR_CCONTEXT = uintptr /* rpcndr.h:128:16 */ type _NDR_SCONTEXT = struct { Fpad [2]uintptr FuserContext uintptr } /* rpcndr.h:130:11 */ type NDR_SCONTEXT = uintptr /* rpcndr.h:133:5 */ type NDR_RUNDOWN = uintptr /* rpcndr.h:139:16 */ type NDR_NOTIFY_ROUTINE = uintptr /* rpcndr.h:140:16 */ type NDR_NOTIFY2_ROUTINE = uintptr /* rpcndr.h:141:16 */ type _SCONTEXT_QUEUE = struct { FNumberOfObjects uint32 _ [4]byte FArrayOfObjects uintptr } /* rpcndr.h:143:11 */ type SCONTEXT_QUEUE = _SCONTEXT_QUEUE /* rpcndr.h:146:5 */ type PSCONTEXT_QUEUE = uintptr /* rpcndr.h:146:20 */ type error_status_t = uint32 /* rpcndr.h:173:27 */ type _MIDL_STUB_MESSAGE = struct { FRpcMsg PRPC_MESSAGE FBuffer uintptr FBufferStart uintptr FBufferEnd uintptr FBufferMark uintptr FBufferLength uint32 FMemorySize uint32 FMemory uintptr FIsClient uint8 FPad uint8 FuFlags2 uint16 FReuseBuffer int32 FpAllocAllNodesContext uintptr FpPointerQueueState uintptr FIgnoreEmbeddedPointers int32 _ [4]byte FPointerBufferMark uintptr FfBufferValid uint8 FuFlags uint8 FUniquePtrCount uint16 _ [4]byte FMaxCount ULONG_PTR FOffset uint32 FActualCount uint32 FpfnAllocate uintptr FpfnFree uintptr FStackTop uintptr FpPresentedType uintptr FpTransmitType uintptr FSavedHandle handle_t FStubDesc uintptr FFullPtrXlatTables uintptr FFullPtrRefId uint32 FPointerLength uint32 FfInDontFree uint32 /* int fInDontFree: 1, int fDontCallFreeInst: 1, int fInOnlyParam: 1, int fHasReturn: 1, int fHasExtensions: 1, int fHasNewCorrDesc: 1, int fIsOicfServer: 1, int fHasMemoryValidateCallback: 1, int fUnused: 8, int fUnused2: 16 */ _ [4]byte FdwDestContext uint32 _ [4]byte FpvDestContext uintptr FSavedContextHandles uintptr FParamNumber int32 _ [4]byte FpRpcChannelBuffer uintptr FpArrayInfo PARRAY_INFO FSizePtrCountArray uintptr FSizePtrOffsetArray uintptr FSizePtrLengthArray uintptr FpArgQueue uintptr FdwStubPhase uint32 _ [4]byte FLowStackMark uintptr FpAsyncMsg PNDR_ASYNC_MESSAGE FpCorrInfo PNDR_CORRELATION_INFO FpCorrMemory uintptr FpMemoryList uintptr FpCSInfo uintptr FConformanceMark uintptr FVarianceMark uintptr FUnused INT_PTR FpContext uintptr FpUserMarshalList uintptr FReserved51_2 INT_PTR FReserved51_3 INT_PTR FReserved51_4 INT_PTR FReserved51_5 INT_PTR } /* rpcndr.h:211:3 */ type _MIDL_STUB_DESC = struct { FRpcInterfaceInformation uintptr FpfnAllocate uintptr FpfnFree uintptr FIMPLICIT_HANDLE_INFO struct{ FpAutoHandle uintptr } FapfnNdrRundownRoutines uintptr FaGenericBindingRoutinePairs uintptr FapfnExprEval uintptr FaXmitQuintuple uintptr FpFormatTypes uintptr FfCheckBounds int32 FVersion uint32 FpMallocFreeStruct uintptr FMIDLVersion int32 _ [4]byte FCommFaultOffsets uintptr FaUserMarshalQuadruple uintptr FNotifyRoutineTable uintptr FmFlags ULONG_PTR FCsRoutineTables uintptr FReserved4 uintptr FReserved5 ULONG_PTR } /* rpcndr.h:211:3 */ type _FULL_PTR_XLAT_TABLES = struct { FRefIdToPointer struct { FXlatTable uintptr FStateTable uintptr FNumberOfEntries uint32 _ [4]byte } FPointerToRefId struct { FXlatTable uintptr FNumberOfBuckets uint32 FHashMask uint32 } FNextRefId uint32 FXlatSide XLAT_SIDE } /* rpcndr.h:211:3 */ type RPC_BUFPTR = uintptr /* rpcndr.h:215:25 */ type RPC_LENGTH = uint32 /* rpcndr.h:216:29 */ type EXPR_EVAL = uintptr /* rpcndr.h:217:16 */ type PFORMAT_STRING = uintptr /* rpcndr.h:218:31 */ type ARRAY_INFO = struct { FDimension int32 _ [4]byte FBufferConformanceMark uintptr FBufferVarianceMark uintptr FMaxCountArray uintptr FOffsetArray uintptr FActualCountArray uintptr } /* rpcndr.h:227:5 */ type PARRAY_INFO = uintptr /* rpcndr.h:227:16 */ type PNDR_ASYNC_MESSAGE = uintptr /* rpcndr.h:229:37 */ type PNDR_CORRELATION_INFO = uintptr /* rpcndr.h:230:40 */ type CS_STUB_INFO = struct { FWireCodeset uint32 FDesiredReceivingCodeset uint32 FCSArrayInfo uintptr } /* rpcndr.h:236:5 */ type _MIDL_SYNTAX_INFO = struct { FTransferSyntax RPC_SYNTAX_IDENTIFIER _ [4]byte FDispatchTable uintptr FProcString PFORMAT_STRING FFmtStringOffset uintptr FTypeString PFORMAT_STRING FaUserMarshalQuadruple uintptr FpReserved1 ULONG_PTR FpReserved2 ULONG_PTR } /* rpcndr.h:238:3 */ type MIDL_SYNTAX_INFO = _MIDL_SYNTAX_INFO /* rpcndr.h:239:36 */ type PMIDL_SYNTAX_INFO = uintptr /* rpcndr.h:239:53 */ type IRpcChannelBuffer1 = struct{ FlpVtbl uintptr } /* rpcndr.h:211:3 */ type MIDL_STUB_MESSAGE = _MIDL_STUB_MESSAGE /* rpcndr.h:318:5 */ type PMIDL_STUB_MESSAGE = uintptr /* rpcndr.h:318:23 */ type GENERIC_BINDING_ROUTINE = uintptr /* rpcndr.h:320:16 */ type GENERIC_UNBIND_ROUTINE = uintptr /* rpcndr.h:321:16 */ type _GENERIC_BINDING_ROUTINE_PAIR = struct { FpfnBind GENERIC_BINDING_ROUTINE FpfnUnbind GENERIC_UNBIND_ROUTINE } /* rpcndr.h:211:3 */ type GENERIC_BINDING_ROUTINE_PAIR = _GENERIC_BINDING_ROUTINE_PAIR /* rpcndr.h:326:5 */ type PGENERIC_BINDING_ROUTINE_PAIR = uintptr /* rpcndr.h:326:34 */ type __GENERIC_BINDING_INFO = struct { FpObj uintptr FSize uint32 _ [4]byte FpfnBind GENERIC_BINDING_ROUTINE FpfnUnbind GENERIC_UNBIND_ROUTINE } /* rpcndr.h:328:11 */ type GENERIC_BINDING_INFO = __GENERIC_BINDING_INFO /* rpcndr.h:333:5 */ type PGENERIC_BINDING_INFO = uintptr /* rpcndr.h:333:26 */ type XMIT_HELPER_ROUTINE = uintptr /* rpcndr.h:337:16 */ type _XMIT_ROUTINE_QUINTUPLE = struct { FpfnTranslateToXmit XMIT_HELPER_ROUTINE FpfnTranslateFromXmit XMIT_HELPER_ROUTINE FpfnFreeXmit XMIT_HELPER_ROUTINE FpfnFreeInst XMIT_HELPER_ROUTINE } /* rpcndr.h:211:3 */ type XMIT_ROUTINE_QUINTUPLE = _XMIT_ROUTINE_QUINTUPLE /* rpcndr.h:344:5 */ type PXMIT_ROUTINE_QUINTUPLE = uintptr /* rpcndr.h:344:28 */ type USER_MARSHAL_SIZING_ROUTINE = uintptr /* rpcndr.h:346:17 */ type USER_MARSHAL_MARSHALLING_ROUTINE = uintptr /* rpcndr.h:347:25 */ type USER_MARSHAL_UNMARSHALLING_ROUTINE = uintptr /* rpcndr.h:348:25 */ type USER_MARSHAL_FREEING_ROUTINE = uintptr /* rpcndr.h:349:16 */ type _USER_MARSHAL_ROUTINE_QUADRUPLE = struct { FpfnBufferSize USER_MARSHAL_SIZING_ROUTINE FpfnMarshall USER_MARSHAL_MARSHALLING_ROUTINE FpfnUnmarshall USER_MARSHAL_UNMARSHALLING_ROUTINE FpfnFree USER_MARSHAL_FREEING_ROUTINE } /* rpcndr.h:211:3 */ type USER_MARSHAL_ROUTINE_QUADRUPLE = _USER_MARSHAL_ROUTINE_QUADRUPLE /* rpcndr.h:356:5 */ type USER_MARSHAL_CB_TYPE = uint32 /* rpcndr.h:362:5 */ type _USER_MARSHAL_CB = struct { FFlags uint32 _ [4]byte FpStubMsg PMIDL_STUB_MESSAGE FpReserve PFORMAT_STRING FSignature uint32 FCBType USER_MARSHAL_CB_TYPE FpFormat PFORMAT_STRING FpTypeFormat PFORMAT_STRING } /* rpcndr.h:364:11 */ type USER_MARSHAL_CB = _USER_MARSHAL_CB /* rpcndr.h:372:5 */ type _MALLOC_FREE_STRUCT = struct { FpfnAllocate uintptr FpfnFree uintptr } /* rpcndr.h:211:3 */ type MALLOC_FREE_STRUCT = _MALLOC_FREE_STRUCT /* rpcndr.h:384:5 */ type _COMM_FAULT_OFFSETS = struct { FCommOffset int16 FFaultOffset int16 } /* rpcndr.h:211:3 */ type COMM_FAULT_OFFSETS = _COMM_FAULT_OFFSETS /* rpcndr.h:389:5 */ type IDL_CS_CONVERT = uint32 /* rpcndr.h:393:5 */ type CS_TYPE_NET_SIZE_ROUTINE = uintptr /* rpcndr.h:395:16 */ type CS_TYPE_LOCAL_SIZE_ROUTINE = uintptr /* rpcndr.h:396:16 */ type CS_TYPE_TO_NETCS_ROUTINE = uintptr /* rpcndr.h:397:16 */ type CS_TYPE_FROM_NETCS_ROUTINE = uintptr /* rpcndr.h:398:16 */ type CS_TAG_GETTING_ROUTINE = uintptr /* rpcndr.h:399:16 */ type _NDR_CS_SIZE_CONVERT_ROUTINES = struct { FpfnNetSize CS_TYPE_NET_SIZE_ROUTINE FpfnToNetCs CS_TYPE_TO_NETCS_ROUTINE FpfnLocalSize CS_TYPE_LOCAL_SIZE_ROUTINE FpfnFromNetCs CS_TYPE_FROM_NETCS_ROUTINE } /* rpcndr.h:211:3 */ type NDR_CS_SIZE_CONVERT_ROUTINES = _NDR_CS_SIZE_CONVERT_ROUTINES /* rpcndr.h:408:5 */ type _NDR_CS_ROUTINES = struct { FpSizeConvertRoutines uintptr FpTagGettingRoutines uintptr } /* rpcndr.h:211:3 */ type NDR_CS_ROUTINES = _NDR_CS_ROUTINES /* rpcndr.h:413:5 */ type MIDL_STUB_DESC = _MIDL_STUB_DESC /* rpcndr.h:440:5 */ type PMIDL_STUB_DESC = uintptr /* rpcndr.h:442:32 */ type PMIDL_XMIT_TYPE = uintptr /* rpcndr.h:443:16 */ type _MIDL_FORMAT_STRING = struct { _ [0]uint16 FPad int16 } /* rpcndr.h:445:11 */ type MIDL_FORMAT_STRING = _MIDL_FORMAT_STRING /* rpcndr.h:448:5 */ type STUB_THUNK = uintptr /* rpcndr.h:450:16 */ type SERVER_ROUTINE = uintptr /* rpcndr.h:451:20 */ type _MIDL_SERVER_INFO_ = struct { FpStubDesc PMIDL_STUB_DESC FDispatchTable uintptr FProcString PFORMAT_STRING FFmtStringOffset uintptr FThunkTable uintptr FpTransferSyntax PRPC_SYNTAX_IDENTIFIER FnCount ULONG_PTR FpSyntaxInfo PMIDL_SYNTAX_INFO } /* rpcndr.h:453:11 */ type MIDL_SERVER_INFO = _MIDL_SERVER_INFO_ /* rpcndr.h:462:5 */ type PMIDL_SERVER_INFO = uintptr /* rpcndr.h:462:22 */ type _MIDL_STUBLESS_PROXY_INFO = struct { FpStubDesc PMIDL_STUB_DESC FProcFormatString PFORMAT_STRING FFormatStringOffset uintptr FpTransferSyntax PRPC_SYNTAX_IDENTIFIER FnCount ULONG_PTR FpSyntaxInfo PMIDL_SYNTAX_INFO } /* rpcndr.h:466:11 */ type MIDL_STUBLESS_PROXY_INFO = _MIDL_STUBLESS_PROXY_INFO /* rpcndr.h:473:5 */ type PMIDL_STUBLESS_PROXY_INFO = uintptr /* rpcndr.h:475:36 */ type PARAM_OFFSETTABLE = uintptr /* rpcndr.h:488:26 */ type PPARAM_OFFSETTABLE = uintptr /* rpcndr.h:488:45 */ type _CLIENT_CALL_RETURN = struct{ FPointer uintptr } /* rpcndr.h:490:11 */ type CLIENT_CALL_RETURN = _CLIENT_CALL_RETURN /* rpcndr.h:493:5 */ type XLAT_SIDE = uint32 /* rpcndr.h:497:5 */ type _FULL_PTR_TO_REFID_ELEMENT = struct { FNext uintptr FPointer uintptr FRefId uint32 FState uint8 _ [3]byte } /* rpcndr.h:499:11 */ type FULL_PTR_TO_REFID_ELEMENT = _FULL_PTR_TO_REFID_ELEMENT /* rpcndr.h:504:5 */ type PFULL_PTR_TO_REFID_ELEMENT = uintptr /* rpcndr.h:504:31 */ type FULL_PTR_XLAT_TABLES = _FULL_PTR_XLAT_TABLES /* rpcndr.h:520:5 */ type PFULL_PTR_XLAT_TABLES = uintptr /* rpcndr.h:520:26 */ type STUB_PHASE = uint32 /* rpcndr.h:674:5 */ type PROXY_PHASE = uint32 /* rpcndr.h:678:5 */ type IRpcStubBuffer1 = struct{ FlpVtbl uintptr } /* rpcndr.h:680:3 */ type RPC_SS_THREAD_HANDLE = uintptr /* rpcndr.h:705:16 */ type _NDR_USER_MARSHAL_INFO_LEVEL1 = struct { FBuffer uintptr FBufferSize uint32 _ [4]byte FpfnAllocate uintptr FpfnFree uintptr FpRpcChannelBuffer uintptr FReserved [5]ULONG_PTR } /* rpcndr.h:763:11 */ type NDR_USER_MARSHAL_INFO_LEVEL1 = _NDR_USER_MARSHAL_INFO_LEVEL1 /* rpcndr.h:770:5 */ type _NDR_USER_MARSHAL_INFO = struct { FInformationLevel uint32 _ [4]byte F__8 struct{ FLevel1 NDR_USER_MARSHAL_INFO_LEVEL1 } } /* rpcndr.h:772:11 */ type NDR_USER_MARSHAL_INFO = _NDR_USER_MARSHAL_INFO /* rpcndr.h:777:5 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type REGCLS = uint32 /* combaseapi.h:144:3 */ type IRpcStubBuffer = IRpcStubBuffer1 /* combaseapi.h:146:34 */ type IRpcChannelBuffer = IRpcChannelBuffer1 /* combaseapi.h:147:37 */ type COINITBASE = uint32 /* combaseapi.h:151:3 */ type OLECHAR = WCHAR /* wtypesbase.h:68:15 */ type LPOLESTR = uintptr /* wtypesbase.h:69:17 */ type LPCOLESTR = uintptr /* wtypesbase.h:70:23 */ type DOUBLE = float64 /* wtypesbase.h:93:16 */ type _COAUTHIDENTITY = struct { FUser uintptr FUserLength ULONG _ [4]byte FDomain uintptr FDomainLength ULONG _ [4]byte FPassword uintptr FPasswordLength ULONG FFlags ULONG } /* wtypesbase.h:184:9 */ type COAUTHIDENTITY = _COAUTHIDENTITY /* wtypesbase.h:192:3 */ type _COAUTHINFO = struct { FdwAuthnSvc DWORD FdwAuthzSvc DWORD FpwszServerPrincName LPWSTR FdwAuthnLevel DWORD FdwImpersonationLevel DWORD FpAuthIdentityData uintptr FdwCapabilities DWORD _ [4]byte } /* wtypesbase.h:194:9 */ type COAUTHINFO = _COAUTHINFO /* wtypesbase.h:202:3 */ type SCODE = LONG /* wtypesbase.h:204:14 */ type PSCODE = uintptr /* wtypesbase.h:205:15 */ type MEMCTX = int32 /* wtypesbase.h:238:3 */ type CLSCTX = int32 /* wtypesbase.h:293:3 */ type MSHLFLAGS = uint32 /* wtypesbase.h:306:3 */ type MSHCTX = uint32 /* wtypesbase.h:314:3 */ type _BYTE_BLOB = struct { FclSize ULONG FabData [1]byte _ [3]byte } /* wtypesbase.h:316:9 */ type BYTE_BLOB = _BYTE_BLOB /* wtypesbase.h:319:3 */ type UP_BYTE_BLOB = uintptr /* wtypesbase.h:321:19 */ type _WORD_BLOB = struct { FclSize ULONG FasData [1]uint16 _ [2]byte } /* wtypesbase.h:323:9 */ type WORD_BLOB = _WORD_BLOB /* wtypesbase.h:326:3 */ type UP_WORD_BLOB = uintptr /* wtypesbase.h:328:19 */ type _DWORD_BLOB = struct { FclSize ULONG FalData [1]ULONG } /* wtypesbase.h:330:9 */ type DWORD_BLOB = _DWORD_BLOB /* wtypesbase.h:333:3 */ type UP_DWORD_BLOB = uintptr /* wtypesbase.h:335:20 */ type _FLAGGED_BYTE_BLOB = struct { FfFlags ULONG FclSize ULONG FabData [1]byte _ [3]byte } /* wtypesbase.h:337:9 */ type FLAGGED_BYTE_BLOB = _FLAGGED_BYTE_BLOB /* wtypesbase.h:341:3 */ type UP_FLAGGED_BYTE_BLOB = uintptr /* wtypesbase.h:343:27 */ type _FLAGGED_WORD_BLOB = struct { FfFlags ULONG FclSize ULONG FasData [1]uint16 _ [2]byte } /* wtypesbase.h:345:9 */ type FLAGGED_WORD_BLOB = _FLAGGED_WORD_BLOB /* wtypesbase.h:349:3 */ type UP_FLAGGED_WORD_BLOB = uintptr /* wtypesbase.h:351:27 */ type _BYTE_SIZEDARR = struct { FclSize ULONG _ [4]byte FpData uintptr } /* wtypesbase.h:353:9 */ type BYTE_SIZEDARR = _BYTE_SIZEDARR /* wtypesbase.h:356:3 */ type _SHORT_SIZEDARR = struct { FclSize ULONG _ [4]byte FpData uintptr } /* wtypesbase.h:358:9 */ type WORD_SIZEDARR = _SHORT_SIZEDARR /* wtypesbase.h:361:3 */ type _LONG_SIZEDARR = struct { FclSize ULONG _ [4]byte FpData uintptr } /* wtypesbase.h:363:9 */ type DWORD_SIZEDARR = _LONG_SIZEDARR /* wtypesbase.h:366:3 */ type _HYPER_SIZEDARR = struct { FclSize ULONG _ [4]byte FpData uintptr } /* wtypesbase.h:368:9 */ type HYPER_SIZEDARR = _HYPER_SIZEDARR /* wtypesbase.h:371:3 */ type tagBLOB = struct { FcbSize ULONG _ [4]byte FpBlobData uintptr } /* wtypesbase.h:382:9 */ type BLOB = tagBLOB /* wtypesbase.h:385:3 */ type LPBLOB = uintptr /* wtypesbase.h:386:24 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/unknwnbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IUnknown1 = struct{ FlpVtbl uintptr } /* unknwnbase.h:22:9 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/unknwnbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IUnknown = IUnknown1 /* unknwnbase.h:22:28 */ type AsyncIUnknown1 = struct{ FlpVtbl uintptr } /* unknwnbase.h:27:9 */ type AsyncIUnknown = AsyncIUnknown1 /* unknwnbase.h:27:33 */ type IClassFactory1 = struct{ FlpVtbl uintptr } /* unknwnbase.h:32:9 */ type IClassFactory = IClassFactory1 /* unknwnbase.h:32:33 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/wtypesbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // **************************************************************************** // // IUnknown interface type LPUNKNOWN = uintptr /* unknwnbase.h:58:18 */ type IUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* unknwnbase.h:22:9 */ type IUnknownVtbl = IUnknownVtbl1 /* unknwnbase.h:126:3 */ type AsyncIUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBegin_QueryInterface uintptr FFinish_QueryInterface uintptr FBegin_AddRef uintptr FFinish_AddRef uintptr FBegin_Release uintptr FFinish_Release uintptr } /* unknwnbase.h:27:9 */ type AsyncIUnknownVtbl = AsyncIUnknownVtbl1 /* unknwnbase.h:254:3 */ // **************************************************************************** // // IClassFactory interface type LPCLASSFACTORY = uintptr /* unknwnbase.h:363:23 */ type IClassFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateInstance uintptr FLockServer uintptr } /* unknwnbase.h:32:9 */ type IClassFactoryVtbl = IClassFactoryVtbl1 /* unknwnbase.h:410:3 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/objidlbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IMarshal1 = struct{ FlpVtbl uintptr } /* objidlbase.h:22:9 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/objidlbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IMarshal = IMarshal1 /* objidlbase.h:22:28 */ type INoMarshal1 = struct{ FlpVtbl uintptr } /* objidlbase.h:27:9 */ type INoMarshal = INoMarshal1 /* objidlbase.h:27:30 */ type IAgileObject1 = struct{ FlpVtbl uintptr } /* objidlbase.h:32:9 */ type IAgileObject = IAgileObject1 /* objidlbase.h:32:32 */ type IAgileReference1 = struct{ FlpVtbl uintptr } /* objidlbase.h:37:9 */ type IAgileReference = IAgileReference1 /* objidlbase.h:37:35 */ type IMarshal21 = struct{ FlpVtbl uintptr } /* objidlbase.h:42:9 */ type IMarshal2 = IMarshal21 /* objidlbase.h:42:29 */ type IMalloc1 = struct{ FlpVtbl uintptr } /* objidlbase.h:47:9 */ type IMalloc = IMalloc1 /* objidlbase.h:47:27 */ type IStdMarshalInfo1 = struct{ FlpVtbl uintptr } /* objidlbase.h:52:9 */ type IStdMarshalInfo = IStdMarshalInfo1 /* objidlbase.h:52:35 */ type IExternalConnection1 = struct{ FlpVtbl uintptr } /* objidlbase.h:57:9 */ type IExternalConnection = IExternalConnection1 /* objidlbase.h:57:39 */ type IMultiQI1 = struct{ FlpVtbl uintptr } /* objidlbase.h:62:9 */ type IMultiQI = IMultiQI1 /* objidlbase.h:62:28 */ type AsyncIMultiQI1 = struct{ FlpVtbl uintptr } /* objidlbase.h:67:9 */ type AsyncIMultiQI = AsyncIMultiQI1 /* objidlbase.h:67:33 */ type IInternalUnknown1 = struct{ FlpVtbl uintptr } /* objidlbase.h:72:9 */ type IInternalUnknown = IInternalUnknown1 /* objidlbase.h:72:36 */ type IEnumUnknown1 = struct{ FlpVtbl uintptr } /* objidlbase.h:77:9 */ type IEnumUnknown = IEnumUnknown1 /* objidlbase.h:77:32 */ type IEnumString1 = struct{ FlpVtbl uintptr } /* objidlbase.h:82:9 */ type IEnumString = IEnumString1 /* objidlbase.h:82:31 */ type ISequentialStream1 = struct{ FlpVtbl uintptr } /* objidlbase.h:87:9 */ type ISequentialStream = ISequentialStream1 /* objidlbase.h:87:37 */ type IStream1 = struct{ FlpVtbl uintptr } /* objidlbase.h:92:9 */ type IStream = IStream1 /* objidlbase.h:92:27 */ type IRpcChannelBuffer21 = struct{ FlpVtbl uintptr } /* objidlbase.h:102:9 */ type IRpcChannelBuffer2 = IRpcChannelBuffer21 /* objidlbase.h:102:38 */ type IAsyncRpcChannelBuffer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:107:9 */ type IAsyncRpcChannelBuffer = IAsyncRpcChannelBuffer1 /* objidlbase.h:107:42 */ type IRpcChannelBuffer31 = struct{ FlpVtbl uintptr } /* objidlbase.h:112:9 */ type IRpcChannelBuffer3 = IRpcChannelBuffer31 /* objidlbase.h:112:38 */ type IRpcSyntaxNegotiate1 = struct{ FlpVtbl uintptr } /* objidlbase.h:117:9 */ type IRpcSyntaxNegotiate = IRpcSyntaxNegotiate1 /* objidlbase.h:117:39 */ type IRpcProxyBuffer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:122:9 */ type IRpcProxyBuffer = IRpcProxyBuffer1 /* objidlbase.h:122:35 */ type IPSFactoryBuffer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:132:9 */ type IPSFactoryBuffer = IPSFactoryBuffer1 /* objidlbase.h:132:36 */ type IChannelHook1 = struct{ FlpVtbl uintptr } /* objidlbase.h:137:9 */ type IChannelHook = IChannelHook1 /* objidlbase.h:137:32 */ type IClientSecurity1 = struct{ FlpVtbl uintptr } /* objidlbase.h:142:9 */ type IClientSecurity = IClientSecurity1 /* objidlbase.h:142:35 */ type IServerSecurity1 = struct{ FlpVtbl uintptr } /* objidlbase.h:147:9 */ type IServerSecurity = IServerSecurity1 /* objidlbase.h:147:35 */ type IRpcOptions1 = struct{ FlpVtbl uintptr } /* objidlbase.h:152:9 */ type IRpcOptions = IRpcOptions1 /* objidlbase.h:152:31 */ type IGlobalOptions1 = struct{ FlpVtbl uintptr } /* objidlbase.h:157:9 */ type IGlobalOptions = IGlobalOptions1 /* objidlbase.h:157:34 */ type ISurrogate1 = struct{ FlpVtbl uintptr } /* objidlbase.h:162:9 */ type ISurrogate = ISurrogate1 /* objidlbase.h:162:30 */ type IGlobalInterfaceTable1 = struct{ FlpVtbl uintptr } /* objidlbase.h:167:9 */ type IGlobalInterfaceTable = IGlobalInterfaceTable1 /* objidlbase.h:167:41 */ type ISynchronize1 = struct{ FlpVtbl uintptr } /* objidlbase.h:172:9 */ type ISynchronize = ISynchronize1 /* objidlbase.h:172:32 */ type ISynchronizeHandle1 = struct{ FlpVtbl uintptr } /* objidlbase.h:177:9 */ type ISynchronizeHandle = ISynchronizeHandle1 /* objidlbase.h:177:38 */ type ISynchronizeEvent1 = struct{ FlpVtbl uintptr } /* objidlbase.h:182:9 */ type ISynchronizeEvent = ISynchronizeEvent1 /* objidlbase.h:182:37 */ type ISynchronizeContainer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:187:9 */ type ISynchronizeContainer = ISynchronizeContainer1 /* objidlbase.h:187:41 */ type ISynchronizeMutex1 = struct{ FlpVtbl uintptr } /* objidlbase.h:192:9 */ type ISynchronizeMutex = ISynchronizeMutex1 /* objidlbase.h:192:37 */ type ICancelMethodCalls1 = struct{ FlpVtbl uintptr } /* objidlbase.h:197:9 */ type ICancelMethodCalls = ICancelMethodCalls1 /* objidlbase.h:197:38 */ type IAsyncManager1 = struct{ FlpVtbl uintptr } /* objidlbase.h:202:9 */ type IAsyncManager = IAsyncManager1 /* objidlbase.h:202:33 */ type ICallFactory1 = struct{ FlpVtbl uintptr } /* objidlbase.h:207:9 */ type ICallFactory = ICallFactory1 /* objidlbase.h:207:32 */ type IRpcHelper1 = struct{ FlpVtbl uintptr } /* objidlbase.h:212:9 */ type IRpcHelper = IRpcHelper1 /* objidlbase.h:212:30 */ type IReleaseMarshalBuffers1 = struct{ FlpVtbl uintptr } /* objidlbase.h:217:9 */ type IReleaseMarshalBuffers = IReleaseMarshalBuffers1 /* objidlbase.h:217:42 */ type IWaitMultiple1 = struct{ FlpVtbl uintptr } /* objidlbase.h:222:9 */ type IWaitMultiple = IWaitMultiple1 /* objidlbase.h:222:33 */ type IAddrTrackingControl1 = struct{ FlpVtbl uintptr } /* objidlbase.h:227:9 */ type IAddrTrackingControl = IAddrTrackingControl1 /* objidlbase.h:227:40 */ type IAddrExclusionControl1 = struct{ FlpVtbl uintptr } /* objidlbase.h:232:9 */ type IAddrExclusionControl = IAddrExclusionControl1 /* objidlbase.h:232:41 */ type IPipeByte1 = struct{ FlpVtbl uintptr } /* objidlbase.h:237:9 */ type IPipeByte = IPipeByte1 /* objidlbase.h:237:29 */ type IPipeLong1 = struct{ FlpVtbl uintptr } /* objidlbase.h:242:9 */ type IPipeLong = IPipeLong1 /* objidlbase.h:242:29 */ type IPipeDouble1 = struct{ FlpVtbl uintptr } /* objidlbase.h:247:9 */ type IPipeDouble = IPipeDouble1 /* objidlbase.h:247:31 */ type IComThreadingInfo1 = struct{ FlpVtbl uintptr } /* objidlbase.h:262:9 */ type IComThreadingInfo = IComThreadingInfo1 /* objidlbase.h:262:37 */ type IProcessInitControl1 = struct{ FlpVtbl uintptr } /* objidlbase.h:267:9 */ type IProcessInitControl = IProcessInitControl1 /* objidlbase.h:267:39 */ type IFastRundown1 = struct{ FlpVtbl uintptr } /* objidlbase.h:272:9 */ type IFastRundown = IFastRundown1 /* objidlbase.h:272:32 */ type IMarshalingStream1 = struct{ FlpVtbl uintptr } /* objidlbase.h:277:9 */ type IMarshalingStream = IMarshalingStream1 /* objidlbase.h:277:37 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/unknwnbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/wtypesbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _COSERVERINFO = struct { FdwReserved1 DWORD _ [4]byte FpwszName LPWSTR FpAuthInfo uintptr FdwReserved2 DWORD _ [4]byte } /* objidlbase.h:352:9 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/unknwnbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/wtypesbase.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type COSERVERINFO = _COSERVERINFO /* objidlbase.h:357:3 */ // **************************************************************************** // // IMarshal interface type LPMARSHAL = uintptr /* objidlbase.h:365:18 */ type IMarshalVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetUnmarshalClass uintptr FGetMarshalSizeMax uintptr FMarshalInterface uintptr FUnmarshalInterface uintptr FReleaseMarshalData uintptr FDisconnectObject uintptr } /* objidlbase.h:22:9 */ type IMarshalVtbl = IMarshalVtbl1 /* objidlbase.h:469:3 */ type INoMarshalVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* objidlbase.h:27:9 */ type INoMarshalVtbl = INoMarshalVtbl1 /* objidlbase.h:623:3 */ type IAgileObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* objidlbase.h:32:9 */ type IAgileObjectVtbl = IAgileObjectVtbl1 /* objidlbase.h:686:3 */ type IAgileReferenceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FResolve uintptr } /* objidlbase.h:37:9 */ type IAgileReferenceVtbl = IAgileReferenceVtbl1 /* objidlbase.h:758:3 */ // **************************************************************************** // // IMarshal2 interface type LPMARSHAL2 = uintptr /* objidlbase.h:812:19 */ type IMarshal2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetUnmarshalClass uintptr FGetMarshalSizeMax uintptr FMarshalInterface uintptr FUnmarshalInterface uintptr FReleaseMarshalData uintptr FDisconnectObject uintptr } /* objidlbase.h:42:9 */ type IMarshal2Vtbl = IMarshal2Vtbl1 /* objidlbase.h:881:3 */ // **************************************************************************** // // IMalloc interface type LPMALLOC = uintptr /* objidlbase.h:944:17 */ type IMallocVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAlloc uintptr FRealloc uintptr FFree uintptr FGetSize uintptr FDidAlloc uintptr FHeapMinimize uintptr } /* objidlbase.h:47:9 */ type IMallocVtbl = IMallocVtbl1 /* objidlbase.h:1016:3 */ // **************************************************************************** // // IStdMarshalInfo interface type LPSTDMARSHALINFO = uintptr /* objidlbase.h:1127:25 */ type IStdMarshalInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassForHandler uintptr } /* objidlbase.h:52:9 */ type IStdMarshalInfoVtbl = IStdMarshalInfoVtbl1 /* objidlbase.h:1167:3 */ // **************************************************************************** // // IExternalConnection interface type LPEXTERNALCONNECTION = uintptr /* objidlbase.h:1220:29 */ type EXTCONN = uint32 /* objidlbase.h:1226:3 */ type IExternalConnectionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddConnection uintptr FReleaseConnection uintptr } /* objidlbase.h:57:9 */ type IExternalConnectionVtbl = IExternalConnectionVtbl1 /* objidlbase.h:1275:3 */ type LPMULTIQI = uintptr /* objidlbase.h:1335:18 */ type tagMULTI_QI = struct { FpIID uintptr FpItf uintptr Fhr HRESULT _ [4]byte } /* objidlbase.h:1339:9 */ type MULTI_QI = tagMULTI_QI /* objidlbase.h:1343:3 */ type IMultiQIVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryMultipleInterfaces uintptr } /* objidlbase.h:62:9 */ type IMultiQIVtbl = IMultiQIVtbl1 /* objidlbase.h:1387:3 */ type AsyncIMultiQIVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBegin_QueryMultipleInterfaces uintptr FFinish_QueryMultipleInterfaces uintptr } /* objidlbase.h:67:9 */ type AsyncIMultiQIVtbl = AsyncIMultiQIVtbl1 /* objidlbase.h:1481:3 */ type IInternalUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryInternalInterface uintptr } /* objidlbase.h:72:9 */ type IInternalUnknownVtbl = IInternalUnknownVtbl1 /* objidlbase.h:1584:3 */ // **************************************************************************** // // IEnumUnknown interface type LPENUMUNKNOWN = uintptr /* objidlbase.h:1638:22 */ type IEnumUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* objidlbase.h:77:9 */ type IEnumUnknownVtbl = IEnumUnknownVtbl1 /* objidlbase.h:1698:3 */ // **************************************************************************** // // IEnumString interface type LPENUMSTRING = uintptr /* objidlbase.h:1796:21 */ type IEnumStringVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* objidlbase.h:82:9 */ type IEnumStringVtbl = IEnumStringVtbl1 /* objidlbase.h:1856:3 */ type ISequentialStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRead uintptr FWrite uintptr } /* objidlbase.h:87:9 */ type ISequentialStreamVtbl = ISequentialStreamVtbl1 /* objidlbase.h:2003:3 */ // **************************************************************************** // // IStream interface type LPSTREAM = uintptr /* objidlbase.h:2090:17 */ type tagSTATSTG = struct { FpwcsName LPOLESTR Ftype DWORD _ [4]byte FcbSize ULARGE_INTEGER Fmtime FILETIME Fctime FILETIME Fatime FILETIME FgrfMode DWORD FgrfLocksSupported DWORD Fclsid CLSID FgrfStateBits DWORD Freserved DWORD } /* objidlbase.h:2092:9 */ type STATSTG = tagSTATSTG /* objidlbase.h:2104:3 */ type STGTY = uint32 /* objidlbase.h:2111:3 */ type STREAM_SEEK = uint32 /* objidlbase.h:2117:3 */ type LOCKTYPE = uint32 /* objidlbase.h:2123:3 */ type IStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRead uintptr FWrite uintptr FSeek uintptr FSetSize uintptr FCopyTo uintptr FCommit uintptr FRevert uintptr FLockRegion uintptr FUnlockRegion uintptr FStat uintptr FClone uintptr } /* objidlbase.h:92:9 */ type IStreamVtbl = IStreamVtbl1 /* objidlbase.h:2247:3 */ // **************************************************************************** // // IRpcChannelBuffer interface type RPCOLEDATAREP = ULONG /* objidlbase.h:2435:15 */ type tagRPCOLEMESSAGE = struct { Freserved1 uintptr FdataRepresentation RPCOLEDATAREP _ [4]byte FBuffer uintptr FcbBuffer ULONG FiMethod ULONG Freserved2 [5]uintptr FrpcFlags ULONG _ [4]byte } /* objidlbase.h:2437:9 */ type RPCOLEMESSAGE = tagRPCOLEMESSAGE /* objidlbase.h:2445:3 */ type PRPCOLEMESSAGE = uintptr /* objidlbase.h:2447:23 */ type IRpcChannelBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBuffer uintptr FSendReceive uintptr FFreeBuffer uintptr FGetDestCtx uintptr FIsConnected uintptr } /* rpcndr.h:211:3 */ type IRpcChannelBufferVtbl = IRpcChannelBufferVtbl1 /* objidlbase.h:2516:3 */ type IRpcChannelBuffer2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBuffer uintptr FSendReceive uintptr FFreeBuffer uintptr FGetDestCtx uintptr FIsConnected uintptr FGetProtocolVersion uintptr } /* objidlbase.h:102:9 */ type IRpcChannelBuffer2Vtbl = IRpcChannelBuffer2Vtbl1 /* objidlbase.h:2676:3 */ type IAsyncRpcChannelBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBuffer uintptr FSendReceive uintptr FFreeBuffer uintptr FGetDestCtx uintptr FIsConnected uintptr FGetProtocolVersion uintptr FSend uintptr FReceive uintptr FGetDestCtxEx uintptr } /* objidlbase.h:107:9 */ type IAsyncRpcChannelBufferVtbl = IAsyncRpcChannelBufferVtbl1 /* objidlbase.h:2835:3 */ type IRpcChannelBuffer3Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBuffer uintptr FSendReceive uintptr FFreeBuffer uintptr FGetDestCtx uintptr FIsConnected uintptr FGetProtocolVersion uintptr FSend uintptr FReceive uintptr FCancel uintptr FGetCallContext uintptr FGetDestCtxEx uintptr FGetState uintptr FRegisterAsync uintptr } /* objidlbase.h:112:9 */ type IRpcChannelBuffer3Vtbl = IRpcChannelBuffer3Vtbl1 /* objidlbase.h:3065:3 */ type IRpcSyntaxNegotiateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNegotiateSyntax uintptr } /* objidlbase.h:117:9 */ type IRpcSyntaxNegotiateVtbl = IRpcSyntaxNegotiateVtbl1 /* objidlbase.h:3259:3 */ type IRpcProxyBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FConnect uintptr FDisconnect uintptr } /* objidlbase.h:122:9 */ type IRpcProxyBufferVtbl = IRpcProxyBufferVtbl1 /* objidlbase.h:3350:3 */ type IRpcStubBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FConnect uintptr FDisconnect uintptr FInvoke uintptr FIsIIDSupported uintptr FCountRefs uintptr FDebugServerQueryInterface uintptr FDebugServerRelease uintptr } /* rpcndr.h:680:3 */ type IRpcStubBufferVtbl = IRpcStubBufferVtbl1 /* objidlbase.h:3490:3 */ type IPSFactoryBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateProxy uintptr FCreateStub uintptr } /* objidlbase.h:132:9 */ type IPSFactoryBufferVtbl = IPSFactoryBufferVtbl1 /* objidlbase.h:3663:3 */ type SChannelHookCallInfo1 = struct { Fiid IID FcbSize DWORD FuCausality GUID FdwServerPid DWORD FiMethod DWORD _ [4]byte FpObject uintptr } /* objidlbase.h:3728:9 */ type SChannelHookCallInfo = SChannelHookCallInfo1 /* objidlbase.h:3735:3 */ type IChannelHookVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FClientGetSize uintptr FClientFillBuffer uintptr FClientNotify uintptr FServerNotify uintptr FServerGetSize uintptr FServerFillBuffer uintptr } /* objidlbase.h:137:9 */ type IChannelHookVtbl = IChannelHookVtbl1 /* objidlbase.h:3854:3 */ // **************************************************************************** // // IClientSecurity interface type tagSOLE_AUTHENTICATION_SERVICE = struct { FdwAuthnSvc DWORD FdwAuthzSvc DWORD FpPrincipalName uintptr Fhr HRESULT _ [4]byte } /* objidlbase.h:3990:9 */ // **************************************************************************** // // IClientSecurity interface type SOLE_AUTHENTICATION_SERVICE = tagSOLE_AUTHENTICATION_SERVICE /* objidlbase.h:3995:3 */ type PSOLE_AUTHENTICATION_SERVICE = uintptr /* objidlbase.h:3997:37 */ type EOLE_AUTHENTICATION_CAPABILITIES = uint32 /* objidlbase.h:4015:3 */ type tagSOLE_AUTHENTICATION_INFO = struct { FdwAuthnSvc DWORD FdwAuthzSvc DWORD FpAuthInfo uintptr } /* objidlbase.h:4022:9 */ type SOLE_AUTHENTICATION_INFO = tagSOLE_AUTHENTICATION_INFO /* objidlbase.h:4026:3 */ type PSOLE_AUTHENTICATION_INFO = uintptr /* objidlbase.h:4027:44 */ type tagSOLE_AUTHENTICATION_LIST = struct { FcAuthInfo DWORD _ [4]byte FaAuthInfo uintptr } /* objidlbase.h:4029:9 */ type SOLE_AUTHENTICATION_LIST = tagSOLE_AUTHENTICATION_LIST /* objidlbase.h:4032:3 */ type PSOLE_AUTHENTICATION_LIST = uintptr /* objidlbase.h:4033:44 */ type IClientSecurityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryBlanket uintptr FSetBlanket uintptr FCopyProxy uintptr } /* objidlbase.h:142:9 */ type IClientSecurityVtbl = IClientSecurityVtbl1 /* objidlbase.h:4113:3 */ type IServerSecurityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryBlanket uintptr FImpersonateClient uintptr FRevertToSelf uintptr FIsImpersonating uintptr } /* objidlbase.h:147:9 */ type IServerSecurityVtbl = IServerSecurityVtbl1 /* objidlbase.h:4269:3 */ type RPCOPT_PROPERTIES = uint32 /* objidlbase.h:4357:3 */ type RPCOPT_SERVER_LOCALITY_VALUES = uint32 /* objidlbase.h:4363:3 */ type IRpcOptionsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSet uintptr FQuery uintptr } /* objidlbase.h:152:9 */ type IRpcOptionsVtbl = IRpcOptionsVtbl1 /* objidlbase.h:4420:3 */ type GLOBALOPT_PROPERTIES = uint32 /* objidlbase.h:4489:3 */ type GLOBALOPT_EH_VALUES = uint32 /* objidlbase.h:4496:3 */ type GLOBALOPT_RPCTP_VALUES = uint32 /* objidlbase.h:4501:3 */ type GLOBALOPT_RO_FLAGS = uint32 /* objidlbase.h:4512:3 */ type GLOBALOPT_UNMARSHALING_POLICY_VALUES = uint32 /* objidlbase.h:4518:3 */ type IGlobalOptionsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSet uintptr FQuery uintptr } /* objidlbase.h:157:9 */ type IGlobalOptionsVtbl = IGlobalOptionsVtbl1 /* objidlbase.h:4571:3 */ // **************************************************************************** // // ISurrogate interface type LPSURROGATE = uintptr /* objidlbase.h:4639:20 */ type ISurrogateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FLoadDllServer uintptr FFreeSurrogate uintptr } /* objidlbase.h:162:9 */ type ISurrogateVtbl = ISurrogateVtbl1 /* objidlbase.h:4681:3 */ // **************************************************************************** // // IGlobalInterfaceTable interface type LPGLOBALINTERFACETABLE = uintptr /* objidlbase.h:4743:31 */ type IGlobalInterfaceTableVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRegisterInterfaceInGlobal uintptr FRevokeInterfaceFromGlobal uintptr FGetInterfaceFromGlobal uintptr } /* objidlbase.h:167:9 */ type IGlobalInterfaceTableVtbl = IGlobalInterfaceTableVtbl1 /* objidlbase.h:4801:3 */ type ISynchronizeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWait uintptr FSignal uintptr FReset uintptr } /* objidlbase.h:172:9 */ type ISynchronizeVtbl = ISynchronizeVtbl1 /* objidlbase.h:4930:3 */ type ISynchronizeHandleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetHandle uintptr } /* objidlbase.h:177:9 */ type ISynchronizeHandleVtbl = ISynchronizeHandleVtbl1 /* objidlbase.h:5038:3 */ type ISynchronizeEventVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetHandle uintptr FSetEventHandle uintptr } /* objidlbase.h:182:9 */ type ISynchronizeEventVtbl = ISynchronizeEventVtbl1 /* objidlbase.h:5128:3 */ type ISynchronizeContainerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddSynchronize uintptr FWaitMultiple uintptr } /* objidlbase.h:187:9 */ type ISynchronizeContainerVtbl = ISynchronizeContainerVtbl1 /* objidlbase.h:5230:3 */ type ISynchronizeMutexVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWait uintptr FSignal uintptr FReset uintptr FReleaseMutex uintptr } /* objidlbase.h:192:9 */ type ISynchronizeMutexVtbl = ISynchronizeMutexVtbl1 /* objidlbase.h:5340:3 */ // **************************************************************************** // // ICancelMethodCalls interface type LPCANCELMETHODCALLS = uintptr /* objidlbase.h:5404:28 */ type ICancelMethodCallsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCancel uintptr FTestCancel uintptr } /* objidlbase.h:197:9 */ type ICancelMethodCallsVtbl = ICancelMethodCallsVtbl1 /* objidlbase.h:5446:3 */ // **************************************************************************** // // IAsyncManager interface type DCOM_CALL_STATE = uint32 /* objidlbase.h:5512:3 */ type IAsyncManagerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCompleteCall uintptr FGetCallContext uintptr FGetState uintptr } /* objidlbase.h:202:9 */ type IAsyncManagerVtbl = IAsyncManagerVtbl1 /* objidlbase.h:5564:3 */ type ICallFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateCall uintptr } /* objidlbase.h:207:9 */ type ICallFactoryVtbl = ICallFactoryVtbl1 /* objidlbase.h:5680:3 */ type IRpcHelperVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetDCOMProtocolVersion uintptr FGetIIDFromOBJREF uintptr } /* objidlbase.h:212:9 */ type IRpcHelperVtbl = IRpcHelperVtbl1 /* objidlbase.h:5777:3 */ type IReleaseMarshalBuffersVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FReleaseMarshalBuffer uintptr } /* objidlbase.h:217:9 */ type IReleaseMarshalBuffersVtbl = IReleaseMarshalBuffersVtbl1 /* objidlbase.h:5879:3 */ type IWaitMultipleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWaitMultiple uintptr FAddSynchronize uintptr } /* objidlbase.h:222:9 */ type IWaitMultipleVtbl = IWaitMultipleVtbl1 /* objidlbase.h:5975:3 */ // **************************************************************************** // // IAddrTrackingControl interface type LPADDRTRACKINGCONTROL = uintptr /* objidlbase.h:6039:30 */ type IAddrTrackingControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FEnableCOMDynamicAddrTracking uintptr FDisableCOMDynamicAddrTracking uintptr } /* objidlbase.h:227:9 */ type IAddrTrackingControlVtbl = IAddrTrackingControlVtbl1 /* objidlbase.h:6079:3 */ // **************************************************************************** // // IAddrExclusionControl interface type LPADDREXCLUSIONCONTROL = uintptr /* objidlbase.h:6140:31 */ type IAddrExclusionControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCurrentAddrExclusionList uintptr FUpdateAddrExclusionList uintptr } /* objidlbase.h:232:9 */ type IAddrExclusionControlVtbl = IAddrExclusionControlVtbl1 /* objidlbase.h:6184:3 */ type IPipeByteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPull uintptr FPush uintptr } /* objidlbase.h:237:9 */ type IPipeByteVtbl = IPipeByteVtbl1 /* objidlbase.h:6295:3 */ type IPipeLongVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPull uintptr FPush uintptr } /* objidlbase.h:242:9 */ type IPipeLongVtbl = IPipeLongVtbl1 /* objidlbase.h:6408:3 */ type IPipeDoubleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPull uintptr FPush uintptr } /* objidlbase.h:247:9 */ type IPipeDoubleVtbl = IPipeDoubleVtbl1 /* objidlbase.h:6521:3 */ type APTTYPEQUALIFIER = uint32 /* objidlbase.h:6923:3 */ type APTTYPE = int32 /* objidlbase.h:6931:3 */ type THDTYPE = uint32 /* objidlbase.h:6938:3 */ type APARTMENTID = DWORD /* objidlbase.h:6940:15 */ type IComThreadingInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCurrentApartmentType uintptr FGetCurrentThreadType uintptr FGetCurrentLogicalThreadId uintptr FSetCurrentLogicalThreadId uintptr } /* objidlbase.h:262:9 */ type IComThreadingInfoVtbl = IComThreadingInfoVtbl1 /* objidlbase.h:7003:3 */ type IProcessInitControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FResetInitializerTimeout uintptr } /* objidlbase.h:267:9 */ type IProcessInitControlVtbl = IProcessInitControlVtbl1 /* objidlbase.h:7124:3 */ type IFastRundownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* objidlbase.h:272:9 */ type IFastRundownVtbl = IFastRundownVtbl1 /* objidlbase.h:7201:3 */ type CO_MARSHALING_CONTEXT_ATTRIBUTES = uint32 /* objidlbase.h:7234:3 */ type IMarshalingStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRead uintptr FWrite uintptr FSeek uintptr FSetSize uintptr FCopyTo uintptr FCommit uintptr FRevert uintptr FLockRegion uintptr FUnlockRegion uintptr FStat uintptr FClone uintptr FGetMarshalingContextAttribute uintptr } /* objidlbase.h:277:9 */ type IMarshalingStreamVtbl = IMarshalingStreamVtbl1 /* objidlbase.h:7337:3 */ type STDMSHLFLAGS = uint32 /* combaseapi.h:217:3 */ type tagPROPVARIANT = struct { F__0 struct { F__0 struct { Fvt VARTYPE FwReserved1 PROPVAR_PAD1 FwReserved2 PROPVAR_PAD2 FwReserved3 PROPVAR_PAD3 F__8 struct { _ [0]uint64 FcVal CHAR _ [15]byte } } } } /* combaseapi.h:306:9 */ type PROPVARIANT = tagPROPVARIANT /* combaseapi.h:306:31 */ type COWAIT_FLAGS = uint32 /* combaseapi.h:329:3 */ type LPFNGETCLASSOBJECT = uintptr /* combaseapi.h:356:17 */ type LPFNCANUNLOADNOW = uintptr /* combaseapi.h:357:17 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type COINIT = uint32 /* objbase.h:21:3 */ type STGFMT = DWORD /* objbase.h:57:15 */ //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IMallocSpy1 = struct{ FlpVtbl uintptr } /* objidl.h:277:9 */ //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IMallocSpy = IMallocSpy1 /* objidl.h:277:30 */ type IBindCtx1 = struct{ FlpVtbl uintptr } /* objidl.h:282:9 */ type IBindCtx = IBindCtx1 /* objidl.h:282:28 */ type IEnumMoniker1 = struct{ FlpVtbl uintptr } /* objidl.h:287:9 */ type IEnumMoniker = IEnumMoniker1 /* objidl.h:287:32 */ type IRunnableObject1 = struct{ FlpVtbl uintptr } /* objidl.h:292:9 */ type IRunnableObject = IRunnableObject1 /* objidl.h:292:35 */ type IRunningObjectTable1 = struct{ FlpVtbl uintptr } /* objidl.h:297:9 */ type IRunningObjectTable = IRunningObjectTable1 /* objidl.h:297:39 */ type IPersist1 = struct{ FlpVtbl uintptr } /* objidl.h:302:9 */ type IPersist = IPersist1 /* objidl.h:302:28 */ type IPersistStream1 = struct{ FlpVtbl uintptr } /* objidl.h:307:9 */ type IPersistStream = IPersistStream1 /* objidl.h:307:34 */ type IMoniker1 = struct{ FlpVtbl uintptr } /* objidl.h:312:9 */ type IMoniker = IMoniker1 /* objidl.h:312:28 */ type IROTData1 = struct{ FlpVtbl uintptr } /* objidl.h:317:9 */ type IROTData = IROTData1 /* objidl.h:317:28 */ type IEnumSTATSTG1 = struct{ FlpVtbl uintptr } /* objidl.h:322:9 */ type IEnumSTATSTG = IEnumSTATSTG1 /* objidl.h:322:32 */ type IStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:327:9 */ type IStorage = IStorage1 /* objidl.h:327:28 */ type IPersistFile1 = struct{ FlpVtbl uintptr } /* objidl.h:332:9 */ type IPersistFile = IPersistFile1 /* objidl.h:332:32 */ type IPersistStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:337:9 */ type IPersistStorage = IPersistStorage1 /* objidl.h:337:35 */ type ILockBytes1 = struct{ FlpVtbl uintptr } /* objidl.h:342:9 */ type ILockBytes = ILockBytes1 /* objidl.h:342:30 */ type IEnumFORMATETC1 = struct{ FlpVtbl uintptr } /* objidl.h:347:9 */ type IEnumFORMATETC = IEnumFORMATETC1 /* objidl.h:347:34 */ type IEnumSTATDATA1 = struct{ FlpVtbl uintptr } /* objidl.h:352:9 */ type IEnumSTATDATA = IEnumSTATDATA1 /* objidl.h:352:33 */ type IRootStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:357:9 */ type IRootStorage = IRootStorage1 /* objidl.h:357:32 */ type IAdviseSink1 = struct{ FlpVtbl uintptr } /* objidl.h:362:9 */ type IAdviseSink = IAdviseSink1 /* objidl.h:362:31 */ type AsyncIAdviseSink1 = struct{ FlpVtbl uintptr } /* objidl.h:367:9 */ type AsyncIAdviseSink = AsyncIAdviseSink1 /* objidl.h:367:36 */ type IAdviseSink21 = struct{ FlpVtbl uintptr } /* objidl.h:372:9 */ type IAdviseSink2 = IAdviseSink21 /* objidl.h:372:32 */ type AsyncIAdviseSink21 = struct{ FlpVtbl uintptr } /* objidl.h:377:9 */ type AsyncIAdviseSink2 = AsyncIAdviseSink21 /* objidl.h:377:37 */ type IDataObject1 = struct{ FlpVtbl uintptr } /* objidl.h:382:9 */ type IDataObject = IDataObject1 /* objidl.h:382:31 */ type IDataAdviseHolder1 = struct{ FlpVtbl uintptr } /* objidl.h:387:9 */ type IDataAdviseHolder = IDataAdviseHolder1 /* objidl.h:387:37 */ type IMessageFilter1 = struct{ FlpVtbl uintptr } /* objidl.h:392:9 */ type IMessageFilter = IMessageFilter1 /* objidl.h:392:34 */ type IClassActivator1 = struct{ FlpVtbl uintptr } /* objidl.h:397:9 */ type IClassActivator = IClassActivator1 /* objidl.h:397:35 */ type IFillLockBytes1 = struct{ FlpVtbl uintptr } /* objidl.h:402:9 */ type IFillLockBytes = IFillLockBytes1 /* objidl.h:402:34 */ type IProgressNotify1 = struct{ FlpVtbl uintptr } /* objidl.h:407:9 */ type IProgressNotify = IProgressNotify1 /* objidl.h:407:35 */ type ILayoutStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:412:9 */ type ILayoutStorage = ILayoutStorage1 /* objidl.h:412:34 */ type IBlockingLock1 = struct{ FlpVtbl uintptr } /* objidl.h:417:9 */ type IBlockingLock = IBlockingLock1 /* objidl.h:417:33 */ type ITimeAndNoticeControl1 = struct{ FlpVtbl uintptr } /* objidl.h:422:9 */ type ITimeAndNoticeControl = ITimeAndNoticeControl1 /* objidl.h:422:41 */ type IOplockStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:427:9 */ type IOplockStorage = IOplockStorage1 /* objidl.h:427:34 */ type IDirectWriterLock1 = struct{ FlpVtbl uintptr } /* objidl.h:432:9 */ type IDirectWriterLock = IDirectWriterLock1 /* objidl.h:432:37 */ type IUrlMon1 = struct{ FlpVtbl uintptr } /* objidl.h:437:9 */ type IUrlMon = IUrlMon1 /* objidl.h:437:27 */ type IForegroundTransfer1 = struct{ FlpVtbl uintptr } /* objidl.h:442:9 */ type IForegroundTransfer = IForegroundTransfer1 /* objidl.h:442:39 */ type IThumbnailExtractor1 = struct{ FlpVtbl uintptr } /* objidl.h:447:9 */ type IThumbnailExtractor = IThumbnailExtractor1 /* objidl.h:447:39 */ type IDummyHICONIncluder1 = struct{ FlpVtbl uintptr } /* objidl.h:452:9 */ type IDummyHICONIncluder = IDummyHICONIncluder1 /* objidl.h:452:39 */ type IProcessLock1 = struct{ FlpVtbl uintptr } /* objidl.h:457:9 */ type IProcessLock = IProcessLock1 /* objidl.h:457:32 */ type ISurrogateService1 = struct{ FlpVtbl uintptr } /* objidl.h:462:9 */ type ISurrogateService = ISurrogateService1 /* objidl.h:462:37 */ type IInitializeSpy1 = struct{ FlpVtbl uintptr } /* objidl.h:467:9 */ type IInitializeSpy = IInitializeSpy1 /* objidl.h:467:34 */ type IApartmentShutdown1 = struct{ FlpVtbl uintptr } /* objidl.h:472:9 */ type IApartmentShutdown = IApartmentShutdown1 /* objidl.h:472:38 */ type tagRemHGLOBAL = struct { FfNullHGlobal LONG FcbData ULONG Fdata [1]byte _ [3]byte } /* wtypes.h:42:9 */ type RemHGLOBAL = tagRemHGLOBAL /* wtypes.h:46:3 */ type tagRemHMETAFILEPICT = struct { Fmm LONG FxExt LONG FyExt LONG FcbData ULONG Fdata [1]byte _ [3]byte } /* wtypes.h:48:9 */ type RemHMETAFILEPICT = tagRemHMETAFILEPICT /* wtypes.h:54:3 */ type tagRemHENHMETAFILE = struct { FcbData ULONG Fdata [1]byte _ [3]byte } /* wtypes.h:56:9 */ type RemHENHMETAFILE = tagRemHENHMETAFILE /* wtypes.h:59:3 */ type tagRemHBITMAP = struct { FcbData ULONG Fdata [1]byte _ [3]byte } /* wtypes.h:60:9 */ type RemHBITMAP = tagRemHBITMAP /* wtypes.h:63:3 */ type tagRemHPALETTE = struct { FcbData ULONG Fdata [1]byte _ [3]byte } /* wtypes.h:65:9 */ type RemHPALETTE = tagRemHPALETTE /* wtypes.h:68:3 */ type tagRemBRUSH = struct { FcbData ULONG Fdata [1]byte _ [3]byte } /* wtypes.h:70:9 */ type RemHBRUSH = tagRemBRUSH /* wtypes.h:73:3 */ type DVASPECT = uint32 /* wtypes.h:186:3 */ type STGC = uint32 /* wtypes.h:194:3 */ type STGMOVE = uint32 /* wtypes.h:200:3 */ type STATFLAG = uint32 /* wtypes.h:206:3 */ type HCONTEXT = uintptr /* wtypes.h:207:14 */ type _userCLIPFORMAT = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FdwValue DWORD _ [4]byte } } /* wtypes.h:226:9 */ type userCLIPFORMAT = _userCLIPFORMAT /* wtypes.h:232:3 */ type wireCLIPFORMAT = uintptr /* wtypes.h:234:24 */ type CLIPFORMAT = WORD /* wtypes.h:235:14 */ type _GDI_NONREMOTE = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:237:9 */ type GDI_NONREMOTE = _GDI_NONREMOTE /* wtypes.h:243:3 */ type _userHGLOBAL = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:245:9 */ type userHGLOBAL = _userHGLOBAL /* wtypes.h:252:3 */ type wireHGLOBAL = uintptr /* wtypes.h:254:21 */ type _userHMETAFILE = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:256:9 */ type userHMETAFILE = _userHMETAFILE /* wtypes.h:263:3 */ type _remoteMETAFILEPICT = struct { Fmm LONG FxExt LONG FyExt LONG _ [4]byte FhMF uintptr } /* wtypes.h:265:9 */ type remoteMETAFILEPICT = _remoteMETAFILEPICT /* wtypes.h:270:3 */ type _userHMETAFILEPICT = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:272:9 */ type userHMETAFILEPICT = _userHMETAFILEPICT /* wtypes.h:279:3 */ type _userHENHMETAFILE = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:281:9 */ type userHENHMETAFILE = _userHENHMETAFILE /* wtypes.h:288:3 */ type _userBITMAP = struct { FbmType LONG FbmWidth LONG FbmHeight LONG FbmWidthBytes LONG FbmPlanes WORD FbmBitsPixel WORD FcbSize ULONG FpBuffer [1]byte _ [3]byte } /* wtypes.h:290:9 */ type userBITMAP = _userBITMAP /* wtypes.h:299:3 */ type _userHBITMAP = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:301:9 */ type userHBITMAP = _userHBITMAP /* wtypes.h:308:3 */ type _userHPALETTE = struct { FfContext LONG _ [4]byte Fu struct { _ [0]uint64 FhInproc LONG _ [4]byte } } /* wtypes.h:310:9 */ type userHPALETTE = _userHPALETTE /* wtypes.h:317:3 */ type _RemotableHandle = struct { FfContext LONG Fu struct{ FhInproc LONG } } /* wtypes.h:319:9 */ type RemotableHandle = _RemotableHandle /* wtypes.h:325:3 */ type wireHWND = uintptr /* wtypes.h:327:25 */ type wireHMENU = uintptr /* wtypes.h:328:25 */ type wireHACCEL = uintptr /* wtypes.h:329:25 */ type wireHBRUSH = uintptr /* wtypes.h:330:25 */ type wireHFONT = uintptr /* wtypes.h:331:25 */ type wireHDC = uintptr /* wtypes.h:332:25 */ type wireHICON = uintptr /* wtypes.h:333:25 */ type wireHRGN = uintptr /* wtypes.h:334:25 */ type wireHMONITOR = uintptr /* wtypes.h:335:25 */ type wireHBITMAP = uintptr /* wtypes.h:400:21 */ type wireHPALETTE = uintptr /* wtypes.h:401:22 */ type wireHENHMETAFILE = uintptr /* wtypes.h:402:26 */ type wireHMETAFILE = uintptr /* wtypes.h:403:23 */ type wireHMETAFILEPICT = uintptr /* wtypes.h:404:27 */ type HMETAFILEPICT = uintptr /* wtypes.h:415:14 */ type DATE = float64 /* wtypes.h:420:16 */ type tagCY = struct { _ [0]uint64 Fs struct { FLo uint32 FHi int32 } } /* wtypes.h:431:9 */ type CY = tagCY /* wtypes.h:437:3 */ type LPCY = uintptr /* wtypes.h:441:12 */ type tagDEC = struct { FwReserved USHORT Fu struct { _ [0]uint16 Fs struct { Fscale BYTE Fsign BYTE } } FHi32 ULONG Fu2 struct { _ [0]uint64 Fs2 struct { FLo32 ULONG FMid32 ULONG } } } /* wtypes.h:452:9 */ type DECIMAL = tagDEC /* wtypes.h:469:3 */ type LPDECIMAL = uintptr /* wtypes.h:475:17 */ type wireBSTR = uintptr /* wtypes.h:477:27 */ type BSTR = uintptr /* wtypes.h:478:17 */ type LPBSTR = uintptr /* wtypes.h:480:14 */ type VARIANT_BOOL = int16 /* wtypes.h:482:15 */ type tagBSTRBLOB = struct { FcbSize ULONG _ [4]byte FpData uintptr } /* wtypes.h:492:9 */ type BSTRBLOB = tagBSTRBLOB /* wtypes.h:495:3 */ type LPBSTRBLOB = uintptr /* wtypes.h:496:28 */ type tagCLIPDATA = struct { FcbSize ULONG FulClipFmt LONG FpClipData uintptr } /* wtypes.h:502:9 */ type CLIPDATA = tagCLIPDATA /* wtypes.h:506:3 */ type VARTYPE = uint16 /* wtypes.h:510:24 */ type PROPID = ULONG /* wtypes.h:568:15 */ type _tagpropertykey = struct { Ffmtid GUID Fpid DWORD } /* wtypes.h:573:9 */ type PROPERTYKEY = _tagpropertykey /* wtypes.h:576:3 */ type tagCSPLATFORM = struct { FdwPlatformId DWORD FdwVersionHi DWORD FdwVersionLo DWORD FdwProcessorArch DWORD } /* wtypes.h:579:9 */ type CSPLATFORM = tagCSPLATFORM /* wtypes.h:584:3 */ type tagQUERYCONTEXT = struct { FdwContext DWORD FPlatform CSPLATFORM FLocale LCID FdwVersionHi DWORD FdwVersionLo DWORD } /* wtypes.h:586:9 */ type QUERYCONTEXT = tagQUERYCONTEXT /* wtypes.h:592:3 */ type TYSPEC = uint32 /* wtypes.h:602:3 */ type __WIDL_wtypes_generated_name_00000001 = struct { Ftyspec DWORD _ [4]byte Ftagged_union struct { _ [0]uint64 Fclsid CLSID _ [16]byte } } /* wtypes.h:604:9 */ type uCLSSPEC = __WIDL_wtypes_generated_name_00000001 /* wtypes.h:621:3 */ // Begin additional prototypes for all interfaces // End additional prototypes // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // **************************************************************************** // // IUnknown interface // **************************************************************************** // // AsyncIUnknown interface // **************************************************************************** // // IClassFactory interface // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/wtypes.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // **************************************************************************** // // IMallocSpy interface type LPMALLOCSPY = uintptr /* objidl.h:7612:20 */ type IMallocSpyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPreAlloc uintptr FPostAlloc uintptr FPreFree uintptr FPostFree uintptr FPreRealloc uintptr FPostRealloc uintptr FPreGetSize uintptr FPostGetSize uintptr FPreDidAlloc uintptr FPostDidAlloc uintptr FPreHeapMinimize uintptr FPostHeapMinimize uintptr } /* objidl.h:277:9 */ type IMallocSpyVtbl = IMallocSpyVtbl1 /* objidl.h:7742:3 */ // **************************************************************************** // // IBindCtx interface type LPBC = uintptr /* objidl.h:7934:18 */ type LPBINDCTX = uintptr /* objidl.h:7935:18 */ type tagBIND_OPTS = struct { FcbStruct DWORD FgrfFlags DWORD FgrfMode DWORD FdwTickCountDeadline DWORD } /* objidl.h:7944:9 */ type BIND_OPTS = tagBIND_OPTS /* objidl.h:7949:3 */ type LPBIND_OPTS = uintptr /* objidl.h:7950:29 */ type tagBIND_OPTS2 = struct { FcbStruct DWORD FgrfFlags DWORD FgrfMode DWORD FdwTickCountDeadline DWORD FdwTrackFlags DWORD FdwClassContext DWORD Flocale LCID _ [4]byte FpServerInfo uintptr } /* objidl.h:7960:9 */ type BIND_OPTS2 = tagBIND_OPTS2 /* objidl.h:7969:3 */ type LPBIND_OPTS2 = uintptr /* objidl.h:7970:30 */ type tagBIND_OPTS3 = struct { FcbStruct DWORD FgrfFlags DWORD FgrfMode DWORD FdwTickCountDeadline DWORD FdwTrackFlags DWORD FdwClassContext DWORD Flocale LCID _ [4]byte FpServerInfo uintptr Fhwnd HWND } /* objidl.h:7977:9 */ type BIND_OPTS3 = tagBIND_OPTS3 /* objidl.h:7987:3 */ type LPBIND_OPTS3 = uintptr /* objidl.h:7988:30 */ type BIND_FLAGS = uint32 /* objidl.h:7993:3 */ type IBindCtxVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRegisterObjectBound uintptr FRevokeObjectBound uintptr FReleaseBoundObjects uintptr FSetBindOptions uintptr FGetBindOptions uintptr FGetRunningObjectTable uintptr FRegisterObjectParam uintptr FGetObjectParam uintptr FEnumObjectParam uintptr FRevokeObjectParam uintptr } /* objidl.h:282:9 */ type IBindCtxVtbl = IBindCtxVtbl1 /* objidl.h:8094:3 */ // **************************************************************************** // // IEnumMoniker interface type LPENUMMONIKER = uintptr /* objidl.h:8265:22 */ type IEnumMonikerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* objidl.h:287:9 */ type IEnumMonikerVtbl = IEnumMonikerVtbl1 /* objidl.h:8324:3 */ // **************************************************************************** // // IRunnableObject interface type LPRUNNABLEOBJECT = uintptr /* objidl.h:8423:25 */ type IRunnableObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetRunningClass uintptr FRun uintptr FIsRunning uintptr FLockRunning uintptr FSetContainedObject uintptr } /* objidl.h:292:9 */ type IRunnableObjectVtbl = IRunnableObjectVtbl1 /* objidl.h:8487:3 */ // **************************************************************************** // // IRunningObjectTable interface type LPRUNNINGOBJECTTABLE = uintptr /* objidl.h:8589:29 */ type IRunningObjectTableVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRegister uintptr FRevoke uintptr FIsRunning uintptr FGetObjectA uintptr FNoteChangeTime uintptr FGetTimeOfLastChange uintptr FEnumRunning uintptr } /* objidl.h:297:9 */ type IRunningObjectTableVtbl = IRunningObjectTableVtbl1 /* objidl.h:8678:3 */ // **************************************************************************** // // IPersist interface type LPPERSIST = uintptr /* objidl.h:8808:18 */ type IPersistVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr } /* objidl.h:302:9 */ type IPersistVtbl = IPersistVtbl1 /* objidl.h:8843:3 */ // **************************************************************************** // // IPersistStream interface type LPPERSISTSTREAM = uintptr /* objidl.h:8893:24 */ type IPersistStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FLoad uintptr FSave uintptr FGetSizeMax uintptr } /* objidl.h:307:9 */ type IPersistStreamVtbl = IPersistStreamVtbl1 /* objidl.h:8955:3 */ // **************************************************************************** // // IMoniker interface type LPMONIKER = uintptr /* objidl.h:9047:18 */ type MKSYS = uint32 /* objidl.h:9059:3 */ type MKRREDUCE = uint32 /* objidl.h:9065:3 */ type IMonikerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FLoad uintptr FSave uintptr FGetSizeMax uintptr FBindToObject uintptr FBindToStorage uintptr FReduce uintptr FComposeWith uintptr FEnum uintptr FIsEqual uintptr FHash uintptr FIsRunning uintptr FGetTimeOfLastChange uintptr FInverse uintptr FCommonPrefixWith uintptr FRelativePathTo uintptr FGetDisplayName uintptr FParseDisplayName uintptr FIsSystemMoniker uintptr } /* objidl.h:312:9 */ type IMonikerVtbl = IMonikerVtbl1 /* objidl.h:9268:3 */ type IROTDataVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetComparisonData uintptr } /* objidl.h:317:9 */ type IROTDataVtbl = IROTDataVtbl1 /* objidl.h:9598:3 */ // **************************************************************************** // // IEnumSTATSTG interface type LPENUMSTATSTG = uintptr /* objidl.h:9652:22 */ type IEnumSTATSTGVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* objidl.h:322:9 */ type IEnumSTATSTGVtbl = IEnumSTATSTGVtbl1 /* objidl.h:9711:3 */ // **************************************************************************** // // IStorage interface type LPSTORAGE = uintptr /* objidl.h:9808:18 */ type tagRemSNB = struct { FulCntStr ULONG FulCntChar ULONG FrgString [1]OLECHAR _ [2]byte } /* objidl.h:9809:9 */ type RemSNB = tagRemSNB /* objidl.h:9813:3 */ type wireSNB = uintptr /* objidl.h:9814:16 */ type SNB = uintptr /* objidl.h:9815:18 */ type IStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateStream uintptr FOpenStream uintptr FCreateStorage uintptr FOpenStorage uintptr FCopyTo uintptr FMoveElementTo uintptr FCommit uintptr FRevert uintptr FEnumElements uintptr FDestroyElement uintptr FRenameElement uintptr FSetElementTimes uintptr FSetClass uintptr FSetStateBits uintptr FStat uintptr } /* objidl.h:327:9 */ type IStorageVtbl = IStorageVtbl1 /* objidl.h:10011:3 */ // **************************************************************************** // // IPersistFile interface type LPPERSISTFILE = uintptr /* objidl.h:10304:22 */ type IPersistFileVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FLoad uintptr FSave uintptr FSaveCompleted uintptr FGetCurFile uintptr } /* objidl.h:332:9 */ type IPersistFileVtbl = IPersistFileVtbl1 /* objidl.h:10375:3 */ // **************************************************************************** // // IPersistStorage interface type LPPERSISTSTORAGE = uintptr /* objidl.h:10480:25 */ type IPersistStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FInitNew uintptr FLoad uintptr FSave uintptr FSaveCompleted uintptr FHandsOffStorage uintptr } /* objidl.h:337:9 */ type IPersistStorageVtbl = IPersistStorageVtbl1 /* objidl.h:10555:3 */ // **************************************************************************** // // ILockBytes interface type LPLOCKBYTES = uintptr /* objidl.h:10672:20 */ type ILockBytesVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FReadAt uintptr FWriteAt uintptr FFlush uintptr FSetSize uintptr FLockRegion uintptr FUnlockRegion uintptr FStat uintptr } /* objidl.h:342:9 */ type ILockBytesVtbl = ILockBytesVtbl1 /* objidl.h:10770:3 */ // **************************************************************************** // // IEnumFORMATETC interface type LPENUMFORMATETC = uintptr /* objidl.h:10926:24 */ type tagDVTARGETDEVICE = struct { FtdSize DWORD FtdDriverNameOffset WORD FtdDeviceNameOffset WORD FtdPortNameOffset WORD FtdExtDevmodeOffset WORD FtdData [1]BYTE _ [3]byte } /* objidl.h:10927:9 */ type DVTARGETDEVICE = tagDVTARGETDEVICE /* objidl.h:10934:3 */ type LPCLIPFORMAT = uintptr /* objidl.h:10935:20 */ type tagFORMATETC = struct { FcfFormat CLIPFORMAT _ [6]byte Fptd uintptr FdwAspect DWORD Flindex LONG Ftymed DWORD _ [4]byte } /* objidl.h:10936:9 */ type FORMATETC = tagFORMATETC /* objidl.h:10942:3 */ type LPFORMATETC = uintptr /* objidl.h:10943:29 */ type IEnumFORMATETCVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* objidl.h:347:9 */ type IEnumFORMATETCVtbl = IEnumFORMATETCVtbl1 /* objidl.h:11002:3 */ // **************************************************************************** // // IEnumSTATDATA interface type LPENUMSTATDATA = uintptr /* objidl.h:11099:23 */ type ADVF = uint32 /* objidl.h:11108:3 */ type tagSTATDATA = struct { Fformatetc FORMATETC Fadvf DWORD _ [4]byte FpAdvSink uintptr FdwConnection DWORD _ [4]byte } /* objidl.h:11109:9 */ type STATDATA = tagSTATDATA /* objidl.h:11114:3 */ type LPSTATDATA = uintptr /* objidl.h:11115:18 */ type IEnumSTATDATAVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* objidl.h:352:9 */ type IEnumSTATDATAVtbl = IEnumSTATDATAVtbl1 /* objidl.h:11174:3 */ // **************************************************************************** // // IRootStorage interface type LPROOTSTORAGE = uintptr /* objidl.h:11271:22 */ type IRootStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSwitchToFile uintptr } /* objidl.h:357:9 */ type IRootStorageVtbl = IRootStorageVtbl1 /* objidl.h:11306:3 */ // **************************************************************************** // // IAdviseSink interface type LPADVISESINK = uintptr /* objidl.h:11356:21 */ type TYMED = uint32 /* objidl.h:11366:3 */ type tagRemSTGMEDIUM = struct { Ftymed DWORD FdwHandleType DWORD FpData ULONG FpUnkForRelease ULONG FcbData ULONG Fdata [1]byte _ [3]byte } /* objidl.h:11367:9 */ type RemSTGMEDIUM = tagRemSTGMEDIUM /* objidl.h:11374:3 */ type tagSTGMEDIUM = struct { Ftymed DWORD _ [4]byte Fu struct{ FhBitmap HBITMAP } FpUnkForRelease uintptr } /* objidl.h:11376:9 */ type uSTGMEDIUM = tagSTGMEDIUM /* objidl.h:11388:2 */ type _GDI_OBJECT = struct { FObjectType DWORD _ [4]byte Fu struct{ FhBitmap wireHBITMAP } } /* objidl.h:11404:9 */ type GDI_OBJECT = _GDI_OBJECT /* objidl.h:11411:3 */ type _userSTGMEDIUM = struct { Fu struct { Ftymed DWORD _ [4]byte Fu struct{ FhMetaFilePict wireHMETAFILEPICT } } FpUnkForRelease uintptr } /* objidl.h:11412:9 */ type _STGMEDIUM_UNION = struct { Ftymed DWORD _ [4]byte Fu struct{ FhMetaFilePict wireHMETAFILEPICT } } /* objidl.h:11412:9 */ type userSTGMEDIUM = _userSTGMEDIUM /* objidl.h:11426:3 */ type wireSTGMEDIUM = uintptr /* objidl.h:11427:23 */ type STGMEDIUM = uSTGMEDIUM /* objidl.h:11428:20 */ type wireASYNC_STGMEDIUM = uintptr /* objidl.h:11429:23 */ type ASYNC_STGMEDIUM = STGMEDIUM /* objidl.h:11430:19 */ type LPSTGMEDIUM = uintptr /* objidl.h:11431:19 */ type _userFLAG_STGMEDIUM = struct { FContextFlags LONG FfPassOwnership LONG FStgmed userSTGMEDIUM } /* objidl.h:11432:9 */ type userFLAG_STGMEDIUM = _userFLAG_STGMEDIUM /* objidl.h:11436:3 */ type wireFLAG_STGMEDIUM = uintptr /* objidl.h:11437:28 */ type _FLAG_STGMEDIUM = struct { FContextFlags LONG FfPassOwnership LONG FStgmed STGMEDIUM } /* objidl.h:11438:9 */ type FLAG_STGMEDIUM = _FLAG_STGMEDIUM /* objidl.h:11442:3 */ type IAdviseSinkVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnDataChange uintptr FOnViewChange uintptr FOnRename uintptr FOnSave uintptr FOnClose uintptr } /* objidl.h:362:9 */ type IAdviseSinkVtbl = IAdviseSinkVtbl1 /* objidl.h:11507:3 */ type AsyncIAdviseSinkVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBegin_OnDataChange uintptr FFinish_OnDataChange uintptr FBegin_OnViewChange uintptr FFinish_OnViewChange uintptr FBegin_OnRename uintptr FFinish_OnRename uintptr FBegin_OnSave uintptr FFinish_OnSave uintptr FBegin_OnClose uintptr FFinish_OnClose uintptr } /* objidl.h:367:9 */ type AsyncIAdviseSinkVtbl = AsyncIAdviseSinkVtbl1 /* objidl.h:11729:3 */ // **************************************************************************** // // IAdviseSink2 interface type LPADVISESINK2 = uintptr /* objidl.h:11944:22 */ type IAdviseSink2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnDataChange uintptr FOnViewChange uintptr FOnRename uintptr FOnSave uintptr FOnClose uintptr FOnLinkSrcChange uintptr } /* objidl.h:372:9 */ type IAdviseSink2Vtbl = IAdviseSink2Vtbl1 /* objidl.h:12000:3 */ type AsyncIAdviseSink2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBegin_OnDataChange uintptr FFinish_OnDataChange uintptr FBegin_OnViewChange uintptr FFinish_OnViewChange uintptr FBegin_OnRename uintptr FFinish_OnRename uintptr FBegin_OnSave uintptr FFinish_OnSave uintptr FBegin_OnClose uintptr FFinish_OnClose uintptr FBegin_OnLinkSrcChange uintptr FFinish_OnLinkSrcChange uintptr } /* objidl.h:377:9 */ type AsyncIAdviseSink2Vtbl = AsyncIAdviseSink2Vtbl1 /* objidl.h:12154:3 */ // **************************************************************************** // // IDataObject interface type LPDATAOBJECT = uintptr /* objidl.h:12271:21 */ type DATADIR = uint32 /* objidl.h:12275:3 */ type IDataObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetData uintptr FGetDataHere uintptr FQueryGetData uintptr FGetCanonicalFormatEtc uintptr FSetData uintptr FEnumFormatEtc uintptr FDAdvise uintptr FDUnadvise uintptr FEnumDAdvise uintptr } /* objidl.h:382:9 */ type IDataObjectVtbl = IDataObjectVtbl1 /* objidl.h:12384:3 */ // **************************************************************************** // // IDataAdviseHolder interface type LPDATAADVISEHOLDER = uintptr /* objidl.h:12567:27 */ type IDataAdviseHolderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAdvise uintptr FUnadvise uintptr FEnumAdvise uintptr FSendOnDataChange uintptr } /* objidl.h:387:9 */ type IDataAdviseHolderVtbl = IDataAdviseHolderVtbl1 /* objidl.h:12635:3 */ // **************************************************************************** // // IMessageFilter interface type LPMESSAGEFILTER = uintptr /* objidl.h:12727:24 */ type CALLTYPE = uint32 /* objidl.h:12734:3 */ type SERVERCALL = uint32 /* objidl.h:12739:3 */ type PENDINGTYPE = uint32 /* objidl.h:12743:3 */ type PENDINGMSG = uint32 /* objidl.h:12748:3 */ type tagINTERFACEINFO = struct { FpUnk uintptr Fiid IID FwMethod WORD _ [6]byte } /* objidl.h:12749:9 */ type INTERFACEINFO = tagINTERFACEINFO /* objidl.h:12753:3 */ type LPINTERFACEINFO = uintptr /* objidl.h:12754:33 */ type IMessageFilterVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FHandleInComingCall uintptr FRetryRejectedCall uintptr FMessagePending uintptr } /* objidl.h:392:9 */ type IMessageFilterVtbl = IMessageFilterVtbl1 /* objidl.h:12817:3 */ type IClassActivatorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassObject uintptr } /* objidl.h:397:9 */ type IClassActivatorVtbl = IClassActivatorVtbl1 /* objidl.h:12957:3 */ type IFillLockBytesVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FFillAppend uintptr FFillAt uintptr FSetFillSize uintptr FTerminate uintptr } /* objidl.h:402:9 */ type IFillLockBytesVtbl = IFillLockBytesVtbl1 /* objidl.h:13078:3 */ type IProgressNotifyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnProgress uintptr } /* objidl.h:407:9 */ type IProgressNotifyVtbl = IProgressNotifyVtbl1 /* objidl.h:13233:3 */ // **************************************************************************** // // ILayoutStorage interface type tagStorageLayout = struct { FLayoutType DWORD _ [4]byte FpwcsElementName uintptr FcOffset LARGE_INTEGER FcBytes LARGE_INTEGER } /* objidl.h:13288:9 */ // **************************************************************************** // // ILayoutStorage interface type StorageLayout = tagStorageLayout /* objidl.h:13293:3 */ type ILayoutStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FLayoutScript uintptr FBeginMonitor uintptr FEndMonitor uintptr FReLayoutDocfile uintptr FReLayoutDocfileOnILockBytes uintptr } /* objidl.h:412:9 */ type ILayoutStorageVtbl = ILayoutStorageVtbl1 /* objidl.h:13358:3 */ type IBlockingLockVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FLock uintptr FUnlock uintptr } /* objidl.h:417:9 */ type IBlockingLockVtbl = IBlockingLockVtbl1 /* objidl.h:13498:3 */ type ITimeAndNoticeControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSuppressChanges uintptr } /* objidl.h:422:9 */ type ITimeAndNoticeControlVtbl = ITimeAndNoticeControlVtbl1 /* objidl.h:13595:3 */ type IOplockStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateStorageEx uintptr FOpenStorageEx uintptr } /* objidl.h:427:9 */ type IOplockStorageVtbl = IOplockStorageVtbl1 /* objidl.h:13707:3 */ type IDirectWriterLockVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWaitForWriteAccess uintptr FReleaseWriteAccess uintptr FHaveWriteAccess uintptr } /* objidl.h:432:9 */ type IDirectWriterLockVtbl = IDirectWriterLockVtbl1 /* objidl.h:13827:3 */ type IUrlMonVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAsyncGetClassBits uintptr } /* objidl.h:437:9 */ type IUrlMonVtbl = IUrlMonVtbl1 /* objidl.h:13953:3 */ type IForegroundTransferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAllowForegroundTransfer uintptr } /* objidl.h:442:9 */ type IForegroundTransferVtbl = IForegroundTransferVtbl1 /* objidl.h:14046:3 */ type IThumbnailExtractorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FExtractThumbnail uintptr FOnFileUpdated uintptr } /* objidl.h:447:9 */ type IThumbnailExtractorVtbl = IThumbnailExtractorVtbl1 /* objidl.h:14147:3 */ type IDummyHICONIncluderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDummy uintptr } /* objidl.h:452:9 */ type IDummyHICONIncluderVtbl = IDummyHICONIncluderVtbl1 /* objidl.h:14250:3 */ type ApplicationType = uint32 /* objidl.h:14298:3 */ type ShutdownType = uint32 /* objidl.h:14302:3 */ type IProcessLockVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddRefOnProcess uintptr FReleaseRefOnProcess uintptr } /* objidl.h:457:9 */ type IProcessLockVtbl = IProcessLockVtbl1 /* objidl.h:14348:3 */ type ISurrogateServiceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FInit uintptr FApplicationLaunch uintptr FApplicationFree uintptr FCatalogRefresh uintptr FProcessShutdown uintptr } /* objidl.h:462:9 */ type ISurrogateServiceVtbl = ISurrogateServiceVtbl1 /* objidl.h:14476:3 */ // **************************************************************************** // // IInitializeSpy interface type LPINITIALIZESPY = uintptr /* objidl.h:14577:24 */ type IInitializeSpyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPreInitialize uintptr FPostInitialize uintptr FPreUninitialize uintptr FPostUninitialize uintptr } /* objidl.h:467:9 */ type IInitializeSpyVtbl = IInitializeSpyVtbl1 /* objidl.h:14639:3 */ type IApartmentShutdownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnUninitialize uintptr } /* objidl.h:472:9 */ type IApartmentShutdownVtbl = IApartmentShutdownVtbl1 /* objidl.h:14764:3 */ type COMSD = uint32 /* objbase.h:92:3 */ type tagSTGOPTIONS = struct { FusVersion USHORT Freserved USHORT FulSectorSize ULONG FpwcsTemplateFile uintptr } /* objbase.h:130:9 */ type STGOPTIONS = tagSTGOPTIONS /* objbase.h:137:3 */ //** Autogenerated by WIDL 1.6 from include/urlmon.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IPersistMoniker1 = struct{ FlpVtbl uintptr } /* urlmon.h:22:9 */ //** Autogenerated by WIDL 1.6 from include/urlmon.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IPersistMoniker = IPersistMoniker1 /* urlmon.h:22:35 */ type IMonikerProp1 = struct{ FlpVtbl uintptr } /* urlmon.h:27:9 */ type IMonikerProp = IMonikerProp1 /* urlmon.h:27:32 */ type IBindProtocol1 = struct{ FlpVtbl uintptr } /* urlmon.h:32:9 */ type IBindProtocol = IBindProtocol1 /* urlmon.h:32:33 */ type IBinding1 = struct{ FlpVtbl uintptr } /* urlmon.h:37:9 */ type IBinding = IBinding1 /* urlmon.h:37:28 */ type IBindStatusCallback1 = struct{ FlpVtbl uintptr } /* urlmon.h:42:9 */ type IBindStatusCallback = IBindStatusCallback1 /* urlmon.h:42:39 */ type IBindStatusCallbackEx1 = struct{ FlpVtbl uintptr } /* urlmon.h:47:9 */ type IBindStatusCallbackEx = IBindStatusCallbackEx1 /* urlmon.h:47:41 */ type IAuthenticate1 = struct{ FlpVtbl uintptr } /* urlmon.h:52:9 */ type IAuthenticate = IAuthenticate1 /* urlmon.h:52:33 */ type IAuthenticateEx1 = struct{ FlpVtbl uintptr } /* urlmon.h:57:9 */ type IAuthenticateEx = IAuthenticateEx1 /* urlmon.h:57:35 */ type IHttpNegotiate1 = struct{ FlpVtbl uintptr } /* urlmon.h:62:9 */ type IHttpNegotiate = IHttpNegotiate1 /* urlmon.h:62:34 */ type IHttpNegotiate21 = struct{ FlpVtbl uintptr } /* urlmon.h:67:9 */ type IHttpNegotiate2 = IHttpNegotiate21 /* urlmon.h:67:35 */ type IHttpNegotiate31 = struct{ FlpVtbl uintptr } /* urlmon.h:72:9 */ type IHttpNegotiate3 = IHttpNegotiate31 /* urlmon.h:72:35 */ type IWinInetFileStream1 = struct{ FlpVtbl uintptr } /* urlmon.h:77:9 */ type IWinInetFileStream = IWinInetFileStream1 /* urlmon.h:77:38 */ type IWindowForBindingUI1 = struct{ FlpVtbl uintptr } /* urlmon.h:82:9 */ type IWindowForBindingUI = IWindowForBindingUI1 /* urlmon.h:82:39 */ type ICodeInstall1 = struct{ FlpVtbl uintptr } /* urlmon.h:87:9 */ type ICodeInstall = ICodeInstall1 /* urlmon.h:87:32 */ type IWinInetInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:112:9 */ type IWinInetInfo = IWinInetInfo1 /* urlmon.h:112:32 */ type IHttpSecurity1 = struct{ FlpVtbl uintptr } /* urlmon.h:117:9 */ type IHttpSecurity = IHttpSecurity1 /* urlmon.h:117:33 */ type IWinInetHttpInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:122:9 */ type IWinInetHttpInfo = IWinInetHttpInfo1 /* urlmon.h:122:36 */ type IWinInetHttpTimeouts1 = struct{ FlpVtbl uintptr } /* urlmon.h:127:9 */ type IWinInetHttpTimeouts = IWinInetHttpTimeouts1 /* urlmon.h:127:40 */ type IBindHost1 = struct{ FlpVtbl uintptr } /* urlmon.h:142:9 */ type IBindHost = IBindHost1 /* urlmon.h:142:29 */ type IInternet1 = struct{ FlpVtbl uintptr } /* urlmon.h:147:9 */ type IInternet = IInternet1 /* urlmon.h:147:29 */ type IInternetBindInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:152:9 */ type IInternetBindInfo = IInternetBindInfo1 /* urlmon.h:152:37 */ type IInternetBindInfoEx1 = struct{ FlpVtbl uintptr } /* urlmon.h:157:9 */ type IInternetBindInfoEx = IInternetBindInfoEx1 /* urlmon.h:157:39 */ type IInternetProtocolRoot1 = struct{ FlpVtbl uintptr } /* urlmon.h:162:9 */ type IInternetProtocolRoot = IInternetProtocolRoot1 /* urlmon.h:162:41 */ type IInternetProtocol1 = struct{ FlpVtbl uintptr } /* urlmon.h:167:9 */ type IInternetProtocol = IInternetProtocol1 /* urlmon.h:167:37 */ type IInternetProtocolSink1 = struct{ FlpVtbl uintptr } /* urlmon.h:177:9 */ type IInternetProtocolSink = IInternetProtocolSink1 /* urlmon.h:177:41 */ type IInternetProtocolSinkStackable1 = struct{ FlpVtbl uintptr } /* urlmon.h:182:9 */ type IInternetProtocolSinkStackable = IInternetProtocolSinkStackable1 /* urlmon.h:182:50 */ type IInternetSession1 = struct{ FlpVtbl uintptr } /* urlmon.h:187:9 */ type IInternetSession = IInternetSession1 /* urlmon.h:187:36 */ type IInternetThreadSwitch1 = struct{ FlpVtbl uintptr } /* urlmon.h:192:9 */ type IInternetThreadSwitch = IInternetThreadSwitch1 /* urlmon.h:192:41 */ type IInternetPriority1 = struct{ FlpVtbl uintptr } /* urlmon.h:197:9 */ type IInternetPriority = IInternetPriority1 /* urlmon.h:197:37 */ type IInternetProtocolInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:202:9 */ type IInternetProtocolInfo = IInternetProtocolInfo1 /* urlmon.h:202:41 */ type IInternetSecurityMgrSite1 = struct{ FlpVtbl uintptr } /* urlmon.h:207:9 */ type IInternetSecurityMgrSite = IInternetSecurityMgrSite1 /* urlmon.h:207:44 */ type IInternetSecurityManager1 = struct{ FlpVtbl uintptr } /* urlmon.h:212:9 */ type IInternetSecurityManager = IInternetSecurityManager1 /* urlmon.h:212:44 */ type IInternetHostSecurityManager1 = struct{ FlpVtbl uintptr } /* urlmon.h:232:9 */ type IInternetHostSecurityManager = IInternetHostSecurityManager1 /* urlmon.h:232:48 */ type IInternetZoneManager1 = struct{ FlpVtbl uintptr } /* urlmon.h:237:9 */ type IInternetZoneManager = IInternetZoneManager1 /* urlmon.h:237:40 */ type ISoftDistExt1 = struct{ FlpVtbl uintptr } /* urlmon.h:252:9 */ type ISoftDistExt = ISoftDistExt1 /* urlmon.h:252:32 */ type ICatalogFileInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:257:9 */ type ICatalogFileInfo = ICatalogFileInfo1 /* urlmon.h:257:36 */ type IDataFilter1 = struct{ FlpVtbl uintptr } /* urlmon.h:262:9 */ type IDataFilter = IDataFilter1 /* urlmon.h:262:31 */ type IEncodingFilterFactory1 = struct{ FlpVtbl uintptr } /* urlmon.h:267:9 */ type IEncodingFilterFactory = IEncodingFilterFactory1 /* urlmon.h:267:42 */ type IWrappedProtocol1 = struct{ FlpVtbl uintptr } /* urlmon.h:272:9 */ type IWrappedProtocol = IWrappedProtocol1 /* urlmon.h:272:36 */ type IGetBindHandle1 = struct{ FlpVtbl uintptr } /* urlmon.h:277:9 */ type IGetBindHandle = IGetBindHandle1 /* urlmon.h:277:34 */ type IBindCallbackRedirect1 = struct{ FlpVtbl uintptr } /* urlmon.h:282:9 */ type IBindCallbackRedirect = IBindCallbackRedirect1 /* urlmon.h:282:41 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/oleidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IOleAdviseHolder1 = struct{ FlpVtbl uintptr } /* oleidl.h:22:9 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/oleidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IOleAdviseHolder = IOleAdviseHolder1 /* oleidl.h:22:36 */ type IOleCache1 = struct{ FlpVtbl uintptr } /* oleidl.h:27:9 */ type IOleCache = IOleCache1 /* oleidl.h:27:29 */ type IOleCache21 = struct{ FlpVtbl uintptr } /* oleidl.h:32:9 */ type IOleCache2 = IOleCache21 /* oleidl.h:32:30 */ type IOleCacheControl1 = struct{ FlpVtbl uintptr } /* oleidl.h:37:9 */ type IOleCacheControl = IOleCacheControl1 /* oleidl.h:37:36 */ type IParseDisplayName1 = struct{ FlpVtbl uintptr } /* oleidl.h:42:9 */ type IParseDisplayName = IParseDisplayName1 /* oleidl.h:42:37 */ type IOleContainer1 = struct{ FlpVtbl uintptr } /* oleidl.h:47:9 */ type IOleContainer = IOleContainer1 /* oleidl.h:47:33 */ type IOleClientSite1 = struct{ FlpVtbl uintptr } /* oleidl.h:52:9 */ type IOleClientSite = IOleClientSite1 /* oleidl.h:52:34 */ type IOleObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:57:9 */ type IOleObject = IOleObject1 /* oleidl.h:57:30 */ type IOleWindow1 = struct{ FlpVtbl uintptr } /* oleidl.h:62:9 */ type IOleWindow = IOleWindow1 /* oleidl.h:62:30 */ type IOleLink1 = struct{ FlpVtbl uintptr } /* oleidl.h:67:9 */ type IOleLink = IOleLink1 /* oleidl.h:67:28 */ type IOleItemContainer1 = struct{ FlpVtbl uintptr } /* oleidl.h:72:9 */ type IOleItemContainer = IOleItemContainer1 /* oleidl.h:72:37 */ type IOleInPlaceUIWindow1 = struct{ FlpVtbl uintptr } /* oleidl.h:77:9 */ type IOleInPlaceUIWindow = IOleInPlaceUIWindow1 /* oleidl.h:77:39 */ type IOleInPlaceActiveObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:82:9 */ type IOleInPlaceActiveObject = IOleInPlaceActiveObject1 /* oleidl.h:82:43 */ type IOleInPlaceFrame1 = struct{ FlpVtbl uintptr } /* oleidl.h:87:9 */ type IOleInPlaceFrame = IOleInPlaceFrame1 /* oleidl.h:87:36 */ type IOleInPlaceObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:92:9 */ type IOleInPlaceObject = IOleInPlaceObject1 /* oleidl.h:92:37 */ type IOleInPlaceSite1 = struct{ FlpVtbl uintptr } /* oleidl.h:97:9 */ type IOleInPlaceSite = IOleInPlaceSite1 /* oleidl.h:97:35 */ type IContinue1 = struct{ FlpVtbl uintptr } /* oleidl.h:102:9 */ type IContinue = IContinue1 /* oleidl.h:102:29 */ type IViewObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:107:9 */ type IViewObject = IViewObject1 /* oleidl.h:107:31 */ type IViewObject21 = struct{ FlpVtbl uintptr } /* oleidl.h:112:9 */ type IViewObject2 = IViewObject21 /* oleidl.h:112:32 */ type IDropSource1 = struct{ FlpVtbl uintptr } /* oleidl.h:117:9 */ type IDropSource = IDropSource1 /* oleidl.h:117:31 */ type IDropTarget1 = struct{ FlpVtbl uintptr } /* oleidl.h:122:9 */ type IDropTarget = IDropTarget1 /* oleidl.h:122:31 */ type IDropSourceNotify1 = struct{ FlpVtbl uintptr } /* oleidl.h:127:9 */ type IDropSourceNotify = IDropSourceNotify1 /* oleidl.h:127:37 */ type IEnumOLEVERB1 = struct{ FlpVtbl uintptr } /* oleidl.h:132:9 */ type IEnumOLEVERB = IEnumOLEVERB1 /* oleidl.h:132:32 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // **************************************************************************** // // IOleAdviseHolder interface type LPOLEADVISEHOLDER = uintptr /* oleidl.h:169:26 */ type IOleAdviseHolderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAdvise uintptr FUnadvise uintptr FEnumAdvise uintptr FSendOnRename uintptr FSendOnSave uintptr FSendOnClose uintptr } /* oleidl.h:22:9 */ type IOleAdviseHolderVtbl = IOleAdviseHolderVtbl1 /* oleidl.h:240:3 */ // **************************************************************************** // // IOleCache interface type LPOLECACHE = uintptr /* oleidl.h:352:19 */ type IOleCacheVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCache uintptr FUncache uintptr FEnumCache uintptr FInitCache uintptr FSetData uintptr } /* oleidl.h:27:9 */ type IOleCacheVtbl = IOleCacheVtbl1 /* oleidl.h:424:3 */ // **************************************************************************** // // IOleCache2 interface type LPOLECACHE2 = uintptr /* oleidl.h:527:20 */ type DISCARDCACHE = uint32 /* oleidl.h:551:3 */ type IOleCache2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCache uintptr FUncache uintptr FEnumCache uintptr FInitCache uintptr FSetData uintptr FUpdateCache uintptr FDiscardCache uintptr } /* oleidl.h:32:9 */ type IOleCache2Vtbl = IOleCache2Vtbl1 /* oleidl.h:623:3 */ // **************************************************************************** // // IOleCacheControl interface type LPOLECACHECONTROL = uintptr /* oleidl.h:722:26 */ type IOleCacheControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnRun uintptr FOnStop uintptr } /* oleidl.h:37:9 */ type IOleCacheControlVtbl = IOleCacheControlVtbl1 /* oleidl.h:764:3 */ // **************************************************************************** // // IParseDisplayName interface type LPPARSEDISPLAYNAME = uintptr /* oleidl.h:826:27 */ type IParseDisplayNameVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseDisplayName uintptr } /* oleidl.h:42:9 */ type IParseDisplayNameVtbl = IParseDisplayNameVtbl1 /* oleidl.h:868:3 */ // **************************************************************************** // // IOleContainer interface type LPOLECONTAINER = uintptr /* oleidl.h:922:23 */ type IOleContainerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseDisplayName uintptr FEnumObjects uintptr FLockContainer uintptr } /* oleidl.h:47:9 */ type IOleContainerVtbl = IOleContainerVtbl1 /* oleidl.h:975:3 */ // **************************************************************************** // // IOleClientSite interface type LPOLECLIENTSITE = uintptr /* oleidl.h:1045:24 */ type IOleClientSiteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSaveObject uintptr FGetMoniker uintptr FGetContainer uintptr FShowObject uintptr FOnShowWindow uintptr FRequestNewObjectLayout uintptr } /* oleidl.h:52:9 */ type IOleClientSiteVtbl = IOleClientSiteVtbl1 /* oleidl.h:1117:3 */ // **************************************************************************** // // IOleObject interface type LPOLEOBJECT = uintptr /* oleidl.h:1227:20 */ type OLEGETMONIKER = uint32 /* oleidl.h:1234:3 */ type OLEWHICHMK = uint32 /* oleidl.h:1240:3 */ type USERCLASSTYPE = uint32 /* oleidl.h:1246:3 */ type OLEMISC = uint32 /* oleidl.h:1271:3 */ type OLECLOSE = uint32 /* oleidl.h:1276:3 */ type IOleObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetClientSite uintptr FGetClientSite uintptr FSetHostNames uintptr FClose uintptr FSetMoniker uintptr FGetMoniker uintptr FInitFromData uintptr FGetClipboardData uintptr FDoVerb uintptr FEnumVerbs uintptr FUpdate uintptr FIsUpToDate uintptr FGetUserClassID uintptr FGetUserType uintptr FSetExtent uintptr FGetExtent uintptr FAdvise uintptr FUnadvise uintptr FEnumAdvise uintptr FGetMiscStatus uintptr FSetColorScheme uintptr } /* oleidl.h:57:9 */ type IOleObjectVtbl = IOleObjectVtbl1 /* oleidl.h:1484:3 */ type OLERENDER = uint32 /* oleidl.h:1797:3 */ type LPOLERENDER = uintptr /* oleidl.h:1799:19 */ type tagOBJECTDESCRIPTOR = struct { FcbSize ULONG Fclsid CLSID FdwDrawAspect DWORD Fsizel SIZEL Fpointl POINTL FdwStatus DWORD FdwFullUserTypeName DWORD FdwSrcOfCopy DWORD } /* oleidl.h:1801:9 */ type OBJECTDESCRIPTOR = tagOBJECTDESCRIPTOR /* oleidl.h:1810:3 */ type POBJECTDESCRIPTOR = uintptr /* oleidl.h:1811:36 */ type LPOBJECTDESCRIPTOR = uintptr /* oleidl.h:1812:36 */ type LINKSRCDESCRIPTOR = tagOBJECTDESCRIPTOR /* oleidl.h:1813:36 */ type PLINKSRCDESCRIPTOR = uintptr /* oleidl.h:1814:36 */ type LPLINKSRCDESCRIPTOR = uintptr /* oleidl.h:1815:36 */ // **************************************************************************** // // IOleWindow interface type LPOLEWINDOW = uintptr /* oleidl.h:1826:20 */ type IOleWindowVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr } /* oleidl.h:62:9 */ type IOleWindowVtbl = IOleWindowVtbl1 /* oleidl.h:1869:3 */ // **************************************************************************** // // IOleLink interface type LPOLELINK = uintptr /* oleidl.h:1932:18 */ type OLEUPDATE = uint32 /* oleidl.h:1937:3 */ type LPOLEUPDATE = uintptr /* oleidl.h:1939:19 */ type POLEUPDATE = uintptr /* oleidl.h:1940:19 */ type OLELINKBIND = uint32 /* oleidl.h:1944:3 */ type IOleLinkVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetUpdateOptions uintptr FGetUpdateOptions uintptr FSetSourceMoniker uintptr FGetSourceMoniker uintptr FSetSourceDisplayName uintptr FGetSourceDisplayName uintptr FBindToSource uintptr FBindIfRunning uintptr FGetBoundSource uintptr FUnbindSource uintptr FUpdate uintptr } /* oleidl.h:67:9 */ type IOleLinkVtbl = IOleLinkVtbl1 /* oleidl.h:2052:3 */ // **************************************************************************** // // IOleItemContainer interface type LPOLEITEMCONTAINER = uintptr /* oleidl.h:2223:27 */ type BINDSPEED = uint32 /* oleidl.h:2229:3 */ type OLECONTF = uint32 /* oleidl.h:2237:3 */ type IOleItemContainerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseDisplayName uintptr FEnumObjects uintptr FLockContainer uintptr FGetObjectA uintptr FGetObjectStorage uintptr FIsRunning uintptr } /* oleidl.h:72:9 */ type IOleItemContainerVtbl = IOleItemContainerVtbl1 /* oleidl.h:2319:3 */ // **************************************************************************** // // IOleInPlaceUIWindow interface type LPOLEINPLACEUIWINDOW = uintptr /* oleidl.h:2417:29 */ type BORDERWIDTHS = RECT /* oleidl.h:2418:14 */ type LPBORDERWIDTHS = LPRECT /* oleidl.h:2419:16 */ type LPCBORDERWIDTHS = LPCRECT /* oleidl.h:2420:17 */ type IOleInPlaceUIWindowVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FGetBorder uintptr FRequestBorderSpace uintptr FSetBorderSpace uintptr FSetActiveObject uintptr } /* oleidl.h:77:9 */ type IOleInPlaceUIWindowVtbl = IOleInPlaceUIWindowVtbl1 /* oleidl.h:2488:3 */ // **************************************************************************** // // IOleInPlaceActiveObject interface type LPOLEINPLACEACTIVEOBJECT = uintptr /* oleidl.h:2586:33 */ type IOleInPlaceActiveObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FTranslateAcceleratorA uintptr FOnFrameWindowActivate uintptr FOnDocWindowActivate uintptr FResizeBorder uintptr FEnableModeless uintptr } /* oleidl.h:82:9 */ type IOleInPlaceActiveObjectVtbl = IOleInPlaceActiveObjectVtbl1 /* oleidl.h:2663:3 */ // **************************************************************************** // // IOleInPlaceFrame interface type LPOLEINPLACEFRAME = uintptr /* oleidl.h:2790:26 */ type tagOIFI = struct { Fcb UINT FfMDIApp WINBOOL FhwndFrame HWND Fhaccel HACCEL FcAccelEntries UINT _ [4]byte } /* oleidl.h:2792:9 */ type OLEINPLACEFRAMEINFO = tagOIFI /* oleidl.h:2798:3 */ type LPOLEINPLACEFRAMEINFO = uintptr /* oleidl.h:2799:24 */ type tagOleMenuGroupWidths = struct{ Fwidth [6]LONG } /* oleidl.h:2801:9 */ type OLEMENUGROUPWIDTHS = tagOleMenuGroupWidths /* oleidl.h:2803:3 */ type LPOLEMENUGROUPWIDTHS = uintptr /* oleidl.h:2804:38 */ type HOLEMENU = HGLOBAL /* oleidl.h:2806:17 */ type IOleInPlaceFrameVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FGetBorder uintptr FRequestBorderSpace uintptr FSetBorderSpace uintptr FSetActiveObject uintptr FInsertMenus uintptr FSetMenu uintptr FRemoveMenus uintptr FSetStatusText uintptr FEnableModeless uintptr FTranslateAcceleratorA uintptr } /* oleidl.h:87:9 */ type IOleInPlaceFrameVtbl = IOleInPlaceFrameVtbl1 /* oleidl.h:2912:3 */ // **************************************************************************** // // IOleInPlaceObject interface type LPOLEINPLACEOBJECT = uintptr /* oleidl.h:3055:27 */ type IOleInPlaceObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FInPlaceDeactivate uintptr FUIDeactivate uintptr FSetObjectRects uintptr FReactivateAndUndo uintptr } /* oleidl.h:92:9 */ type IOleInPlaceObjectVtbl = IOleInPlaceObjectVtbl1 /* oleidl.h:3120:3 */ // **************************************************************************** // // IOleInPlaceSite interface type LPOLEINPLACESITE = uintptr /* oleidl.h:3215:25 */ type IOleInPlaceSiteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FCanInPlaceActivate uintptr FOnInPlaceActivate uintptr FOnUIActivate uintptr FGetWindowContext uintptr FScroll uintptr FOnUIDeactivate uintptr FOnInPlaceDeactivate uintptr FDiscardUndoState uintptr FDeactivateAndUndo uintptr FOnPosRectChange uintptr } /* oleidl.h:97:9 */ type IOleInPlaceSiteVtbl = IOleInPlaceSiteVtbl1 /* oleidl.h:3325:3 */ type IContinueVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FFContinue uintptr } /* oleidl.h:102:9 */ type IContinueVtbl = IContinueVtbl1 /* oleidl.h:3525:3 */ // **************************************************************************** // // IViewObject interface type LPVIEWOBJECT = uintptr /* oleidl.h:3575:21 */ type IViewObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDraw uintptr FGetColorSet uintptr FFreeze uintptr FUnfreeze uintptr FSetAdvise uintptr FGetAdvise uintptr } /* oleidl.h:107:9 */ type IViewObjectVtbl = IViewObjectVtbl1 /* oleidl.h:3688:3 */ // **************************************************************************** // // IViewObject2 interface type LPVIEWOBJECT2 = uintptr /* oleidl.h:3880:22 */ type IViewObject2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDraw uintptr FGetColorSet uintptr FFreeze uintptr FUnfreeze uintptr FSetAdvise uintptr FGetAdvise uintptr FGetExtent uintptr } /* oleidl.h:112:9 */ type IViewObject2Vtbl = IViewObject2Vtbl1 /* oleidl.h:3968:3 */ // **************************************************************************** // // IDropSource interface type LPDROPSOURCE = uintptr /* oleidl.h:4048:21 */ type IDropSourceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryContinueDrag uintptr FGiveFeedback uintptr } /* oleidl.h:117:9 */ type IDropSourceVtbl = IDropSourceVtbl1 /* oleidl.h:4093:3 */ // **************************************************************************** // // IDropTarget interface type LPDROPTARGET = uintptr /* oleidl.h:4157:21 */ type IDropTargetVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDragEnter uintptr FDragOver uintptr FDragLeave uintptr FDrop uintptr } /* oleidl.h:122:9 */ type IDropTargetVtbl = IDropTargetVtbl1 /* oleidl.h:4257:3 */ type IDropSourceNotifyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDragEnterTarget uintptr FDragLeaveTarget uintptr } /* oleidl.h:127:9 */ type IDropSourceNotifyVtbl = IDropSourceNotifyVtbl1 /* oleidl.h:4391:3 */ // **************************************************************************** // // IEnumOLEVERB interface type LPENUMOLEVERB = uintptr /* oleidl.h:4455:22 */ type tagOLEVERB = struct { FlVerb LONG _ [4]byte FlpszVerbName LPOLESTR FfuFlags DWORD FgrfAttribs DWORD } /* oleidl.h:4457:9 */ type OLEVERB = tagOLEVERB /* oleidl.h:4462:3 */ type LPOLEVERB = uintptr /* oleidl.h:4463:27 */ type OLEVERBATTRIB = uint32 /* oleidl.h:4468:3 */ type IEnumOLEVERBVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* oleidl.h:132:9 */ type IEnumOLEVERBVtbl = IEnumOLEVERBVtbl1 /* oleidl.h:4528:3 */ // End additional prototypes //** Autogenerated by WIDL 1.6 from include/servprov.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IServiceProvider1 = struct{ FlpVtbl uintptr } /* servprov.h:22:9 */ // End additional prototypes //** Autogenerated by WIDL 1.6 from include/servprov.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IServiceProvider = IServiceProvider1 /* servprov.h:22:36 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // **************************************************************************** // // IServiceProvider interface type LPSERVICEPROVIDER = uintptr /* servprov.h:55:26 */ type IServiceProviderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryService uintptr } /* servprov.h:22:9 */ type IServiceProviderVtbl = IServiceProviderVtbl1 /* servprov.h:115:3 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/msxml.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations // Headers for imported files //** Autogenerated by WIDL 1.6 from include/unknwn.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/oaidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type ICreateTypeInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:22:9 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 1.6 from include/msxml.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations // Headers for imported files //** Autogenerated by WIDL 1.6 from include/unknwn.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/oaidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type ICreateTypeInfo = ICreateTypeInfo1 /* oaidl.h:22:35 */ type ICreateTypeInfo21 = struct{ FlpVtbl uintptr } /* oaidl.h:27:9 */ type ICreateTypeInfo2 = ICreateTypeInfo21 /* oaidl.h:27:36 */ type ICreateTypeLib1 = struct{ FlpVtbl uintptr } /* oaidl.h:32:9 */ type ICreateTypeLib = ICreateTypeLib1 /* oaidl.h:32:34 */ type ICreateTypeLib21 = struct{ FlpVtbl uintptr } /* oaidl.h:37:9 */ type ICreateTypeLib2 = ICreateTypeLib21 /* oaidl.h:37:35 */ type IDispatch1 = struct{ FlpVtbl uintptr } /* oaidl.h:42:9 */ type IDispatch = IDispatch1 /* oaidl.h:42:29 */ type IEnumVARIANT1 = struct{ FlpVtbl uintptr } /* oaidl.h:47:9 */ type IEnumVARIANT = IEnumVARIANT1 /* oaidl.h:47:32 */ type ITypeComp1 = struct{ FlpVtbl uintptr } /* oaidl.h:52:9 */ type ITypeComp = ITypeComp1 /* oaidl.h:52:29 */ type ITypeInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:57:9 */ type ITypeInfo = ITypeInfo1 /* oaidl.h:57:29 */ type ITypeInfo21 = struct{ FlpVtbl uintptr } /* oaidl.h:62:9 */ type ITypeInfo2 = ITypeInfo21 /* oaidl.h:62:30 */ type ITypeLib1 = struct{ FlpVtbl uintptr } /* oaidl.h:67:9 */ type ITypeLib = ITypeLib1 /* oaidl.h:67:28 */ type ITypeLib21 = struct{ FlpVtbl uintptr } /* oaidl.h:72:9 */ type ITypeLib2 = ITypeLib21 /* oaidl.h:72:29 */ type ITypeChangeEvents1 = struct{ FlpVtbl uintptr } /* oaidl.h:77:9 */ type ITypeChangeEvents = ITypeChangeEvents1 /* oaidl.h:77:37 */ type IErrorInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:82:9 */ type IErrorInfo = IErrorInfo1 /* oaidl.h:82:30 */ type ICreateErrorInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:87:9 */ type ICreateErrorInfo = ICreateErrorInfo1 /* oaidl.h:87:36 */ type ISupportErrorInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:92:9 */ type ISupportErrorInfo = ISupportErrorInfo1 /* oaidl.h:92:37 */ type ITypeFactory1 = struct{ FlpVtbl uintptr } /* oaidl.h:97:9 */ type ITypeFactory = ITypeFactory1 /* oaidl.h:97:32 */ type ITypeMarshal1 = struct{ FlpVtbl uintptr } /* oaidl.h:102:9 */ type ITypeMarshal = ITypeMarshal1 /* oaidl.h:102:32 */ type IRecordInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:107:9 */ type IRecordInfo = IRecordInfo1 /* oaidl.h:107:31 */ type IErrorLog1 = struct{ FlpVtbl uintptr } /* oaidl.h:112:9 */ type IErrorLog = IErrorLog1 /* oaidl.h:112:29 */ type IPropertyBag1 = struct{ FlpVtbl uintptr } /* oaidl.h:117:9 */ type IPropertyBag = IPropertyBag1 /* oaidl.h:117:32 */ type CURRENCY = CY /* oaidl.h:243:12 */ type tagSAFEARRAYBOUND = struct { FcElements ULONG FlLbound LONG } /* oaidl.h:244:9 */ type SAFEARRAYBOUND = tagSAFEARRAYBOUND /* oaidl.h:247:3 */ type LPSAFEARRAYBOUND = uintptr /* oaidl.h:248:34 */ type _wireVARIANT = struct { FclSize DWORD FrpcReserved DWORD Fvt USHORT FwReserved1 USHORT FwReserved2 USHORT FwReserved3 USHORT F__16 struct { FllVal LONGLONG _ [8]byte } } /* oaidl.h:250:9 */ type wireVARIANT = uintptr /* oaidl.h:250:29 */ type _wireBRECORD = struct { FfFlags ULONG FclSize ULONG FpRecInfo uintptr FpRecord uintptr } /* oaidl.h:251:9 */ type wireBRECORD = uintptr /* oaidl.h:251:29 */ type _wireSAFEARR_BSTR = struct { FSize ULONG _ [4]byte FaBstr uintptr } /* oaidl.h:253:9 */ type SAFEARR_BSTR = _wireSAFEARR_BSTR /* oaidl.h:256:3 */ type _wireSAFEARR_UNKNOWN = struct { FSize ULONG _ [4]byte FapUnknown uintptr } /* oaidl.h:258:9 */ type SAFEARR_UNKNOWN = _wireSAFEARR_UNKNOWN /* oaidl.h:261:3 */ type _wireSAFEARR_DISPATCH = struct { FSize ULONG _ [4]byte FapDispatch uintptr } /* oaidl.h:263:9 */ type SAFEARR_DISPATCH = _wireSAFEARR_DISPATCH /* oaidl.h:266:3 */ type _wireSAFEARR_VARIANT = struct { FSize ULONG _ [4]byte FaVariant uintptr } /* oaidl.h:268:9 */ type SAFEARR_VARIANT = _wireSAFEARR_VARIANT /* oaidl.h:271:3 */ type _wireSAFEARR_BRECORD = struct { FSize ULONG _ [4]byte FaRecord uintptr } /* oaidl.h:273:9 */ type SAFEARR_BRECORD = _wireSAFEARR_BRECORD /* oaidl.h:276:3 */ type _wireSAFEARR_HAVEIID = struct { FSize ULONG _ [4]byte FapUnknown uintptr Fiid IID } /* oaidl.h:278:9 */ type SAFEARR_HAVEIID = _wireSAFEARR_HAVEIID /* oaidl.h:282:3 */ type SF_TYPE = uint32 /* oaidl.h:296:3 */ type _wireSAFEARRAY_UNION = struct { FsfType ULONG _ [4]byte Fu struct { FBstrStr SAFEARR_BSTR _ [16]byte } } /* oaidl.h:298:9 */ type SAFEARRAYUNION = _wireSAFEARRAY_UNION /* oaidl.h:312:3 */ type _wireSAFEARRAY = struct { FcDims USHORT FfFeatures USHORT FcbElements ULONG FcLocks ULONG _ [4]byte FuArrayStructs SAFEARRAYUNION Frgsabound [1]SAFEARRAYBOUND } /* oaidl.h:314:9 */ type wireSAFEARRAY = uintptr /* oaidl.h:321:3 */ type wirePSAFEARRAY = uintptr /* oaidl.h:322:23 */ type tagSAFEARRAY = struct { FcDims USHORT FfFeatures USHORT FcbElements ULONG FcLocks ULONG _ [4]byte FpvData PVOID Frgsabound [1]SAFEARRAYBOUND } /* oaidl.h:324:9 */ type SAFEARRAY = tagSAFEARRAY /* oaidl.h:331:3 */ type LPSAFEARRAY = uintptr /* oaidl.h:332:19 */ // Kludge for 3.0 release to disable new default-behavior. // For now we define _FORCENAMELESSUNION. For 4.0 this define // will be removed. type tagVARIANT = struct { Fn1 struct { Fn2 struct { Fvt VARTYPE FwReserved1 WORD FwReserved2 WORD FwReserved3 WORD Fn3 struct { FllVal LONGLONG _ [8]byte } } } } /* oaidl.h:380:9 */ // Kludge for 3.0 release to disable new default-behavior. // For now we define _FORCENAMELESSUNION. For 4.0 this define // will be removed. type VARIANT = tagVARIANT /* oaidl.h:380:27 */ type __tagVARIANT = struct { Fvt VARTYPE FwReserved1 WORD FwReserved2 WORD FwReserved3 WORD Fn3 struct { FllVal LONGLONG _ [8]byte } } /* oaidl.h:384:9 */ type __tagBRECORD = struct { FpvRecord PVOID FpRecInfo uintptr } /* oaidl.h:433:17 */ type LPVARIANT = uintptr /* oaidl.h:444:17 */ type VARIANTARG = VARIANT /* oaidl.h:445:17 */ type LPVARIANTARG = uintptr /* oaidl.h:446:17 */ type DISPID = LONG /* oaidl.h:525:14 */ type MEMBERID = DISPID /* oaidl.h:526:16 */ type HREFTYPE = DWORD /* oaidl.h:527:15 */ type TYPEKIND = uint32 /* oaidl.h:538:3 */ type tagTYPEDESC = struct { F__0 struct{ Flptdesc uintptr } Fvt VARTYPE _ [6]byte } /* oaidl.h:540:9 */ type tagARRAYDESC = struct { FtdescElem TYPEDESC FcDims USHORT _ [2]byte Frgbounds [1]SAFEARRAYBOUND _ [4]byte } /* oaidl.h:543:9 */ type TYPEDESC = tagTYPEDESC /* oaidl.h:547:3 */ type ARRAYDESC = tagARRAYDESC /* oaidl.h:553:3 */ type tagPARAMDESCEX = struct { FcBytes ULONG _ [4]byte FvarDefaultValue VARIANTARG } /* oaidl.h:555:9 */ type PARAMDESCEX = tagPARAMDESCEX /* oaidl.h:558:3 */ type LPPARAMDESCEX = uintptr /* oaidl.h:559:31 */ type tagPARAMDESC = struct { Fpparamdescex LPPARAMDESCEX FwParamFlags USHORT _ [6]byte } /* oaidl.h:561:9 */ type PARAMDESC = tagPARAMDESC /* oaidl.h:564:3 */ type LPPARAMDESC = uintptr /* oaidl.h:565:29 */ type tagIDLDESC = struct { FdwReserved ULONG_PTR FwIDLFlags USHORT _ [6]byte } /* oaidl.h:584:9 */ type IDLDESC = tagIDLDESC /* oaidl.h:587:3 */ type LPIDLDESC = uintptr /* oaidl.h:588:27 */ type tagELEMDESC = struct { Ftdesc TYPEDESC Fu struct{ Fidldesc IDLDESC } } /* oaidl.h:608:11 */ type ELEMDESC = tagELEMDESC /* oaidl.h:614:5 */ type LPELEMDESC = uintptr /* oaidl.h:614:14 */ type tagTYPEATTR = struct { Fguid GUID Flcid LCID FdwReserved DWORD FmemidConstructor MEMBERID FmemidDestructor MEMBERID FlpstrSchema LPOLESTR FcbSizeInstance ULONG Ftypekind TYPEKIND FcFuncs WORD FcVars WORD FcImplTypes WORD FcbSizeVft WORD FcbAlignment WORD FwTypeFlags WORD FwMajorVerNum WORD FwMinorVerNum WORD FtdescAlias TYPEDESC FidldescType IDLDESC } /* oaidl.h:617:9 */ type TYPEATTR = tagTYPEATTR /* oaidl.h:636:3 */ type LPTYPEATTR = uintptr /* oaidl.h:637:28 */ type tagDISPPARAMS = struct { Frgvarg uintptr FrgdispidNamedArgs uintptr FcArgs UINT FcNamedArgs UINT } /* oaidl.h:639:9 */ type DISPPARAMS = tagDISPPARAMS /* oaidl.h:644:3 */ type tagEXCEPINFO = struct { FwCode WORD FwReserved WORD _ [4]byte FbstrSource BSTR FbstrDescription BSTR FbstrHelpFile BSTR FdwHelpContext DWORD _ [4]byte FpvReserved PVOID FpfnDeferredFillIn uintptr Fscode SCODE _ [4]byte } /* oaidl.h:659:11 */ type EXCEPINFO = tagEXCEPINFO /* oaidl.h:669:5 */ type LPEXCEPINFO = uintptr /* oaidl.h:669:16 */ type CALLCONV = uint32 /* oaidl.h:684:3 */ type FUNCKIND = uint32 /* oaidl.h:692:3 */ type INVOKEKIND = uint32 /* oaidl.h:699:3 */ type tagFUNCDESC = struct { Fmemid MEMBERID _ [4]byte Flprgscode uintptr FlprgelemdescParam uintptr Ffunckind FUNCKIND Finvkind INVOKEKIND Fcallconv CALLCONV FcParams SHORT FcParamsOpt SHORT FoVft SHORT FcScodes SHORT _ [4]byte FelemdescFunc ELEMDESC FwFuncFlags WORD _ [6]byte } /* oaidl.h:701:9 */ type FUNCDESC = tagFUNCDESC /* oaidl.h:714:3 */ type LPFUNCDESC = uintptr /* oaidl.h:715:28 */ type VARKIND = uint32 /* oaidl.h:722:3 */ type tagVARDESC = struct { Fmemid MEMBERID _ [4]byte FlpstrSchema LPOLESTR F__16 struct { _ [0]uint64 FoInst ULONG _ [4]byte } FelemdescVar ELEMDESC FwVarFlags WORD _ [2]byte Fvarkind VARKIND } /* oaidl.h:733:9 */ type VARDESC = tagVARDESC /* oaidl.h:743:3 */ type LPVARDESC = uintptr /* oaidl.h:744:27 */ type TYPEFLAGS = uint32 /* oaidl.h:762:3 */ type FUNCFLAGS = uint32 /* oaidl.h:778:3 */ type VARFLAGS = uint32 /* oaidl.h:794:3 */ type tagCLEANLOCALSTORAGE = struct { FpInterface uintptr FpStorage PVOID Fflags DWORD _ [4]byte } /* oaidl.h:796:9 */ type CLEANLOCALSTORAGE = tagCLEANLOCALSTORAGE /* oaidl.h:800:3 */ type tagCUSTDATAITEM = struct { Fguid GUID FvarValue VARIANTARG } /* oaidl.h:802:9 */ type CUSTDATAITEM = tagCUSTDATAITEM /* oaidl.h:805:3 */ type LPCUSTDATAITEM = uintptr /* oaidl.h:806:32 */ type tagCUSTDATA = struct { FcCustData DWORD _ [4]byte FprgCustData LPCUSTDATAITEM } /* oaidl.h:808:9 */ type CUSTDATA = tagCUSTDATA /* oaidl.h:811:3 */ type LPCUSTDATA = uintptr /* oaidl.h:812:28 */ // **************************************************************************** // // ICreateTypeInfo interface type LPCREATETYPEINFO = uintptr /* oaidl.h:825:25 */ type ICreateTypeInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetGuid uintptr FSetTypeFlags uintptr FSetDocString uintptr FSetHelpContext uintptr FSetVersion uintptr FAddRefTypeInfo uintptr FAddFuncDesc uintptr FAddImplType uintptr FSetImplTypeFlags uintptr FSetAlignment uintptr FSetSchema uintptr FAddVarDesc uintptr FSetFuncAndParamNames uintptr FSetVarName uintptr FSetTypeDescAlias uintptr FDefineFuncAsDllEntry uintptr FSetFuncDocString uintptr FSetVarDocString uintptr FSetFuncHelpContext uintptr FSetVarHelpContext uintptr FSetMops uintptr FSetTypeIdldesc uintptr FLayOut uintptr } /* oaidl.h:22:9 */ type ICreateTypeInfoVtbl = ICreateTypeInfoVtbl1 /* oaidl.h:1046:3 */ // **************************************************************************** // // ICreateTypeInfo2 interface type LPCREATETYPEINFO2 = uintptr /* oaidl.h:1376:26 */ type ICreateTypeInfo2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetGuid uintptr FSetTypeFlags uintptr FSetDocString uintptr FSetHelpContext uintptr FSetVersion uintptr FAddRefTypeInfo uintptr FAddFuncDesc uintptr FAddImplType uintptr FSetImplTypeFlags uintptr FSetAlignment uintptr FSetSchema uintptr FAddVarDesc uintptr FSetFuncAndParamNames uintptr FSetVarName uintptr FSetTypeDescAlias uintptr FDefineFuncAsDllEntry uintptr FSetFuncDocString uintptr FSetVarDocString uintptr FSetFuncHelpContext uintptr FSetVarHelpContext uintptr FSetMops uintptr FSetTypeIdldesc uintptr FLayOut uintptr FDeleteFuncDesc uintptr FDeleteFuncDescByMemId uintptr FDeleteVarDesc uintptr FDeleteVarDescByMemId uintptr FDeleteImplType uintptr FSetCustData uintptr FSetFuncCustData uintptr FSetParamCustData uintptr FSetVarCustData uintptr FSetImplTypeCustData uintptr FSetHelpStringContext uintptr FSetFuncHelpStringContext uintptr FSetVarHelpStringContext uintptr FInvalidate uintptr FSetName uintptr } /* oaidl.h:27:9 */ type ICreateTypeInfo2Vtbl = ICreateTypeInfo2Vtbl1 /* oaidl.h:1643:3 */ // **************************************************************************** // // ICreateTypeLib interface type LPCREATETYPELIB = uintptr /* oaidl.h:1968:24 */ type ICreateTypeLibVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateTypeInfo uintptr FSetName uintptr FSetVersion uintptr FSetGuid uintptr FSetDocString uintptr FSetHelpFileName uintptr FSetHelpContext uintptr FSetLcid uintptr FSetLibFlags uintptr FSaveAllChanges uintptr } /* oaidl.h:32:9 */ type ICreateTypeLibVtbl = ICreateTypeLibVtbl1 /* oaidl.h:2072:3 */ // **************************************************************************** // // ICreateTypeLib2 interface type LPCREATETYPELIB2 = uintptr /* oaidl.h:2233:25 */ type ICreateTypeLib2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateTypeInfo uintptr FSetName uintptr FSetVersion uintptr FSetGuid uintptr FSetDocString uintptr FSetHelpFileName uintptr FSetHelpContext uintptr FSetLcid uintptr FSetLibFlags uintptr FSaveAllChanges uintptr FDeleteTypeInfo uintptr FSetCustData uintptr FSetHelpStringContext uintptr FSetHelpStringDll uintptr } /* oaidl.h:37:9 */ type ICreateTypeLib2Vtbl = ICreateTypeLib2Vtbl1 /* oaidl.h:2334:3 */ // **************************************************************************** // // IDispatch interface type LPDISPATCH = uintptr /* oaidl.h:2466:19 */ type IDispatchVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr } /* oaidl.h:42:9 */ type IDispatchVtbl = IDispatchVtbl1 /* oaidl.h:2567:3 */ // **************************************************************************** // // IEnumVARIANT interface type LPENUMVARIANT = uintptr /* oaidl.h:2693:22 */ type IEnumVARIANTVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* oaidl.h:47:9 */ type IEnumVARIANTVtbl = IEnumVARIANTVtbl1 /* oaidl.h:2753:3 */ // **************************************************************************** // // ITypeComp interface type LPTYPECOMP = uintptr /* oaidl.h:2851:19 */ type DESCKIND = uint32 /* oaidl.h:2860:3 */ type tagBINDPTR = struct{ Flpfuncdesc uintptr } /* oaidl.h:2862:9 */ type BINDPTR = tagBINDPTR /* oaidl.h:2866:3 */ type LPBINDPTR = uintptr /* oaidl.h:2867:26 */ type ITypeCompVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBind uintptr FBindType uintptr } /* oaidl.h:52:9 */ type ITypeCompVtbl = ITypeCompVtbl1 /* oaidl.h:2926:3 */ // **************************************************************************** // // ITypeInfo interface type LPTYPEINFO = uintptr /* oaidl.h:3031:19 */ type ITypeInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeAttr uintptr FGetTypeComp uintptr FGetFuncDesc uintptr FGetVarDesc uintptr FGetNames uintptr FGetRefTypeOfImplType uintptr FGetImplTypeFlags uintptr FGetIDsOfNames uintptr FInvoke uintptr FGetDocumentation uintptr FGetDllEntry uintptr FGetRefTypeInfo uintptr FAddressOfMember uintptr FCreateInstance uintptr FGetMops uintptr FGetContainingTypeLib uintptr FReleaseTypeAttr uintptr FReleaseFuncDesc uintptr FReleaseVarDesc uintptr } /* oaidl.h:57:9 */ type ITypeInfoVtbl = ITypeInfoVtbl1 /* oaidl.h:3253:3 */ // **************************************************************************** // // ITypeInfo2 interface type LPTYPEINFO2 = uintptr /* oaidl.h:3662:20 */ type ITypeInfo2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeAttr uintptr FGetTypeComp uintptr FGetFuncDesc uintptr FGetVarDesc uintptr FGetNames uintptr FGetRefTypeOfImplType uintptr FGetImplTypeFlags uintptr FGetIDsOfNames uintptr FInvoke uintptr FGetDocumentation uintptr FGetDllEntry uintptr FGetRefTypeInfo uintptr FAddressOfMember uintptr FCreateInstance uintptr FGetMops uintptr FGetContainingTypeLib uintptr FReleaseTypeAttr uintptr FReleaseFuncDesc uintptr FReleaseVarDesc uintptr FGetTypeKind uintptr FGetTypeFlags uintptr FGetFuncIndexOfMemId uintptr FGetVarIndexOfMemId uintptr FGetCustData uintptr FGetFuncCustData uintptr FGetParamCustData uintptr FGetVarCustData uintptr FGetImplTypeCustData uintptr FGetDocumentation2 uintptr FGetAllCustData uintptr FGetAllFuncCustData uintptr FGetAllParamCustData uintptr FGetAllVarCustData uintptr FGetAllImplTypeCustData uintptr } /* oaidl.h:62:9 */ type ITypeInfo2Vtbl = ITypeInfo2Vtbl1 /* oaidl.h:3947:3 */ // **************************************************************************** // // ITypeLib interface type SYSKIND = uint32 /* oaidl.h:4289:3 */ type LIBFLAGS = uint32 /* oaidl.h:4296:3 */ type LPTYPELIB = uintptr /* oaidl.h:4298:18 */ type tagTLIBATTR = struct { Fguid GUID Flcid LCID Fsyskind SYSKIND FwMajorVerNum WORD FwMinorVerNum WORD FwLibFlags WORD _ [2]byte } /* oaidl.h:4300:9 */ type TLIBATTR = tagTLIBATTR /* oaidl.h:4307:3 */ type LPTLIBATTR = uintptr /* oaidl.h:4308:28 */ type ITypeLibVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetTypeInfoType uintptr FGetTypeInfoOfGuid uintptr FGetLibAttr uintptr FGetTypeComp uintptr FGetDocumentation uintptr FIsName uintptr FFindName uintptr FReleaseTLibAttr uintptr } /* oaidl.h:67:9 */ type ITypeLibVtbl = ITypeLibVtbl1 /* oaidl.h:4432:3 */ // **************************************************************************** // // ITypeLib2 interface type LPTYPELIB2 = uintptr /* oaidl.h:4667:19 */ type ITypeLib2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetTypeInfoType uintptr FGetTypeInfoOfGuid uintptr FGetLibAttr uintptr FGetTypeComp uintptr FGetDocumentation uintptr FIsName uintptr FFindName uintptr FReleaseTLibAttr uintptr FGetCustData uintptr FGetLibStatistics uintptr FGetDocumentation2 uintptr FGetAllCustData uintptr } /* oaidl.h:72:9 */ type ITypeLib2Vtbl = ITypeLib2Vtbl1 /* oaidl.h:4789:3 */ // **************************************************************************** // // ITypeChangeEvents interface type LPTYPECHANGEEVENTS = uintptr /* oaidl.h:4948:27 */ type CHANGEKIND = uint32 /* oaidl.h:4959:3 */ type ITypeChangeEventsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRequestTypeChange uintptr FAfterTypeChange uintptr } /* oaidl.h:77:9 */ type ITypeChangeEventsVtbl = ITypeChangeEventsVtbl1 /* oaidl.h:5012:3 */ // **************************************************************************** // // IErrorInfo interface type LPERRORINFO = uintptr /* oaidl.h:5080:20 */ type IErrorInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetGUID uintptr FGetSource uintptr FGetDescription uintptr FGetHelpFile uintptr FGetHelpContext uintptr } /* oaidl.h:82:9 */ type IErrorInfoVtbl = IErrorInfoVtbl1 /* oaidl.h:5144:3 */ // **************************************************************************** // // ICreateErrorInfo interface type LPCREATEERRORINFO = uintptr /* oaidl.h:5243:26 */ type ICreateErrorInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetGUID uintptr FSetSource uintptr FSetDescription uintptr FSetHelpFile uintptr FSetHelpContext uintptr } /* oaidl.h:87:9 */ type ICreateErrorInfoVtbl = ICreateErrorInfoVtbl1 /* oaidl.h:5307:3 */ // **************************************************************************** // // ISupportErrorInfo interface type LPSUPPORTERRORINFO = uintptr /* oaidl.h:5406:27 */ type ISupportErrorInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FInterfaceSupportsErrorInfo uintptr } /* oaidl.h:92:9 */ type ISupportErrorInfoVtbl = ISupportErrorInfoVtbl1 /* oaidl.h:5442:3 */ type ITypeFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateFromTypeInfo uintptr } /* oaidl.h:97:9 */ type ITypeFactoryVtbl = ITypeFactoryVtbl1 /* oaidl.h:5531:3 */ type ITypeMarshalVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSize uintptr FMarshal uintptr FUnmarshal uintptr FFree uintptr } /* oaidl.h:102:9 */ type ITypeMarshalVtbl = ITypeMarshalVtbl1 /* oaidl.h:5663:3 */ // **************************************************************************** // // IRecordInfo interface type LPRECORDINFO = uintptr /* oaidl.h:5762:21 */ type IRecordInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRecordInit uintptr FRecordClear uintptr FRecordCopy uintptr FGetGuid uintptr FGetName uintptr FGetSize uintptr FGetTypeInfo uintptr FGetField uintptr FGetFieldNoCopy uintptr FPutField uintptr FPutFieldNoCopy uintptr FGetFieldNames uintptr FIsMatchingType uintptr FRecordCreate uintptr FRecordCreateCopy uintptr FRecordDestroy uintptr } /* oaidl.h:107:9 */ type IRecordInfoVtbl = IRecordInfoVtbl1 /* oaidl.h:5930:3 */ // **************************************************************************** // // IErrorLog interface type LPERRORLOG = uintptr /* oaidl.h:6174:19 */ type IErrorLogVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddError uintptr } /* oaidl.h:112:9 */ type IErrorLogVtbl = IErrorLogVtbl1 /* oaidl.h:6212:3 */ // **************************************************************************** // // IPropertyBag interface type LPPROPERTYBAG = uintptr /* oaidl.h:6264:22 */ type IPropertyBagVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRead uintptr FWrite uintptr } /* oaidl.h:117:9 */ type IPropertyBagVtbl = IPropertyBagVtbl1 /* oaidl.h:6313:3 */ // End additional prototypes type IXMLDOMImplementation1 = struct{ FlpVtbl uintptr } /* msxml.h:34:9 */ // End additional prototypes type IXMLDOMImplementation = IXMLDOMImplementation1 /* msxml.h:34:38 */ type IXMLDOMNode1 = struct{ FlpVtbl uintptr } /* msxml.h:39:9 */ type IXMLDOMNode = IXMLDOMNode1 /* msxml.h:39:28 */ type IXMLDOMDocumentFragment1 = struct{ FlpVtbl uintptr } /* msxml.h:44:9 */ type IXMLDOMDocumentFragment = IXMLDOMDocumentFragment1 /* msxml.h:44:40 */ type IXMLDOMDocument1 = struct{ FlpVtbl uintptr } /* msxml.h:49:9 */ type IXMLDOMDocument = IXMLDOMDocument1 /* msxml.h:49:32 */ type IXMLDOMNodeList1 = struct{ FlpVtbl uintptr } /* msxml.h:54:9 */ type IXMLDOMNodeList = IXMLDOMNodeList1 /* msxml.h:54:32 */ type IXMLDOMNamedNodeMap1 = struct{ FlpVtbl uintptr } /* msxml.h:59:9 */ type IXMLDOMNamedNodeMap = IXMLDOMNamedNodeMap1 /* msxml.h:59:36 */ type IXMLDOMCharacterData1 = struct{ FlpVtbl uintptr } /* msxml.h:64:9 */ type IXMLDOMCharacterData = IXMLDOMCharacterData1 /* msxml.h:64:37 */ type IXMLDOMAttribute1 = struct{ FlpVtbl uintptr } /* msxml.h:69:9 */ type IXMLDOMAttribute = IXMLDOMAttribute1 /* msxml.h:69:33 */ type IXMLDOMElement1 = struct{ FlpVtbl uintptr } /* msxml.h:74:9 */ type IXMLDOMElement = IXMLDOMElement1 /* msxml.h:74:31 */ type IXMLDOMText1 = struct{ FlpVtbl uintptr } /* msxml.h:79:9 */ type IXMLDOMText = IXMLDOMText1 /* msxml.h:79:28 */ type IXMLDOMComment1 = struct{ FlpVtbl uintptr } /* msxml.h:84:9 */ type IXMLDOMComment = IXMLDOMComment1 /* msxml.h:84:31 */ type IXMLDOMProcessingInstruction1 = struct{ FlpVtbl uintptr } /* msxml.h:89:9 */ type IXMLDOMProcessingInstruction = IXMLDOMProcessingInstruction1 /* msxml.h:89:45 */ type IXMLDOMCDATASection1 = struct{ FlpVtbl uintptr } /* msxml.h:94:9 */ type IXMLDOMCDATASection = IXMLDOMCDATASection1 /* msxml.h:94:36 */ type IXMLDOMDocumentType1 = struct{ FlpVtbl uintptr } /* msxml.h:99:9 */ type IXMLDOMDocumentType = IXMLDOMDocumentType1 /* msxml.h:99:36 */ type IXMLDOMNotation1 = struct{ FlpVtbl uintptr } /* msxml.h:104:9 */ type IXMLDOMNotation = IXMLDOMNotation1 /* msxml.h:104:32 */ type IXMLDOMEntity1 = struct{ FlpVtbl uintptr } /* msxml.h:109:9 */ type IXMLDOMEntity = IXMLDOMEntity1 /* msxml.h:109:30 */ type IXMLDOMEntityReference1 = struct{ FlpVtbl uintptr } /* msxml.h:114:9 */ type IXMLDOMEntityReference = IXMLDOMEntityReference1 /* msxml.h:114:39 */ type IXMLDOMParseError1 = struct{ FlpVtbl uintptr } /* msxml.h:119:9 */ type IXMLDOMParseError = IXMLDOMParseError1 /* msxml.h:119:34 */ type IXTLRuntime1 = struct{ FlpVtbl uintptr } /* msxml.h:124:9 */ type IXTLRuntime = IXTLRuntime1 /* msxml.h:124:28 */ type XMLDOMDocumentEvents1 = struct{ FlpVtbl uintptr } /* msxml.h:129:9 */ type XMLDOMDocumentEvents = XMLDOMDocumentEvents1 /* msxml.h:129:37 */ type IXMLHttpRequest1 = struct{ FlpVtbl uintptr } /* msxml.h:152:9 */ type IXMLHttpRequest = IXMLHttpRequest1 /* msxml.h:152:32 */ type IXMLDSOControl1 = struct{ FlpVtbl uintptr } /* msxml.h:166:9 */ type IXMLDSOControl = IXMLDSOControl1 /* msxml.h:166:31 */ type IXMLElementCollection1 = struct{ FlpVtbl uintptr } /* msxml.h:180:9 */ type IXMLElementCollection = IXMLElementCollection1 /* msxml.h:180:38 */ type IXMLDocument1 = struct{ FlpVtbl uintptr } /* msxml.h:185:9 */ type IXMLDocument = IXMLDocument1 /* msxml.h:185:29 */ type IXMLDocument21 = struct{ FlpVtbl uintptr } /* msxml.h:190:9 */ type IXMLDocument2 = IXMLDocument21 /* msxml.h:190:30 */ type IXMLElement1 = struct{ FlpVtbl uintptr } /* msxml.h:195:9 */ type IXMLElement = IXMLElement1 /* msxml.h:195:28 */ type IXMLElement21 = struct{ FlpVtbl uintptr } /* msxml.h:200:9 */ type IXMLElement2 = IXMLElement21 /* msxml.h:200:29 */ type IXMLAttribute1 = struct{ FlpVtbl uintptr } /* msxml.h:205:9 */ type IXMLAttribute = IXMLAttribute1 /* msxml.h:205:30 */ type IXMLError1 = struct{ FlpVtbl uintptr } /* msxml.h:210:9 */ type IXMLError = IXMLError1 /* msxml.h:210:26 */ type _xml_error = struct { F_nLine uint32 _ [4]byte F_pchBuf BSTR F_cchBuf uint32 F_ich uint32 F_pszFound BSTR F_pszExpected BSTR F_reserved1 DWORD F_reserved2 DWORD } /* msxml.h:224:11 */ type XML_ERROR = _xml_error /* msxml.h:233:5 */ type DOMNodeType = uint32 /* msxml.h:245:5 */ type XMLELEM_TYPE = uint32 /* msxml.h:250:5 */ type IXMLDOMImplementationVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr FhasFeature uintptr } /* msxml.h:34:9 */ type IXMLDOMImplementationVtbl = IXMLDOMImplementationVtbl1 /* msxml.h:274:5 */ type IXMLDOMNodeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr } /* msxml.h:39:9 */ type IXMLDOMNodeVtbl = IXMLDOMNodeVtbl1 /* msxml.h:383:5 */ type IXMLDOMDocumentFragmentVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr } /* msxml.h:44:9 */ type IXMLDOMDocumentFragmentVtbl = IXMLDOMDocumentFragmentVtbl1 /* msxml.h:560:5 */ type IXMLDOMDocumentVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_doctype uintptr Fget_implementation uintptr Fget_documentElement uintptr Fputref_documentElement uintptr FcreateElement uintptr FcreateDocumentFragment uintptr FcreateTextNode uintptr FcreateComment uintptr FcreateCDATASection uintptr FcreateProcessingInstruction uintptr FcreateAttribute uintptr FcreateEntityReference uintptr FgetElementsByTagName uintptr FcreateNode uintptr FnodeFromID uintptr Fload uintptr Fget_readyState uintptr Fget_parseError uintptr Fget_url uintptr Fget_async uintptr Fput_async uintptr Fabort uintptr FloadXML uintptr Fsave uintptr Fget_validateOnParse uintptr Fput_validateOnParse uintptr Fget_resolveExternals uintptr Fput_resolveExternals uintptr Fget_preserveWhiteSpace uintptr Fput_preserveWhiteSpace uintptr Fput_onreadystatechange uintptr Fput_ondataavailable uintptr Fput_ontransformnode uintptr } /* msxml.h:49:9 */ type IXMLDOMDocumentVtbl = IXMLDOMDocumentVtbl1 /* msxml.h:732:5 */ type IXMLDOMNodeListVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_item uintptr Fget_length uintptr FnextNode uintptr Freset uintptr Fget__newEnum uintptr } /* msxml.h:54:9 */ type IXMLDOMNodeListVtbl = IXMLDOMNodeListVtbl1 /* msxml.h:911:5 */ type IXMLDOMNamedNodeMapVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr FgetNamedItem uintptr FsetNamedItem uintptr FremoveNamedItem uintptr Fget_item uintptr Fget_length uintptr FgetQualifiedItem uintptr FremoveQualifiedItem uintptr FnextNode uintptr Freset uintptr Fget__newEnum uintptr } /* msxml.h:59:9 */ type IXMLDOMNamedNodeMapVtbl = IXMLDOMNamedNodeMapVtbl1 /* msxml.h:980:5 */ type IXMLDOMCharacterDataVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_data uintptr Fput_data uintptr Fget_length uintptr FsubstringData uintptr FappendData uintptr FinsertData uintptr FdeleteData uintptr FreplaceData uintptr } /* msxml.h:64:9 */ type IXMLDOMCharacterDataVtbl = IXMLDOMCharacterDataVtbl1 /* msxml.h:1096:5 */ type IXMLDOMAttributeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_name uintptr Fget_value uintptr Fput_value uintptr } /* msxml.h:69:9 */ type IXMLDOMAttributeVtbl = IXMLDOMAttributeVtbl1 /* msxml.h:1232:5 */ type IXMLDOMElementVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_tagName uintptr FgetAttribute uintptr FsetAttribute uintptr FremoveAttribute uintptr FgetAttributeNode uintptr FsetAttributeNode uintptr FremoveAttributeNode uintptr FgetElementsByTagName uintptr Fnormalize uintptr } /* msxml.h:74:9 */ type IXMLDOMElementVtbl = IXMLDOMElementVtbl1 /* msxml.h:1365:5 */ type IXMLDOMTextVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_data uintptr Fput_data uintptr Fget_length uintptr FsubstringData uintptr FappendData uintptr FinsertData uintptr FdeleteData uintptr FreplaceData uintptr FsplitText uintptr } /* msxml.h:79:9 */ type IXMLDOMTextVtbl = IXMLDOMTextVtbl1 /* msxml.h:1508:5 */ type IXMLDOMCommentVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_data uintptr Fput_data uintptr Fget_length uintptr FsubstringData uintptr FappendData uintptr FinsertData uintptr FdeleteData uintptr FreplaceData uintptr } /* msxml.h:84:9 */ type IXMLDOMCommentVtbl = IXMLDOMCommentVtbl1 /* msxml.h:1632:5 */ type IXMLDOMProcessingInstructionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_target uintptr Fget_data uintptr Fput_data uintptr } /* msxml.h:89:9 */ type IXMLDOMProcessingInstructionVtbl = IXMLDOMProcessingInstructionVtbl1 /* msxml.h:1752:5 */ type IXMLDOMCDATASectionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_data uintptr Fput_data uintptr Fget_length uintptr FsubstringData uintptr FappendData uintptr FinsertData uintptr FdeleteData uintptr FreplaceData uintptr FsplitText uintptr } /* msxml.h:94:9 */ type IXMLDOMCDATASectionVtbl = IXMLDOMCDATASectionVtbl1 /* msxml.h:1875:5 */ type IXMLDOMDocumentTypeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_name uintptr Fget_entities uintptr Fget_notations uintptr } /* msxml.h:99:9 */ type IXMLDOMDocumentTypeVtbl = IXMLDOMDocumentTypeVtbl1 /* msxml.h:1996:5 */ type IXMLDOMNotationVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_publicId uintptr Fget_systemId uintptr } /* msxml.h:104:9 */ type IXMLDOMNotationVtbl = IXMLDOMNotationVtbl1 /* msxml.h:2115:5 */ type IXMLDOMEntityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr Fget_publicId uintptr Fget_systemId uintptr Fget_notationName uintptr } /* msxml.h:109:9 */ type IXMLDOMEntityVtbl = IXMLDOMEntityVtbl1 /* msxml.h:2233:5 */ type IXMLDOMEntityReferenceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr } /* msxml.h:114:9 */ type IXMLDOMEntityReferenceVtbl = IXMLDOMEntityReferenceVtbl1 /* msxml.h:2347:5 */ type IXMLDOMParseErrorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_errorCode uintptr Fget_url uintptr Fget_reason uintptr Fget_srcText uintptr Fget_line uintptr Fget_linepos uintptr Fget_filepos uintptr } /* msxml.h:119:9 */ type IXMLDOMParseErrorVtbl = IXMLDOMParseErrorVtbl1 /* msxml.h:2431:5 */ type IXTLRuntimeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_nodeName uintptr Fget_nodeValue uintptr Fput_nodeValue uintptr Fget_nodeType uintptr Fget_parentNode uintptr Fget_childNodes uintptr Fget_firstChild uintptr Fget_lastChild uintptr Fget_previousSibling uintptr Fget_nextSibling uintptr Fget_attributes uintptr FinsertBefore uintptr FreplaceChild uintptr FremoveChild uintptr FappendChild uintptr FhasChildNodes uintptr Fget_ownerDocument uintptr FcloneNode uintptr Fget_nodeTypeString uintptr Fget_text uintptr Fput_text uintptr Fget_specified uintptr Fget_definition uintptr Fget_nodeTypedValue uintptr Fput_nodeTypedValue uintptr Fget_dataType uintptr Fput_dataType uintptr Fget_xml uintptr FtransformNode uintptr FselectNodes uintptr FselectSingleNode uintptr Fget_parsed uintptr Fget_namespaceURI uintptr Fget_prefix uintptr Fget_baseName uintptr FtransformNodeToObject uintptr FuniqueID uintptr Fdepth uintptr FchildNumber uintptr FancestorChildNumber uintptr FabsoluteChildNumber uintptr FformatIndex uintptr FformatNumber uintptr FformatDate uintptr FformatTime uintptr } /* msxml.h:124:9 */ type IXTLRuntimeVtbl = IXTLRuntimeVtbl1 /* msxml.h:2540:5 */ type XMLDOMDocumentEventsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr } /* msxml.h:129:9 */ type XMLDOMDocumentEventsVtbl = XMLDOMDocumentEventsVtbl1 /* msxml.h:2636:5 */ type IXMLHttpRequestVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fopen uintptr FsetRequestHeader uintptr FgetResponseHeader uintptr FgetAllResponseHeaders uintptr Fsend uintptr Fabort uintptr Fget_status uintptr Fget_statusText uintptr Fget_responseXML uintptr Fget_responseText uintptr Fget_responseBody uintptr Fget_responseStream uintptr Fget_readyState uintptr Fput_onreadystatechange uintptr } /* msxml.h:152:9 */ type IXMLHttpRequestVtbl = IXMLHttpRequestVtbl1 /* msxml.h:2707:5 */ type IXMLDSOControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_XMLDocument uintptr Fput_XMLDocument uintptr Fget_JavaDSOCompatible uintptr Fput_JavaDSOCompatible uintptr Fget_readyState uintptr } /* msxml.h:166:9 */ type IXMLDSOControlVtbl = IXMLDSOControlVtbl1 /* msxml.h:2798:5 */ type IXMLElementCollectionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fput_length uintptr Fget_length uintptr Fget__newEnum uintptr Fitem uintptr } /* msxml.h:180:9 */ type IXMLElementCollectionVtbl = IXMLElementCollectionVtbl1 /* msxml.h:2860:5 */ type IXMLDocumentVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_root uintptr Fget_fileSize uintptr Fget_fileModifiedDate uintptr Fget_fileUpdatedDate uintptr Fget_URL uintptr Fput_URL uintptr Fget_mimeType uintptr Fget_readyState uintptr Fget_charset uintptr Fput_charset uintptr Fget_version uintptr Fget_doctype uintptr Fget_dtdURL uintptr FcreateElement uintptr } /* msxml.h:185:9 */ type IXMLDocumentVtbl = IXMLDocumentVtbl1 /* msxml.h:2934:5 */ type IXMLDocument2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_root uintptr Fget_fileSize uintptr Fget_fileModifiedDate uintptr Fget_fileUpdatedDate uintptr Fget_URL uintptr Fput_URL uintptr Fget_mimeType uintptr Fget_readyState uintptr Fget_charset uintptr Fput_charset uintptr Fget_version uintptr Fget_doctype uintptr Fget_dtdURL uintptr FcreateElement uintptr Fget_async uintptr Fput_async uintptr } /* msxml.h:190:9 */ type IXMLDocument2Vtbl = IXMLDocument2Vtbl1 /* msxml.h:3042:5 */ type IXMLElementVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_tagName uintptr Fput_tagName uintptr Fget_parent uintptr FsetAttribute uintptr FgetAttribute uintptr FremoveAttribute uintptr Fget_children uintptr Fget_type uintptr Fget_text uintptr Fput_text uintptr FaddChild uintptr FremoveChild uintptr } /* msxml.h:195:9 */ type IXMLElementVtbl = IXMLElementVtbl1 /* msxml.h:3148:5 */ type IXMLElement2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_tagName uintptr Fput_tagName uintptr Fget_parent uintptr FsetAttribute uintptr FgetAttribute uintptr FremoveAttribute uintptr Fget_children uintptr Fget_type uintptr Fget_text uintptr Fput_text uintptr FaddChild uintptr FremoveChild uintptr Fget_attributes uintptr } /* msxml.h:200:9 */ type IXMLElement2Vtbl = IXMLElement2Vtbl1 /* msxml.h:3244:5 */ type IXMLAttributeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_name uintptr Fget_value uintptr } /* msxml.h:205:9 */ type IXMLAttributeVtbl = IXMLAttributeVtbl1 /* msxml.h:3321:5 */ type IXMLErrorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetErrorInfo uintptr } /* msxml.h:210:9 */ type IXMLErrorVtbl = IXMLErrorVtbl1 /* msxml.h:3359:5 */ // **************************************************************************** // // IPersistMoniker interface type LPPERSISTMONIKER = uintptr /* urlmon.h:590:25 */ type IPersistMonikerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FLoad uintptr FSave uintptr FSaveCompleted uintptr FGetCurMoniker uintptr } /* urlmon.h:22:9 */ type IPersistMonikerVtbl = IPersistMonikerVtbl1 /* urlmon.h:672:3 */ // **************************************************************************** // // IMonikerProp interface type LPMONIKERPROP = uintptr /* urlmon.h:791:22 */ type MONIKERPROPERTY = uint32 /* urlmon.h:799:3 */ type IMonikerPropVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPutProperty uintptr } /* urlmon.h:27:9 */ type IMonikerPropVtbl = IMonikerPropVtbl1 /* urlmon.h:837:3 */ // **************************************************************************** // // IBindProtocol interface type LPBINDPROTOCOL = uintptr /* urlmon.h:893:23 */ type IBindProtocolVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateBinding uintptr } /* urlmon.h:32:9 */ type IBindProtocolVtbl = IBindProtocolVtbl1 /* urlmon.h:933:3 */ // **************************************************************************** // // IBinding interface type LPBINDING = uintptr /* urlmon.h:990:18 */ type IBindingVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAbort uintptr FSuspend uintptr FResume uintptr FSetPriority uintptr FGetPriority uintptr FGetBindResult uintptr } /* urlmon.h:37:9 */ type IBindingVtbl = IBindingVtbl1 /* urlmon.h:1064:3 */ // **************************************************************************** // // IBindStatusCallback interface type LPBINDSTATUSCALLBACK = uintptr /* urlmon.h:1193:29 */ type BINDVERB = uint32 /* urlmon.h:1201:3 */ type BINDINFOF = uint32 /* urlmon.h:1206:3 */ type BINDF = uint32 /* urlmon.h:1240:3 */ type URL_ENCODING = uint32 /* urlmon.h:1246:3 */ type _tagBINDINFO = struct { FcbSize ULONG _ [4]byte FszExtraInfo LPWSTR FstgmedData STGMEDIUM FgrfBindInfoF DWORD FdwBindVerb DWORD FszCustomVerb LPWSTR FcbstgmedData DWORD FdwOptions DWORD FdwOptionsFlags DWORD FdwCodePage DWORD FsecurityAttributes SECURITY_ATTRIBUTES Fiid IID FpUnk uintptr FdwReserved DWORD _ [4]byte } /* urlmon.h:1248:9 */ type BINDINFO = _tagBINDINFO /* urlmon.h:1263:3 */ type _REMSECURITY_ATTRIBUTES = struct { FnLength DWORD FlpSecurityDescriptor DWORD FbInheritHandle WINBOOL } /* urlmon.h:1265:9 */ type REMSECURITY_ATTRIBUTES = _REMSECURITY_ATTRIBUTES /* urlmon.h:1269:3 */ type PREMSECURITY_ATTRIBUTES = uintptr /* urlmon.h:1270:40 */ type LPREMSECURITY_ATTRIBUTES = uintptr /* urlmon.h:1271:40 */ type _tagRemBINDINFO = struct { FcbSize ULONG _ [4]byte FszExtraInfo LPWSTR FgrfBindInfoF DWORD FdwBindVerb DWORD FszCustomVerb LPWSTR FcbstgmedData DWORD FdwOptions DWORD FdwOptionsFlags DWORD FdwCodePage DWORD FsecurityAttributes REMSECURITY_ATTRIBUTES Fiid IID _ [4]byte FpUnk uintptr FdwReserved DWORD _ [4]byte } /* urlmon.h:1273:9 */ type RemBINDINFO = _tagRemBINDINFO /* urlmon.h:1287:3 */ type tagRemFORMATETC = struct { FcfFormat DWORD Fptd DWORD FdwAspect DWORD Flindex LONG Ftymed DWORD } /* urlmon.h:1289:9 */ type RemFORMATETC = tagRemFORMATETC /* urlmon.h:1295:3 */ type LPREMFORMATETC = uintptr /* urlmon.h:1296:32 */ type BINDINFO_OPTIONS = int32 /* urlmon.h:1314:3 */ type BSCF = uint32 /* urlmon.h:1324:3 */ type BINDSTATUS = uint32 /* urlmon.h:1395:3 */ type IBindStatusCallbackVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnStartBinding uintptr FGetPriority uintptr FOnLowResource uintptr FOnProgress uintptr FOnStopBinding uintptr FGetBindInfo uintptr FOnDataAvailable uintptr FOnObjectAvailable uintptr } /* urlmon.h:42:9 */ type IBindStatusCallbackVtbl = IBindStatusCallbackVtbl1 /* urlmon.h:1500:3 */ // **************************************************************************** // // IBindStatusCallbackEx interface type LPBINDSTATUSCALLBACKEX = uintptr /* urlmon.h:1673:31 */ type BINDF2 = uint32 /* urlmon.h:1699:3 */ type IBindStatusCallbackExVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnStartBinding uintptr FGetPriority uintptr FOnLowResource uintptr FOnProgress uintptr FOnStopBinding uintptr FGetBindInfo uintptr FOnDataAvailable uintptr FOnObjectAvailable uintptr FGetBindInfoEx uintptr } /* urlmon.h:47:9 */ type IBindStatusCallbackExVtbl = IBindStatusCallbackExVtbl1 /* urlmon.h:1784:3 */ // **************************************************************************** // // IAuthenticate interface type LPAUTHENTICATION = uintptr /* urlmon.h:1890:23 */ type IAuthenticateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAuthenticate uintptr } /* urlmon.h:52:9 */ type IAuthenticateVtbl = IAuthenticateVtbl1 /* urlmon.h:1930:3 */ // **************************************************************************** // // IAuthenticateEx interface type LPAUTHENTICATIONEX = uintptr /* urlmon.h:1987:25 */ type AUTHENTICATEF = uint32 /* urlmon.h:1993:3 */ type _tagAUTHENTICATEINFO = struct { FdwFlags DWORD FdwReserved DWORD } /* urlmon.h:1995:9 */ type AUTHENTICATEINFO = _tagAUTHENTICATEINFO /* urlmon.h:1998:3 */ type IAuthenticateExVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAuthenticate uintptr FAuthenticateEx uintptr } /* urlmon.h:57:9 */ type IAuthenticateExVtbl = IAuthenticateExVtbl1 /* urlmon.h:2047:3 */ // **************************************************************************** // // IHttpNegotiate interface type LPHTTPNEGOTIATE = uintptr /* urlmon.h:2111:24 */ type IHttpNegotiateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBeginningTransaction uintptr FOnResponse uintptr } /* urlmon.h:62:9 */ type IHttpNegotiateVtbl = IHttpNegotiateVtbl1 /* urlmon.h:2166:3 */ // **************************************************************************** // // IHttpNegotiate2 interface type LPHTTPNEGOTIATE2 = uintptr /* urlmon.h:2239:25 */ type IHttpNegotiate2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBeginningTransaction uintptr FOnResponse uintptr FGetRootSecurityId uintptr } /* urlmon.h:67:9 */ type IHttpNegotiate2Vtbl = IHttpNegotiate2Vtbl1 /* urlmon.h:2294:3 */ // **************************************************************************** // // IHttpNegotiate3 interface type LPHTTPNEGOTIATE3 = uintptr /* urlmon.h:2361:25 */ type IHttpNegotiate3Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBeginningTransaction uintptr FOnResponse uintptr FGetRootSecurityId uintptr FGetSerializedClientCertContext uintptr } /* urlmon.h:72:9 */ type IHttpNegotiate3Vtbl = IHttpNegotiate3Vtbl1 /* urlmon.h:2421:3 */ // **************************************************************************** // // IWinInetFileStream interface type LPWININETFILESTREAM = uintptr /* urlmon.h:2493:28 */ type IWinInetFileStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetHandleForUnlock uintptr FSetDeleteFile uintptr } /* urlmon.h:77:9 */ type IWinInetFileStreamVtbl = IWinInetFileStreamVtbl1 /* urlmon.h:2538:3 */ // **************************************************************************** // // IWindowForBindingUI interface type LPWINDOWFORBINDINGUI = uintptr /* urlmon.h:2606:29 */ type IWindowForBindingUIVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr } /* urlmon.h:82:9 */ type IWindowForBindingUIVtbl = IWindowForBindingUIVtbl1 /* urlmon.h:2644:3 */ // **************************************************************************** // // ICodeInstall interface type LPCODEINSTALL = uintptr /* urlmon.h:2700:22 */ type CIP_STATUS = uint32 /* urlmon.h:2713:3 */ type ICodeInstallVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FOnCodeInstallProblem uintptr } /* urlmon.h:87:9 */ type ICodeInstallVtbl = ICodeInstallVtbl1 /* urlmon.h:2761:3 */ // **************************************************************************** // // IWinInetInfo interface type LPWININETINFO = uintptr /* urlmon.h:4260:22 */ type IWinInetInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryOption uintptr } /* urlmon.h:112:9 */ type IWinInetInfoVtbl = IWinInetInfoVtbl1 /* urlmon.h:4299:3 */ // **************************************************************************** // // IHttpSecurity interface type LPHTTPSECURITY = uintptr /* urlmon.h:4368:23 */ type IHttpSecurityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FOnSecurityProblem uintptr } /* urlmon.h:117:9 */ type IHttpSecurityVtbl = IHttpSecurityVtbl1 /* urlmon.h:4410:3 */ // **************************************************************************** // // IWinInetHttpInfo interface type LPWININETHTTPINFO = uintptr /* urlmon.h:4471:26 */ type IWinInetHttpInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryOption uintptr FQueryInfo uintptr } /* urlmon.h:122:9 */ type IWinInetHttpInfoVtbl = IWinInetHttpInfoVtbl1 /* urlmon.h:4522:3 */ type IWinInetHttpTimeoutsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetRequestTimeouts uintptr } /* urlmon.h:127:9 */ type IWinInetHttpTimeoutsVtbl = IWinInetHttpTimeoutsVtbl1 /* urlmon.h:4638:3 */ // **************************************************************************** // // IBindHost interface type LPBINDHOST = uintptr /* urlmon.h:4925:19 */ type IBindHostVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateMoniker uintptr FMonikerBindToStorage uintptr FMonikerBindToObject uintptr } /* urlmon.h:142:9 */ type IBindHostVtbl = IBindHostVtbl1 /* urlmon.h:4997:3 */ // **************************************************************************** // // IInternet interface type LPIINTERNET = uintptr /* urlmon.h:5196:19 */ type IInternetVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* urlmon.h:147:9 */ type IInternetVtbl = IInternetVtbl1 /* urlmon.h:5223:3 */ // **************************************************************************** // // IInternetBindInfo interface type LPIINTERNETBINDINFO = uintptr /* urlmon.h:5264:27 */ type BINDSTRING = uint32 /* urlmon.h:5290:3 */ type IInternetBindInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBindInfo uintptr FGetBindString uintptr } /* urlmon.h:152:9 */ type IInternetBindInfoVtbl = IInternetBindInfoVtbl1 /* urlmon.h:5341:3 */ // **************************************************************************** // // IInternetBindInfoEx interface type LPIINTERNETBINDINFOEX = uintptr /* urlmon.h:5412:29 */ type IInternetBindInfoExVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBindInfo uintptr FGetBindString uintptr FGetBindInfoEx uintptr } /* urlmon.h:157:9 */ type IInternetBindInfoExVtbl = IInternetBindInfoExVtbl1 /* urlmon.h:5467:3 */ // **************************************************************************** // // IInternetProtocolRoot interface type LPIINTERNETPROTOCOLROOT = uintptr /* urlmon.h:5535:31 */ type PI_FLAGS = uint32 /* urlmon.h:5553:3 */ type _tagPROTOCOLDATA = struct { FgrfFlags DWORD FdwState DWORD FpData LPVOID FcbData ULONG _ [4]byte } /* urlmon.h:5554:9 */ type PROTOCOLDATA = _tagPROTOCOLDATA /* urlmon.h:5559:3 */ type _tagStartParam = struct { Fiid IID FpIBindCtx uintptr FpItf uintptr } /* urlmon.h:5561:9 */ type StartParam = _tagStartParam /* urlmon.h:5565:3 */ type IInternetProtocolRootVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FStart uintptr FContinue uintptr FAbort uintptr FTerminate uintptr FSuspend uintptr FResume uintptr } /* urlmon.h:162:9 */ type IInternetProtocolRootVtbl = IInternetProtocolRootVtbl1 /* urlmon.h:5644:3 */ // **************************************************************************** // // IInternetProtocol interface type LPIINTERNETPROTOCOL = uintptr /* urlmon.h:5762:27 */ type IInternetProtocolVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FStart uintptr FContinue uintptr FAbort uintptr FTerminate uintptr FSuspend uintptr FResume uintptr FRead uintptr FSeek uintptr FLockRequest uintptr FUnlockRequest uintptr } /* urlmon.h:167:9 */ type IInternetProtocolVtbl = IInternetProtocolVtbl1 /* urlmon.h:5854:3 */ // **************************************************************************** // // IInternetProtocolSink interface type LPIINTERNETPROTOCOLSINK = uintptr /* urlmon.h:6168:31 */ type IInternetProtocolSinkVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSwitch uintptr FReportProgress uintptr FReportData uintptr FReportResult uintptr } /* urlmon.h:177:9 */ type IInternetProtocolSinkVtbl = IInternetProtocolSinkVtbl1 /* urlmon.h:6235:3 */ // **************************************************************************** // // IInternetProtocolSinkStackable interface type LPIINTERNETPROTOCOLSINKStackable = uintptr /* urlmon.h:6331:40 */ type IInternetProtocolSinkStackableVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSwitchSink uintptr FCommitSwitch uintptr FRollbackSwitch uintptr } /* urlmon.h:182:9 */ type IInternetProtocolSinkStackableVtbl = IInternetProtocolSinkStackableVtbl1 /* urlmon.h:6379:3 */ // **************************************************************************** // // IInternetSession interface type LPIINTERNETSESSION = uintptr /* urlmon.h:6456:26 */ type OIBDG_FLAGS = uint32 /* urlmon.h:6461:3 */ type IInternetSessionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRegisterNameSpace uintptr FUnregisterNameSpace uintptr FRegisterMimeFilter uintptr FUnregisterMimeFilter uintptr FCreateBinding uintptr FSetSessionOption uintptr FGetSessionOption uintptr } /* urlmon.h:187:9 */ type IInternetSessionVtbl = IInternetSessionVtbl1 /* urlmon.h:6579:3 */ // **************************************************************************** // // IInternetThreadSwitch interface type LPIINTERNETTHREADSWITCH = uintptr /* urlmon.h:6726:31 */ type IInternetThreadSwitchVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPrepare uintptr FContinue uintptr } /* urlmon.h:192:9 */ type IInternetThreadSwitchVtbl = IInternetThreadSwitchVtbl1 /* urlmon.h:6767:3 */ // **************************************************************************** // // IInternetPriority interface type LPIINTERNETPRIORITY = uintptr /* urlmon.h:6832:27 */ type IInternetPriorityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetPriority uintptr FGetPriority uintptr } /* urlmon.h:197:9 */ type IInternetPriorityVtbl = IInternetPriorityVtbl1 /* urlmon.h:6875:3 */ // **************************************************************************** // // IInternetProtocolInfo interface type LPIINTERNETPROTOCOLINFO = uintptr /* urlmon.h:6942:31 */ type PARSEACTION = uint32 /* urlmon.h:6964:3 */ type PSUACTION = uint32 /* urlmon.h:6969:3 */ type QUERYOPTION = uint32 /* urlmon.h:6988:3 */ type IInternetProtocolInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseUrl uintptr FCombineUrl uintptr FCompareUrl uintptr FQueryInfo uintptr } /* urlmon.h:202:9 */ type IInternetProtocolInfoVtbl = IInternetProtocolInfoVtbl1 /* urlmon.h:7085:3 */ type IInternetSecurityMgrSiteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FEnableModeless uintptr } /* urlmon.h:207:9 */ type IInternetSecurityMgrSiteVtbl = IInternetSecurityMgrSiteVtbl1 /* urlmon.h:7412:3 */ // **************************************************************************** // // IInternetSecurityManager interface type PUAF = uint32 /* urlmon.h:7517:3 */ type PUAFOUT = uint32 /* urlmon.h:7521:3 */ type SZM_FLAGS = uint32 /* urlmon.h:7527:3 */ type IInternetSecurityManagerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetSecuritySite uintptr FGetSecuritySite uintptr FMapUrlToZone uintptr FGetSecurityId uintptr FProcessUrlAction uintptr FQueryCustomPolicy uintptr FSetZoneMapping uintptr FGetZoneMappings uintptr } /* urlmon.h:212:9 */ type IInternetSecurityManagerVtbl = IInternetSecurityManagerVtbl1 /* urlmon.h:7656:3 */ type IInternetHostSecurityManagerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetSecurityId uintptr FProcessUrlAction uintptr FQueryCustomPolicy uintptr } /* urlmon.h:232:9 */ type IInternetHostSecurityManagerVtbl = IInternetHostSecurityManagerVtbl1 /* urlmon.h:8537:3 */ // **************************************************************************** // // IInternetZoneManager interface type LPURLZONEMANAGER = uintptr /* urlmon.h:8832:30 */ type URLZONE = int32 /* urlmon.h:8845:3 */ type URLTEMPLATE = uint32 /* urlmon.h:8858:3 */ type ZAFLAGS = uint32 /* urlmon.h:8879:3 */ type _ZONEATTRIBUTES = struct { FcbSize ULONG FszDisplayName [260]WCHAR FszDescription [200]WCHAR FszIconPath [260]WCHAR FdwTemplateMinLevel DWORD FdwTemplateRecommended DWORD FdwTemplateCurrentLevel DWORD FdwFlags DWORD } /* urlmon.h:8881:9 */ type ZONEATTRIBUTES = _ZONEATTRIBUTES /* urlmon.h:8890:3 */ type LPZONEATTRIBUTES = uintptr /* urlmon.h:8891:32 */ type URLZONEREG = uint32 /* urlmon.h:8898:3 */ type IInternetZoneManagerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetZoneAttributes uintptr FSetZoneAttributes uintptr FGetZoneCustomPolicy uintptr FSetZoneCustomPolicy uintptr FGetZoneActionPolicy uintptr FSetZoneActionPolicy uintptr FPromptAction uintptr FLogAction uintptr FCreateZoneEnumerator uintptr FGetZoneAt uintptr FDestroyZoneEnumerator uintptr FCopyTemplatePoliciesToZone uintptr } /* urlmon.h:237:9 */ type IInternetZoneManagerVtbl = IInternetZoneManagerVtbl1 /* urlmon.h:9073:3 */ type _tagCODEBASEHOLD = struct { FcbSize ULONG _ [4]byte FszDistUnit LPWSTR FszCodeBase LPWSTR FdwVersionMS DWORD FdwVersionLS DWORD FdwStyle DWORD _ [4]byte } /* urlmon.h:9899:9 */ type CODEBASEHOLD = _tagCODEBASEHOLD /* urlmon.h:9906:3 */ type LPCODEBASEHOLD = uintptr /* urlmon.h:9907:33 */ type _tagSOFTDISTINFO = struct { FcbSize ULONG FdwFlags DWORD FdwAdState DWORD _ [4]byte FszTitle LPWSTR FszAbstract LPWSTR FszHREF LPWSTR FdwInstalledVersionMS DWORD FdwInstalledVersionLS DWORD FdwUpdateVersionMS DWORD FdwUpdateVersionLS DWORD FdwAdvertisedVersionMS DWORD FdwAdvertisedVersionLS DWORD FdwReserved DWORD _ [4]byte } /* urlmon.h:9909:9 */ type SOFTDISTINFO = _tagSOFTDISTINFO /* urlmon.h:9923:3 */ type LPSOFTDISTINFO = uintptr /* urlmon.h:9924:33 */ type ISoftDistExtVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FProcessSoftDist uintptr FGetFirstCodeBase uintptr FGetNextCodeBase uintptr FAsyncInstallDistributionUnit uintptr } /* urlmon.h:252:9 */ type ISoftDistExtVtbl = ISoftDistExtVtbl1 /* urlmon.h:10001:3 */ // **************************************************************************** // // ICatalogFileInfo interface type LPCATALOGFILEINFO = uintptr /* urlmon.h:10102:26 */ type ICatalogFileInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCatalogFile uintptr FGetJavaTrust uintptr } /* urlmon.h:257:9 */ type ICatalogFileInfoVtbl = ICatalogFileInfoVtbl1 /* urlmon.h:10145:3 */ // **************************************************************************** // // IDataFilter interface type LPDATAFILTER = uintptr /* urlmon.h:10212:21 */ type IDataFilterVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDoEncode uintptr FDoDecode uintptr FSetEncodingLevel uintptr } /* urlmon.h:262:9 */ type IDataFilterVtbl = IDataFilterVtbl1 /* urlmon.h:10294:3 */ type _tagPROTOCOLFILTERDATA = struct { FcbSize DWORD _ [4]byte FpProtocolSink uintptr FpProtocol uintptr FpUnk uintptr FdwFilterFlags DWORD _ [4]byte } /* urlmon.h:10383:9 */ type PROTOCOLFILTERDATA = _tagPROTOCOLFILTERDATA /* urlmon.h:10389:3 */ // **************************************************************************** // // IEncodingFilterFactory interface type LPENCODINGFILTERFACTORY = uintptr /* urlmon.h:10397:32 */ type _tagDATAINFO = struct { FulTotalSize ULONG FulavrPacketSize ULONG FulConnectSpeed ULONG FulProcessorSpeed ULONG } /* urlmon.h:10399:9 */ type DATAINFO = _tagDATAINFO /* urlmon.h:10404:3 */ type IEncodingFilterFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FFindBestFilter uintptr FGetDefaultFilter uintptr } /* urlmon.h:267:9 */ type IEncodingFilterFactoryVtbl = IEncodingFilterFactoryVtbl1 /* urlmon.h:10457:3 */ type _tagHIT_LOGGING_INFO = struct { FdwStructSize DWORD _ [4]byte FlpszLoggedUrlName LPSTR FStartTime SYSTEMTIME FEndTime SYSTEMTIME FlpszExtendedInfo LPSTR } /* urlmon.h:10527:9 */ type HIT_LOGGING_INFO = _tagHIT_LOGGING_INFO /* urlmon.h:10533:3 */ type LPHIT_LOGGING_INFO = uintptr /* urlmon.h:10534:37 */ type CONFIRMSAFETY = struct { Fclsid CLSID FpUnk uintptr FdwFlags DWORD _ [4]byte } /* urlmon.h:10540:1 */ // **************************************************************************** // // IWrappedProtocol interface type LPIWRAPPEDPROTOCOL = uintptr /* urlmon.h:10559:26 */ type IWrappedProtocolVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWrapperCode uintptr } /* urlmon.h:272:9 */ type IWrappedProtocolVtbl = IWrappedProtocolVtbl1 /* urlmon.h:10597:3 */ // **************************************************************************** // // IGetBindHandle interface type LPGETBINDHANDLE = uintptr /* urlmon.h:10653:24 */ type BINDHANDLETYPES = uint32 /* urlmon.h:10659:3 */ type IGetBindHandleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBindHandle uintptr } /* urlmon.h:277:9 */ type IGetBindHandleVtbl = IGetBindHandleVtbl1 /* urlmon.h:10697:3 */ type _tagPROTOCOL_ARGUMENT = struct { FszMethod LPCWSTR FszTargetUrl LPCWSTR } /* urlmon.h:10747:9 */ type PROTOCOL_ARGUMENT = _tagPROTOCOL_ARGUMENT /* urlmon.h:10750:3 */ type LPPROTOCOL_ARGUMENT = uintptr /* urlmon.h:10751:38 */ // **************************************************************************** // // IBindCallbackRedirect interface type LPBINDCALLBACKREDIRECT = uintptr /* urlmon.h:10763:31 */ type IBindCallbackRedirectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRedirect uintptr } /* urlmon.h:282:9 */ type IBindCallbackRedirectVtbl = IBindCallbackRedirectVtbl1 /* urlmon.h:10801:3 */ // End additional prototypes //** Autogenerated by WIDL 1.6 from include/propidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IPropertyStorage1 = struct{ FlpVtbl uintptr } /* propidl.h:22:9 */ // End additional prototypes //** Autogenerated by WIDL 1.6 from include/propidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // Forward declarations type IPropertyStorage = IPropertyStorage1 /* propidl.h:22:36 */ type IPropertySetStorage1 = struct{ FlpVtbl uintptr } /* propidl.h:27:9 */ type IPropertySetStorage = IPropertySetStorage1 /* propidl.h:27:39 */ type IEnumSTATPROPSTG1 = struct{ FlpVtbl uintptr } /* propidl.h:32:9 */ type IEnumSTATPROPSTG = IEnumSTATPROPSTG1 /* propidl.h:32:36 */ type IEnumSTATPROPSETSTG1 = struct{ FlpVtbl uintptr } /* propidl.h:37:9 */ type IEnumSTATPROPSETSTG = IEnumSTATPROPSETSTG1 /* propidl.h:37:39 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/wtypes.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/oaidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type tagVersionedStream = struct { FguidVersion GUID FpStream uintptr } /* propidl.h:75:9 */ // Headers for imported files //** Autogenerated by WIDL 1.6 from include/wtypes.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. //** Autogenerated by WIDL 1.6 from include/oaidl.idl - Do not edit ** // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Make sure we have internals defined. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type VERSIONEDSTREAM = tagVersionedStream /* propidl.h:78:3 */ type LPVERSIONEDSTREAM = uintptr /* propidl.h:79:35 */ type tagCAC = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:101:9 */ type CAC = tagCAC /* propidl.h:104:3 */ type tagCAUB = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:105:9 */ type CAUB = tagCAUB /* propidl.h:108:3 */ type tagCAI = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:109:9 */ type CAI = tagCAI /* propidl.h:112:3 */ type tagCAUI = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:113:9 */ type CAUI = tagCAUI /* propidl.h:116:3 */ type tagCAL = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:117:9 */ type CAL = tagCAL /* propidl.h:120:3 */ type tagCAUL = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:121:9 */ type CAUL = tagCAUL /* propidl.h:124:3 */ type tagCAFLT = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:125:9 */ type CAFLT = tagCAFLT /* propidl.h:128:3 */ type tagCADBL = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:129:9 */ type CADBL = tagCADBL /* propidl.h:132:3 */ type tagCACY = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:133:9 */ type CACY = tagCACY /* propidl.h:136:3 */ type tagCADATE = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:137:9 */ type CADATE = tagCADATE /* propidl.h:140:3 */ type tagCABSTR = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:141:9 */ type CABSTR = tagCABSTR /* propidl.h:144:3 */ type tagCABSTRBLOB = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:145:9 */ type CABSTRBLOB = tagCABSTRBLOB /* propidl.h:148:3 */ type tagCABOOL = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:149:9 */ type CABOOL = tagCABOOL /* propidl.h:152:3 */ type tagCASCODE = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:153:9 */ type CASCODE = tagCASCODE /* propidl.h:156:3 */ type tagCAPROPVARIANT = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:157:9 */ type CAPROPVARIANT = tagCAPROPVARIANT /* propidl.h:160:3 */ type tagCAH = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:161:9 */ type CAH = tagCAH /* propidl.h:164:3 */ type tagCAUH = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:165:9 */ type CAUH = tagCAUH /* propidl.h:168:3 */ type tagCALPSTR = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:169:9 */ type CALPSTR = tagCALPSTR /* propidl.h:172:3 */ type tagCALPWSTR = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:173:9 */ type CALPWSTR = tagCALPWSTR /* propidl.h:176:3 */ type tagCAFILETIME = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:177:9 */ type CAFILETIME = tagCAFILETIME /* propidl.h:180:3 */ type tagCACLIPDATA = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:181:9 */ type CACLIPDATA = tagCACLIPDATA /* propidl.h:184:3 */ type tagCACLSID = struct { FcElems ULONG _ [4]byte FpElems uintptr } /* propidl.h:185:9 */ type CACLSID = tagCACLSID /* propidl.h:188:3 */ type PROPVAR_PAD1 = WORD /* propidl.h:195:14 */ type PROPVAR_PAD2 = WORD /* propidl.h:196:14 */ type PROPVAR_PAD3 = WORD /* propidl.h:197:14 */ type LPPROPVARIANT = uintptr /* propidl.h:294:31 */ type tagPROPSPEC = struct { FulKind ULONG _ [4]byte Fu struct { _ [0]uint64 Fpropid PROPID _ [4]byte } } /* propidl.h:404:9 */ type PROPSPEC = tagPROPSPEC /* propidl.h:410:3 */ type tagSTATPROPSTG = struct { FlpwstrName LPOLESTR Fpropid PROPID Fvt VARTYPE _ [2]byte } /* propidl.h:412:9 */ type STATPROPSTG = tagSTATPROPSTG /* propidl.h:416:3 */ type tagSTATPROPSETSTG = struct { Ffmtid FMTID Fclsid CLSID FgrfFlags DWORD Fmtime FILETIME Fctime FILETIME Fatime FILETIME FdwOSVersion DWORD } /* propidl.h:423:9 */ type STATPROPSETSTG = tagSTATPROPSETSTG /* propidl.h:431:3 */ type IPropertyStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FReadMultiple uintptr FWriteMultiple uintptr FDeleteMultiple uintptr FReadPropertyNames uintptr FWritePropertyNames uintptr FDeletePropertyNames uintptr FCommit uintptr FRevert uintptr FEnum uintptr FSetTimes uintptr FSetClass uintptr FStat uintptr } /* propidl.h:22:9 */ type IPropertyStorageVtbl = IPropertyStorageVtbl1 /* propidl.h:575:3 */ // **************************************************************************** // // IPropertySetStorage interface type LPPROPERTYSETSTORAGE = uintptr /* propidl.h:770:29 */ type IPropertySetStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreate uintptr FOpen uintptr FDelete uintptr FEnum uintptr } /* propidl.h:27:9 */ type IPropertySetStorageVtbl = IPropertySetStorageVtbl1 /* propidl.h:839:3 */ // **************************************************************************** // // IEnumSTATPROPSTG interface type LPENUMSTATPROPSTG = uintptr /* propidl.h:932:26 */ type IEnumSTATPROPSTGVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* propidl.h:32:9 */ type IEnumSTATPROPSTGVtbl = IEnumSTATPROPSTGVtbl1 /* propidl.h:992:3 */ // **************************************************************************** // // IEnumSTATPROPSETSTG interface type LPENUMSTATPROPSETSTG = uintptr /* propidl.h:1090:29 */ type IEnumSTATPROPSETSTGVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* propidl.h:37:9 */ type IEnumSTATPROPSETSTGVtbl = IEnumSTATPROPSETSTGVtbl1 /* propidl.h:1150:3 */ type LPPROPERTYSTORAGE = uintptr /* propidl.h:1242:26 */ type tagSERIALIZEDPROPERTYVALUE = struct { FdwType DWORD Frgb [1]BYTE _ [3]byte } /* propidl.h:1268:9 */ type SERIALIZEDPROPERTYVALUE = tagSERIALIZEDPROPERTYVALUE /* propidl.h:1271:3 */ type NUMPARSE = struct { FcDig INT FdwInFlags ULONG FdwOutFlags ULONG FcchUsed INT FnBaseShift INT FnPwr10 INT } /* oleauto.h:429:3 */ type UDATE = struct { Fst SYSTEMTIME FwDayOfYear USHORT } /* oleauto.h:530:3 */ type REGKIND = uint32 /* oleauto.h:592:3 */ type tagPARAMDATA = struct { FszName uintptr Fvt VARTYPE _ [6]byte } /* oleauto.h:611:9 */ type PARAMDATA = tagPARAMDATA /* oleauto.h:614:3 */ type LPPARAMDATA = uintptr /* oleauto.h:614:13 */ type tagMETHODDATA = struct { FszName uintptr Fppdata uintptr Fdispid DISPID FiMeth UINT Fcc CALLCONV FcArgs UINT FwFlags WORD FvtReturn VARTYPE _ [4]byte } /* oleauto.h:616:9 */ type METHODDATA = tagMETHODDATA /* oleauto.h:625:3 */ type LPMETHODDATA = uintptr /* oleauto.h:625:14 */ type tagINTERFACEDATA = struct { Fpmethdata uintptr FcMembers UINT _ [4]byte } /* oleauto.h:627:9 */ type INTERFACEDATA = tagINTERFACEDATA /* oleauto.h:630:3 */ type LPINTERFACEDATA = uintptr /* oleauto.h:630:17 */ type _OLESTREAM = struct{ Flpstbl LPOLESTREAMVTBL } /* ole2.h:109:9 */ type LPOLESTREAM = uintptr /* ole2.h:109:27 */ type _OLESTREAMVTBL = struct { FGet uintptr FPut uintptr } /* ole2.h:109:9 */ type OLESTREAMVTBL = _OLESTREAMVTBL /* ole2.h:114:3 */ type LPOLESTREAMVTBL = uintptr /* ole2.h:115:23 */ type OLESTREAM = _OLESTREAM /* ole2.h:119:3 */ type _STORAGE_READ_CAPACITY = struct { FVersion ULONG FSize ULONG FBlockLength ULONG _ [4]byte FNumberOfBlocks LARGE_INTEGER FDiskLength LARGE_INTEGER } /* winioctl.h:168:9 */ type STORAGE_READ_CAPACITY = _STORAGE_READ_CAPACITY /* winioctl.h:174:3 */ type PSTORAGE_READ_CAPACITY = uintptr /* winioctl.h:174:26 */ type _STORAGE_HOTPLUG_INFO = struct { FSize DWORD FMediaRemovable BOOLEAN FMediaHotplug BOOLEAN FDeviceHotplug BOOLEAN FWriteCacheEnableOverride BOOLEAN } /* winioctl.h:205:11 */ type STORAGE_HOTPLUG_INFO = _STORAGE_HOTPLUG_INFO /* winioctl.h:211:5 */ type PSTORAGE_HOTPLUG_INFO = uintptr /* winioctl.h:211:26 */ type _STORAGE_DEVICE_NUMBER = struct { FDeviceType DWORD FDeviceNumber DWORD FPartitionNumber DWORD } /* winioctl.h:213:11 */ type STORAGE_DEVICE_NUMBER = _STORAGE_DEVICE_NUMBER /* winioctl.h:217:5 */ type PSTORAGE_DEVICE_NUMBER = uintptr /* winioctl.h:217:27 */ type _STORAGE_BUS_RESET_REQUEST = struct{ FPathId BYTE } /* winioctl.h:219:11 */ type STORAGE_BUS_RESET_REQUEST = _STORAGE_BUS_RESET_REQUEST /* winioctl.h:221:5 */ type PSTORAGE_BUS_RESET_REQUEST = uintptr /* winioctl.h:221:31 */ type STORAGE_BREAK_RESERVATION_REQUEST1 = struct { FLength DWORD F_unused BYTE FPathId BYTE FTargetId BYTE FLun BYTE } /* winioctl.h:223:11 */ type STORAGE_BREAK_RESERVATION_REQUEST = STORAGE_BREAK_RESERVATION_REQUEST1 /* winioctl.h:229:5 */ type PSTORAGE_BREAK_RESERVATION_REQUEST = uintptr /* winioctl.h:229:39 */ type _PREVENT_MEDIA_REMOVAL = struct{ FPreventMediaRemoval BOOLEAN } /* winioctl.h:231:11 */ type PREVENT_MEDIA_REMOVAL = _PREVENT_MEDIA_REMOVAL /* winioctl.h:233:5 */ type PPREVENT_MEDIA_REMOVAL = uintptr /* winioctl.h:233:27 */ type _CLASS_MEDIA_CHANGE_CONTEXT = struct { FMediaChangeCount DWORD FNewState DWORD } /* winioctl.h:235:11 */ type CLASS_MEDIA_CHANGE_CONTEXT = _CLASS_MEDIA_CHANGE_CONTEXT /* winioctl.h:238:5 */ type PCLASS_MEDIA_CHANGE_CONTEXT = uintptr /* winioctl.h:238:32 */ type _TAPE_STATISTICS = struct { FVersion DWORD FFlags DWORD FRecoveredWrites LARGE_INTEGER FUnrecoveredWrites LARGE_INTEGER FRecoveredReads LARGE_INTEGER FUnrecoveredReads LARGE_INTEGER FCompressionRatioReads BYTE FCompressionRatioWrites BYTE _ [6]byte } /* winioctl.h:240:11 */ type TAPE_STATISTICS = _TAPE_STATISTICS /* winioctl.h:249:5 */ type PTAPE_STATISTICS = uintptr /* winioctl.h:249:21 */ type _TAPE_GET_STATISTICS = struct{ FOperation DWORD } /* winioctl.h:258:11 */ type TAPE_GET_STATISTICS = _TAPE_GET_STATISTICS /* winioctl.h:260:5 */ type PTAPE_GET_STATISTICS = uintptr /* winioctl.h:260:25 */ type STORAGE_MEDIA_TYPE = uint32 /* winioctl.h:330:5 */ type PSTORAGE_MEDIA_TYPE = uintptr /* winioctl.h:330:25 */ type STORAGE_BUS_TYPE = uint32 /* winioctl.h:363:5 */ type PSTORAGE_BUS_TYPE = uintptr /* winioctl.h:363:23 */ type _DEVICE_MEDIA_INFO = struct { FDeviceSpecific struct { FDiskInfo struct { FCylinders LARGE_INTEGER FMediaType STORAGE_MEDIA_TYPE FTracksPerCylinder DWORD FSectorsPerTrack DWORD FBytesPerSector DWORD FNumberMediaSides DWORD FMediaCharacteristics DWORD } } } /* winioctl.h:365:11 */ type DEVICE_MEDIA_INFO = _DEVICE_MEDIA_INFO /* winioctl.h:398:5 */ type PDEVICE_MEDIA_INFO = uintptr /* winioctl.h:398:23 */ type _GET_MEDIA_TYPES = struct { FDeviceType DWORD FMediaInfoCount DWORD FMediaInfo [1]DEVICE_MEDIA_INFO } /* winioctl.h:400:11 */ type GET_MEDIA_TYPES = _GET_MEDIA_TYPES /* winioctl.h:404:5 */ type PGET_MEDIA_TYPES = uintptr /* winioctl.h:404:21 */ type _STORAGE_PREDICT_FAILURE = struct { FPredictFailure DWORD FVendorSpecific [512]BYTE } /* winioctl.h:406:11 */ type STORAGE_PREDICT_FAILURE = _STORAGE_PREDICT_FAILURE /* winioctl.h:409:5 */ type PSTORAGE_PREDICT_FAILURE = uintptr /* winioctl.h:409:29 */ type MEDIA_TYPE = uint32 /* winioctl.h:503:3 */ type PMEDIA_TYPE = uintptr /* winioctl.h:503:14 */ type _FORMAT_PARAMETERS = struct { FMediaType MEDIA_TYPE FStartCylinderNumber DWORD FEndCylinderNumber DWORD FStartHeadNumber DWORD FEndHeadNumber DWORD } /* winioctl.h:505:9 */ type FORMAT_PARAMETERS = _FORMAT_PARAMETERS /* winioctl.h:511:3 */ type PFORMAT_PARAMETERS = uintptr /* winioctl.h:511:21 */ type BAD_TRACK_NUMBER = WORD /* winioctl.h:513:14 */ type PBAD_TRACK_NUMBER = uintptr /* winioctl.h:514:14 */ type _FORMAT_EX_PARAMETERS = struct { FMediaType MEDIA_TYPE FStartCylinderNumber DWORD FEndCylinderNumber DWORD FStartHeadNumber DWORD FEndHeadNumber DWORD FFormatGapLength WORD FSectorsPerTrack WORD FSectorNumber [1]WORD _ [2]byte } /* winioctl.h:516:9 */ type FORMAT_EX_PARAMETERS = _FORMAT_EX_PARAMETERS /* winioctl.h:525:3 */ type PFORMAT_EX_PARAMETERS = uintptr /* winioctl.h:525:24 */ type _DISK_GEOMETRY = struct { FCylinders LARGE_INTEGER FMediaType MEDIA_TYPE FTracksPerCylinder DWORD FSectorsPerTrack DWORD FBytesPerSector DWORD } /* winioctl.h:527:9 */ type DISK_GEOMETRY = _DISK_GEOMETRY /* winioctl.h:533:3 */ type PDISK_GEOMETRY = uintptr /* winioctl.h:533:17 */ type _PARTITION_INFORMATION = struct { FStartingOffset LARGE_INTEGER FPartitionLength LARGE_INTEGER FHiddenSectors DWORD FPartitionNumber DWORD FPartitionType BYTE FBootIndicator BOOLEAN FRecognizedPartition BOOLEAN FRewritePartition BOOLEAN _ [4]byte } /* winioctl.h:537:9 */ type PARTITION_INFORMATION = _PARTITION_INFORMATION /* winioctl.h:546:3 */ type PPARTITION_INFORMATION = uintptr /* winioctl.h:546:25 */ type _SET_PARTITION_INFORMATION = struct{ FPartitionType BYTE } /* winioctl.h:548:9 */ type SET_PARTITION_INFORMATION = _SET_PARTITION_INFORMATION /* winioctl.h:550:3 */ type PSET_PARTITION_INFORMATION = uintptr /* winioctl.h:550:29 */ type _DRIVE_LAYOUT_INFORMATION = struct { FPartitionCount DWORD FSignature DWORD FPartitionEntry [1]PARTITION_INFORMATION } /* winioctl.h:552:9 */ type DRIVE_LAYOUT_INFORMATION = _DRIVE_LAYOUT_INFORMATION /* winioctl.h:556:3 */ type PDRIVE_LAYOUT_INFORMATION = uintptr /* winioctl.h:556:28 */ type _VERIFY_INFORMATION = struct { FStartingOffset LARGE_INTEGER FLength DWORD _ [4]byte } /* winioctl.h:558:9 */ type VERIFY_INFORMATION = _VERIFY_INFORMATION /* winioctl.h:561:3 */ type PVERIFY_INFORMATION = uintptr /* winioctl.h:561:22 */ type _REASSIGN_BLOCKS = struct { FReserved WORD FCount WORD FBlockNumber [1]DWORD } /* winioctl.h:563:9 */ type REASSIGN_BLOCKS = _REASSIGN_BLOCKS /* winioctl.h:567:3 */ type PREASSIGN_BLOCKS = uintptr /* winioctl.h:567:19 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _REASSIGN_BLOCKS_EX = struct { FReserved WORD FCount WORD _ [4]byte FBlockNumber [1]LARGE_INTEGER } /* winioctl.h:570:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type REASSIGN_BLOCKS_EX = _REASSIGN_BLOCKS_EX /* winioctl.h:574:3 */ type PREASSIGN_BLOCKS_EX = uintptr /* winioctl.h:574:22 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type PARTITION_STYLE = uint32 /* winioctl.h:579:3 */ type _PARTITION_INFORMATION_GPT = struct { FPartitionType GUID FPartitionId GUID FAttributes DWORD64 FName [36]WCHAR } /* winioctl.h:581:9 */ type PARTITION_INFORMATION_GPT = _PARTITION_INFORMATION_GPT /* winioctl.h:586:3 */ type PPARTITION_INFORMATION_GPT = uintptr /* winioctl.h:586:29 */ type _PARTITION_INFORMATION_MBR = struct { FPartitionType BYTE FBootIndicator BOOLEAN FRecognizedPartition BOOLEAN _ [1]byte FHiddenSectors DWORD } /* winioctl.h:595:9 */ type PARTITION_INFORMATION_MBR = _PARTITION_INFORMATION_MBR /* winioctl.h:600:3 */ type PPARTITION_INFORMATION_MBR = uintptr /* winioctl.h:600:29 */ type SET_PARTITION_INFORMATION_MBR = SET_PARTITION_INFORMATION /* winioctl.h:602:35 */ type SET_PARTITION_INFORMATION_GPT = PARTITION_INFORMATION_GPT /* winioctl.h:603:35 */ type _SET_PARTITION_INFORMATION_EX = struct { FPartitionStyle PARTITION_STYLE _ [4]byte Fu struct { _ [0]uint64 FMbr SET_PARTITION_INFORMATION_MBR _ [111]byte } } /* winioctl.h:605:9 */ type SET_PARTITION_INFORMATION_EX = _SET_PARTITION_INFORMATION_EX /* winioctl.h:611:3 */ type PSET_PARTITION_INFORMATION_EX = uintptr /* winioctl.h:611:32 */ type _CREATE_DISK_GPT = struct { FDiskId GUID FMaxPartitionCount DWORD } /* winioctl.h:613:9 */ type CREATE_DISK_GPT = _CREATE_DISK_GPT /* winioctl.h:616:3 */ type PCREATE_DISK_GPT = uintptr /* winioctl.h:616:19 */ type _CREATE_DISK_MBR = struct{ FSignature DWORD } /* winioctl.h:618:9 */ type CREATE_DISK_MBR = _CREATE_DISK_MBR /* winioctl.h:620:3 */ type PCREATE_DISK_MBR = uintptr /* winioctl.h:620:19 */ type _CREATE_DISK = struct { FPartitionStyle PARTITION_STYLE Fu struct { FMbr CREATE_DISK_MBR _ [16]byte } } /* winioctl.h:622:9 */ type CREATE_DISK = _CREATE_DISK /* winioctl.h:628:3 */ type PCREATE_DISK = uintptr /* winioctl.h:628:15 */ type _GET_LENGTH_INFORMATION = struct{ FLength LARGE_INTEGER } /* winioctl.h:630:9 */ type GET_LENGTH_INFORMATION = _GET_LENGTH_INFORMATION /* winioctl.h:632:3 */ type PGET_LENGTH_INFORMATION = uintptr /* winioctl.h:632:26 */ type _PARTITION_INFORMATION_EX = struct { FPartitionStyle PARTITION_STYLE _ [4]byte FStartingOffset LARGE_INTEGER FPartitionLength LARGE_INTEGER FPartitionNumber DWORD FRewritePartition BOOLEAN _ [3]byte Fu struct { _ [0]uint64 FMbr PARTITION_INFORMATION_MBR _ [104]byte } } /* winioctl.h:634:9 */ type PARTITION_INFORMATION_EX = _PARTITION_INFORMATION_EX /* winioctl.h:644:3 */ type PPARTITION_INFORMATION_EX = uintptr /* winioctl.h:644:28 */ type _DRIVE_LAYOUT_INFORMATION_GPT = struct { FDiskId GUID FStartingUsableOffset LARGE_INTEGER FUsableLength LARGE_INTEGER FMaxPartitionCount DWORD _ [4]byte } /* winioctl.h:646:9 */ type DRIVE_LAYOUT_INFORMATION_GPT = _DRIVE_LAYOUT_INFORMATION_GPT /* winioctl.h:651:3 */ type PDRIVE_LAYOUT_INFORMATION_GPT = uintptr /* winioctl.h:651:32 */ type _DRIVE_LAYOUT_INFORMATION_MBR = struct{ FSignature DWORD } /* winioctl.h:653:9 */ type DRIVE_LAYOUT_INFORMATION_MBR = _DRIVE_LAYOUT_INFORMATION_MBR /* winioctl.h:655:3 */ type PDRIVE_LAYOUT_INFORMATION_MBR = uintptr /* winioctl.h:655:32 */ type _DRIVE_LAYOUT_INFORMATION_EX = struct { FPartitionStyle DWORD FPartitionCount DWORD Fu struct { _ [0]uint64 FMbr DRIVE_LAYOUT_INFORMATION_MBR _ [36]byte } FPartitionEntry [1]PARTITION_INFORMATION_EX } /* winioctl.h:657:9 */ type DRIVE_LAYOUT_INFORMATION_EX = _DRIVE_LAYOUT_INFORMATION_EX /* winioctl.h:665:3 */ type PDRIVE_LAYOUT_INFORMATION_EX = uintptr /* winioctl.h:665:31 */ type DETECTION_TYPE = uint32 /* winioctl.h:669:3 */ type _DISK_INT13_INFO = struct { FDriveSelect WORD _ [2]byte FMaxCylinders DWORD FSectorsPerTrack WORD FMaxHeads WORD FNumberDrives WORD _ [2]byte } /* winioctl.h:671:9 */ type DISK_INT13_INFO = _DISK_INT13_INFO /* winioctl.h:677:3 */ type PDISK_INT13_INFO = uintptr /* winioctl.h:677:19 */ type _DISK_EX_INT13_INFO = struct { FExBufferSize WORD FExFlags WORD FExCylinders DWORD FExHeads DWORD FExSectorsPerTrack DWORD FExSectorsPerDrive DWORD64 FExSectorSize WORD FExReserved WORD _ [4]byte } /* winioctl.h:679:9 */ type DISK_EX_INT13_INFO = _DISK_EX_INT13_INFO /* winioctl.h:688:3 */ type PDISK_EX_INT13_INFO = uintptr /* winioctl.h:688:22 */ type _DISK_DETECTION_INFO = struct { FSizeOfDetectInfo DWORD FDetectionType DETECTION_TYPE Fu struct { Fs struct { FInt13 DISK_INT13_INFO FExInt13 DISK_EX_INT13_INFO } } } /* winioctl.h:690:9 */ type DISK_DETECTION_INFO = _DISK_DETECTION_INFO /* winioctl.h:699:3 */ type PDISK_DETECTION_INFO = uintptr /* winioctl.h:699:23 */ type _DISK_PARTITION_INFO = struct { FSizeOfPartitionInfo DWORD FPartitionStyle PARTITION_STYLE Fu struct { FMbr struct { FSignature DWORD FCheckSum DWORD } _ [8]byte } } /* winioctl.h:701:9 */ type DISK_PARTITION_INFO = _DISK_PARTITION_INFO /* winioctl.h:713:3 */ type PDISK_PARTITION_INFO = uintptr /* winioctl.h:713:23 */ type _DISK_GEOMETRY_EX = struct { FGeometry DISK_GEOMETRY FDiskSize LARGE_INTEGER FData [1]BYTE _ [7]byte } /* winioctl.h:718:9 */ type DISK_GEOMETRY_EX = _DISK_GEOMETRY_EX /* winioctl.h:722:3 */ type PDISK_GEOMETRY_EX = uintptr /* winioctl.h:722:20 */ type _DISK_CONTROLLER_NUMBER = struct { FControllerNumber DWORD FDiskNumber DWORD } /* winioctl.h:724:9 */ type DISK_CONTROLLER_NUMBER = _DISK_CONTROLLER_NUMBER /* winioctl.h:727:3 */ type PDISK_CONTROLLER_NUMBER = uintptr /* winioctl.h:727:26 */ type DISK_CACHE_RETENTION_PRIORITY = uint32 /* winioctl.h:731:3 */ type _DISK_CACHE_INFORMATION = struct { FParametersSavable BOOLEAN FReadCacheEnabled BOOLEAN FWriteCacheEnabled BOOLEAN _ [1]byte FReadRetentionPriority DISK_CACHE_RETENTION_PRIORITY FWriteRetentionPriority DISK_CACHE_RETENTION_PRIORITY FDisablePrefetchTransferLength WORD FPrefetchScalar BOOLEAN _ [1]byte Fu struct { FScalarPrefetch struct { FMinimum WORD FMaximum WORD FMaximumBlocks WORD } } _ [2]byte } /* winioctl.h:733:9 */ type DISK_CACHE_INFORMATION = _DISK_CACHE_INFORMATION /* winioctl.h:752:3 */ type PDISK_CACHE_INFORMATION = uintptr /* winioctl.h:752:26 */ type _DISK_GROW_PARTITION = struct { FPartitionNumber DWORD _ [4]byte FBytesToGrow LARGE_INTEGER } /* winioctl.h:754:9 */ type DISK_GROW_PARTITION = _DISK_GROW_PARTITION /* winioctl.h:757:3 */ type PDISK_GROW_PARTITION = uintptr /* winioctl.h:757:23 */ type _HISTOGRAM_BUCKET = struct { FReads DWORD FWrites DWORD } /* winioctl.h:761:9 */ type HISTOGRAM_BUCKET = _HISTOGRAM_BUCKET /* winioctl.h:764:3 */ type PHISTOGRAM_BUCKET = uintptr /* winioctl.h:764:20 */ type _DISK_HISTOGRAM = struct { FDiskSize LARGE_INTEGER FStart LARGE_INTEGER FEnd LARGE_INTEGER FAverage LARGE_INTEGER FAverageRead LARGE_INTEGER FAverageWrite LARGE_INTEGER FGranularity DWORD FSize DWORD FReadCount DWORD FWriteCount DWORD FHistogram PHISTOGRAM_BUCKET } /* winioctl.h:768:9 */ type DISK_HISTOGRAM = _DISK_HISTOGRAM /* winioctl.h:780:3 */ type PDISK_HISTOGRAM = uintptr /* winioctl.h:780:18 */ type _DISK_PERFORMANCE = struct { FBytesRead LARGE_INTEGER FBytesWritten LARGE_INTEGER FReadTime LARGE_INTEGER FWriteTime LARGE_INTEGER FIdleTime LARGE_INTEGER FReadCount DWORD FWriteCount DWORD FQueueDepth DWORD FSplitCount DWORD FQueryTime LARGE_INTEGER FStorageDeviceNumber DWORD FStorageManagerName [8]WCHAR _ [4]byte } /* winioctl.h:784:9 */ type DISK_PERFORMANCE = _DISK_PERFORMANCE /* winioctl.h:797:3 */ type PDISK_PERFORMANCE = uintptr /* winioctl.h:797:20 */ type _DISK_RECORD = struct { FByteOffset LARGE_INTEGER FStartTime LARGE_INTEGER FEndTime LARGE_INTEGER FVirtualAddress PVOID FNumberOfBytes DWORD FDeviceNumber BYTE FReadRequest BOOLEAN _ [2]byte } /* winioctl.h:799:9 */ type DISK_RECORD = _DISK_RECORD /* winioctl.h:807:3 */ type PDISK_RECORD = uintptr /* winioctl.h:807:15 */ type _DISK_LOGGING = struct { FFunction BYTE _ [7]byte FBufferAddress PVOID FBufferSize DWORD _ [4]byte } /* winioctl.h:809:9 */ type DISK_LOGGING = _DISK_LOGGING /* winioctl.h:813:3 */ type PDISK_LOGGING = uintptr /* winioctl.h:813:16 */ type BIN_TYPES = uint32 /* winioctl.h:822:3 */ type _BIN_RANGE = struct { FStartValue LARGE_INTEGER FLength LARGE_INTEGER } /* winioctl.h:824:9 */ type BIN_RANGE = _BIN_RANGE /* winioctl.h:827:3 */ type PBIN_RANGE = uintptr /* winioctl.h:827:13 */ type _PERF_BIN = struct { FNumberOfBins DWORD FTypeOfBin DWORD FBinsRanges [1]BIN_RANGE } /* winioctl.h:829:9 */ type PERF_BIN = _PERF_BIN /* winioctl.h:833:3 */ type PPERF_BIN = uintptr /* winioctl.h:833:12 */ type _BIN_COUNT = struct { FBinRange BIN_RANGE FBinCount DWORD _ [4]byte } /* winioctl.h:835:9 */ type BIN_COUNT = _BIN_COUNT /* winioctl.h:838:3 */ type PBIN_COUNT = uintptr /* winioctl.h:838:13 */ type _BIN_RESULTS = struct { FNumberOfBins DWORD _ [4]byte FBinCounts [1]BIN_COUNT } /* winioctl.h:840:9 */ type BIN_RESULTS = _BIN_RESULTS /* winioctl.h:843:3 */ type PBIN_RESULTS = uintptr /* winioctl.h:843:15 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _GETVERSIONINPARAMS = struct { FbVersion BYTE FbRevision BYTE FbReserved BYTE FbIDEDeviceMap BYTE FfCapabilities DWORD FdwReserved [4]DWORD } /* winioctl.h:846:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type GETVERSIONINPARAMS = _GETVERSIONINPARAMS /* winioctl.h:853:3 */ type PGETVERSIONINPARAMS = uintptr /* winioctl.h:853:22 */ type LPGETVERSIONINPARAMS = uintptr /* winioctl.h:853:43 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _IDEREGS = struct { FbFeaturesReg BYTE FbSectorCountReg BYTE FbSectorNumberReg BYTE FbCylLowReg BYTE FbCylHighReg BYTE FbDriveHeadReg BYTE FbCommandReg BYTE FbReserved BYTE } /* winioctl.h:861:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type IDEREGS = _IDEREGS /* winioctl.h:870:3 */ type PIDEREGS = uintptr /* winioctl.h:870:11 */ type LPIDEREGS = uintptr /* winioctl.h:870:21 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _SENDCMDINPARAMS = struct { FcBufferSize DWORD FirDriveRegs IDEREGS FbDriveNumber BYTE FbReserved [3]BYTE FdwReserved [4]DWORD FbBuffer [1]BYTE _ [3]byte } /* winioctl.h:881:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type SENDCMDINPARAMS = _SENDCMDINPARAMS /* winioctl.h:888:3 */ type PSENDCMDINPARAMS = uintptr /* winioctl.h:888:19 */ type LPSENDCMDINPARAMS = uintptr /* winioctl.h:888:37 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _DRIVERSTATUS = struct { FbDriverError BYTE FbIDEError BYTE FbReserved [2]BYTE FdwReserved [2]DWORD } /* winioctl.h:892:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type DRIVERSTATUS = _DRIVERSTATUS /* winioctl.h:897:3 */ type PDRIVERSTATUS = uintptr /* winioctl.h:897:16 */ type LPDRIVERSTATUS = uintptr /* winioctl.h:897:31 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _SENDCMDOUTPARAMS = struct { FcBufferSize DWORD FDriverStatus DRIVERSTATUS FbBuffer [1]BYTE _ [3]byte } /* winioctl.h:920:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type SENDCMDOUTPARAMS = _SENDCMDOUTPARAMS /* winioctl.h:924:3 */ type PSENDCMDOUTPARAMS = uintptr /* winioctl.h:924:20 */ type LPSENDCMDOUTPARAMS = uintptr /* winioctl.h:924:39 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type ELEMENT_TYPE = uint32 /* winioctl.h:970:3 */ type PELEMENT_TYPE = uintptr /* winioctl.h:970:16 */ type _CHANGER_ELEMENT = struct { FElementType ELEMENT_TYPE FElementAddress DWORD } /* winioctl.h:972:9 */ type CHANGER_ELEMENT = _CHANGER_ELEMENT /* winioctl.h:975:3 */ type PCHANGER_ELEMENT = uintptr /* winioctl.h:975:19 */ type _CHANGER_ELEMENT_LIST = struct { FElement CHANGER_ELEMENT FNumberOfElements DWORD } /* winioctl.h:977:9 */ type CHANGER_ELEMENT_LIST = _CHANGER_ELEMENT_LIST /* winioctl.h:980:3 */ type PCHANGER_ELEMENT_LIST = uintptr /* winioctl.h:980:25 */ type _GET_CHANGER_PARAMETERS = struct { FSize DWORD FNumberTransportElements WORD FNumberStorageElements WORD FNumberCleanerSlots WORD FNumberIEElements WORD FNumberDataTransferElements WORD FNumberOfDoors WORD FFirstSlotNumber WORD FFirstDriveNumber WORD FFirstTransportNumber WORD FFirstIEPortNumber WORD FFirstCleanerSlotAddress WORD FMagazineSize WORD FDriveCleanTimeout DWORD FFeatures0 DWORD FFeatures1 DWORD FMoveFromTransport BYTE FMoveFromSlot BYTE FMoveFromIePort BYTE FMoveFromDrive BYTE FExchangeFromTransport BYTE FExchangeFromSlot BYTE FExchangeFromIePort BYTE FExchangeFromDrive BYTE FLockUnlockCapabilities BYTE FPositionCapabilities BYTE FReserved1 [2]BYTE FReserved2 [2]DWORD } /* winioctl.h:1044:9 */ type GET_CHANGER_PARAMETERS = _GET_CHANGER_PARAMETERS /* winioctl.h:1073:3 */ type PGET_CHANGER_PARAMETERS = uintptr /* winioctl.h:1073:26 */ type _CHANGER_PRODUCT_DATA = struct { FVendorId [8]BYTE FProductId [16]BYTE FRevision [4]BYTE FSerialNumber [32]BYTE FDeviceType BYTE } /* winioctl.h:1075:9 */ type CHANGER_PRODUCT_DATA = _CHANGER_PRODUCT_DATA /* winioctl.h:1081:3 */ type PCHANGER_PRODUCT_DATA = uintptr /* winioctl.h:1081:24 */ type _CHANGER_SET_ACCESS = struct { FElement CHANGER_ELEMENT FControl DWORD } /* winioctl.h:1088:9 */ type CHANGER_SET_ACCESS = _CHANGER_SET_ACCESS /* winioctl.h:1091:3 */ type PCHANGER_SET_ACCESS = uintptr /* winioctl.h:1091:22 */ type _CHANGER_READ_ELEMENT_STATUS = struct { FElementList CHANGER_ELEMENT_LIST FVolumeTagInfo BOOLEAN _ [3]byte } /* winioctl.h:1093:9 */ type CHANGER_READ_ELEMENT_STATUS = _CHANGER_READ_ELEMENT_STATUS /* winioctl.h:1096:3 */ type PCHANGER_READ_ELEMENT_STATUS = uintptr /* winioctl.h:1096:31 */ type _CHANGER_ELEMENT_STATUS = struct { FElement CHANGER_ELEMENT FSrcElementAddress CHANGER_ELEMENT FFlags DWORD FExceptionCode DWORD FTargetId BYTE FLun BYTE FReserved WORD FPrimaryVolumeID [36]BYTE FAlternateVolumeID [36]BYTE } /* winioctl.h:1098:9 */ type CHANGER_ELEMENT_STATUS = _CHANGER_ELEMENT_STATUS /* winioctl.h:1108:3 */ type PCHANGER_ELEMENT_STATUS = uintptr /* winioctl.h:1108:26 */ type _CHANGER_ELEMENT_STATUS_EX = struct { FElement CHANGER_ELEMENT FSrcElementAddress CHANGER_ELEMENT FFlags DWORD FExceptionCode DWORD FTargetId BYTE FLun BYTE FReserved WORD FPrimaryVolumeID [36]BYTE FAlternateVolumeID [36]BYTE FVendorIdentification [8]BYTE FProductIdentification [16]BYTE FSerialNumber [32]BYTE } /* winioctl.h:1110:9 */ type CHANGER_ELEMENT_STATUS_EX = _CHANGER_ELEMENT_STATUS_EX /* winioctl.h:1123:3 */ type PCHANGER_ELEMENT_STATUS_EX = uintptr /* winioctl.h:1123:29 */ type _CHANGER_INITIALIZE_ELEMENT_STATUS = struct { FElementList CHANGER_ELEMENT_LIST FBarCodeScan BOOLEAN _ [3]byte } /* winioctl.h:1151:9 */ type CHANGER_INITIALIZE_ELEMENT_STATUS = _CHANGER_INITIALIZE_ELEMENT_STATUS /* winioctl.h:1154:3 */ type PCHANGER_INITIALIZE_ELEMENT_STATUS = uintptr /* winioctl.h:1154:37 */ type _CHANGER_SET_POSITION = struct { FTransport CHANGER_ELEMENT FDestination CHANGER_ELEMENT FFlip BOOLEAN _ [3]byte } /* winioctl.h:1156:9 */ type CHANGER_SET_POSITION = _CHANGER_SET_POSITION /* winioctl.h:1160:3 */ type PCHANGER_SET_POSITION = uintptr /* winioctl.h:1160:24 */ type _CHANGER_EXCHANGE_MEDIUM = struct { FTransport CHANGER_ELEMENT FSource CHANGER_ELEMENT FDestination1 CHANGER_ELEMENT FDestination2 CHANGER_ELEMENT FFlip1 BOOLEAN FFlip2 BOOLEAN _ [2]byte } /* winioctl.h:1162:9 */ type CHANGER_EXCHANGE_MEDIUM = _CHANGER_EXCHANGE_MEDIUM /* winioctl.h:1169:3 */ type PCHANGER_EXCHANGE_MEDIUM = uintptr /* winioctl.h:1169:27 */ type _CHANGER_MOVE_MEDIUM = struct { FTransport CHANGER_ELEMENT FSource CHANGER_ELEMENT FDestination CHANGER_ELEMENT FFlip BOOLEAN _ [3]byte } /* winioctl.h:1171:9 */ type CHANGER_MOVE_MEDIUM = _CHANGER_MOVE_MEDIUM /* winioctl.h:1176:3 */ type PCHANGER_MOVE_MEDIUM = uintptr /* winioctl.h:1176:23 */ type _CHANGER_SEND_VOLUME_TAG_INFORMATION = struct { FStartingElement CHANGER_ELEMENT FActionCode DWORD FVolumeIDTemplate [40]BYTE } /* winioctl.h:1178:9 */ type CHANGER_SEND_VOLUME_TAG_INFORMATION = _CHANGER_SEND_VOLUME_TAG_INFORMATION /* winioctl.h:1182:3 */ type PCHANGER_SEND_VOLUME_TAG_INFORMATION = uintptr /* winioctl.h:1182:39 */ type _READ_ELEMENT_ADDRESS_INFO = struct { FNumberOfElements DWORD FElementStatus [1]CHANGER_ELEMENT_STATUS } /* winioctl.h:1184:9 */ type READ_ELEMENT_ADDRESS_INFO = _READ_ELEMENT_ADDRESS_INFO /* winioctl.h:1187:3 */ type PREAD_ELEMENT_ADDRESS_INFO = uintptr /* winioctl.h:1187:29 */ type CHANGER_DEVICE_PROBLEM_TYPE = uint32 /* winioctl.h:1209:3 */ type PCHANGER_DEVICE_PROBLEM_TYPE = uintptr /* winioctl.h:1209:31 */ type _PATHNAME_BUFFER = struct { FPathNameLength DWORD FName [1]WCHAR _ [2]byte } /* winioctl.h:1309:9 */ type PATHNAME_BUFFER = _PATHNAME_BUFFER /* winioctl.h:1312:3 */ type PPATHNAME_BUFFER = uintptr /* winioctl.h:1312:19 */ type _FSCTL_QUERY_FAT_BPB_BUFFER = struct{ FFirst0x24BytesOfBootSector [36]BYTE } /* winioctl.h:1314:9 */ type FSCTL_QUERY_FAT_BPB_BUFFER = _FSCTL_QUERY_FAT_BPB_BUFFER /* winioctl.h:1316:3 */ type PFSCTL_QUERY_FAT_BPB_BUFFER = uintptr /* winioctl.h:1316:30 */ type NTFS_VOLUME_DATA_BUFFER = struct { FVolumeSerialNumber LARGE_INTEGER FNumberSectors LARGE_INTEGER FTotalClusters LARGE_INTEGER FFreeClusters LARGE_INTEGER FTotalReserved LARGE_INTEGER FBytesPerSector DWORD FBytesPerCluster DWORD FBytesPerFileRecordSegment DWORD FClustersPerFileRecordSegment DWORD FMftValidDataLength LARGE_INTEGER FMftStartLcn LARGE_INTEGER FMft2StartLcn LARGE_INTEGER FMftZoneStart LARGE_INTEGER FMftZoneEnd LARGE_INTEGER } /* winioctl.h:1333:3 */ type PNTFS_VOLUME_DATA_BUFFER = uintptr /* winioctl.h:1333:27 */ type NTFS_EXTENDED_VOLUME_DATA = struct { FByteCount DWORD FMajorVersion WORD FMinorVersion WORD } /* winioctl.h:1339:3 */ type PNTFS_EXTENDED_VOLUME_DATA = uintptr /* winioctl.h:1339:29 */ type STARTING_LCN_INPUT_BUFFER = struct{ FStartingLcn LARGE_INTEGER } /* winioctl.h:1343:3 */ type PSTARTING_LCN_INPUT_BUFFER = uintptr /* winioctl.h:1343:29 */ type VOLUME_BITMAP_BUFFER = struct { FStartingLcn LARGE_INTEGER FBitmapSize LARGE_INTEGER FBuffer [1]BYTE _ [7]byte } /* winioctl.h:1349:3 */ type PVOLUME_BITMAP_BUFFER = uintptr /* winioctl.h:1349:24 */ type STARTING_VCN_INPUT_BUFFER = struct{ FStartingVcn LARGE_INTEGER } /* winioctl.h:1353:3 */ type PSTARTING_VCN_INPUT_BUFFER = uintptr /* winioctl.h:1353:29 */ type RETRIEVAL_POINTERS_BUFFER1 = struct { FExtentCount DWORD _ [4]byte FStartingVcn LARGE_INTEGER FExtents [1]struct { FNextVcn LARGE_INTEGER FLcn LARGE_INTEGER } } /* winioctl.h:1355:9 */ type RETRIEVAL_POINTERS_BUFFER = RETRIEVAL_POINTERS_BUFFER1 /* winioctl.h:1362:3 */ type PRETRIEVAL_POINTERS_BUFFER = uintptr /* winioctl.h:1362:29 */ type NTFS_FILE_RECORD_INPUT_BUFFER = struct{ FFileReferenceNumber LARGE_INTEGER } /* winioctl.h:1366:3 */ type PNTFS_FILE_RECORD_INPUT_BUFFER = uintptr /* winioctl.h:1366:33 */ type NTFS_FILE_RECORD_OUTPUT_BUFFER = struct { FFileReferenceNumber LARGE_INTEGER FFileRecordLength DWORD FFileRecordBuffer [1]BYTE _ [3]byte } /* winioctl.h:1372:3 */ type PNTFS_FILE_RECORD_OUTPUT_BUFFER = uintptr /* winioctl.h:1372:34 */ type MOVE_FILE_DATA = struct { FFileHandle HANDLE FStartingVcn LARGE_INTEGER FStartingLcn LARGE_INTEGER FClusterCount DWORD _ [4]byte } /* winioctl.h:1379:3 */ type PMOVE_FILE_DATA = uintptr /* winioctl.h:1379:18 */ type _MOVE_FILE_DATA32 = struct { FFileHandle UINT32 _ [4]byte FStartingVcn LARGE_INTEGER FStartingLcn LARGE_INTEGER FClusterCount DWORD _ [4]byte } /* winioctl.h:1382:9 */ type MOVE_FILE_DATA32 = _MOVE_FILE_DATA32 /* winioctl.h:1387:3 */ type PMOVE_FILE_DATA32 = uintptr /* winioctl.h:1387:20 */ type FIND_BY_SID_DATA = struct { FRestart DWORD FSid SID } /* winioctl.h:1393:3 */ type PFIND_BY_SID_DATA = uintptr /* winioctl.h:1393:20 */ type FIND_BY_SID_OUTPUT = struct { FNextEntryOffset DWORD FFileIndex DWORD FFileNameLength DWORD FFileName [1]WCHAR _ [2]byte } /* winioctl.h:1400:3 */ type PFIND_BY_SID_OUTPUT = uintptr /* winioctl.h:1400:22 */ type MFT_ENUM_DATA = struct { FStartFileReferenceNumber DWORDLONG FLowUsn USN FHighUsn USN } /* winioctl.h:1406:3 */ type PMFT_ENUM_DATA = uintptr /* winioctl.h:1406:17 */ type CREATE_USN_JOURNAL_DATA = struct { FMaximumSize DWORDLONG FAllocationDelta DWORDLONG } /* winioctl.h:1411:3 */ type PCREATE_USN_JOURNAL_DATA = uintptr /* winioctl.h:1411:27 */ type READ_USN_JOURNAL_DATA = struct { FStartUsn USN FReasonMask DWORD FReturnOnlyOnClose DWORD FTimeout DWORDLONG FBytesToWaitFor DWORDLONG FUsnJournalID DWORDLONG } /* winioctl.h:1420:3 */ type PREAD_USN_JOURNAL_DATA = uintptr /* winioctl.h:1420:25 */ type USN_RECORD = struct { FRecordLength DWORD FMajorVersion WORD FMinorVersion WORD FFileReferenceNumber DWORDLONG FParentFileReferenceNumber DWORDLONG FUsn USN FTimeStamp LARGE_INTEGER FReason DWORD FSourceInfo DWORD FSecurityId DWORD FFileAttributes DWORD FFileNameLength WORD FFileNameOffset WORD FFileName [1]WCHAR _ [2]byte } /* winioctl.h:1437:3 */ type PUSN_RECORD = uintptr /* winioctl.h:1437:14 */ type USN_JOURNAL_DATA = struct { FUsnJournalID DWORDLONG FFirstUsn USN FNextUsn USN FLowestValidUsn USN FMaxUsn USN FMaximumSize DWORDLONG FAllocationDelta DWORDLONG } /* winioctl.h:1472:3 */ type PUSN_JOURNAL_DATA = uintptr /* winioctl.h:1472:20 */ type DELETE_USN_JOURNAL_DATA = struct { FUsnJournalID DWORDLONG FDeleteFlags DWORD _ [4]byte } /* winioctl.h:1477:3 */ type PDELETE_USN_JOURNAL_DATA = uintptr /* winioctl.h:1477:27 */ type MARK_HANDLE_INFO = struct { FUsnSourceInfo DWORD _ [4]byte FVolumeHandle HANDLE FHandleInfo DWORD _ [4]byte } /* winioctl.h:1488:3 */ type PMARK_HANDLE_INFO = uintptr /* winioctl.h:1488:20 */ type MARK_HANDLE_INFO32 = struct { FUsnSourceInfo DWORD FVolumeHandle UINT32 FHandleInfo DWORD } /* winioctl.h:1497:3 */ type PMARK_HANDLE_INFO32 = uintptr /* winioctl.h:1497:22 */ type BULK_SECURITY_TEST_DATA = struct { FDesiredAccess ACCESS_MASK FSecurityIds [1]DWORD } /* winioctl.h:1513:3 */ type PBULK_SECURITY_TEST_DATA = uintptr /* winioctl.h:1513:27 */ type _FILE_PREFETCH = struct { FType DWORD FCount DWORD FPrefetch [1]DWORDLONG } /* winioctl.h:1518:9 */ type FILE_PREFETCH = _FILE_PREFETCH /* winioctl.h:1522:3 */ type PFILE_PREFETCH = uintptr /* winioctl.h:1522:17 */ type _FILESYSTEM_STATISTICS = struct { FFileSystemType WORD FVersion WORD FSizeOfCompleteStructure DWORD FUserFileReads DWORD FUserFileReadBytes DWORD FUserDiskReads DWORD FUserFileWrites DWORD FUserFileWriteBytes DWORD FUserDiskWrites DWORD FMetaDataReads DWORD FMetaDataReadBytes DWORD FMetaDataDiskReads DWORD FMetaDataWrites DWORD FMetaDataWriteBytes DWORD FMetaDataDiskWrites DWORD } /* winioctl.h:1526:9 */ type FILESYSTEM_STATISTICS = _FILESYSTEM_STATISTICS /* winioctl.h:1542:3 */ type PFILESYSTEM_STATISTICS = uintptr /* winioctl.h:1542:25 */ type _FAT_STATISTICS = struct { FCreateHits DWORD FSuccessfulCreates DWORD FFailedCreates DWORD FNonCachedReads DWORD FNonCachedReadBytes DWORD FNonCachedWrites DWORD FNonCachedWriteBytes DWORD FNonCachedDiskReads DWORD FNonCachedDiskWrites DWORD } /* winioctl.h:1547:9 */ type FAT_STATISTICS = _FAT_STATISTICS /* winioctl.h:1557:3 */ type PFAT_STATISTICS = uintptr /* winioctl.h:1557:18 */ type _EXFAT_STATISTICS = struct { FCreateHits DWORD FSuccessfulCreates DWORD FFailedCreates DWORD FNonCachedReads DWORD FNonCachedReadBytes DWORD FNonCachedWrites DWORD FNonCachedWriteBytes DWORD FNonCachedDiskReads DWORD FNonCachedDiskWrites DWORD } /* winioctl.h:1559:9 */ type EXFAT_STATISTICS = _EXFAT_STATISTICS /* winioctl.h:1569:3 */ type PEXFAT_STATISTICS = uintptr /* winioctl.h:1569:21 */ type _NTFS_STATISTICS = struct { FLogFileFullExceptions DWORD FOtherExceptions DWORD FMftReads DWORD FMftReadBytes DWORD FMftWrites DWORD FMftWriteBytes DWORD FMftWritesUserLevel struct { FWrite WORD FCreate WORD FSetInfo WORD FFlush WORD } FMftWritesFlushForLogFileFull WORD FMftWritesLazyWriter WORD FMftWritesUserRequest WORD _ [2]byte FMft2Writes DWORD FMft2WriteBytes DWORD FMft2WritesUserLevel struct { FWrite WORD FCreate WORD FSetInfo WORD FFlush WORD } FMft2WritesFlushForLogFileFull WORD FMft2WritesLazyWriter WORD FMft2WritesUserRequest WORD _ [2]byte FRootIndexReads DWORD FRootIndexReadBytes DWORD FRootIndexWrites DWORD FRootIndexWriteBytes DWORD FBitmapReads DWORD FBitmapReadBytes DWORD FBitmapWrites DWORD FBitmapWriteBytes DWORD FBitmapWritesFlushForLogFileFull WORD FBitmapWritesLazyWriter WORD FBitmapWritesUserRequest WORD FBitmapWritesUserLevel struct { FWrite WORD FCreate WORD FSetInfo WORD } FMftBitmapReads DWORD FMftBitmapReadBytes DWORD FMftBitmapWrites DWORD FMftBitmapWriteBytes DWORD FMftBitmapWritesFlushForLogFileFull WORD FMftBitmapWritesLazyWriter WORD FMftBitmapWritesUserRequest WORD FMftBitmapWritesUserLevel struct { FWrite WORD FCreate WORD FSetInfo WORD FFlush WORD } _ [2]byte FUserIndexReads DWORD FUserIndexReadBytes DWORD FUserIndexWrites DWORD FUserIndexWriteBytes DWORD FLogFileReads DWORD FLogFileReadBytes DWORD FLogFileWrites DWORD FLogFileWriteBytes DWORD FAllocate struct { FCalls DWORD FClusters DWORD FHints DWORD FRunsReturned DWORD FHintsHonored DWORD FHintsClusters DWORD FCache DWORD FCacheClusters DWORD FCacheMiss DWORD FCacheMissClusters DWORD } } /* winioctl.h:1571:9 */ type NTFS_STATISTICS = _NTFS_STATISTICS /* winioctl.h:1647:3 */ type PNTFS_STATISTICS = uintptr /* winioctl.h:1647:19 */ type _FILE_OBJECTID_BUFFER = struct { FObjectId [16]BYTE Fu struct { Fs struct { FBirthVolumeId [16]BYTE FBirthObjectId [16]BYTE FDomainId [16]BYTE } } } /* winioctl.h:1649:9 */ type FILE_OBJECTID_BUFFER = _FILE_OBJECTID_BUFFER /* winioctl.h:1659:3 */ type PFILE_OBJECTID_BUFFER = uintptr /* winioctl.h:1659:24 */ type _FILE_SET_SPARSE_BUFFER = struct{ FSetSparse BOOLEAN } /* winioctl.h:1661:9 */ type FILE_SET_SPARSE_BUFFER = _FILE_SET_SPARSE_BUFFER /* winioctl.h:1663:3 */ type PFILE_SET_SPARSE_BUFFER = uintptr /* winioctl.h:1663:26 */ type _FILE_ZERO_DATA_INFORMATION = struct { FFileOffset LARGE_INTEGER FBeyondFinalZero LARGE_INTEGER } /* winioctl.h:1665:9 */ type FILE_ZERO_DATA_INFORMATION = _FILE_ZERO_DATA_INFORMATION /* winioctl.h:1668:3 */ type PFILE_ZERO_DATA_INFORMATION = uintptr /* winioctl.h:1668:30 */ type _FILE_ALLOCATED_RANGE_BUFFER = struct { FFileOffset LARGE_INTEGER FLength LARGE_INTEGER } /* winioctl.h:1670:9 */ type FILE_ALLOCATED_RANGE_BUFFER = _FILE_ALLOCATED_RANGE_BUFFER /* winioctl.h:1673:3 */ type PFILE_ALLOCATED_RANGE_BUFFER = uintptr /* winioctl.h:1673:31 */ type _ENCRYPTION_BUFFER = struct { FEncryptionOperation DWORD FPrivate [1]BYTE _ [3]byte } /* winioctl.h:1675:9 */ type ENCRYPTION_BUFFER = _ENCRYPTION_BUFFER /* winioctl.h:1678:3 */ type PENCRYPTION_BUFFER = uintptr /* winioctl.h:1678:21 */ type _DECRYPTION_STATUS_BUFFER = struct{ FNoEncryptedStreams BOOLEAN } /* winioctl.h:1687:9 */ type DECRYPTION_STATUS_BUFFER = _DECRYPTION_STATUS_BUFFER /* winioctl.h:1689:3 */ type PDECRYPTION_STATUS_BUFFER = uintptr /* winioctl.h:1689:28 */ type _REQUEST_RAW_ENCRYPTED_DATA = struct { FFileOffset LONGLONG FLength DWORD _ [4]byte } /* winioctl.h:1694:9 */ type REQUEST_RAW_ENCRYPTED_DATA = _REQUEST_RAW_ENCRYPTED_DATA /* winioctl.h:1697:3 */ type PREQUEST_RAW_ENCRYPTED_DATA = uintptr /* winioctl.h:1697:30 */ type _ENCRYPTED_DATA_INFO = struct { FStartingFileOffset DWORDLONG FOutputBufferOffset DWORD FBytesWithinFileSize DWORD FBytesWithinValidDataLength DWORD FCompressionFormat WORD FDataUnitShift BYTE FChunkShift BYTE FClusterShift BYTE FEncryptionFormat BYTE FNumberOfDataBlocks WORD FDataBlockSize [1]DWORD } /* winioctl.h:1699:9 */ type ENCRYPTED_DATA_INFO = _ENCRYPTED_DATA_INFO /* winioctl.h:1711:3 */ type PENCRYPTED_DATA_INFO = uintptr /* winioctl.h:1712:29 */ type _PLEX_READ_DATA_REQUEST = struct { FByteOffset LARGE_INTEGER FByteLength DWORD FPlexNumber DWORD } /* winioctl.h:1714:9 */ type PLEX_READ_DATA_REQUEST = _PLEX_READ_DATA_REQUEST /* winioctl.h:1718:3 */ type PPLEX_READ_DATA_REQUEST = uintptr /* winioctl.h:1718:26 */ type _SI_COPYFILE = struct { FSourceFileNameLength DWORD FDestinationFileNameLength DWORD FFlags DWORD FFileNameBuffer [1]WCHAR _ [2]byte } /* winioctl.h:1720:9 */ type SI_COPYFILE = _SI_COPYFILE /* winioctl.h:1725:3 */ type PSI_COPYFILE = uintptr /* winioctl.h:1725:15 */ type _STORAGE_DESCRIPTOR_HEADER = struct { FVersion DWORD FSize DWORD } /* winioctl.h:1731:9 */ type STORAGE_DESCRIPTOR_HEADER = _STORAGE_DESCRIPTOR_HEADER /* winioctl.h:1734:3 */ type PSTORAGE_DESCRIPTOR_HEADER = uintptr /* winioctl.h:1734:30 */ type STORAGE_PROPERTY_ID = uint32 /* winioctl.h:1746:3 */ type PSTORAGE_PROPERTY_ID = uintptr /* winioctl.h:1746:24 */ type STORAGE_QUERY_TYPE = uint32 /* winioctl.h:1753:3 */ type PSTORAGE_QUERY_TYPE = uintptr /* winioctl.h:1753:23 */ type _STORAGE_PROPERTY_QUERY = struct { FPropertyId STORAGE_PROPERTY_ID FQueryType STORAGE_QUERY_TYPE FAdditionalParameters [1]BYTE _ [3]byte } /* winioctl.h:1755:9 */ type STORAGE_PROPERTY_QUERY = _STORAGE_PROPERTY_QUERY /* winioctl.h:1759:3 */ type PSTORAGE_PROPERTY_QUERY = uintptr /* winioctl.h:1759:27 */ type _STORAGE_DEVICE_DESCRIPTOR = struct { FVersion DWORD FSize DWORD FDeviceType BYTE FDeviceTypeModifier BYTE FRemovableMedia BOOLEAN FCommandQueueing BOOLEAN FVendorIdOffset DWORD FProductIdOffset DWORD FProductRevisionOffset DWORD FSerialNumberOffset DWORD FBusType STORAGE_BUS_TYPE FRawPropertiesLength DWORD FRawDeviceProperties [1]BYTE _ [3]byte } /* winioctl.h:1761:9 */ type STORAGE_DEVICE_DESCRIPTOR = _STORAGE_DEVICE_DESCRIPTOR /* winioctl.h:1775:3 */ type PSTORAGE_DEVICE_DESCRIPTOR = uintptr /* winioctl.h:1775:30 */ type _STORAGE_ADAPTER_DESCRIPTOR = struct { FVersion DWORD FSize DWORD FMaximumTransferLength DWORD FMaximumPhysicalPages DWORD FAlignmentMask DWORD FAdapterUsesPio BOOLEAN FAdapterScansDown BOOLEAN FCommandQueueing BOOLEAN FAcceleratedTransfer BOOLEAN FBusType BYTE _ [1]byte FBusMajorVersion WORD FBusMinorVersion WORD _ [2]byte } /* winioctl.h:1777:9 */ type STORAGE_ADAPTER_DESCRIPTOR = _STORAGE_ADAPTER_DESCRIPTOR /* winioctl.h:1790:3 */ type PSTORAGE_ADAPTER_DESCRIPTOR = uintptr /* winioctl.h:1790:31 */ type _STORAGE_DEVICE_ID_DESCRIPTOR = struct { FVersion DWORD FSize DWORD FNumberOfIdentifiers DWORD FIdentifiers [1]BYTE _ [3]byte } /* winioctl.h:1792:9 */ type STORAGE_DEVICE_ID_DESCRIPTOR = _STORAGE_DEVICE_ID_DESCRIPTOR /* winioctl.h:1797:3 */ type PSTORAGE_DEVICE_ID_DESCRIPTOR = uintptr /* winioctl.h:1797:33 */ type _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = struct{ FGptAttributes ULONGLONG } /* winioctl.h:1799:9 */ type VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION /* winioctl.h:1801:3 */ type PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION = uintptr /* winioctl.h:1801:42 */ type _DISK_EXTENT = struct { FDiskNumber DWORD _ [4]byte FStartingOffset LARGE_INTEGER FExtentLength LARGE_INTEGER } /* winioctl.h:2318:9 */ type DISK_EXTENT = _DISK_EXTENT /* winioctl.h:2322:3 */ type PDISK_EXTENT = uintptr /* winioctl.h:2322:15 */ type _VOLUME_DISK_EXTENTS = struct { FNumberOfDiskExtents DWORD _ [4]byte FExtents [1]DISK_EXTENT } /* winioctl.h:2324:9 */ type VOLUME_DISK_EXTENTS = _VOLUME_DISK_EXTENTS /* winioctl.h:2327:3 */ type PVOLUME_DISK_EXTENTS = uintptr /* winioctl.h:2327:23 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type UWORD = WORD /* winsmcrd.h:27:16 */ type _SCARD_IO_REQUEST = struct { FdwProtocol DWORD FcbPciLength DWORD } /* winsmcrd.h:161:11 */ type SCARD_IO_REQUEST = _SCARD_IO_REQUEST /* winsmcrd.h:164:5 */ type PSCARD_IO_REQUEST = uintptr /* winsmcrd.h:164:22 */ type LPSCARD_IO_REQUEST = uintptr /* winsmcrd.h:164:41 */ type LPCSCARD_IO_REQUEST = uintptr /* winsmcrd.h:165:34 */ type SCARD_T0_COMMAND = struct { FbCla BYTE FbIns BYTE FbP1 BYTE FbP2 BYTE FbP3 BYTE } /* winsmcrd.h:170:5 */ type LPSCARD_T0_COMMAND = uintptr /* winsmcrd.h:170:22 */ type SCARD_T0_REQUEST = struct { FioRequest SCARD_IO_REQUEST FbSw1 BYTE FbSw2 BYTE F__10 struct{ FCmdBytes SCARD_T0_COMMAND } _ [1]byte } /* winsmcrd.h:179:5 */ type PSCARD_T0_REQUEST = uintptr /* winsmcrd.h:181:28 */ type LPSCARD_T0_REQUEST = uintptr /* winsmcrd.h:181:47 */ type SCARD_T1_REQUEST = struct{ FioRequest SCARD_IO_REQUEST } /* winsmcrd.h:185:5 */ type PSCARD_T1_REQUEST = uintptr /* winsmcrd.h:186:28 */ type LPSCARD_T1_REQUEST = uintptr /* winsmcrd.h:186:47 */ type LPCBYTE = uintptr /* winscard.h:23:22 */ var g_rgSCardT0Pci SCARD_IO_REQUEST /* winscard.h:37:46: */ var g_rgSCardT1Pci SCARD_IO_REQUEST /* winscard.h:37:61: */ var g_rgSCardRawPci SCARD_IO_REQUEST /* winscard.h:37:76: */ type SCARDCONTEXT = ULONG_PTR /* winscard.h:42:21 */ type PSCARDCONTEXT = uintptr /* winscard.h:43:24 */ type LPSCARDCONTEXT = uintptr /* winscard.h:43:39 */ type SCARDHANDLE = ULONG_PTR /* winscard.h:45:21 */ type PSCARDHANDLE = uintptr /* winscard.h:46:23 */ type LPSCARDHANDLE = uintptr /* winscard.h:46:37 */ type SCARD_READERSTATEA = struct { FszReader LPCSTR FpvUserData LPVOID FdwCurrentState DWORD FdwEventState DWORD FcbAtr DWORD FrgbAtr [36]BYTE } /* winscard.h:126:5 */ type PSCARD_READERSTATEA = uintptr /* winscard.h:126:24 */ type LPSCARD_READERSTATEA = uintptr /* winscard.h:126:45 */ type SCARD_READERSTATEW = struct { FszReader LPCWSTR FpvUserData LPVOID FdwCurrentState DWORD FdwEventState DWORD FcbAtr DWORD FrgbAtr [36]BYTE } /* winscard.h:135:5 */ type PSCARD_READERSTATEW = uintptr /* winscard.h:135:24 */ type LPSCARD_READERSTATEW = uintptr /* winscard.h:135:45 */ type SCARD_READERSTATE = SCARD_READERSTATEA /* winscard.h:137:3 */ type PSCARD_READERSTATE = PSCARD_READERSTATEA /* winscard.h:138:3 */ type LPSCARD_READERSTATE = LPSCARD_READERSTATEA /* winscard.h:139:3 */ type _SCARD_ATRMASK = struct { FcbAtr DWORD FrgbAtr [36]BYTE FrgbMask [36]BYTE } /* winscard.h:170:11 */ type SCARD_ATRMASK = _SCARD_ATRMASK /* winscard.h:174:5 */ type PSCARD_ATRMASK = uintptr /* winscard.h:174:19 */ type LPSCARD_ATRMASK = uintptr /* winscard.h:174:35 */ type LPOCNCONNPROCA = uintptr /* winscard.h:220:23 */ type LPOCNCONNPROCW = uintptr /* winscard.h:221:23 */ type LPOCNCHKPROC = uintptr /* winscard.h:222:19 */ type LPOCNDSCPROC = uintptr /* winscard.h:223:16 */ type OPENCARD_SEARCH_CRITERIAA = struct { FdwStructSize DWORD _ [4]byte FlpstrGroupNames LPSTR FnMaxGroupNames DWORD _ [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD _ [4]byte FlpstrCardNames LPSTR FnMaxCardNames DWORD _ [4]byte FlpfnCheck LPOCNCHKPROC FlpfnConnect LPOCNCONNPROCA FlpfnDisconnect LPOCNDSCPROC FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD } /* winscard.h:239:5 */ type POPENCARD_SEARCH_CRITERIAA = uintptr /* winscard.h:239:31 */ type LPOPENCARD_SEARCH_CRITERIAA = uintptr /* winscard.h:239:59 */ type OPENCARD_SEARCH_CRITERIAW = struct { FdwStructSize DWORD _ [4]byte FlpstrGroupNames LPWSTR FnMaxGroupNames DWORD _ [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD _ [4]byte FlpstrCardNames LPWSTR FnMaxCardNames DWORD _ [4]byte FlpfnCheck LPOCNCHKPROC FlpfnConnect LPOCNCONNPROCW FlpfnDisconnect LPOCNDSCPROC FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD } /* winscard.h:255:5 */ type POPENCARD_SEARCH_CRITERIAW = uintptr /* winscard.h:255:31 */ type LPOPENCARD_SEARCH_CRITERIAW = uintptr /* winscard.h:255:59 */ type OPENCARD_SEARCH_CRITERIA = OPENCARD_SEARCH_CRITERIAA /* winscard.h:257:3 */ type POPENCARD_SEARCH_CRITERIA = POPENCARD_SEARCH_CRITERIAA /* winscard.h:258:3 */ type LPOPENCARD_SEARCH_CRITERIA = LPOPENCARD_SEARCH_CRITERIAA /* winscard.h:259:3 */ type OPENCARDNAME_EXA = struct { FdwStructSize DWORD _ [4]byte FhSCardContext SCARDCONTEXT FhwndOwner HWND FdwFlags DWORD _ [4]byte FlpstrTitle LPCSTR FlpstrSearchDesc LPCSTR FhIcon HICON FpOpenCardSearchCriteria POPENCARD_SEARCH_CRITERIAA FlpfnConnect LPOCNCONNPROCA FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FlpstrRdr LPSTR FnMaxRdr DWORD _ [4]byte FlpstrCard LPSTR FnMaxCard DWORD FdwActiveProtocol DWORD FhCardHandle SCARDHANDLE } /* winscard.h:280:5 */ type POPENCARDNAME_EXA = uintptr /* winscard.h:280:22 */ type LPOPENCARDNAME_EXA = uintptr /* winscard.h:280:41 */ type OPENCARDNAME_EXW = struct { FdwStructSize DWORD _ [4]byte FhSCardContext SCARDCONTEXT FhwndOwner HWND FdwFlags DWORD _ [4]byte FlpstrTitle LPCWSTR FlpstrSearchDesc LPCWSTR FhIcon HICON FpOpenCardSearchCriteria POPENCARD_SEARCH_CRITERIAW FlpfnConnect LPOCNCONNPROCW FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FlpstrRdr LPWSTR FnMaxRdr DWORD _ [4]byte FlpstrCard LPWSTR FnMaxCard DWORD FdwActiveProtocol DWORD FhCardHandle SCARDHANDLE } /* winscard.h:301:5 */ type POPENCARDNAME_EXW = uintptr /* winscard.h:301:22 */ type LPOPENCARDNAME_EXW = uintptr /* winscard.h:301:41 */ type OPENCARDNAME_EX = OPENCARDNAME_EXA /* winscard.h:303:3 */ type POPENCARDNAME_EX = POPENCARDNAME_EXA /* winscard.h:304:3 */ type LPOPENCARDNAME_EX = LPOPENCARDNAME_EXA /* winscard.h:305:3 */ type OPENCARDNAMEA = struct { FdwStructSize DWORD _ [4]byte FhwndOwner HWND FhSCardContext SCARDCONTEXT FlpstrGroupNames LPSTR FnMaxGroupNames DWORD _ [4]byte FlpstrCardNames LPSTR FnMaxCardNames DWORD _ [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD _ [4]byte FlpstrRdr LPSTR FnMaxRdr DWORD _ [4]byte FlpstrCard LPSTR FnMaxCard DWORD _ [4]byte FlpstrTitle LPCSTR FdwFlags DWORD _ [4]byte FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FdwActiveProtocol DWORD _ [4]byte FlpfnConnect LPOCNCONNPROCA FlpfnCheck LPOCNCHKPROC FlpfnDisconnect LPOCNDSCPROC FhCardHandle SCARDHANDLE } /* winscard.h:343:5 */ type POPENCARDNAMEA = uintptr /* winscard.h:343:19 */ type LPOPENCARDNAMEA = uintptr /* winscard.h:343:35 */ type OPENCARDNAMEW = struct { FdwStructSize DWORD _ [4]byte FhwndOwner HWND FhSCardContext SCARDCONTEXT FlpstrGroupNames LPWSTR FnMaxGroupNames DWORD _ [4]byte FlpstrCardNames LPWSTR FnMaxCardNames DWORD _ [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD _ [4]byte FlpstrRdr LPWSTR FnMaxRdr DWORD _ [4]byte FlpstrCard LPWSTR FnMaxCard DWORD _ [4]byte FlpstrTitle LPCWSTR FdwFlags DWORD _ [4]byte FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FdwActiveProtocol DWORD _ [4]byte FlpfnConnect LPOCNCONNPROCW FlpfnCheck LPOCNCHKPROC FlpfnDisconnect LPOCNDSCPROC FhCardHandle SCARDHANDLE } /* winscard.h:369:5 */ type POPENCARDNAMEW = uintptr /* winscard.h:369:19 */ type LPOPENCARDNAMEW = uintptr /* winscard.h:369:35 */ type OPENCARDNAME = OPENCARDNAMEA /* winscard.h:371:3 */ type POPENCARDNAME = POPENCARDNAMEA /* winscard.h:372:3 */ type LPOPENCARDNAME = LPOPENCARDNAMEA /* winscard.h:373:3 */ type _PROPSHEETPAGEA = struct { FdwSize DWORD FdwFlags DWORD FhInstance HINSTANCE Fu struct{ FpszTemplate LPCSTR } Fu2 struct{ FhIcon HICON } FpszTitle LPCSTR FpfnDlgProc DLGPROC FlParam LPARAM FpfnCallback LPFNPSPCALLBACKA FpcRefParent uintptr FpszHeaderTitle LPCSTR FpszHeaderSubTitle LPCSTR FhActCtx HANDLE } /* prsht.h:50:3 */ type _PROPSHEETPAGEW = struct { FdwSize DWORD FdwFlags DWORD FhInstance HINSTANCE Fu struct{ FpszTemplate LPCWSTR } Fu2 struct{ FhIcon HICON } FpszTitle LPCWSTR FpfnDlgProc DLGPROC FlParam LPARAM FpfnCallback LPFNPSPCALLBACKW FpcRefParent uintptr FpszHeaderTitle LPCWSTR FpszHeaderSubTitle LPCWSTR FhActCtx HANDLE } /* prsht.h:51:3 */ type HPROPSHEETPAGE = uintptr /* prsht.h:53:23 */ type LPFNPSPCALLBACKA = uintptr /* prsht.h:54:16 */ type LPFNPSPCALLBACKW = uintptr /* prsht.h:55:16 */ type PROPSHEETPAGE_RESOURCE = LPCDLGTEMPLATE /* prsht.h:86:26 */ type _PROPSHEETPAGEA_V1 = struct { FdwSize DWORD FdwFlags DWORD FhInstance HINSTANCE Fu struct{ FpszTemplate LPCSTR } Fu2 struct{ FhIcon HICON } FpszTitle LPCSTR FpfnDlgProc DLGPROC FlParam LPARAM FpfnCallback LPFNPSPCALLBACKA FpcRefParent uintptr } /* prsht.h:121:11 */ type PROPSHEETPAGEA_V1 = _PROPSHEETPAGEA_V1 /* prsht.h:123:5 */ type LPPROPSHEETPAGEA_V1 = uintptr /* prsht.h:123:23 */ type LPCPROPSHEETPAGEA_V1 = uintptr /* prsht.h:125:35 */ type _PROPSHEETPAGEA_V2 = struct { FdwSize DWORD FdwFlags DWORD FhInstance HINSTANCE Fu struct{ FpszTemplate LPCSTR } Fu2 struct{ FhIcon HICON } FpszTitle LPCSTR FpfnDlgProc DLGPROC FlParam LPARAM FpfnCallback LPFNPSPCALLBACKA FpcRefParent uintptr FpszHeaderTitle LPCSTR FpszHeaderSubTitle LPCSTR } /* prsht.h:127:11 */ type PROPSHEETPAGEA_V2 = _PROPSHEETPAGEA_V2 /* prsht.h:132:5 */ type LPPROPSHEETPAGEA_V2 = uintptr /* prsht.h:132:23 */ type LPCPROPSHEETPAGEA_V2 = uintptr /* prsht.h:134:35 */ type PROPSHEETPAGEA_V3 = _PROPSHEETPAGEA /* prsht.h:141:5 */ type LPPROPSHEETPAGEA_V3 = uintptr /* prsht.h:141:23 */ type LPCPROPSHEETPAGEA_V3 = uintptr /* prsht.h:143:35 */ type _PROPSHEETPAGEW_V1 = struct { FdwSize DWORD FdwFlags DWORD FhInstance HINSTANCE Fu struct{ FpszTemplate LPCWSTR } Fu2 struct{ FhIcon HICON } FpszTitle LPCWSTR FpfnDlgProc DLGPROC FlParam LPARAM FpfnCallback LPFNPSPCALLBACKW FpcRefParent uintptr } /* prsht.h:145:11 */ type PROPSHEETPAGEW_V1 = _PROPSHEETPAGEW_V1 /* prsht.h:147:5 */ type LPPROPSHEETPAGEW_V1 = uintptr /* prsht.h:147:23 */ type LPCPROPSHEETPAGEW_V1 = uintptr /* prsht.h:149:35 */ type _PROPSHEETPAGEW_V2 = struct { FdwSize DWORD FdwFlags DWORD FhInstance HINSTANCE Fu struct{ FpszTemplate LPCWSTR } Fu2 struct{ FhIcon HICON } FpszTitle LPCWSTR FpfnDlgProc DLGPROC FlParam LPARAM FpfnCallback LPFNPSPCALLBACKW FpcRefParent uintptr FpszHeaderTitle LPCWSTR FpszHeaderSubTitle LPCWSTR } /* prsht.h:151:11 */ type PROPSHEETPAGEW_V2 = _PROPSHEETPAGEW_V2 /* prsht.h:155:5 */ type LPPROPSHEETPAGEW_V2 = uintptr /* prsht.h:155:23 */ type LPCPROPSHEETPAGEW_V2 = uintptr /* prsht.h:157:35 */ type PROPSHEETPAGEW_V3 = _PROPSHEETPAGEW /* prsht.h:164:5 */ type LPPROPSHEETPAGEW_V3 = uintptr /* prsht.h:164:23 */ type LPCPROPSHEETPAGEW_V3 = uintptr /* prsht.h:166:35 */ type PROPSHEETPAGEA_LATEST = PROPSHEETPAGEA_V3 /* prsht.h:167:29 */ type PROPSHEETPAGEW_LATEST = PROPSHEETPAGEW_V3 /* prsht.h:168:29 */ type LPPROPSHEETPAGEA_LATEST = LPPROPSHEETPAGEA_V3 /* prsht.h:169:31 */ type LPPROPSHEETPAGEW_LATEST = LPPROPSHEETPAGEW_V3 /* prsht.h:170:31 */ type LPCPROPSHEETPAGEA_LATEST = LPCPROPSHEETPAGEA_V3 /* prsht.h:171:32 */ type LPCPROPSHEETPAGEW_LATEST = LPCPROPSHEETPAGEW_V3 /* prsht.h:172:32 */ type PROPSHEETPAGEA = PROPSHEETPAGEA_V3 /* prsht.h:174:29 */ type PROPSHEETPAGEW = PROPSHEETPAGEW_V3 /* prsht.h:175:29 */ type LPPROPSHEETPAGEA = LPPROPSHEETPAGEA_V3 /* prsht.h:176:31 */ type LPPROPSHEETPAGEW = LPPROPSHEETPAGEW_V3 /* prsht.h:177:31 */ type LPCPROPSHEETPAGEA = LPCPROPSHEETPAGEA_V3 /* prsht.h:178:32 */ type LPCPROPSHEETPAGEW = LPCPROPSHEETPAGEW_V3 /* prsht.h:179:32 */ type PFNPROPSHEETCALLBACK = uintptr /* prsht.h:227:15 */ type _PROPSHEETHEADERA = struct { FdwSize DWORD FdwFlags DWORD FhwndParent HWND FhInstance HINSTANCE Fu struct{ FhIcon HICON } FpszCaption LPCSTR FnPages UINT _ [4]byte Fu2 struct { _ [0]uint64 FnStartPage UINT _ [4]byte } Fu3 struct{ Fppsp LPCPROPSHEETPAGEA } FpfnCallback PFNPROPSHEETCALLBACK Fu4 struct{ FhbmWatermark HBITMAP } FhplWatermark HPALETTE Fu5 struct{ FhbmHeader HBITMAP } } /* prsht.h:235:11 */ type PROPSHEETHEADERA = _PROPSHEETHEADERA /* prsht.h:264:5 */ type LPPROPSHEETHEADERA = uintptr /* prsht.h:264:22 */ type LPCPROPSHEETHEADERA = uintptr /* prsht.h:266:34 */ type _PROPSHEETHEADERW = struct { FdwSize DWORD FdwFlags DWORD FhwndParent HWND FhInstance HINSTANCE Fu struct{ FhIcon HICON } FpszCaption LPCWSTR FnPages UINT _ [4]byte Fu2 struct { _ [0]uint64 FnStartPage UINT _ [4]byte } Fu3 struct{ Fppsp LPCPROPSHEETPAGEW } FpfnCallback PFNPROPSHEETCALLBACK Fu4 struct{ FhbmWatermark HBITMAP } FhplWatermark HPALETTE Fu5 struct{ FhbmHeader HBITMAP } } /* prsht.h:268:11 */ type PROPSHEETHEADERW = _PROPSHEETHEADERW /* prsht.h:297:5 */ type LPPROPSHEETHEADERW = uintptr /* prsht.h:297:22 */ type LPCPROPSHEETHEADERW = uintptr /* prsht.h:299:34 */ type LPFNADDPROPSHEETPAGE = uintptr /* prsht.h:321:19 */ type LPFNADDPROPSHEETPAGES = uintptr /* prsht.h:322:19 */ type _PSHNOTIFY = struct { Fhdr NMHDR FlParam LPARAM } /* prsht.h:324:11 */ type PSHNOTIFY = _PSHNOTIFY /* prsht.h:327:5 */ type LPPSHNOTIFY = uintptr /* prsht.h:327:15 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _PRINTER_INFO_1A = struct { FFlags DWORD _ [4]byte FpDescription LPSTR FpName LPSTR FpComment LPSTR } /* winspool.h:19:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type PRINTER_INFO_1A = _PRINTER_INFO_1A /* winspool.h:24:5 */ type PPRINTER_INFO_1A = uintptr /* winspool.h:24:21 */ type LPPRINTER_INFO_1A = uintptr /* winspool.h:24:39 */ type _PRINTER_INFO_1W = struct { FFlags DWORD _ [4]byte FpDescription LPWSTR FpName LPWSTR FpComment LPWSTR } /* winspool.h:26:11 */ type PRINTER_INFO_1W = _PRINTER_INFO_1W /* winspool.h:31:5 */ type PPRINTER_INFO_1W = uintptr /* winspool.h:31:21 */ type LPPRINTER_INFO_1W = uintptr /* winspool.h:31:39 */ type PRINTER_INFO_1 = PRINTER_INFO_1A /* winspool.h:33:3 */ type PPRINTER_INFO_1 = PPRINTER_INFO_1A /* winspool.h:34:3 */ type LPPRINTER_INFO_1 = LPPRINTER_INFO_1A /* winspool.h:35:3 */ type _PRINTER_INFO_2A = struct { FpServerName LPSTR FpPrinterName LPSTR FpShareName LPSTR FpPortName LPSTR FpDriverName LPSTR FpComment LPSTR FpLocation LPSTR FpDevMode LPDEVMODEA FpSepFile LPSTR FpPrintProcessor LPSTR FpDatatype LPSTR FpParameters LPSTR FpSecurityDescriptor PSECURITY_DESCRIPTOR FAttributes DWORD FPriority DWORD FDefaultPriority DWORD FStartTime DWORD FUntilTime DWORD FStatus DWORD FcJobs DWORD FAveragePPM DWORD } /* winspool.h:37:11 */ type PRINTER_INFO_2A = _PRINTER_INFO_2A /* winspool.h:59:5 */ type PPRINTER_INFO_2A = uintptr /* winspool.h:59:21 */ type LPPRINTER_INFO_2A = uintptr /* winspool.h:59:39 */ type _PRINTER_INFO_2W = struct { FpServerName LPWSTR FpPrinterName LPWSTR FpShareName LPWSTR FpPortName LPWSTR FpDriverName LPWSTR FpComment LPWSTR FpLocation LPWSTR FpDevMode LPDEVMODEW FpSepFile LPWSTR FpPrintProcessor LPWSTR FpDatatype LPWSTR FpParameters LPWSTR FpSecurityDescriptor PSECURITY_DESCRIPTOR FAttributes DWORD FPriority DWORD FDefaultPriority DWORD FStartTime DWORD FUntilTime DWORD FStatus DWORD FcJobs DWORD FAveragePPM DWORD } /* winspool.h:61:11 */ type PRINTER_INFO_2W = _PRINTER_INFO_2W /* winspool.h:83:5 */ type PPRINTER_INFO_2W = uintptr /* winspool.h:83:21 */ type LPPRINTER_INFO_2W = uintptr /* winspool.h:83:39 */ type PRINTER_INFO_2 = PRINTER_INFO_2A /* winspool.h:85:3 */ type PPRINTER_INFO_2 = PPRINTER_INFO_2A /* winspool.h:86:3 */ type LPPRINTER_INFO_2 = LPPRINTER_INFO_2A /* winspool.h:87:3 */ type _PRINTER_INFO_3 = struct{ FpSecurityDescriptor PSECURITY_DESCRIPTOR } /* winspool.h:89:11 */ type PRINTER_INFO_3 = _PRINTER_INFO_3 /* winspool.h:91:5 */ type PPRINTER_INFO_3 = uintptr /* winspool.h:91:20 */ type LPPRINTER_INFO_3 = uintptr /* winspool.h:91:37 */ type _PRINTER_INFO_4A = struct { FpPrinterName LPSTR FpServerName LPSTR FAttributes DWORD _ [4]byte } /* winspool.h:93:11 */ type PRINTER_INFO_4A = _PRINTER_INFO_4A /* winspool.h:97:5 */ type PPRINTER_INFO_4A = uintptr /* winspool.h:97:21 */ type LPPRINTER_INFO_4A = uintptr /* winspool.h:97:39 */ type _PRINTER_INFO_4W = struct { FpPrinterName LPWSTR FpServerName LPWSTR FAttributes DWORD _ [4]byte } /* winspool.h:99:11 */ type PRINTER_INFO_4W = _PRINTER_INFO_4W /* winspool.h:103:5 */ type PPRINTER_INFO_4W = uintptr /* winspool.h:103:21 */ type LPPRINTER_INFO_4W = uintptr /* winspool.h:103:39 */ type PRINTER_INFO_4 = PRINTER_INFO_4A /* winspool.h:105:3 */ type PPRINTER_INFO_4 = PPRINTER_INFO_4A /* winspool.h:106:3 */ type LPPRINTER_INFO_4 = LPPRINTER_INFO_4A /* winspool.h:107:3 */ type _PRINTER_INFO_5A = struct { FpPrinterName LPSTR FpPortName LPSTR FAttributes DWORD FDeviceNotSelectedTimeout DWORD FTransmissionRetryTimeout DWORD _ [4]byte } /* winspool.h:109:11 */ type PRINTER_INFO_5A = _PRINTER_INFO_5A /* winspool.h:115:5 */ type PPRINTER_INFO_5A = uintptr /* winspool.h:115:21 */ type LPPRINTER_INFO_5A = uintptr /* winspool.h:115:39 */ type _PRINTER_INFO_5W = struct { FpPrinterName LPWSTR FpPortName LPWSTR FAttributes DWORD FDeviceNotSelectedTimeout DWORD FTransmissionRetryTimeout DWORD _ [4]byte } /* winspool.h:117:11 */ type PRINTER_INFO_5W = _PRINTER_INFO_5W /* winspool.h:123:5 */ type PPRINTER_INFO_5W = uintptr /* winspool.h:123:21 */ type LPPRINTER_INFO_5W = uintptr /* winspool.h:123:39 */ type PRINTER_INFO_5 = PRINTER_INFO_5A /* winspool.h:125:3 */ type PPRINTER_INFO_5 = PPRINTER_INFO_5A /* winspool.h:126:3 */ type LPPRINTER_INFO_5 = LPPRINTER_INFO_5A /* winspool.h:127:3 */ type _PRINTER_INFO_6 = struct{ FdwStatus DWORD } /* winspool.h:129:11 */ type PRINTER_INFO_6 = _PRINTER_INFO_6 /* winspool.h:131:5 */ type PPRINTER_INFO_6 = uintptr /* winspool.h:131:20 */ type LPPRINTER_INFO_6 = uintptr /* winspool.h:131:37 */ type _PRINTER_INFO_7A = struct { FpszObjectGUID LPSTR FdwAction DWORD _ [4]byte } /* winspool.h:133:11 */ type PRINTER_INFO_7A = _PRINTER_INFO_7A /* winspool.h:136:5 */ type PPRINTER_INFO_7A = uintptr /* winspool.h:136:21 */ type LPPRINTER_INFO_7A = uintptr /* winspool.h:136:39 */ type _PRINTER_INFO_7W = struct { FpszObjectGUID LPWSTR FdwAction DWORD _ [4]byte } /* winspool.h:138:11 */ type PRINTER_INFO_7W = _PRINTER_INFO_7W /* winspool.h:141:5 */ type PPRINTER_INFO_7W = uintptr /* winspool.h:141:21 */ type LPPRINTER_INFO_7W = uintptr /* winspool.h:141:39 */ type PRINTER_INFO_7 = PRINTER_INFO_7A /* winspool.h:143:3 */ type PPRINTER_INFO_7 = PPRINTER_INFO_7A /* winspool.h:144:3 */ type LPPRINTER_INFO_7 = LPPRINTER_INFO_7A /* winspool.h:145:3 */ type _PRINTER_INFO_8A = struct{ FpDevMode LPDEVMODEA } /* winspool.h:153:11 */ type PRINTER_INFO_8A = _PRINTER_INFO_8A /* winspool.h:155:5 */ type PPRINTER_INFO_8A = uintptr /* winspool.h:155:21 */ type LPPRINTER_INFO_8A = uintptr /* winspool.h:155:39 */ type _PRINTER_INFO_8W = struct{ FpDevMode LPDEVMODEW } /* winspool.h:157:11 */ type PRINTER_INFO_8W = _PRINTER_INFO_8W /* winspool.h:159:5 */ type PPRINTER_INFO_8W = uintptr /* winspool.h:159:21 */ type LPPRINTER_INFO_8W = uintptr /* winspool.h:159:39 */ type PRINTER_INFO_8 = PRINTER_INFO_8A /* winspool.h:161:3 */ type PPRINTER_INFO_8 = PPRINTER_INFO_8A /* winspool.h:162:3 */ type LPPRINTER_INFO_8 = LPPRINTER_INFO_8A /* winspool.h:163:3 */ type _PRINTER_INFO_9A = struct{ FpDevMode LPDEVMODEA } /* winspool.h:165:11 */ type PRINTER_INFO_9A = _PRINTER_INFO_9A /* winspool.h:167:5 */ type PPRINTER_INFO_9A = uintptr /* winspool.h:167:21 */ type LPPRINTER_INFO_9A = uintptr /* winspool.h:167:39 */ type _PRINTER_INFO_9W = struct{ FpDevMode LPDEVMODEW } /* winspool.h:169:11 */ type PRINTER_INFO_9W = _PRINTER_INFO_9W /* winspool.h:171:5 */ type PPRINTER_INFO_9W = uintptr /* winspool.h:171:21 */ type LPPRINTER_INFO_9W = uintptr /* winspool.h:171:39 */ type PRINTER_INFO_9 = PRINTER_INFO_9A /* winspool.h:173:3 */ type PPRINTER_INFO_9 = PPRINTER_INFO_9A /* winspool.h:174:3 */ type LPPRINTER_INFO_9 = LPPRINTER_INFO_9A /* winspool.h:175:3 */ type _JOB_INFO_1A = struct { FJobId DWORD _ [4]byte FpPrinterName LPSTR FpMachineName LPSTR FpUserName LPSTR FpDocument LPSTR FpDatatype LPSTR FpStatus LPSTR FStatus DWORD FPriority DWORD FPosition DWORD FTotalPages DWORD FPagesPrinted DWORD FSubmitted SYSTEMTIME _ [4]byte } /* winspool.h:232:11 */ type JOB_INFO_1A = _JOB_INFO_1A /* winspool.h:246:5 */ type PJOB_INFO_1A = uintptr /* winspool.h:246:17 */ type LPJOB_INFO_1A = uintptr /* winspool.h:246:31 */ type _JOB_INFO_1W = struct { FJobId DWORD _ [4]byte FpPrinterName LPWSTR FpMachineName LPWSTR FpUserName LPWSTR FpDocument LPWSTR FpDatatype LPWSTR FpStatus LPWSTR FStatus DWORD FPriority DWORD FPosition DWORD FTotalPages DWORD FPagesPrinted DWORD FSubmitted SYSTEMTIME _ [4]byte } /* winspool.h:248:11 */ type JOB_INFO_1W = _JOB_INFO_1W /* winspool.h:262:5 */ type PJOB_INFO_1W = uintptr /* winspool.h:262:17 */ type LPJOB_INFO_1W = uintptr /* winspool.h:262:31 */ type JOB_INFO_1 = JOB_INFO_1A /* winspool.h:264:3 */ type PJOB_INFO_1 = PJOB_INFO_1A /* winspool.h:265:3 */ type LPJOB_INFO_1 = LPJOB_INFO_1A /* winspool.h:266:3 */ type _JOB_INFO_2A = struct { FJobId DWORD _ [4]byte FpPrinterName LPSTR FpMachineName LPSTR FpUserName LPSTR FpDocument LPSTR FpNotifyName LPSTR FpDatatype LPSTR FpPrintProcessor LPSTR FpParameters LPSTR FpDriverName LPSTR FpDevMode LPDEVMODEA FpStatus LPSTR FpSecurityDescriptor PSECURITY_DESCRIPTOR FStatus DWORD FPriority DWORD FPosition DWORD FStartTime DWORD FUntilTime DWORD FTotalPages DWORD FSize DWORD FSubmitted SYSTEMTIME FTime DWORD FPagesPrinted DWORD _ [4]byte } /* winspool.h:268:11 */ type JOB_INFO_2A = _JOB_INFO_2A /* winspool.h:292:5 */ type PJOB_INFO_2A = uintptr /* winspool.h:292:17 */ type LPJOB_INFO_2A = uintptr /* winspool.h:292:31 */ type _JOB_INFO_2W = struct { FJobId DWORD _ [4]byte FpPrinterName LPWSTR FpMachineName LPWSTR FpUserName LPWSTR FpDocument LPWSTR FpNotifyName LPWSTR FpDatatype LPWSTR FpPrintProcessor LPWSTR FpParameters LPWSTR FpDriverName LPWSTR FpDevMode LPDEVMODEW FpStatus LPWSTR FpSecurityDescriptor PSECURITY_DESCRIPTOR FStatus DWORD FPriority DWORD FPosition DWORD FStartTime DWORD FUntilTime DWORD FTotalPages DWORD FSize DWORD FSubmitted SYSTEMTIME FTime DWORD FPagesPrinted DWORD _ [4]byte } /* winspool.h:294:11 */ type JOB_INFO_2W = _JOB_INFO_2W /* winspool.h:318:5 */ type PJOB_INFO_2W = uintptr /* winspool.h:318:17 */ type LPJOB_INFO_2W = uintptr /* winspool.h:318:31 */ type JOB_INFO_2 = JOB_INFO_2A /* winspool.h:320:3 */ type PJOB_INFO_2 = PJOB_INFO_2A /* winspool.h:321:3 */ type LPJOB_INFO_2 = LPJOB_INFO_2A /* winspool.h:322:3 */ type _JOB_INFO_3 = struct { FJobId DWORD FNextJobId DWORD FReserved DWORD } /* winspool.h:324:11 */ type JOB_INFO_3 = _JOB_INFO_3 /* winspool.h:328:5 */ type PJOB_INFO_3 = uintptr /* winspool.h:328:16 */ type LPJOB_INFO_3 = uintptr /* winspool.h:328:29 */ type _ADDJOB_INFO_1A = struct { FPath LPSTR FJobId DWORD _ [4]byte } /* winspool.h:354:11 */ type ADDJOB_INFO_1A = _ADDJOB_INFO_1A /* winspool.h:357:5 */ type PADDJOB_INFO_1A = uintptr /* winspool.h:357:20 */ type LPADDJOB_INFO_1A = uintptr /* winspool.h:357:37 */ type _ADDJOB_INFO_1W = struct { FPath LPWSTR FJobId DWORD _ [4]byte } /* winspool.h:359:11 */ type ADDJOB_INFO_1W = _ADDJOB_INFO_1W /* winspool.h:362:5 */ type PADDJOB_INFO_1W = uintptr /* winspool.h:362:20 */ type LPADDJOB_INFO_1W = uintptr /* winspool.h:362:37 */ type ADDJOB_INFO_1 = ADDJOB_INFO_1A /* winspool.h:364:3 */ type PADDJOB_INFO_1 = PADDJOB_INFO_1A /* winspool.h:365:3 */ type LPADDJOB_INFO_1 = LPADDJOB_INFO_1A /* winspool.h:366:3 */ type _DRIVER_INFO_1A = struct{ FpName LPSTR } /* winspool.h:368:11 */ type DRIVER_INFO_1A = _DRIVER_INFO_1A /* winspool.h:370:5 */ type PDRIVER_INFO_1A = uintptr /* winspool.h:370:20 */ type LPDRIVER_INFO_1A = uintptr /* winspool.h:370:37 */ type _DRIVER_INFO_1W = struct{ FpName LPWSTR } /* winspool.h:372:11 */ type DRIVER_INFO_1W = _DRIVER_INFO_1W /* winspool.h:374:5 */ type PDRIVER_INFO_1W = uintptr /* winspool.h:374:20 */ type LPDRIVER_INFO_1W = uintptr /* winspool.h:374:37 */ type DRIVER_INFO_1 = DRIVER_INFO_1A /* winspool.h:376:3 */ type PDRIVER_INFO_1 = PDRIVER_INFO_1A /* winspool.h:377:3 */ type LPDRIVER_INFO_1 = LPDRIVER_INFO_1A /* winspool.h:378:3 */ type _DRIVER_INFO_2A = struct { FcVersion DWORD _ [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR } /* winspool.h:380:11 */ type DRIVER_INFO_2A = _DRIVER_INFO_2A /* winspool.h:387:5 */ type PDRIVER_INFO_2A = uintptr /* winspool.h:387:20 */ type LPDRIVER_INFO_2A = uintptr /* winspool.h:387:37 */ type _DRIVER_INFO_2W = struct { FcVersion DWORD _ [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR } /* winspool.h:389:11 */ type DRIVER_INFO_2W = _DRIVER_INFO_2W /* winspool.h:396:5 */ type PDRIVER_INFO_2W = uintptr /* winspool.h:396:20 */ type LPDRIVER_INFO_2W = uintptr /* winspool.h:396:37 */ type DRIVER_INFO_2 = DRIVER_INFO_2A /* winspool.h:398:3 */ type PDRIVER_INFO_2 = PDRIVER_INFO_2A /* winspool.h:399:3 */ type LPDRIVER_INFO_2 = LPDRIVER_INFO_2A /* winspool.h:400:3 */ type _DRIVER_INFO_3A = struct { FcVersion DWORD _ [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FpHelpFile LPSTR FpDependentFiles LPSTR FpMonitorName LPSTR FpDefaultDataType LPSTR } /* winspool.h:402:11 */ type DRIVER_INFO_3A = _DRIVER_INFO_3A /* winspool.h:413:5 */ type PDRIVER_INFO_3A = uintptr /* winspool.h:413:20 */ type LPDRIVER_INFO_3A = uintptr /* winspool.h:413:37 */ type _DRIVER_INFO_3W = struct { FcVersion DWORD _ [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FpHelpFile LPWSTR FpDependentFiles LPWSTR FpMonitorName LPWSTR FpDefaultDataType LPWSTR } /* winspool.h:415:11 */ type DRIVER_INFO_3W = _DRIVER_INFO_3W /* winspool.h:426:5 */ type PDRIVER_INFO_3W = uintptr /* winspool.h:426:20 */ type LPDRIVER_INFO_3W = uintptr /* winspool.h:426:37 */ type DRIVER_INFO_3 = DRIVER_INFO_3A /* winspool.h:428:3 */ type PDRIVER_INFO_3 = PDRIVER_INFO_3A /* winspool.h:429:3 */ type LPDRIVER_INFO_3 = LPDRIVER_INFO_3A /* winspool.h:430:3 */ type _DRIVER_INFO_4A = struct { FcVersion DWORD _ [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FpHelpFile LPSTR FpDependentFiles LPSTR FpMonitorName LPSTR FpDefaultDataType LPSTR FpszzPreviousNames LPSTR } /* winspool.h:432:11 */ type DRIVER_INFO_4A = _DRIVER_INFO_4A /* winspool.h:444:5 */ type PDRIVER_INFO_4A = uintptr /* winspool.h:444:20 */ type LPDRIVER_INFO_4A = uintptr /* winspool.h:444:37 */ type _DRIVER_INFO_4W = struct { FcVersion DWORD _ [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FpHelpFile LPWSTR FpDependentFiles LPWSTR FpMonitorName LPWSTR FpDefaultDataType LPWSTR FpszzPreviousNames LPWSTR } /* winspool.h:446:11 */ type DRIVER_INFO_4W = _DRIVER_INFO_4W /* winspool.h:458:5 */ type PDRIVER_INFO_4W = uintptr /* winspool.h:458:20 */ type LPDRIVER_INFO_4W = uintptr /* winspool.h:458:37 */ type DRIVER_INFO_4 = DRIVER_INFO_4A /* winspool.h:460:3 */ type PDRIVER_INFO_4 = PDRIVER_INFO_4A /* winspool.h:461:3 */ type LPDRIVER_INFO_4 = LPDRIVER_INFO_4A /* winspool.h:462:3 */ type _DRIVER_INFO_5A = struct { FcVersion DWORD _ [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FdwDriverAttributes DWORD FdwConfigVersion DWORD FdwDriverVersion DWORD _ [4]byte } /* winspool.h:464:11 */ type DRIVER_INFO_5A = _DRIVER_INFO_5A /* winspool.h:474:5 */ type PDRIVER_INFO_5A = uintptr /* winspool.h:474:20 */ type LPDRIVER_INFO_5A = uintptr /* winspool.h:474:37 */ type _DRIVER_INFO_5W = struct { FcVersion DWORD _ [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FdwDriverAttributes DWORD FdwConfigVersion DWORD FdwDriverVersion DWORD _ [4]byte } /* winspool.h:476:11 */ type DRIVER_INFO_5W = _DRIVER_INFO_5W /* winspool.h:486:5 */ type PDRIVER_INFO_5W = uintptr /* winspool.h:486:20 */ type LPDRIVER_INFO_5W = uintptr /* winspool.h:486:37 */ type DRIVER_INFO_5 = DRIVER_INFO_5A /* winspool.h:488:3 */ type PDRIVER_INFO_5 = PDRIVER_INFO_5A /* winspool.h:489:3 */ type LPDRIVER_INFO_5 = LPDRIVER_INFO_5A /* winspool.h:490:3 */ type _DRIVER_INFO_6A = struct { FcVersion DWORD _ [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FpHelpFile LPSTR FpDependentFiles LPSTR FpMonitorName LPSTR FpDefaultDataType LPSTR FpszzPreviousNames LPSTR FftDriverDate FILETIME FdwlDriverVersion DWORDLONG FpszMfgName LPSTR FpszOEMUrl LPSTR FpszHardwareID LPSTR FpszProvider LPSTR } /* winspool.h:492:11 */ type DRIVER_INFO_6A = _DRIVER_INFO_6A /* winspool.h:510:5 */ type PDRIVER_INFO_6A = uintptr /* winspool.h:510:20 */ type LPDRIVER_INFO_6A = uintptr /* winspool.h:510:37 */ type _DRIVER_INFO_6W = struct { FcVersion DWORD _ [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FpHelpFile LPWSTR FpDependentFiles LPWSTR FpMonitorName LPWSTR FpDefaultDataType LPWSTR FpszzPreviousNames LPWSTR FftDriverDate FILETIME FdwlDriverVersion DWORDLONG FpszMfgName LPWSTR FpszOEMUrl LPWSTR FpszHardwareID LPWSTR FpszProvider LPWSTR } /* winspool.h:512:11 */ type DRIVER_INFO_6W = _DRIVER_INFO_6W /* winspool.h:530:5 */ type PDRIVER_INFO_6W = uintptr /* winspool.h:530:20 */ type LPDRIVER_INFO_6W = uintptr /* winspool.h:530:37 */ type DRIVER_INFO_6 = DRIVER_INFO_6A /* winspool.h:532:3 */ type PDRIVER_INFO_6 = PDRIVER_INFO_6A /* winspool.h:533:3 */ type LPDRIVER_INFO_6 = LPDRIVER_INFO_6A /* winspool.h:534:3 */ type _DOC_INFO_1A = struct { FpDocName LPSTR FpOutputFile LPSTR FpDatatype LPSTR } /* winspool.h:549:11 */ type DOC_INFO_1A = _DOC_INFO_1A /* winspool.h:553:5 */ type PDOC_INFO_1A = uintptr /* winspool.h:553:17 */ type LPDOC_INFO_1A = uintptr /* winspool.h:553:31 */ type _DOC_INFO_1W = struct { FpDocName LPWSTR FpOutputFile LPWSTR FpDatatype LPWSTR } /* winspool.h:555:11 */ type DOC_INFO_1W = _DOC_INFO_1W /* winspool.h:559:5 */ type PDOC_INFO_1W = uintptr /* winspool.h:559:17 */ type LPDOC_INFO_1W = uintptr /* winspool.h:559:31 */ type DOC_INFO_1 = DOC_INFO_1A /* winspool.h:561:3 */ type PDOC_INFO_1 = PDOC_INFO_1A /* winspool.h:562:3 */ type LPDOC_INFO_1 = LPDOC_INFO_1A /* winspool.h:563:3 */ type _FORM_INFO_1A = struct { FFlags DWORD _ [4]byte FpName LPSTR FSize SIZEL FImageableArea RECTL } /* winspool.h:565:11 */ type FORM_INFO_1A = _FORM_INFO_1A /* winspool.h:570:5 */ type PFORM_INFO_1A = uintptr /* winspool.h:570:18 */ type LPFORM_INFO_1A = uintptr /* winspool.h:570:33 */ type _FORM_INFO_1W = struct { FFlags DWORD _ [4]byte FpName LPWSTR FSize SIZEL FImageableArea RECTL } /* winspool.h:572:11 */ type FORM_INFO_1W = _FORM_INFO_1W /* winspool.h:577:5 */ type PFORM_INFO_1W = uintptr /* winspool.h:577:18 */ type LPFORM_INFO_1W = uintptr /* winspool.h:577:33 */ type FORM_INFO_1 = FORM_INFO_1A /* winspool.h:579:3 */ type PFORM_INFO_1 = PFORM_INFO_1A /* winspool.h:580:3 */ type LPFORM_INFO_1 = LPFORM_INFO_1A /* winspool.h:581:3 */ type _DOC_INFO_2A = struct { FpDocName LPSTR FpOutputFile LPSTR FpDatatype LPSTR FdwMode DWORD FJobId DWORD } /* winspool.h:583:11 */ type DOC_INFO_2A = _DOC_INFO_2A /* winspool.h:589:5 */ type PDOC_INFO_2A = uintptr /* winspool.h:589:17 */ type LPDOC_INFO_2A = uintptr /* winspool.h:589:31 */ type _DOC_INFO_2W = struct { FpDocName LPWSTR FpOutputFile LPWSTR FpDatatype LPWSTR FdwMode DWORD FJobId DWORD } /* winspool.h:591:11 */ type DOC_INFO_2W = _DOC_INFO_2W /* winspool.h:597:5 */ type PDOC_INFO_2W = uintptr /* winspool.h:597:17 */ type LPDOC_INFO_2W = uintptr /* winspool.h:597:31 */ type DOC_INFO_2 = DOC_INFO_2A /* winspool.h:599:3 */ type PDOC_INFO_2 = PDOC_INFO_2A /* winspool.h:600:3 */ type LPDOC_INFO_2 = LPDOC_INFO_2A /* winspool.h:601:3 */ type _DOC_INFO_3A = struct { FpDocName LPSTR FpOutputFile LPSTR FpDatatype LPSTR FdwFlags DWORD _ [4]byte } /* winspool.h:606:11 */ type DOC_INFO_3A = _DOC_INFO_3A /* winspool.h:611:5 */ type PDOC_INFO_3A = uintptr /* winspool.h:611:17 */ type LPDOC_INFO_3A = uintptr /* winspool.h:611:31 */ type _DOC_INFO_3W = struct { FpDocName LPWSTR FpOutputFile LPWSTR FpDatatype LPWSTR FdwFlags DWORD _ [4]byte } /* winspool.h:613:11 */ type DOC_INFO_3W = _DOC_INFO_3W /* winspool.h:618:5 */ type PDOC_INFO_3W = uintptr /* winspool.h:618:17 */ type LPDOC_INFO_3W = uintptr /* winspool.h:618:31 */ type DOC_INFO_3 = DOC_INFO_3A /* winspool.h:620:3 */ type PDOC_INFO_3 = PDOC_INFO_3A /* winspool.h:621:3 */ type LPDOC_INFO_3 = LPDOC_INFO_3A /* winspool.h:622:3 */ type _PRINTPROCESSOR_INFO_1A = struct{ FpName LPSTR } /* winspool.h:630:11 */ type PRINTPROCESSOR_INFO_1A = _PRINTPROCESSOR_INFO_1A /* winspool.h:632:5 */ type PPRINTPROCESSOR_INFO_1A = uintptr /* winspool.h:632:28 */ type LPPRINTPROCESSOR_INFO_1A = uintptr /* winspool.h:632:53 */ type _PRINTPROCESSOR_INFO_1W = struct{ FpName LPWSTR } /* winspool.h:634:11 */ type PRINTPROCESSOR_INFO_1W = _PRINTPROCESSOR_INFO_1W /* winspool.h:636:5 */ type PPRINTPROCESSOR_INFO_1W = uintptr /* winspool.h:636:28 */ type LPPRINTPROCESSOR_INFO_1W = uintptr /* winspool.h:636:53 */ type PRINTPROCESSOR_INFO_1 = PRINTPROCESSOR_INFO_1A /* winspool.h:638:3 */ type PPRINTPROCESSOR_INFO_1 = PPRINTPROCESSOR_INFO_1A /* winspool.h:639:3 */ type LPPRINTPROCESSOR_INFO_1 = LPPRINTPROCESSOR_INFO_1A /* winspool.h:640:3 */ type _PRINTPROCESSOR_CAPS_1 = struct { FdwLevel DWORD FdwNupOptions DWORD FdwPageOrderFlags DWORD FdwNumberOfCopies DWORD } /* winspool.h:642:11 */ type PRINTPROCESSOR_CAPS_1 = _PRINTPROCESSOR_CAPS_1 /* winspool.h:647:5 */ type PPRINTPROCESSOR_CAPS_1 = uintptr /* winspool.h:647:27 */ type _PORT_INFO_1A = struct{ FpName LPSTR } /* winspool.h:652:11 */ type PORT_INFO_1A = _PORT_INFO_1A /* winspool.h:654:5 */ type PPORT_INFO_1A = uintptr /* winspool.h:654:18 */ type LPPORT_INFO_1A = uintptr /* winspool.h:654:33 */ type _PORT_INFO_1W = struct{ FpName LPWSTR } /* winspool.h:655:11 */ type PORT_INFO_1W = _PORT_INFO_1W /* winspool.h:657:5 */ type PPORT_INFO_1W = uintptr /* winspool.h:657:18 */ type LPPORT_INFO_1W = uintptr /* winspool.h:657:33 */ type PORT_INFO_1 = PORT_INFO_1A /* winspool.h:659:3 */ type PPORT_INFO_1 = PPORT_INFO_1A /* winspool.h:660:3 */ type LPPORT_INFO_1 = LPPORT_INFO_1A /* winspool.h:661:3 */ type _PORT_INFO_2A = struct { FpPortName LPSTR FpMonitorName LPSTR FpDescription LPSTR FfPortType DWORD FReserved DWORD } /* winspool.h:663:11 */ type PORT_INFO_2A = _PORT_INFO_2A /* winspool.h:669:5 */ type PPORT_INFO_2A = uintptr /* winspool.h:669:18 */ type LPPORT_INFO_2A = uintptr /* winspool.h:669:33 */ type _PORT_INFO_2W = struct { FpPortName LPWSTR FpMonitorName LPWSTR FpDescription LPWSTR FfPortType DWORD FReserved DWORD } /* winspool.h:671:11 */ type PORT_INFO_2W = _PORT_INFO_2W /* winspool.h:677:5 */ type PPORT_INFO_2W = uintptr /* winspool.h:677:18 */ type LPPORT_INFO_2W = uintptr /* winspool.h:677:33 */ type PORT_INFO_2 = PORT_INFO_2A /* winspool.h:679:3 */ type PPORT_INFO_2 = PPORT_INFO_2A /* winspool.h:680:3 */ type LPPORT_INFO_2 = LPPORT_INFO_2A /* winspool.h:681:3 */ type _PORT_INFO_3A = struct { FdwStatus DWORD _ [4]byte FpszStatus LPSTR FdwSeverity DWORD _ [4]byte } /* winspool.h:688:11 */ type PORT_INFO_3A = _PORT_INFO_3A /* winspool.h:692:5 */ type PPORT_INFO_3A = uintptr /* winspool.h:692:18 */ type LPPORT_INFO_3A = uintptr /* winspool.h:692:33 */ type _PORT_INFO_3W = struct { FdwStatus DWORD _ [4]byte FpszStatus LPWSTR FdwSeverity DWORD _ [4]byte } /* winspool.h:694:11 */ type PORT_INFO_3W = _PORT_INFO_3W /* winspool.h:698:5 */ type PPORT_INFO_3W = uintptr /* winspool.h:698:18 */ type LPPORT_INFO_3W = uintptr /* winspool.h:698:33 */ type PORT_INFO_3 = PORT_INFO_3A /* winspool.h:700:3 */ type PPORT_INFO_3 = PPORT_INFO_3A /* winspool.h:701:3 */ type LPPORT_INFO_3 = LPPORT_INFO_3A /* winspool.h:702:3 */ type _MONITOR_INFO_1A = struct{ FpName LPSTR } /* winspool.h:721:11 */ type MONITOR_INFO_1A = _MONITOR_INFO_1A /* winspool.h:723:5 */ type PMONITOR_INFO_1A = uintptr /* winspool.h:723:21 */ type LPMONITOR_INFO_1A = uintptr /* winspool.h:723:39 */ type _MONITOR_INFO_1W = struct{ FpName LPWSTR } /* winspool.h:725:11 */ type MONITOR_INFO_1W = _MONITOR_INFO_1W /* winspool.h:727:5 */ type PMONITOR_INFO_1W = uintptr /* winspool.h:727:21 */ type LPMONITOR_INFO_1W = uintptr /* winspool.h:727:39 */ type MONITOR_INFO_1 = MONITOR_INFO_1A /* winspool.h:729:3 */ type PMONITOR_INFO_1 = PMONITOR_INFO_1A /* winspool.h:730:3 */ type LPMONITOR_INFO_1 = LPMONITOR_INFO_1A /* winspool.h:731:3 */ type _MONITOR_INFO_2A = struct { FpName LPSTR FpEnvironment LPSTR FpDLLName LPSTR } /* winspool.h:733:11 */ type MONITOR_INFO_2A = _MONITOR_INFO_2A /* winspool.h:737:5 */ type PMONITOR_INFO_2A = uintptr /* winspool.h:737:21 */ type LPMONITOR_INFO_2A = uintptr /* winspool.h:737:39 */ type _MONITOR_INFO_2W = struct { FpName LPWSTR FpEnvironment LPWSTR FpDLLName LPWSTR } /* winspool.h:739:11 */ type MONITOR_INFO_2W = _MONITOR_INFO_2W /* winspool.h:743:5 */ type PMONITOR_INFO_2W = uintptr /* winspool.h:743:21 */ type LPMONITOR_INFO_2W = uintptr /* winspool.h:743:39 */ type MONITOR_INFO_2 = MONITOR_INFO_2A /* winspool.h:745:3 */ type PMONITOR_INFO_2 = PMONITOR_INFO_2A /* winspool.h:746:3 */ type LPMONITOR_INFO_2 = LPMONITOR_INFO_2A /* winspool.h:747:3 */ type _DATATYPES_INFO_1A = struct{ FpName LPSTR } /* winspool.h:749:11 */ type DATATYPES_INFO_1A = _DATATYPES_INFO_1A /* winspool.h:751:5 */ type PDATATYPES_INFO_1A = uintptr /* winspool.h:751:23 */ type LPDATATYPES_INFO_1A = uintptr /* winspool.h:751:43 */ type _DATATYPES_INFO_1W = struct{ FpName LPWSTR } /* winspool.h:753:11 */ type DATATYPES_INFO_1W = _DATATYPES_INFO_1W /* winspool.h:755:5 */ type PDATATYPES_INFO_1W = uintptr /* winspool.h:755:23 */ type LPDATATYPES_INFO_1W = uintptr /* winspool.h:755:43 */ type DATATYPES_INFO_1 = DATATYPES_INFO_1A /* winspool.h:757:3 */ type PDATATYPES_INFO_1 = PDATATYPES_INFO_1A /* winspool.h:758:3 */ type LPDATATYPES_INFO_1 = LPDATATYPES_INFO_1A /* winspool.h:759:3 */ type _PRINTER_DEFAULTSA = struct { FpDatatype LPSTR FpDevMode LPDEVMODEA FDesiredAccess ACCESS_MASK _ [4]byte } /* winspool.h:761:11 */ type PRINTER_DEFAULTSA = _PRINTER_DEFAULTSA /* winspool.h:765:5 */ type PPRINTER_DEFAULTSA = uintptr /* winspool.h:765:23 */ type LPPRINTER_DEFAULTSA = uintptr /* winspool.h:765:43 */ type _PRINTER_DEFAULTSW = struct { FpDatatype LPWSTR FpDevMode LPDEVMODEW FDesiredAccess ACCESS_MASK _ [4]byte } /* winspool.h:767:11 */ type PRINTER_DEFAULTSW = _PRINTER_DEFAULTSW /* winspool.h:771:5 */ type PPRINTER_DEFAULTSW = uintptr /* winspool.h:771:23 */ type LPPRINTER_DEFAULTSW = uintptr /* winspool.h:771:43 */ type PRINTER_DEFAULTS = PRINTER_DEFAULTSA /* winspool.h:773:3 */ type PPRINTER_DEFAULTS = PPRINTER_DEFAULTSA /* winspool.h:774:3 */ type LPPRINTER_DEFAULTS = LPPRINTER_DEFAULTSA /* winspool.h:775:3 */ type _PRINTER_ENUM_VALUESA = struct { FpValueName LPSTR FcbValueName DWORD FdwType DWORD FpData LPBYTE FcbData DWORD _ [4]byte } /* winspool.h:777:11 */ type PRINTER_ENUM_VALUESA = _PRINTER_ENUM_VALUESA /* winspool.h:783:5 */ type PPRINTER_ENUM_VALUESA = uintptr /* winspool.h:783:26 */ type LPPRINTER_ENUM_VALUESA = uintptr /* winspool.h:783:49 */ type _PRINTER_ENUM_VALUESW = struct { FpValueName LPWSTR FcbValueName DWORD FdwType DWORD FpData LPBYTE FcbData DWORD _ [4]byte } /* winspool.h:785:11 */ type PRINTER_ENUM_VALUESW = _PRINTER_ENUM_VALUESW /* winspool.h:791:5 */ type PPRINTER_ENUM_VALUESW = uintptr /* winspool.h:791:26 */ type LPPRINTER_ENUM_VALUESW = uintptr /* winspool.h:791:49 */ type PRINTER_ENUM_VALUES = PRINTER_ENUM_VALUESA /* winspool.h:793:3 */ type PPRINTER_ENUM_VALUES = PPRINTER_ENUM_VALUESA /* winspool.h:794:3 */ type LPPRINTER_ENUM_VALUES = LPPRINTER_ENUM_VALUESA /* winspool.h:795:3 */ type _PRINTER_NOTIFY_OPTIONS_TYPE = struct { FType WORD FReserved0 WORD FReserved1 DWORD FReserved2 DWORD FCount DWORD FpFields PWORD } /* winspool.h:999:11 */ type PRINTER_NOTIFY_OPTIONS_TYPE = _PRINTER_NOTIFY_OPTIONS_TYPE /* winspool.h:1006:5 */ type PPRINTER_NOTIFY_OPTIONS_TYPE = uintptr /* winspool.h:1006:33 */ type LPPRINTER_NOTIFY_OPTIONS_TYPE = uintptr /* winspool.h:1006:63 */ type _PRINTER_NOTIFY_OPTIONS = struct { FVersion DWORD FFlags DWORD FCount DWORD _ [4]byte FpTypes PPRINTER_NOTIFY_OPTIONS_TYPE } /* winspool.h:1010:11 */ type PRINTER_NOTIFY_OPTIONS = _PRINTER_NOTIFY_OPTIONS /* winspool.h:1015:5 */ type PPRINTER_NOTIFY_OPTIONS = uintptr /* winspool.h:1015:28 */ type LPPRINTER_NOTIFY_OPTIONS = uintptr /* winspool.h:1015:53 */ type _PRINTER_NOTIFY_INFO_DATA = struct { FType WORD FField WORD FReserved DWORD FId DWORD _ [4]byte FNotifyData struct { _ [0]uint64 FadwData [2]DWORD _ [8]byte } } /* winspool.h:1019:11 */ type PRINTER_NOTIFY_INFO_DATA = _PRINTER_NOTIFY_INFO_DATA /* winspool.h:1031:5 */ type PPRINTER_NOTIFY_INFO_DATA = uintptr /* winspool.h:1031:30 */ type LPPRINTER_NOTIFY_INFO_DATA = uintptr /* winspool.h:1031:57 */ type _PRINTER_NOTIFY_INFO = struct { FVersion DWORD FFlags DWORD FCount DWORD _ [4]byte FaData [1]PRINTER_NOTIFY_INFO_DATA } /* winspool.h:1033:11 */ type PRINTER_NOTIFY_INFO = _PRINTER_NOTIFY_INFO /* winspool.h:1038:5 */ type PPRINTER_NOTIFY_INFO = uintptr /* winspool.h:1038:25 */ type LPPRINTER_NOTIFY_INFO = uintptr /* winspool.h:1038:47 */ type _BINARY_CONTAINER = struct { FcbBuf DWORD _ [4]byte FpData LPBYTE } /* winspool.h:1040:11 */ type BINARY_CONTAINER = _BINARY_CONTAINER /* winspool.h:1043:5 */ type PBINARY_CONTAINER = uintptr /* winspool.h:1043:22 */ type _BIDI_DATA = struct { FdwBidiType DWORD _ [4]byte Fu struct { _ [0]uint64 FbData WINBOOL _ [12]byte } } /* winspool.h:1045:11 */ type BIDI_DATA = _BIDI_DATA /* winspool.h:1054:5 */ type PBIDI_DATA = uintptr /* winspool.h:1054:15 */ type LPBIDI_DATA = uintptr /* winspool.h:1054:27 */ type _BIDI_REQUEST_DATA = struct { FdwReqNumber DWORD _ [4]byte FpSchema LPWSTR Fdata BIDI_DATA } /* winspool.h:1056:11 */ type BIDI_REQUEST_DATA = _BIDI_REQUEST_DATA /* winspool.h:1060:5 */ type PBIDI_REQUEST_DATA = uintptr /* winspool.h:1060:24 */ type LPBIDI_REQUEST_DATA = uintptr /* winspool.h:1060:45 */ type _BIDI_REQUEST_CONTAINER = struct { FVersion DWORD FFlags DWORD FCount DWORD _ [4]byte FaData [1]BIDI_REQUEST_DATA } /* winspool.h:1062:11 */ type BIDI_REQUEST_CONTAINER = _BIDI_REQUEST_CONTAINER /* winspool.h:1067:4 */ type PBIDI_REQUEST_CONTAINER = uintptr /* winspool.h:1067:27 */ type LPBIDI_REQUEST_CONTAINER = uintptr /* winspool.h:1067:52 */ type _BIDI_RESPONSE_DATA = struct { FdwResult DWORD FdwReqNumber DWORD FpSchema LPWSTR Fdata BIDI_DATA } /* winspool.h:1069:11 */ type BIDI_RESPONSE_DATA = _BIDI_RESPONSE_DATA /* winspool.h:1074:5 */ type PBIDI_RESPONSE_DATA = uintptr /* winspool.h:1074:24 */ type LPBIDI_RESPONSE_DATA = uintptr /* winspool.h:1074:45 */ type _BIDI_RESPONSE_CONTAINER = struct { FVersion DWORD FFlags DWORD FCount DWORD _ [4]byte FaData [1]BIDI_RESPONSE_DATA } /* winspool.h:1076:11 */ type BIDI_RESPONSE_CONTAINER = _BIDI_RESPONSE_CONTAINER /* winspool.h:1081:5 */ type PBIDI_RESPONSE_CONTAINER = uintptr /* winspool.h:1081:29 */ type LPBIDI_RESPONSE_CONTAINER = uintptr /* winspool.h:1081:55 */ type BIDI_TYPE = uint32 /* winspool.h:1090:5 */ type _PROVIDOR_INFO_1A = struct { FpName LPSTR FpEnvironment LPSTR FpDLLName LPSTR } /* winspool.h:1210:11 */ type PROVIDOR_INFO_1A = _PROVIDOR_INFO_1A /* winspool.h:1214:5 */ type PPROVIDOR_INFO_1A = uintptr /* winspool.h:1214:22 */ type LPPROVIDOR_INFO_1A = uintptr /* winspool.h:1214:41 */ type _PROVIDOR_INFO_1W = struct { FpName LPWSTR FpEnvironment LPWSTR FpDLLName LPWSTR } /* winspool.h:1216:11 */ type PROVIDOR_INFO_1W = _PROVIDOR_INFO_1W /* winspool.h:1220:5 */ type PPROVIDOR_INFO_1W = uintptr /* winspool.h:1220:22 */ type LPPROVIDOR_INFO_1W = uintptr /* winspool.h:1220:41 */ type PROVIDOR_INFO_1 = PROVIDOR_INFO_1A /* winspool.h:1222:3 */ type PPROVIDOR_INFO_1 = PPROVIDOR_INFO_1A /* winspool.h:1223:3 */ type LPPROVIDOR_INFO_1 = LPPROVIDOR_INFO_1A /* winspool.h:1224:3 */ type _PROVIDOR_INFO_2A = struct{ FpOrder LPSTR } /* winspool.h:1226:11 */ type PROVIDOR_INFO_2A = _PROVIDOR_INFO_2A /* winspool.h:1228:5 */ type PPROVIDOR_INFO_2A = uintptr /* winspool.h:1228:22 */ type LPPROVIDOR_INFO_2A = uintptr /* winspool.h:1228:41 */ type _PROVIDOR_INFO_2W = struct{ FpOrder LPWSTR } /* winspool.h:1230:11 */ type PROVIDOR_INFO_2W = _PROVIDOR_INFO_2W /* winspool.h:1232:5 */ type PPROVIDOR_INFO_2W = uintptr /* winspool.h:1232:22 */ type LPPROVIDOR_INFO_2W = uintptr /* winspool.h:1232:41 */ type PROVIDOR_INFO_2 = PROVIDOR_INFO_2A /* winspool.h:1234:3 */ type PPROVIDOR_INFO_2 = PPROVIDOR_INFO_2A /* winspool.h:1235:3 */ type LPPROVIDOR_INFO_2 = LPPROVIDOR_INFO_2A /* winspool.h:1236:3 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type LPOFNHOOKPROC = uintptr /* commdlg.h:46:20 */ type tagOFN_NT4A = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCSTR FlpstrCustomFilter LPSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPSTR FnMaxFile DWORD _ [4]byte FlpstrFileTitle LPSTR FnMaxFileTitle DWORD _ [4]byte FlpstrInitialDir LPCSTR FlpstrTitle LPCSTR FFlags DWORD FnFileOffset WORD FnFileExtension WORD FlpstrDefExt LPCSTR FlCustData LPARAM FlpfnHook LPOFNHOOKPROC FlpTemplateName LPCSTR } /* commdlg.h:52:11 */ type OPENFILENAME_NT4A = tagOFN_NT4A /* commdlg.h:73:5 */ type LPOPENFILENAME_NT4A = uintptr /* commdlg.h:73:23 */ type tagOFN_NT4W = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCWSTR FlpstrCustomFilter LPWSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPWSTR FnMaxFile DWORD _ [4]byte FlpstrFileTitle LPWSTR FnMaxFileTitle DWORD _ [4]byte FlpstrInitialDir LPCWSTR FlpstrTitle LPCWSTR FFlags DWORD FnFileOffset WORD FnFileExtension WORD FlpstrDefExt LPCWSTR FlCustData LPARAM FlpfnHook LPOFNHOOKPROC FlpTemplateName LPCWSTR } /* commdlg.h:74:11 */ type OPENFILENAME_NT4W = tagOFN_NT4W /* commdlg.h:95:5 */ type LPOPENFILENAME_NT4W = uintptr /* commdlg.h:95:23 */ type OPENFILENAME_NT4 = OPENFILENAME_NT4A /* commdlg.h:97:3 */ type LPOPENFILENAME_NT4 = LPOPENFILENAME_NT4A /* commdlg.h:98:3 */ type tagOFNA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCSTR FlpstrCustomFilter LPSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPSTR FnMaxFile DWORD _ [4]byte FlpstrFileTitle LPSTR FnMaxFileTitle DWORD _ [4]byte FlpstrInitialDir LPCSTR FlpstrTitle LPCSTR FFlags DWORD FnFileOffset WORD FnFileExtension WORD FlpstrDefExt LPCSTR FlCustData LPARAM FlpfnHook LPOFNHOOKPROC FlpTemplateName LPCSTR FpvReserved uintptr FdwReserved DWORD FFlagsEx DWORD } /* commdlg.h:100:11 */ type OPENFILENAMEA = tagOFNA /* commdlg.h:124:5 */ type LPOPENFILENAMEA = uintptr /* commdlg.h:124:19 */ type tagOFNW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCWSTR FlpstrCustomFilter LPWSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPWSTR FnMaxFile DWORD _ [4]byte FlpstrFileTitle LPWSTR FnMaxFileTitle DWORD _ [4]byte FlpstrInitialDir LPCWSTR FlpstrTitle LPCWSTR FFlags DWORD FnFileOffset WORD FnFileExtension WORD FlpstrDefExt LPCWSTR FlCustData LPARAM FlpfnHook LPOFNHOOKPROC FlpTemplateName LPCWSTR FpvReserved uintptr FdwReserved DWORD FFlagsEx DWORD } /* commdlg.h:125:11 */ type OPENFILENAMEW = tagOFNW /* commdlg.h:149:5 */ type LPOPENFILENAMEW = uintptr /* commdlg.h:149:19 */ type OPENFILENAME = OPENFILENAMEA /* commdlg.h:151:3 */ type LPOPENFILENAME = LPOPENFILENAMEA /* commdlg.h:152:3 */ type LPCCHOOKPROC = uintptr /* commdlg.h:205:20 */ type _OFNOTIFYA = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEA FpszFile LPSTR } /* commdlg.h:207:11 */ type OFNOTIFYA = _OFNOTIFYA /* commdlg.h:211:5 */ type LPOFNOTIFYA = uintptr /* commdlg.h:211:15 */ type _OFNOTIFYW = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEW FpszFile LPWSTR } /* commdlg.h:213:11 */ type OFNOTIFYW = _OFNOTIFYW /* commdlg.h:217:5 */ type LPOFNOTIFYW = uintptr /* commdlg.h:217:15 */ type OFNOTIFY = OFNOTIFYA /* commdlg.h:219:3 */ type LPOFNOTIFY = LPOFNOTIFYA /* commdlg.h:220:3 */ type _OFNOTIFYEXA = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEA Fpsf LPVOID Fpidl LPVOID } /* commdlg.h:222:11 */ type OFNOTIFYEXA = _OFNOTIFYEXA /* commdlg.h:227:5 */ type LPOFNOTIFYEXA = uintptr /* commdlg.h:227:17 */ type _OFNOTIFYEXW = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEW Fpsf LPVOID Fpidl LPVOID } /* commdlg.h:229:11 */ type OFNOTIFYEXW = _OFNOTIFYEXW /* commdlg.h:234:5 */ type LPOFNOTIFYEXW = uintptr /* commdlg.h:234:17 */ type OFNOTIFYEX = OFNOTIFYEXA /* commdlg.h:236:3 */ type LPOFNOTIFYEX = LPOFNOTIFYEXA /* commdlg.h:237:3 */ type tagCHOOSECOLORA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HWND FrgbResult COLORREF _ [4]byte FlpCustColors uintptr FFlags DWORD _ [4]byte FlCustData LPARAM FlpfnHook LPCCHOOKPROC FlpTemplateName LPCSTR } /* commdlg.h:281:11 */ type CHOOSECOLORA = tagCHOOSECOLORA /* commdlg.h:291:5 */ type LPCHOOSECOLORA = uintptr /* commdlg.h:291:18 */ type tagCHOOSECOLORW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HWND FrgbResult COLORREF _ [4]byte FlpCustColors uintptr FFlags DWORD _ [4]byte FlCustData LPARAM FlpfnHook LPCCHOOKPROC FlpTemplateName LPCWSTR } /* commdlg.h:292:11 */ type CHOOSECOLORW = tagCHOOSECOLORW /* commdlg.h:302:5 */ type LPCHOOSECOLORW = uintptr /* commdlg.h:302:18 */ type CHOOSECOLOR = CHOOSECOLORA /* commdlg.h:304:3 */ type LPCHOOSECOLOR = LPCHOOSECOLORA /* commdlg.h:305:3 */ type LPFRHOOKPROC = uintptr /* commdlg.h:322:20 */ type tagFINDREPLACEA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FFlags DWORD _ [4]byte FlpstrFindWhat LPSTR FlpstrReplaceWith LPSTR FwFindWhatLen WORD FwReplaceWithLen WORD _ [4]byte FlCustData LPARAM FlpfnHook LPFRHOOKPROC FlpTemplateName LPCSTR } /* commdlg.h:324:11 */ type FINDREPLACEA = tagFINDREPLACEA /* commdlg.h:336:5 */ type LPFINDREPLACEA = uintptr /* commdlg.h:336:18 */ type tagFINDREPLACEW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhInstance HINSTANCE FFlags DWORD _ [4]byte FlpstrFindWhat LPWSTR FlpstrReplaceWith LPWSTR FwFindWhatLen WORD FwReplaceWithLen WORD _ [4]byte FlCustData LPARAM FlpfnHook LPFRHOOKPROC FlpTemplateName LPCWSTR } /* commdlg.h:338:11 */ type FINDREPLACEW = tagFINDREPLACEW /* commdlg.h:350:5 */ type LPFINDREPLACEW = uintptr /* commdlg.h:350:18 */ type FINDREPLACE = FINDREPLACEA /* commdlg.h:352:3 */ type LPFINDREPLACE = LPFINDREPLACEA /* commdlg.h:353:3 */ type LPCFHOOKPROC = uintptr /* commdlg.h:387:20 */ type tagCHOOSEFONTA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDC HDC FlpLogFont LPLOGFONTA FiPointSize INT FFlags DWORD FrgbColors COLORREF _ [4]byte FlCustData LPARAM FlpfnHook LPCFHOOKPROC FlpTemplateName LPCSTR FhInstance HINSTANCE FlpszStyle LPSTR FnFontType WORD F___MISSING_ALIGNMENT__ WORD FnSizeMin INT FnSizeMax INT _ [4]byte } /* commdlg.h:389:11 */ type CHOOSEFONTA = tagCHOOSEFONTA /* commdlg.h:406:5 */ type LPCHOOSEFONTA = uintptr /* commdlg.h:406:17 */ type tagCHOOSEFONTW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDC HDC FlpLogFont LPLOGFONTW FiPointSize INT FFlags DWORD FrgbColors COLORREF _ [4]byte FlCustData LPARAM FlpfnHook LPCFHOOKPROC FlpTemplateName LPCWSTR FhInstance HINSTANCE FlpszStyle LPWSTR FnFontType WORD F___MISSING_ALIGNMENT__ WORD FnSizeMin INT FnSizeMax INT _ [4]byte } /* commdlg.h:408:11 */ type CHOOSEFONTW = tagCHOOSEFONTW /* commdlg.h:425:5 */ type LPCHOOSEFONTW = uintptr /* commdlg.h:425:17 */ type CHOOSEFONT = CHOOSEFONTA /* commdlg.h:427:3 */ type LPCHOOSEFONT = LPCHOOSEFONTA /* commdlg.h:428:3 */ type LPPRINTHOOKPROC = uintptr /* commdlg.h:516:20 */ type LPSETUPHOOKPROC = uintptr /* commdlg.h:517:20 */ type tagPDA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FnFromPage WORD FnToPage WORD FnMinPage WORD FnMaxPage WORD FnCopies WORD _ [2]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPrintHook LPPRINTHOOKPROC FlpfnSetupHook LPSETUPHOOKPROC FlpPrintTemplateName LPCSTR FlpSetupTemplateName LPCSTR FhPrintTemplate HGLOBAL FhSetupTemplate HGLOBAL } /* commdlg.h:519:11 */ type PRINTDLGA = tagPDA /* commdlg.h:539:5 */ type LPPRINTDLGA = uintptr /* commdlg.h:539:15 */ type tagPDW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FnFromPage WORD FnToPage WORD FnMinPage WORD FnMaxPage WORD FnCopies WORD _ [2]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPrintHook LPPRINTHOOKPROC FlpfnSetupHook LPSETUPHOOKPROC FlpPrintTemplateName LPCWSTR FlpSetupTemplateName LPCWSTR FhPrintTemplate HGLOBAL FhSetupTemplate HGLOBAL } /* commdlg.h:541:11 */ type PRINTDLGW = tagPDW /* commdlg.h:561:5 */ type LPPRINTDLGW = uintptr /* commdlg.h:561:15 */ type PRINTDLG = PRINTDLGA /* commdlg.h:563:3 */ type LPPRINTDLG = LPPRINTDLGA /* commdlg.h:564:3 */ type IPrintDialogCallback1 = struct{ FlpVtbl uintptr } /* commdlg.h:575:3 */ type IPrintDialogCallbackVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FInitDone uintptr FSelectionChange uintptr FHandleMessage uintptr } /* commdlg.h:575:3 */ type IPrintDialogCallback = IPrintDialogCallback1 /* commdlg.h:575:3 */ type IPrintDialogCallbackVtbl = IPrintDialogCallbackVtbl1 /* commdlg.h:575:3 */ type IPrintDialogServices1 = struct{ FlpVtbl uintptr } /* commdlg.h:588:3 */ type IPrintDialogServicesVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCurrentDevMode uintptr FGetCurrentPrinterName uintptr FGetCurrentPortName uintptr } /* commdlg.h:588:3 */ type IPrintDialogServices = IPrintDialogServices1 /* commdlg.h:588:3 */ type IPrintDialogServicesVtbl = IPrintDialogServicesVtbl1 /* commdlg.h:588:3 */ type tagPRINTPAGERANGE = struct { FnFromPage DWORD FnToPage DWORD } /* commdlg.h:599:11 */ type PRINTPAGERANGE = tagPRINTPAGERANGE /* commdlg.h:602:5 */ type LPPRINTPAGERANGE = uintptr /* commdlg.h:602:20 */ type tagPDEXA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FFlags2 DWORD FExclusionFlags DWORD FnPageRanges DWORD FnMaxPageRanges DWORD _ [4]byte FlpPageRanges LPPRINTPAGERANGE FnMinPage DWORD FnMaxPage DWORD FnCopies DWORD _ [4]byte FhInstance HINSTANCE FlpPrintTemplateName LPCSTR FlpCallback LPUNKNOWN FnPropertyPages DWORD _ [4]byte FlphPropertyPages uintptr FnStartPage DWORD FdwResultAction DWORD } /* commdlg.h:604:11 */ type PRINTDLGEXA = tagPDEXA /* commdlg.h:626:5 */ type LPPRINTDLGEXA = uintptr /* commdlg.h:626:17 */ type tagPDEXW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FFlags2 DWORD FExclusionFlags DWORD FnPageRanges DWORD FnMaxPageRanges DWORD _ [4]byte FlpPageRanges LPPRINTPAGERANGE FnMinPage DWORD FnMaxPage DWORD FnCopies DWORD _ [4]byte FhInstance HINSTANCE FlpPrintTemplateName LPCWSTR FlpCallback LPUNKNOWN FnPropertyPages DWORD _ [4]byte FlphPropertyPages uintptr FnStartPage DWORD FdwResultAction DWORD } /* commdlg.h:628:11 */ type PRINTDLGEXW = tagPDEXW /* commdlg.h:650:5 */ type LPPRINTDLGEXW = uintptr /* commdlg.h:650:17 */ type PRINTDLGEX = PRINTDLGEXA /* commdlg.h:652:3 */ type LPPRINTDLGEX = LPPRINTDLGEXA /* commdlg.h:653:3 */ type tagDEVNAMES = struct { FwDriverOffset WORD FwDeviceOffset WORD FwOutputOffset WORD FwDefault WORD } /* commdlg.h:697:11 */ type DEVNAMES = tagDEVNAMES /* commdlg.h:702:5 */ type LPDEVNAMES = uintptr /* commdlg.h:702:14 */ type LPPAGEPAINTHOOK = uintptr /* commdlg.h:716:20 */ type LPPAGESETUPHOOK = uintptr /* commdlg.h:717:20 */ type tagPSDA = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FFlags DWORD FptPaperSize POINT FrtMinMargin RECT FrtMargin RECT _ [4]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPageSetupHook LPPAGESETUPHOOK FlpfnPagePaintHook LPPAGEPAINTHOOK FlpPageSetupTemplateName LPCSTR FhPageSetupTemplate HGLOBAL } /* commdlg.h:719:11 */ type PAGESETUPDLGA = tagPSDA /* commdlg.h:734:5 */ type LPPAGESETUPDLGA = uintptr /* commdlg.h:734:19 */ type tagPSDW = struct { FlStructSize DWORD _ [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FFlags DWORD FptPaperSize POINT FrtMinMargin RECT FrtMargin RECT _ [4]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPageSetupHook LPPAGESETUPHOOK FlpfnPagePaintHook LPPAGEPAINTHOOK FlpPageSetupTemplateName LPCWSTR FhPageSetupTemplate HGLOBAL } /* commdlg.h:736:11 */ type PAGESETUPDLGW = tagPSDW /* commdlg.h:751:5 */ type LPPAGESETUPDLGW = uintptr /* commdlg.h:751:19 */ type PAGESETUPDLG = PAGESETUPDLGA /* commdlg.h:753:3 */ type LPPAGESETUPDLG = LPPAGESETUPDLGA /* commdlg.h:754:3 */ type PUWSTR_C = uintptr /* stralign.h:105:42 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type _SERVICE_DESCRIPTIONA = struct{ FlpDescription LPSTR } /* winsvc.h:95:11 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER within this package. type SERVICE_DESCRIPTIONA = _SERVICE_DESCRIPTIONA /* winsvc.h:97:5 */ type LPSERVICE_DESCRIPTIONA = uintptr /* winsvc.h:97:26 */ type _SERVICE_DESCRIPTIONW = struct{ FlpDescription LPWSTR } /* winsvc.h:99:11 */ type SERVICE_DESCRIPTIONW = _SERVICE_DESCRIPTIONW /* winsvc.h:101:5 */ type LPSERVICE_DESCRIPTIONW = uintptr /* winsvc.h:101:26 */ type SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONA /* winsvc.h:103:3 */ type LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONA /* winsvc.h:104:3 */ type SC_ACTION_TYPE = uint32 /* winsvc.h:108:5 */ type _SC_ACTION = struct { FType SC_ACTION_TYPE FDelay DWORD } /* winsvc.h:110:11 */ type SC_ACTION = _SC_ACTION /* winsvc.h:113:5 */ type LPSC_ACTION = uintptr /* winsvc.h:113:15 */ type _SERVICE_FAILURE_ACTIONSA = struct { FdwResetPeriod DWORD _ [4]byte FlpRebootMsg LPSTR FlpCommand LPSTR FcActions DWORD _ [4]byte FlpsaActions uintptr } /* winsvc.h:115:11 */ type SERVICE_FAILURE_ACTIONSA = _SERVICE_FAILURE_ACTIONSA /* winsvc.h:121:5 */ type LPSERVICE_FAILURE_ACTIONSA = uintptr /* winsvc.h:121:30 */ type _SERVICE_FAILURE_ACTIONSW = struct { FdwResetPeriod DWORD _ [4]byte FlpRebootMsg LPWSTR FlpCommand LPWSTR FcActions DWORD _ [4]byte FlpsaActions uintptr } /* winsvc.h:123:11 */ type SERVICE_FAILURE_ACTIONSW = _SERVICE_FAILURE_ACTIONSW /* winsvc.h:129:5 */ type LPSERVICE_FAILURE_ACTIONSW = uintptr /* winsvc.h:129:30 */ type SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSA /* winsvc.h:131:3 */ type LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSA /* winsvc.h:132:3 */ type SC_HANDLE__ = struct{ Funused int32 } /* winsvc.h:134:3 */ type SC_HANDLE = uintptr /* winsvc.h:134:3 */ type LPSC_HANDLE = uintptr /* winsvc.h:135:21 */ type SERVICE_STATUS_HANDLE__ = struct{ Funused int32 } /* winsvc.h:137:3 */ type SERVICE_STATUS_HANDLE = uintptr /* winsvc.h:137:3 */ type SC_STATUS_TYPE = uint32 /* winsvc.h:141:5 */ type SC_ENUM_TYPE = uint32 /* winsvc.h:145:5 */ type _SERVICE_STATUS = struct { FdwServiceType DWORD FdwCurrentState DWORD FdwControlsAccepted DWORD FdwWin32ExitCode DWORD FdwServiceSpecificExitCode DWORD FdwCheckPoint DWORD FdwWaitHint DWORD } /* winsvc.h:147:11 */ type SERVICE_STATUS = _SERVICE_STATUS /* winsvc.h:155:5 */ type LPSERVICE_STATUS = uintptr /* winsvc.h:155:20 */ type _SERVICE_STATUS_PROCESS = struct { FdwServiceType DWORD FdwCurrentState DWORD FdwControlsAccepted DWORD FdwWin32ExitCode DWORD FdwServiceSpecificExitCode DWORD FdwCheckPoint DWORD FdwWaitHint DWORD FdwProcessId DWORD FdwServiceFlags DWORD } /* winsvc.h:157:11 */ type SERVICE_STATUS_PROCESS = _SERVICE_STATUS_PROCESS /* winsvc.h:167:5 */ type LPSERVICE_STATUS_PROCESS = uintptr /* winsvc.h:167:28 */ type _ENUM_SERVICE_STATUSA = struct { FlpServiceName LPSTR FlpDisplayName LPSTR FServiceStatus SERVICE_STATUS _ [4]byte } /* winsvc.h:169:11 */ type ENUM_SERVICE_STATUSA = _ENUM_SERVICE_STATUSA /* winsvc.h:173:5 */ type LPENUM_SERVICE_STATUSA = uintptr /* winsvc.h:173:26 */ type _ENUM_SERVICE_STATUSW = struct { FlpServiceName LPWSTR FlpDisplayName LPWSTR FServiceStatus SERVICE_STATUS _ [4]byte } /* winsvc.h:175:11 */ type ENUM_SERVICE_STATUSW = _ENUM_SERVICE_STATUSW /* winsvc.h:179:5 */ type LPENUM_SERVICE_STATUSW = uintptr /* winsvc.h:179:26 */ type ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSA /* winsvc.h:181:3 */ type LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSA /* winsvc.h:182:3 */ type _ENUM_SERVICE_STATUS_PROCESSA = struct { FlpServiceName LPSTR FlpDisplayName LPSTR FServiceStatusProcess SERVICE_STATUS_PROCESS _ [4]byte } /* winsvc.h:184:11 */ type ENUM_SERVICE_STATUS_PROCESSA = _ENUM_SERVICE_STATUS_PROCESSA /* winsvc.h:188:5 */ type LPENUM_SERVICE_STATUS_PROCESSA = uintptr /* winsvc.h:188:34 */ type _ENUM_SERVICE_STATUS_PROCESSW = struct { FlpServiceName LPWSTR FlpDisplayName LPWSTR FServiceStatusProcess SERVICE_STATUS_PROCESS _ [4]byte } /* winsvc.h:190:11 */ type ENUM_SERVICE_STATUS_PROCESSW = _ENUM_SERVICE_STATUS_PROCESSW /* winsvc.h:194:5 */ type LPENUM_SERVICE_STATUS_PROCESSW = uintptr /* winsvc.h:194:34 */ type ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSA /* winsvc.h:196:3 */ type LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSA /* winsvc.h:197:3 */ type SC_LOCK = LPVOID /* winsvc.h:199:18 */ type _QUERY_SERVICE_LOCK_STATUSA = struct { FfIsLocked DWORD _ [4]byte FlpLockOwner LPSTR FdwLockDuration DWORD _ [4]byte } /* winsvc.h:201:11 */ type QUERY_SERVICE_LOCK_STATUSA = _QUERY_SERVICE_LOCK_STATUSA /* winsvc.h:205:5 */ type LPQUERY_SERVICE_LOCK_STATUSA = uintptr /* winsvc.h:205:32 */ type _QUERY_SERVICE_LOCK_STATUSW = struct { FfIsLocked DWORD _ [4]byte FlpLockOwner LPWSTR FdwLockDuration DWORD _ [4]byte } /* winsvc.h:207:11 */ type QUERY_SERVICE_LOCK_STATUSW = _QUERY_SERVICE_LOCK_STATUSW /* winsvc.h:211:5 */ type LPQUERY_SERVICE_LOCK_STATUSW = uintptr /* winsvc.h:211:32 */ type QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSA /* winsvc.h:213:3 */ type LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSA /* winsvc.h:214:3 */ type _QUERY_SERVICE_CONFIGA = struct { FdwServiceType DWORD FdwStartType DWORD FdwErrorControl DWORD _ [4]byte FlpBinaryPathName LPSTR FlpLoadOrderGroup LPSTR FdwTagId DWORD _ [4]byte FlpDependencies LPSTR FlpServiceStartName LPSTR FlpDisplayName LPSTR } /* winsvc.h:216:11 */ type QUERY_SERVICE_CONFIGA = _QUERY_SERVICE_CONFIGA /* winsvc.h:226:5 */ type LPQUERY_SERVICE_CONFIGA = uintptr /* winsvc.h:226:27 */ type _QUERY_SERVICE_CONFIGW = struct { FdwServiceType DWORD FdwStartType DWORD FdwErrorControl DWORD _ [4]byte FlpBinaryPathName LPWSTR FlpLoadOrderGroup LPWSTR FdwTagId DWORD _ [4]byte FlpDependencies LPWSTR FlpServiceStartName LPWSTR FlpDisplayName LPWSTR } /* winsvc.h:228:11 */ type QUERY_SERVICE_CONFIGW = _QUERY_SERVICE_CONFIGW /* winsvc.h:238:5 */ type LPQUERY_SERVICE_CONFIGW = uintptr /* winsvc.h:238:27 */ type QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGA /* winsvc.h:240:3 */ type LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGA /* winsvc.h:241:3 */ type LPSERVICE_MAIN_FUNCTIONW = uintptr /* winsvc.h:243:16 */ type LPSERVICE_MAIN_FUNCTIONA = uintptr /* winsvc.h:244:16 */ type _SERVICE_TABLE_ENTRYA = struct { FlpServiceName LPSTR FlpServiceProc LPSERVICE_MAIN_FUNCTIONA } /* winsvc.h:248:11 */ type SERVICE_TABLE_ENTRYA = _SERVICE_TABLE_ENTRYA /* winsvc.h:251:5 */ type LPSERVICE_TABLE_ENTRYA = uintptr /* winsvc.h:251:26 */ type _SERVICE_TABLE_ENTRYW = struct { FlpServiceName LPWSTR FlpServiceProc LPSERVICE_MAIN_FUNCTIONW } /* winsvc.h:253:11 */ type SERVICE_TABLE_ENTRYW = _SERVICE_TABLE_ENTRYW /* winsvc.h:256:5 */ type LPSERVICE_TABLE_ENTRYW = uintptr /* winsvc.h:256:26 */ type SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYA /* winsvc.h:258:3 */ type LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYA /* winsvc.h:259:3 */ type LPHANDLER_FUNCTION = uintptr /* winsvc.h:261:16 */ type LPHANDLER_FUNCTION_EX = uintptr /* winsvc.h:262:17 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _MODEMDEVCAPS = struct { FdwActualSize DWORD FdwRequiredSize DWORD FdwDevSpecificOffset DWORD FdwDevSpecificSize DWORD FdwModemProviderVersion DWORD FdwModemManufacturerOffset DWORD FdwModemManufacturerSize DWORD FdwModemModelOffset DWORD FdwModemModelSize DWORD FdwModemVersionOffset DWORD FdwModemVersionSize DWORD FdwDialOptions DWORD FdwCallSetupFailTimer DWORD FdwInactivityTimeout DWORD FdwSpeakerVolume DWORD FdwSpeakerMode DWORD FdwModemOptions DWORD FdwMaxDTERate DWORD FdwMaxDCERate DWORD FabVariablePortion [1]BYTE _ [3]byte } /* mcx.h:9:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type MODEMDEVCAPS = _MODEMDEVCAPS /* mcx.h:30:3 */ type PMODEMDEVCAPS = uintptr /* mcx.h:30:16 */ type LPMODEMDEVCAPS = uintptr /* mcx.h:30:31 */ type _MODEMSETTINGS = struct { FdwActualSize DWORD FdwRequiredSize DWORD FdwDevSpecificOffset DWORD FdwDevSpecificSize DWORD FdwCallSetupFailTimer DWORD FdwInactivityTimeout DWORD FdwSpeakerVolume DWORD FdwSpeakerMode DWORD FdwPreferredModemOptions DWORD FdwNegotiatedModemOptions DWORD FdwNegotiatedDCERate DWORD FabVariablePortion [1]BYTE _ [3]byte } /* mcx.h:32:9 */ type MODEMSETTINGS = _MODEMSETTINGS /* mcx.h:45:3 */ type PMODEMSETTINGS = uintptr /* mcx.h:45:17 */ type LPMODEMSETTINGS = uintptr /* mcx.h:45:33 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type HIMC__ = struct{ Funused int32 } /* imm.h:18:3 */ type HIMC = uintptr /* imm.h:18:3 */ type HIMCC__ = struct{ Funused int32 } /* imm.h:19:3 */ type HIMCC = uintptr /* imm.h:19:3 */ type LPHKL = uintptr /* imm.h:21:15 */ type tagCOMPOSITIONFORM = struct { FdwStyle DWORD FptCurrentPos POINT FrcArea RECT } /* imm.h:27:11 */ type COMPOSITIONFORM = tagCOMPOSITIONFORM /* imm.h:31:5 */ type PCOMPOSITIONFORM = uintptr /* imm.h:31:21 */ type NPCOMPOSITIONFORM = uintptr /* imm.h:31:39 */ type LPCOMPOSITIONFORM = uintptr /* imm.h:31:58 */ type tagCANDIDATEFORM = struct { FdwIndex DWORD FdwStyle DWORD FptCurrentPos POINT FrcArea RECT } /* imm.h:33:11 */ type CANDIDATEFORM = tagCANDIDATEFORM /* imm.h:38:5 */ type PCANDIDATEFORM = uintptr /* imm.h:38:19 */ type NPCANDIDATEFORM = uintptr /* imm.h:38:35 */ type LPCANDIDATEFORM = uintptr /* imm.h:38:52 */ type tagCANDIDATELIST = struct { FdwSize DWORD FdwStyle DWORD FdwCount DWORD FdwSelection DWORD FdwPageStart DWORD FdwPageSize DWORD FdwOffset [1]DWORD } /* imm.h:40:11 */ type CANDIDATELIST = tagCANDIDATELIST /* imm.h:48:5 */ type PCANDIDATELIST = uintptr /* imm.h:48:19 */ type NPCANDIDATELIST = uintptr /* imm.h:48:35 */ type LPCANDIDATELIST = uintptr /* imm.h:48:52 */ type tagREGISTERWORDA = struct { FlpReading LPSTR FlpWord LPSTR } /* imm.h:50:11 */ type REGISTERWORDA = tagREGISTERWORDA /* imm.h:53:5 */ type PREGISTERWORDA = uintptr /* imm.h:53:19 */ type NPREGISTERWORDA = uintptr /* imm.h:53:35 */ type LPREGISTERWORDA = uintptr /* imm.h:53:52 */ type tagREGISTERWORDW = struct { FlpReading LPWSTR FlpWord LPWSTR } /* imm.h:55:11 */ type REGISTERWORDW = tagREGISTERWORDW /* imm.h:58:5 */ type PREGISTERWORDW = uintptr /* imm.h:58:19 */ type NPREGISTERWORDW = uintptr /* imm.h:58:35 */ type LPREGISTERWORDW = uintptr /* imm.h:58:52 */ type REGISTERWORD = REGISTERWORDA /* imm.h:60:3 */ type PREGISTERWORD = PREGISTERWORDA /* imm.h:61:3 */ type NPREGISTERWORD = NPREGISTERWORDA /* imm.h:62:3 */ type LPREGISTERWORD = LPREGISTERWORDA /* imm.h:63:3 */ type tagRECONVERTSTRING = struct { FdwSize DWORD FdwVersion DWORD FdwStrLen DWORD FdwStrOffset DWORD FdwCompStrLen DWORD FdwCompStrOffset DWORD FdwTargetStrLen DWORD FdwTargetStrOffset DWORD } /* imm.h:65:11 */ type RECONVERTSTRING = tagRECONVERTSTRING /* imm.h:74:5 */ type PRECONVERTSTRING = uintptr /* imm.h:74:21 */ type NPRECONVERTSTRING = uintptr /* imm.h:74:39 */ type LPRECONVERTSTRING = uintptr /* imm.h:74:58 */ type tagSTYLEBUFA = struct { FdwStyle DWORD FszDescription [32]CHAR } /* imm.h:78:11 */ type STYLEBUFA = tagSTYLEBUFA /* imm.h:81:5 */ type PSTYLEBUFA = uintptr /* imm.h:81:15 */ type NPSTYLEBUFA = uintptr /* imm.h:81:27 */ type LPSTYLEBUFA = uintptr /* imm.h:81:40 */ type tagSTYLEBUFW = struct { FdwStyle DWORD FszDescription [32]WCHAR } /* imm.h:83:11 */ type STYLEBUFW = tagSTYLEBUFW /* imm.h:86:5 */ type PSTYLEBUFW = uintptr /* imm.h:86:15 */ type NPSTYLEBUFW = uintptr /* imm.h:86:27 */ type LPSTYLEBUFW = uintptr /* imm.h:86:40 */ type STYLEBUF = STYLEBUFA /* imm.h:88:3 */ type PSTYLEBUF = PSTYLEBUFA /* imm.h:89:3 */ type NPSTYLEBUF = NPSTYLEBUFA /* imm.h:90:3 */ type LPSTYLEBUF = LPSTYLEBUFA /* imm.h:91:3 */ type tagIMEMENUITEMINFOA = struct { FcbSize UINT FfType UINT FfState UINT FwID UINT FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData DWORD FszString [80]CHAR _ [4]byte FhbmpItem HBITMAP } /* imm.h:95:11 */ type IMEMENUITEMINFOA = tagIMEMENUITEMINFOA /* imm.h:105:5 */ type PIMEMENUITEMINFOA = uintptr /* imm.h:105:22 */ type NPIMEMENUITEMINFOA = uintptr /* imm.h:105:41 */ type LPIMEMENUITEMINFOA = uintptr /* imm.h:105:61 */ type tagIMEMENUITEMINFOW = struct { FcbSize UINT FfType UINT FfState UINT FwID UINT FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData DWORD FszString [80]WCHAR _ [4]byte FhbmpItem HBITMAP } /* imm.h:107:11 */ type IMEMENUITEMINFOW = tagIMEMENUITEMINFOW /* imm.h:117:5 */ type PIMEMENUITEMINFOW = uintptr /* imm.h:117:22 */ type NPIMEMENUITEMINFOW = uintptr /* imm.h:117:41 */ type LPIMEMENUITEMINFOW = uintptr /* imm.h:117:61 */ type IMEMENUITEMINFO = IMEMENUITEMINFOA /* imm.h:119:3 */ type PIMEMENUITEMINFO = PIMEMENUITEMINFOA /* imm.h:120:3 */ type NPIMEMENUITEMINFO = NPIMEMENUITEMINFOA /* imm.h:121:3 */ type LPIMEMENUITEMINFO = LPIMEMENUITEMINFOA /* imm.h:122:3 */ type tagIMECHARPOSITION = struct { FdwSize DWORD FdwCharPos DWORD Fpt POINT FcLineHeight UINT FrcDocument RECT } /* imm.h:124:11 */ type IMECHARPOSITION = tagIMECHARPOSITION /* imm.h:130:5 */ type PIMECHARPOSITION = uintptr /* imm.h:130:21 */ type NPIMECHARPOSITION = uintptr /* imm.h:130:39 */ type LPIMECHARPOSITION = uintptr /* imm.h:130:58 */ type IMCENUMPROC = uintptr /* imm.h:132:19 */ type REGISTERWORDENUMPROCA = uintptr /* imm.h:185:15 */ type REGISTERWORDENUMPROCW = uintptr /* imm.h:186:15 */ // Restore old value of interface for Obj-C. See above. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _diskfree_t = struct { Ftotal_clusters uint32 Favail_clusters uint32 Fsectors_per_cluster uint32 Fbytes_per_sector uint32 } /* direct.h:20:3 */ // We need to define "NAME_MAX" if it was not present in "limits.h". // We need to define "NULL_INTPTR_T" and "BAD_INTPTR_T". // We need to provide the necessary structures and related types. type DIRENT1 = struct { Fd_ino ino_t _ [2]byte Fd_attributes uint32 Fd_name [261]int8 _ [3]byte } /* test_windirent.h:111:9 */ // We need to define "NAME_MAX" if it was not present in "limits.h". // We need to define "NULL_INTPTR_T" and "BAD_INTPTR_T". // We need to provide the necessary structures and related types. type DIRENT = DIRENT1 /* test_windirent.h:111:23 */ type LPDIRENT = uintptr /* test_windirent.h:112:16 */ type DIR1 = struct { Fd_handle intptr_t Fd_first DIRENT Fd_next DIRENT } /* test_windirent.h:122:9 */ type DIR = DIR1 /* test_windirent.h:122:20 */ type LPDIR = uintptr /* test_windirent.h:123:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type clock_t = int32 /* time.h:60:16 */ type tm = struct { Ftm_sec int32 Ftm_min int32 Ftm_hour int32 Ftm_mday int32 Ftm_mon int32 Ftm_year int32 Ftm_wday int32 Ftm_yday int32 Ftm_isdst int32 } /* time.h:97:3 */ var daylight int32 /* time.h:279:22: */ var timezone int32 /* time.h:280:23: */ var tzname [2]uintptr /* time.h:281:23: */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type timezone1 = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:289:1 */ // Adding timespec definition. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type __timeb32 = struct { Ftime int32 Fmillitm uint16 Ftimezone int16 Fdstflag int16 _ [2]byte } /* timeb.h:53:3 */ type timeb = struct { Ftime time_t Fmillitm uint16 Ftimezone int16 Fdstflag int16 _ [2]byte } /* timeb.h:61:3 */ type __timeb64 = struct { Ftime int64 Fmillitm uint16 Ftimezone int16 Fdstflag int16 _ [2]byte } /* timeb.h:69:3 */ // POSIX 2008 says clock_gettime and timespec are defined in time.h header, // but other systems - like Linux, Solaris, etc - tend to declare such // recent extensions only if the following guards are met. // // Copyright (c) 2011-2016 mingw-w64 project // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Posix timers are supported // Monotonic clocks are available. // CPU-time clocks are available. // Clock support in threads are available. type clockid_t = int32 /* pthread_time.h:49:13 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Structure of the fsdir() table-valued function // 0 1 2 3 4 5 // Set the result stored by context ctx to a blob containing the // contents of file zName. Or, leave the result unchanged (NULL) // if the file does not exist or is unreadable. // // If the file exceeds the SQLite blob size limit, through an // SQLITE_TOOBIG error. // // Throw an SQLITE_IOERR if there are difficulties pulling the file // off of disk. func readFileContents(tls *libc.TLS, ctx uintptr, zName uintptr) { /* fileio.c:133:13: */ var in uintptr var nIn sqlite3_int64 var pBuf uintptr var db uintptr var mxBlob int32 in = libc.Xfopen(tls, zName, ts+4273 /* "rb" */) if in == uintptr(0) { // File does not exist or is unreadable. Leave the result set to NULL. return } libc.Xfseek(tls, in, 0, SEEK_END) nIn = sqlite3_int64(libc.Xftell(tls, in)) libc.Xrewind(tls, in) db = sqlite3.Xsqlite3_context_db_handle(tls, ctx) mxBlob = sqlite3.Xsqlite3_limit(tls, db, SQLITE_LIMIT_LENGTH, -1) if nIn > sqlite3_int64(mxBlob) { sqlite3.Xsqlite3_result_error_code(tls, ctx, SQLITE_TOOBIG) libc.Xfclose(tls, in) return } pBuf = sqlite3.Xsqlite3_malloc64(tls, func() uint64 { if nIn != 0 { return uint64(nIn) } return uint64(1) }()) if pBuf == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, ctx) libc.Xfclose(tls, in) return } if nIn == sqlite3_int64(libc.Xfread(tls, pBuf, uint64(1), size_t(nIn), in)) { sqlite3.Xsqlite3_result_blob64(tls, ctx, pBuf, uint64(nIn), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } else { sqlite3.Xsqlite3_result_error_code(tls, ctx, SQLITE_IOERR) sqlite3.Xsqlite3_free(tls, pBuf) } libc.Xfclose(tls, in) } // Implementation of the "readfile(X)" SQL function. The entire content // of the file named X is read and returned as a BLOB. NULL is returned // if the file does not exist or is unreadable. func readfileFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* fileio.c:175:13: */ var zName uintptr _ = argc // Unused parameter zName = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zName == uintptr(0) { return } readFileContents(tls, context, zName) } // Set the error message contained in context ctx to the results of // vprintf(zFmt, ...). func ctxErrorMsg(tls *libc.TLS, ctx uintptr, zFmt uintptr, va uintptr) { /* fileio.c:191:13: */ var zMsg uintptr = uintptr(0) var ap va_list _ = ap ap = va zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) sqlite3.Xsqlite3_result_error(tls, ctx, zMsg, -1) sqlite3.Xsqlite3_free(tls, zMsg) _ = ap } // This function is designed to convert a Win32 FILETIME structure into the // number of seconds since the Unix Epoch (1970-01-01 00:00:00 UTC). func fileTimeToUnixTime(tls *libc.TLS, pFileTime LPFILETIME) sqlite3_uint64 { /* fileio.c:206:23: */ bp := tls.Alloc(40) defer tls.Free(40) // var epochSystemTime SYSTEMTIME at bp, 16 // var epochIntervals ULARGE_INTEGER at bp+24, 8 // var epochFileTime FILETIME at bp+16, 8 // var fileIntervals ULARGE_INTEGER at bp+32, 8 libc.Xmemset(tls, bp /* &epochSystemTime */, 0, uint64(unsafe.Sizeof(SYSTEMTIME{}))) (*SYSTEMTIME)(unsafe.Pointer(bp /* &epochSystemTime */)).FwYear = WORD(1970) (*SYSTEMTIME)(unsafe.Pointer(bp /* &epochSystemTime */)).FwMonth = WORD(1) (*SYSTEMTIME)(unsafe.Pointer(bp /* &epochSystemTime */)).FwDay = WORD(1) libc.XSystemTimeToFileTime(tls, bp /* &epochSystemTime */, bp+16 /* &epochFileTime */) *(*DWORD)(unsafe.Pointer(bp + 24 /* &epochIntervals */)) = (*FILETIME)(unsafe.Pointer(bp + 16 /* &epochFileTime */)).FdwLowDateTime *(*DWORD)(unsafe.Pointer(bp + 24 /* &epochIntervals */)) = (*FILETIME)(unsafe.Pointer(bp + 16 /* &epochFileTime */)).FdwHighDateTime *(*DWORD)(unsafe.Pointer(bp + 32 /* &fileIntervals */)) = (*_FILETIME)(unsafe.Pointer(pFileTime)).FdwLowDateTime *(*DWORD)(unsafe.Pointer(bp + 32 /* &fileIntervals */)) = (*_FILETIME)(unsafe.Pointer(pFileTime)).FdwHighDateTime return ((*(*ULONGLONG)(unsafe.Pointer(bp + 32 /* &fileIntervals */)) - *(*ULONGLONG)(unsafe.Pointer(bp + 24 /* &epochIntervals */))) / uint64(10000000)) } // This function attempts to normalize the time values found in the stat() // buffer to UTC. This is necessary on Win32, where the runtime library // appears to return these values as local times. func statTimesToUtc(tls *libc.TLS, zPath uintptr, pStatBuf uintptr) { /* fileio.c:233:13: */ bp := tls.Alloc(592) defer tls.Free(592) var hFindFile HANDLE // var fd WIN32_FIND_DATAW at bp, 592 var zUnicodeName LPWSTR zUnicodeName = sqlite3.Xsqlite3_win32_utf8_to_unicode(tls, zPath) if zUnicodeName != 0 { libc.Xmemset(tls, bp /* &fd */, 0, uint64(unsafe.Sizeof(WIN32_FIND_DATAW{}))) hFindFile = libc.XFindFirstFileW(tls, zUnicodeName, bp /* &fd */) if hFindFile != (uintptr(0)) { (*_stat64)(unsafe.Pointer(pStatBuf)).Fst_ctime = time_t(fileTimeToUnixTime(tls, (bp /* &fd */ + 4 /* &.ftCreationTime */))) (*_stat64)(unsafe.Pointer(pStatBuf)).Fst_atime = time_t(fileTimeToUnixTime(tls, (bp /* &fd */ + 12 /* &.ftLastAccessTime */))) (*_stat64)(unsafe.Pointer(pStatBuf)).Fst_mtime = time_t(fileTimeToUnixTime(tls, (bp /* &fd */ + 20 /* &.ftLastWriteTime */))) libc.XFindClose(tls, hFindFile) } sqlite3.Xsqlite3_free(tls, zUnicodeName) } } // This function is used in place of stat(). On Windows, special handling // is required in order for the included time to be returned as UTC. On all // other systems, this function simply calls stat(). func fileStat(tls *libc.TLS, zPath uintptr, pStatBuf uintptr) int32 { /* fileio.c:261:12: */ var rc int32 = libc.X_stat64(tls, zPath, pStatBuf) if rc == 0 { statTimesToUtc(tls, zPath, pStatBuf) } return rc } // This function is used in place of lstat(). On Windows, special handling // is required in order for the included time to be returned as UTC. On all // other systems, this function simply calls lstat(). func fileLinkStat(tls *libc.TLS, zPath uintptr, pStatBuf uintptr) int32 { /* fileio.c:279:12: */ var rc int32 = libc.X_stat64(tls, zPath, pStatBuf) if rc == 0 { statTimesToUtc(tls, zPath, pStatBuf) } return rc } // Argument zFile is the name of a file that will be created and/or written // by SQL function writefile(). This function ensures that the directory // zFile will be written to exists, creating it if required. The permissions // for any path components created by this function are set in accordance // with the current umask. // // If an OOM condition is encountered, SQLITE_NOMEM is returned. Otherwise, // SQLITE_OK is returned if the directory is successfully created, or // SQLITE_ERROR otherwise. func makeDirectory(tls *libc.TLS, zFile uintptr) int32 { /* fileio.c:303:12: */ bp := tls.Alloc(72) defer tls.Free(72) var zCopy uintptr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zFile)) var rc int32 = SQLITE_OK if zCopy == uintptr(0) { rc = SQLITE_NOMEM } else { var nCopy int32 = int32(libc.Xstrlen(tls, zCopy)) var i int32 = 1 for rc == SQLITE_OK { // var sStat _stat64 at bp+16, 56 var rc2 int32 for ; (int32(*(*int8)(unsafe.Pointer(zCopy + uintptr(i)))) != '/') && (i < nCopy); i++ { } if i == nCopy { break } *(*int8)(unsafe.Pointer(zCopy + uintptr(i))) = int8(0) rc2 = fileStat(tls, zCopy, bp+16 /* &sStat */) if rc2 != 0 { if libc.X_mkdir(tls, zCopy) != 0 { rc = SQLITE_ERROR } } else { if !(((int32((*_stat64)(unsafe.Pointer(bp + 16 /* &sStat */)).Fst_mode)) & X_S_IFMT) == X_S_IFDIR) { rc = SQLITE_ERROR } } *(*int8)(unsafe.Pointer(zCopy + uintptr(i))) = int8('/') i++ } sqlite3.Xsqlite3_free(tls, zCopy) } return rc } // This function does the work for the writefile() UDF. Refer to // header comments at the top of this file for details. func writeFile(tls *libc.TLS, pCtx uintptr, zFile uintptr, pData uintptr, mode mode_t, mtime sqlite3_int64) int32 { /* fileio.c:343:12: */ bp := tls.Alloc(88) defer tls.Free(88) { if ((int32(mode)) & X_S_IFMT) == X_S_IFDIR { if libc.X_mkdir(tls, zFile) != 0 { // The mkdir() call to create the directory failed. This might not // be an error though - if there is already a directory at the same // path and either the permissions already match or can be changed // to do so using chmod(), it is not an error. // var sStat _stat64 at bp, 56 if ((((*(*int32)(unsafe.Pointer(libc.X_errno(tls)))) != EEXIST) || (0 != fileStat(tls, zFile, bp /* &sStat */))) || !(((int32((*_stat64)(unsafe.Pointer(bp /* &sStat */)).Fst_mode)) & X_S_IFMT) == X_S_IFDIR)) || (((int32((*_stat64)(unsafe.Pointer(bp /* &sStat */)).Fst_mode) & 0777) != (int32(mode) & 0777)) && (0 != libc.X_chmod(tls, zFile, (int32(mode)&0777)))) { return 1 } } } else { var nWrite sqlite3_int64 = int64(0) var z uintptr var rc int32 = 0 var out uintptr = libc.Xfopen(tls, zFile, ts+4853 /* "wb" */) if out == uintptr(0) { return 1 } z = sqlite3.Xsqlite3_value_blob(tls, pData) if z != 0 { var n sqlite3_int64 = sqlite3_int64(libc.Xfwrite(tls, z, uint64(1), uint64(sqlite3.Xsqlite3_value_bytes(tls, pData)), out)) nWrite = sqlite3_int64(sqlite3.Xsqlite3_value_bytes(tls, pData)) if nWrite != n { rc = 1 } } libc.Xfclose(tls, out) if ((rc == 0) && (mode != 0)) && (libc.X_chmod(tls, zFile, (int32(mode)&0777)) != 0) { rc = 1 } if rc != 0 { return 2 } sqlite3.Xsqlite3_result_int64(tls, pCtx, nWrite) } } if mtime >= int64(0) { // Windows // var lastAccess FILETIME at bp+72, 8 // var lastWrite FILETIME at bp+80, 8 // var currentTime SYSTEMTIME at bp+56, 16 var intervals LONGLONG var hFile HANDLE var zUnicodeName LPWSTR libc.XGetSystemTime(tls, bp+56 /* ¤tTime */) libc.XSystemTimeToFileTime(tls, bp+56 /* ¤tTime */, bp+72 /* &lastAccess */) intervals = (((LONGLONG(LONG(mtime))) * (LONGLONG(10000000))) + 116444736000000000) (*FILETIME)(unsafe.Pointer(bp + 80 /* &lastWrite */)).FdwLowDateTime = DWORD(intervals) (*FILETIME)(unsafe.Pointer(bp + 80 /* &lastWrite */)).FdwHighDateTime = (DWORD(intervals >> 32)) zUnicodeName = sqlite3.Xsqlite3_win32_utf8_to_unicode(tls, zFile) if zUnicodeName == uintptr(0) { return 1 } hFile = libc.XCreateFileW(tls, zUnicodeName, uint32(0x0100), uint32(0), uintptr(0), uint32(OPEN_EXISTING), uint32(FILE_FLAG_BACKUP_SEMANTICS), uintptr(0)) sqlite3.Xsqlite3_free(tls, zUnicodeName) if hFile != (libc.UintptrFromInt64(int64(-1))) { var bResult WINBOOL = libc.XSetFileTime(tls, hFile, uintptr(0), bp+72 /* &lastAccess */, bp+80 /* &lastWrite */) libc.XCloseHandle(tls, hFile) return libc.BoolInt32(!(bResult != 0)) } else { return 1 } } return 0 } // Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function. // Refer to header comments at the top of this file for details. func writefileFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* fileio.c:457:13: */ bp := tls.Alloc(48) defer tls.Free(48) var zFile uintptr var mode mode_t = mode_t(0) var res int32 var mtime sqlite3_int64 = int64(-1) if (argc < 2) || (argc > 4) { sqlite3.Xsqlite3_result_error(tls, context, ts+4856 /* "wrong number of ..." */, -1) return } zFile = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zFile == uintptr(0) { return } if argc >= 3 { mode = mode_t(sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) } if argc == 4 { mtime = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) } res = writeFile(tls, context, zFile, *(*uintptr)(unsafe.Pointer(argv + 1*8)), mode, mtime) if (res == 1) && ((*(*int32)(unsafe.Pointer(libc.X_errno(tls)))) == ENOENT) { if makeDirectory(tls, zFile) == SQLITE_OK { res = writeFile(tls, context, zFile, *(*uintptr)(unsafe.Pointer(argv + 1*8)), mode, mtime) } } if (argc > 2) && (res != 0) { if 0 != 0 { ctxErrorMsg(tls, context, ts+4906 /* "failed to create..." */, libc.VaList(bp, zFile)) } else if ((int32(mode)) & X_S_IFMT) == X_S_IFDIR { ctxErrorMsg(tls, context, ts+4935 /* "failed to create..." */, libc.VaList(bp+16, zFile)) } else { ctxErrorMsg(tls, context, ts+4966 /* "failed to write ..." */, libc.VaList(bp+32, zFile)) } } } // SQL function: lsmode(MODE) // // Given a numberic st_mode from stat(), convert it into a human-readable // text string in the style of "ls -l". func lsModeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* fileio.c:507:13: */ bp := tls.Alloc(16) defer tls.Free(16) var i int32 var iMode int32 = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) // var z [16]int8 at bp, 16 _ = argc if 0 != 0 { *(*int8)(unsafe.Pointer(bp /* &z[0] */)) = int8('l') } else if ((iMode) & X_S_IFMT) == X_S_IFREG { *(*int8)(unsafe.Pointer(bp /* &z[0] */)) = int8('-') } else if ((iMode) & X_S_IFMT) == X_S_IFDIR { *(*int8)(unsafe.Pointer(bp /* &z[0] */)) = int8('d') } else { *(*int8)(unsafe.Pointer(bp /* &z[0] */)) = int8('?') } for i = 0; i < 3; i++ { var m int32 = (iMode >> ((2 - i) * 3)) var a uintptr = (bp /* &z */ + uintptr((1 + (i * 3)))) *(*int8)(unsafe.Pointer(a)) = func() int8 { if (m & 0x4) != 0 { return int8('r') } return int8('-') }() *(*int8)(unsafe.Pointer(a + 1)) = func() int8 { if (m & 0x2) != 0 { return int8('w') } return int8('-') }() *(*int8)(unsafe.Pointer(a + 2)) = func() int8 { if (m & 0x1) != 0 { return int8('x') } return int8('-') }() } *(*int8)(unsafe.Pointer(bp /* &z[0] */ + 10)) = int8(0) sqlite3.Xsqlite3_result_text(tls, context, bp /* &z[0] */, -1, libc.UintptrFromInt32(-1)) } // Cursor type for recursively iterating through a directory structure. type fsdir_cursor1 = struct { Fbase sqlite3_vtab_cursor FnLvl int32 FiLvl int32 FaLvl uintptr FzBase uintptr FnBase int32 _ [4]byte FsStat struct { Fst_dev _dev_t Fst_ino _ino_t Fst_mode uint16 Fst_nlink int16 Fst_uid int16 Fst_gid int16 _ [2]byte Fst_rdev _dev_t _ [4]byte Fst_size int64 Fst_atime int64 Fst_mtime int64 Fst_ctime int64 } FzPath uintptr FiRowid sqlite3_int64 } /* fileio.c:541:9 */ // Cursor type for recursively iterating through a directory structure. type fsdir_cursor = fsdir_cursor1 /* fileio.c:541:29 */ type FsdirLevel1 = struct { FpDir uintptr FzDir uintptr } /* fileio.c:541:9 */ type FsdirLevel = FsdirLevel1 /* fileio.c:542:27 */ type fsdir_tab1 = struct{ Fbase sqlite3_vtab } /* fileio.c:564:9 */ type fsdir_tab = fsdir_tab1 /* fileio.c:564:26 */ // Construct a new fsdir virtual table object. func fsdirConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* fileio.c:572:12: */ var pNew uintptr = uintptr(0) var rc int32 _ = pAux _ = argc _ = argv _ = pzErr rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+4991 /* "CREATE TABLE x(n..." */) if rc == SQLITE_OK { pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(fsdir_tab{}))) if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(fsdir_tab{}))) sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_DIRECTONLY, 0) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew return rc } // This method is the destructor for fsdir vtab objects. func fsdirDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* fileio.c:599:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // Constructor for a new fsdir_cursor object. func fsdirOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* fileio.c:607:12: */ var pCur uintptr _ = p pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(fsdir_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(fsdir_cursor{}))) (*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl = -1 *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Reset a cursor back to the state it was in when first returned // by fsdirOpen(). func fsdirResetCursor(tls *libc.TLS, pCur uintptr) { /* fileio.c:622:13: */ var i int32 for i = 0; i <= (*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl; i++ { var pLvl uintptr = ((*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl + uintptr(i)*16) if (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir != 0 { closedir(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir) } sqlite3.Xsqlite3_free(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir) } sqlite3.Xsqlite3_free(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath) sqlite3.Xsqlite3_free(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl) (*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl = uintptr(0) (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = uintptr(0) (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase = uintptr(0) (*fsdir_cursor)(unsafe.Pointer(pCur)).FnBase = 0 (*fsdir_cursor)(unsafe.Pointer(pCur)).FnLvl = 0 (*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl = -1 (*fsdir_cursor)(unsafe.Pointer(pCur)).FiRowid = int64(1) } // Destructor for an fsdir_cursor. func fsdirClose(tls *libc.TLS, cur uintptr) int32 { /* fileio.c:643:12: */ var pCur uintptr = cur fsdirResetCursor(tls, pCur) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Set the error message for the virtual table associated with cursor // pCur to the results of vprintf(zFmt, ...). func fsdirSetErrmsg(tls *libc.TLS, pCur uintptr, zFmt uintptr, va uintptr) { /* fileio.c:655:13: */ var ap va_list _ = ap ap = va (*sqlite3_vtab)(unsafe.Pointer((*fsdir_cursor)(unsafe.Pointer(pCur)).Fbase.FpVtab)).FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } // Advance an fsdir_cursor to its next row of output. func fsdirNext(tls *libc.TLS, cur uintptr) int32 { /* fileio.c:666:12: */ bp := tls.Alloc(56) defer tls.Free(56) var pCur uintptr = cur var m mode_t = (*fsdir_cursor)(unsafe.Pointer(pCur)).FsStat.Fst_mode (*fsdir_cursor)(unsafe.Pointer(pCur)).FiRowid++ if ((int32(m)) & X_S_IFMT) == X_S_IFDIR { // Descend into this directory var iNew int32 = ((*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl + 1) var pLvl uintptr if iNew >= (*fsdir_cursor)(unsafe.Pointer(pCur)).FnLvl { var nNew int32 = (iNew + 1) var nByte sqlite3_int64 = (sqlite3_int64(uint64(nNew) * uint64(unsafe.Sizeof(FsdirLevel{})))) var aNew uintptr = sqlite3.Xsqlite3_realloc64(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl, uint64(nByte)) if aNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, (aNew + uintptr((*fsdir_cursor)(unsafe.Pointer(pCur)).FnLvl)*16), 0, (uint64(unsafe.Sizeof(FsdirLevel{})) * (uint64(nNew - (*fsdir_cursor)(unsafe.Pointer(pCur)).FnLvl)))) (*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl = aNew (*fsdir_cursor)(unsafe.Pointer(pCur)).FnLvl = nNew } (*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl = iNew pLvl = ((*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl + uintptr(iNew)*16) (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir = (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = uintptr(0) (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir = opendir(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir) if (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir == uintptr(0) { fsdirSetErrmsg(tls, pCur, ts+5051 /* "cannot read dire..." */, libc.VaList(bp, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) return SQLITE_ERROR } } for (*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl >= 0 { var pLvl uintptr = ((*fsdir_cursor)(unsafe.Pointer(pCur)).FaLvl + uintptr((*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl)*16) var pEntry uintptr = readdir(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir) if pEntry != 0 { if int32(*(*int8)(unsafe.Pointer((pEntry + 8 /* &.d_name */)))) == '.' { if (int32(*(*int8)(unsafe.Pointer((pEntry + 8 /* &.d_name */) + 1))) == '.') && (int32(*(*int8)(unsafe.Pointer((pEntry + 8 /* &.d_name */) + 2))) == 0) { continue } if int32(*(*int8)(unsafe.Pointer((pEntry + 8 /* &.d_name */) + 1))) == 0 { continue } } sqlite3.Xsqlite3_free(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath) (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+5077 /* "%s/%s" */, libc.VaList(bp+16, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir, pEntry+8 /* &.d_name */)) if (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath == uintptr(0) { return SQLITE_NOMEM } if fileLinkStat(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath, (pCur+40 /* &.sStat */)) != 0 { fsdirSetErrmsg(tls, pCur, ts+5083 /* "cannot stat file..." */, libc.VaList(bp+40, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) return SQLITE_ERROR } return SQLITE_OK } closedir(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir) sqlite3.Xsqlite3_free(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir) (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir = uintptr(0) (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir = uintptr(0) (*fsdir_cursor)(unsafe.Pointer(pCur)).FiLvl-- } // EOF sqlite3.Xsqlite3_free(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath) (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = uintptr(0) return SQLITE_OK } // Return values of columns for the row at which the series_cursor // is currently pointing. func fsdirColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* fileio.c:730:12: */ var pCur uintptr = cur switch i { case FSDIR_COLUMN_NAME: { sqlite3.Xsqlite3_result_text(tls, ctx, ((*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath + uintptr((*fsdir_cursor)(unsafe.Pointer(pCur)).FnBase)), -1, libc.UintptrFromInt32(-1)) break } case FSDIR_COLUMN_MODE: sqlite3.Xsqlite3_result_int64(tls, ctx, int64((*fsdir_cursor)(unsafe.Pointer(pCur)).FsStat.Fst_mode)) break case FSDIR_COLUMN_MTIME: sqlite3.Xsqlite3_result_int64(tls, ctx, (*fsdir_cursor)(unsafe.Pointer(pCur)).FsStat.Fst_mtime) break case FSDIR_COLUMN_DATA: { var m mode_t = (*fsdir_cursor)(unsafe.Pointer(pCur)).FsStat.Fst_mode if ((int32(m)) & X_S_IFMT) == X_S_IFDIR { sqlite3.Xsqlite3_result_null(tls, ctx) } else { readFileContents(tls, ctx, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath) } } fallthrough case FSDIR_COLUMN_PATH: fallthrough default: { // The FSDIR_COLUMN_PATH and FSDIR_COLUMN_DIR are input parameters. // always return their values as NULL break } } return SQLITE_OK } // Return the rowid for the current row. In this implementation, the // first row returned is assigned rowid value 1, and each subsequent // row a value 1 more than that of the previous. func fsdirRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* fileio.c:795:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*fsdir_cursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // Return TRUE if the cursor has been moved off of the last // row of output. func fsdirEof(tls *libc.TLS, cur uintptr) int32 { /* fileio.c:805:12: */ var pCur uintptr = cur return (libc.Bool32((*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath == uintptr(0))) } // xFilter callback. // // idxNum==1 PATH parameter only // idxNum==2 Both PATH and DIR supplied func fsdirFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* fileio.c:816:12: */ bp := tls.Alloc(56) defer tls.Free(56) var zDir uintptr = uintptr(0) var pCur uintptr = cur _ = idxStr fsdirResetCursor(tls, pCur) if idxNum == 0 { fsdirSetErrmsg(tls, pCur, ts+5104 /* "table function f..." */, 0) return SQLITE_ERROR } zDir = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zDir == uintptr(0) { fsdirSetErrmsg(tls, pCur, ts+5146 /* "table function f..." */, 0) return SQLITE_ERROR } if argc == 2 { (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) } if (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase != 0 { (*fsdir_cursor)(unsafe.Pointer(pCur)).FnBase = (int32(libc.Xstrlen(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase)) + 1) (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+5077 /* "%s/%s" */, libc.VaList(bp, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase, zDir)) } else { (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+24, zDir)) } if (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath == uintptr(0) { return SQLITE_NOMEM } if fileLinkStat(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath, (pCur+40 /* &.sStat */)) != 0 { fsdirSetErrmsg(tls, pCur, ts+5083 /* "cannot stat file..." */, libc.VaList(bp+40, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) return SQLITE_ERROR } return SQLITE_OK } // SQLite will invoke this method one or more times while planning a query // that uses the generate_series virtual table. This routine needs to create // a query plan for each invocation and compute an estimated cost for that // plan. // // In this implementation idxNum is used to represent the // query plan. idxStr is unused. // // The query plan is represented by values of idxNum: // // (1) The path value is supplied by argv[0] // (2) Path is in argv[0] and dir is in argv[1] func fsdirBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* fileio.c:872:12: */ var i int32 // Loop over constraints var idxPath int32 = -1 // Index in pIdxInfo->aConstraint of PATH= var idxDir int32 = -1 // Index in pIdxInfo->aConstraint of DIR= var seenPath int32 = 0 // True if an unusable PATH= constraint is seen var seenDir int32 = 0 // True if an unusable DIR= constraint is seen var pConstraint uintptr _ = tab pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) != SQLITE_INDEX_CONSTRAINT_EQ { goto __2 } switch (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn { case FSDIR_COLUMN_PATH: { if (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable != 0 { idxPath = i seenPath = 0 } else if idxPath < 0 { seenPath = 1 } break } case FSDIR_COLUMN_DIR: { if (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable != 0 { idxDir = i seenDir = 0 } else if idxDir < 0 { seenDir = 1 } break } } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if (seenPath != 0) || (seenDir != 0) { // If input parameters are unusable, disallow this plan return SQLITE_CONSTRAINT } if idxPath < 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 0 // The pIdxInfo->estimatedCost should have been initialized to a huge // number. Leave it unchanged. (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(0x7fffffff) } else { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idxPath)*8)).Fomit = uint8(1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idxPath)*8)).FargvIndex = 1 if idxDir >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idxDir)*8)).Fomit = uint8(1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idxDir)*8)).FargvIndex = 2 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 10.0 } else { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 100.0 } } return SQLITE_OK } // Register the "fsdir" virtual table. func fsdirRegister(tls *libc.TLS, db uintptr) int32 { /* fileio.c:938:12: */ var rc int32 = sqlite3.Xsqlite3_create_module(tls, db, ts+5196 /* "fsdir" */, uintptr(unsafe.Pointer(&fsdirModule1)), uintptr(0)) return rc } var fsdirModule1 = sqlite3_module{ // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName } /* fileio.c:939:25 */ func sqlite3_fileio_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* fileio.c:976:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Unused parameter rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5202 /* "readfile" */, 1, (SQLITE_UTF8 | SQLITE_DIRECTONLY), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{readfileFunc})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5211 /* "writefile" */, -1, (SQLITE_UTF8 | SQLITE_DIRECTONLY), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{writefileFunc})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5221 /* "lsmode" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{lsModeFunc})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = fsdirRegister(tls, db) } return rc } // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. // Forward declaration of objects used by this implementation type fuzzer_vtab1 = struct { Fbase sqlite3_vtab FzClassName uintptr FpRule uintptr FnCursor int32 _ [4]byte } /* fuzzer.c:162:9 */ // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. // Forward declaration of objects used by this implementation type fuzzer_vtab = fuzzer_vtab1 /* fuzzer.c:162:28 */ type fuzzer_cursor1 = struct { Fbase sqlite3_vtab_cursor FiRowid sqlite3_int64 FpVtab uintptr FrLimit fuzzer_cost _ [4]byte FpStem uintptr FpDone uintptr FaQueue [20]uintptr FmxQueue int32 _ [4]byte FzBuf uintptr FnBuf int32 FnStem int32 FiRuleset int32 _ [4]byte FnullRule fuzzer_rule FapHash [4001]uintptr } /* fuzzer.c:163:9 */ type fuzzer_cursor = fuzzer_cursor1 /* fuzzer.c:163:30 */ type fuzzer_rule1 = struct { FpNext uintptr FzFrom uintptr FrCost fuzzer_cost FnFrom fuzzer_len FnTo fuzzer_len _ [2]byte FiRuleset fuzzer_ruleid FzTo [4]int8 } /* fuzzer.c:162:9 */ type fuzzer_rule = fuzzer_rule1 /* fuzzer.c:164:28 */ type fuzzer_stem1 = struct { FzBasis uintptr FpRule uintptr FpNext uintptr FpHash uintptr FrBaseCost fuzzer_cost FrCostX fuzzer_cost FnBasis fuzzer_len Fn fuzzer_len _ [6]byte } /* fuzzer.c:163:9 */ type fuzzer_stem = fuzzer_stem1 /* fuzzer.c:166:28 */ // Various types. // // fuzzer_cost is the "cost" of an edit operation. // // fuzzer_len is the length of a matching string. // // fuzzer_ruleid is an ruleset identifier. type fuzzer_cost = int32 /* fuzzer.c:177:13 */ type fuzzer_len = int8 /* fuzzer.c:178:21 */ type fuzzer_ruleid = int32 /* fuzzer.c:179:13 */ // The two input rule lists are both sorted in order of increasing // cost. Merge them together into a single list, sorted by cost, and // return a pointer to the head of that list. func fuzzerMergeRules(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* fuzzer.c:261:20: */ bp := tls.Alloc(32) defer tls.Free(32) // var head fuzzer_rule at bp, 32 var pTail uintptr pTail = bp /* &head */ for (pA != 0) && (pB != 0) { if (*fuzzer_rule)(unsafe.Pointer(pA)).FrCost <= (*fuzzer_rule)(unsafe.Pointer(pB)).FrCost { (*fuzzer_rule)(unsafe.Pointer(pTail)).FpNext = pA pTail = pA pA = (*fuzzer_rule)(unsafe.Pointer(pA)).FpNext } else { (*fuzzer_rule)(unsafe.Pointer(pTail)).FpNext = pB pTail = pB pB = (*fuzzer_rule)(unsafe.Pointer(pB)).FpNext } } if pA == uintptr(0) { (*fuzzer_rule)(unsafe.Pointer(pTail)).FpNext = pB } else { (*fuzzer_rule)(unsafe.Pointer(pTail)).FpNext = pA } return (*fuzzer_rule)(unsafe.Pointer(bp /* &head */)).FpNext } // Statement pStmt currently points to a row in the fuzzer data table. This // function allocates and populates a fuzzer_rule structure according to // the content of the row. // // If successful, *ppRule is set to point to the new object and SQLITE_OK // is returned. Otherwise, *ppRule is zeroed, *pzErr may be set to point // to an error message and an SQLite error code returned. func fuzzerLoadOneRule(tls *libc.TLS, p uintptr, pStmt uintptr, ppRule uintptr, pzErr uintptr) int32 { /* fuzzer.c:294:12: */ bp := tls.Alloc(72) defer tls.Free(72) var iRuleset sqlite3_int64 = sqlite3.Xsqlite3_column_int64(tls, pStmt, 0) var zFrom uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 1) var zTo uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 2) var nCost int32 = sqlite3.Xsqlite3_column_int(tls, pStmt, 3) var rc int32 = SQLITE_OK // Return code var nFrom int32 // Size of string zFrom, in bytes var nTo int32 // Size of string zTo, in bytes var pRule uintptr = uintptr(0) // New rule object to return if zFrom == uintptr(0) { zFrom = ts + 489 /* "" */ } if zTo == uintptr(0) { zTo = ts + 489 /* "" */ } nFrom = int32(libc.Xstrlen(tls, zFrom)) nTo = int32(libc.Xstrlen(tls, zTo)) // Silently ignore null transformations if libc.Xstrcmp(tls, zFrom, zTo) == 0 { *(*uintptr)(unsafe.Pointer(ppRule)) = uintptr(0) return SQLITE_OK } if (nCost <= 0) || (nCost > FUZZER_MX_COST) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3175, /* "%s: cost must be..." */ libc.VaList(bp, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, FUZZER_MX_COST)) rc = SQLITE_ERROR } else if (nFrom > FUZZER_MX_LENGTH) || (nTo > FUZZER_MX_LENGTH) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3209, /* "%s: maximum stri..." */ libc.VaList(bp+24, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, FUZZER_MX_LENGTH)) rc = SQLITE_ERROR } else if (iRuleset < int64(0)) || (iRuleset > int64(FUZZER_MX_RULEID)) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+5228, /* "%s: ruleset must..." */ libc.VaList(bp+48, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, FUZZER_MX_RULEID)) rc = SQLITE_ERROR } else { pRule = sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(fuzzer_rule{})) + uint64(nFrom)) + uint64(nTo))) if pRule == uintptr(0) { rc = SQLITE_NOMEM } else { libc.Xmemset(tls, pRule, 0, uint64(unsafe.Sizeof(fuzzer_rule{}))) (*fuzzer_rule)(unsafe.Pointer(pRule)).FzFrom = pRule + 28 /* &.zTo */ *(*uintptr)(unsafe.Pointer(pRule + 8 /* &.zFrom */)) += (uintptr(nTo + 1)) (*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom = fuzzer_len(nFrom) libc.Xmemcpy(tls, (*fuzzer_rule)(unsafe.Pointer(pRule)).FzFrom, zFrom, (uint64(nFrom + 1))) libc.Xmemcpy(tls, pRule+28 /* &.zTo */, zTo, (uint64(nTo + 1))) (*fuzzer_rule)(unsafe.Pointer(pRule)).FnTo = fuzzer_len(nTo) (*fuzzer_rule)(unsafe.Pointer(pRule)).FrCost = nCost (*fuzzer_rule)(unsafe.Pointer(pRule)).FiRuleset = int32(iRuleset) } } *(*uintptr)(unsafe.Pointer(ppRule)) = pRule return rc } // Load the content of the fuzzer data table into memory. func fuzzerLoadRules(tls *libc.TLS, db uintptr, p uintptr, zDb uintptr, zData uintptr, pzErr uintptr) int32 { /* fuzzer.c:363:12: */ bp := tls.Alloc(216) defer tls.Free(216) var rc int32 = SQLITE_OK // Return code var zSql uintptr // SELECT used to read from rules table var pHead uintptr = uintptr(0) zSql = sqlite3.Xsqlite3_mprintf(tls, ts+3278 /* "SELECT * FROM %Q..." */, libc.VaList(bp, zDb, zData)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { var rc2 int32 // finalize() return code *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+80 /* &pStmt */, uintptr(0)) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3298 /* "%s: %s" */, libc.VaList(bp+24, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, sqlite3.Xsqlite3_errmsg(tls, db))) } else if sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3305, /* "%s: %s has %d co..." */ libc.VaList(bp+48, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, zData, sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))))) rc = SQLITE_ERROR } else { for (rc == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)))) { *(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)) = uintptr(0) rc = fuzzerLoadOneRule(tls, p, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), bp+88 /* &pRule */, pzErr) if *(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)) != 0 { (*fuzzer_rule)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)))).FpNext = pHead pHead = *(*uintptr)(unsafe.Pointer(bp + 88 /* pRule */)) } } } rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) if rc == SQLITE_OK { rc = rc2 } } sqlite3.Xsqlite3_free(tls, zSql) // All rules are now in a singly linked list starting at pHead. This // block sorts them by cost and then sets fuzzer_vtab.pRule to point to // point to the head of the sorted list. if rc == SQLITE_OK { var i uint32 var pX uintptr // var a [15]uintptr at bp+96, 120 for i = uint32(0); uint64(i) < (uint64(unsafe.Sizeof([15]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))); i++ { *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) = uintptr(0) } for (libc.AssignUintptr(&pX, pHead)) != uintptr(0) { pHead = (*fuzzer_rule)(unsafe.Pointer(pX)).FpNext (*fuzzer_rule)(unsafe.Pointer(pX)).FpNext = uintptr(0) for i = uint32(0); (*(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) != 0) && (uint64(i) < ((uint64(unsafe.Sizeof([15]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))) - uint64(1))); i++ { pX = fuzzerMergeRules(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)), pX) *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) = uintptr(0) } *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)) = fuzzerMergeRules(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)), pX) } pX = *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */)) i = uint32(1) for ; uint64(i) < (uint64(unsafe.Sizeof([15]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))); i++ { pX = fuzzerMergeRules(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* &a[0] */ + uintptr(i)*8)), pX) } (*fuzzer_vtab)(unsafe.Pointer(p)).FpRule = fuzzerMergeRules(tls, (*fuzzer_vtab)(unsafe.Pointer(p)).FpRule, pX) } else { // An error has occurred. Setting p->pRule to point to the head of the // allocated list ensures that the list will be cleaned up in this case. (*fuzzer_vtab)(unsafe.Pointer(p)).FpRule = pHead } return rc } // This function converts an SQL quoted string into an unquoted string // and returns a pointer to a buffer allocated using sqlite3_malloc() // containing the result. The caller should eventually free this buffer // using sqlite3_free. // // Examples: // // "abc" becomes abc // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno func fuzzerDequote(tls *libc.TLS, zIn uintptr) uintptr { /* fuzzer.c:449:13: */ var nIn sqlite3_int64 // Size of input string, in bytes var zOut uintptr // Output (dequoted) string nIn = sqlite3_int64(libc.Xstrlen(tls, zIn)) zOut = sqlite3.Xsqlite3_malloc64(tls, (uint64(nIn + int64(1)))) if zOut != 0 { var q int8 = *(*int8)(unsafe.Pointer(zIn)) // Quote character (if any ) if (((int32(q) != '[') && (int32(q) != '\'')) && (int32(q) != '"')) && (int32(q) != '`') { libc.Xmemcpy(tls, zOut, zIn, (size_t(nIn + int64(1)))) } else { var iOut int32 = 0 // Index of next byte to write to output var iIn int32 // Index of next byte to read from input if int32(q) == '[' { q = int8(']') } for iIn = 1; sqlite3_int64(iIn) < nIn; iIn++ { if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iIn)))) == int32(q) { iIn++ } *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) } } } return zOut } // xDisconnect/xDestroy method for the fuzzer module. func fuzzerDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* fuzzer.c:478:12: */ var p uintptr = pVtab for (*fuzzer_vtab)(unsafe.Pointer(p)).FpRule != 0 { var pRule uintptr = (*fuzzer_vtab)(unsafe.Pointer(p)).FpRule (*fuzzer_vtab)(unsafe.Pointer(p)).FpRule = (*fuzzer_rule)(unsafe.Pointer(pRule)).FpNext sqlite3.Xsqlite3_free(tls, pRule) } sqlite3.Xsqlite3_free(tls, p) return SQLITE_OK } // xConnect/xCreate method for the fuzzer module. Arguments are: // // argv[0] -> module name ("fuzzer") // argv[1] -> database name // argv[2] -> table name // argv[3] -> fuzzer rule table name func fuzzerConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* fuzzer.c:498:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK // Return code var pNew uintptr = uintptr(0) // New virtual table var zModule uintptr = *(*uintptr)(unsafe.Pointer(argv)) var zDb uintptr = *(*uintptr)(unsafe.Pointer(argv + 1*8)) if argc != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+5265 /* "%s: wrong number..." */, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { var nModule sqlite3_int64 // Length of zModule, in bytes nModule = sqlite3_int64(libc.Xstrlen(tls, zModule)) pNew = sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(fuzzer_vtab{})) + uint64(nModule)) + uint64(1))) if pNew == uintptr(0) { rc = SQLITE_NOMEM } else { var zTab uintptr // Dequoted name of fuzzer data table libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(fuzzer_vtab{}))) (*fuzzer_vtab)(unsafe.Pointer(pNew)).FzClassName = (pNew + 1*48) libc.Xmemcpy(tls, (*fuzzer_vtab)(unsafe.Pointer(pNew)).FzClassName, zModule, (size_t(nModule + int64(1)))) zTab = fuzzerDequote(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) if zTab == uintptr(0) { rc = SQLITE_NOMEM } else { rc = fuzzerLoadRules(tls, db, pNew, zDb, zTab, pzErr) sqlite3.Xsqlite3_free(tls, zTab) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+5316 /* "CREATE TABLE x(w..." */) } if rc != SQLITE_OK { fuzzerDisconnect(tls, pNew) pNew = uintptr(0) } else { sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) } } } *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew return rc } // Open a new fuzzer cursor. func fuzzerOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* fuzzer.c:556:12: */ var p uintptr = pVTab var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(fuzzer_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(fuzzer_cursor{}))) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpVtab = p *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) (*fuzzer_vtab)(unsafe.Pointer(p)).FnCursor++ return SQLITE_OK } // Free all stems in a list. func fuzzerClearStemList(tls *libc.TLS, pStem uintptr) { /* fuzzer.c:571:13: */ for pStem != 0 { var pNext uintptr = (*fuzzer_stem)(unsafe.Pointer(pStem)).FpNext sqlite3.Xsqlite3_free(tls, pStem) pStem = pNext } } // Free up all the memory allocated by a cursor. Set it rLimit to 0 // to indicate that it is at EOF. func fuzzerClearCursor(tls *libc.TLS, pCur uintptr, clearHash int32) { /* fuzzer.c:583:13: */ var i int32 fuzzerClearStemList(tls, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem) fuzzerClearStemList(tls, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpDone) for i = 0; i < FUZZER_NQUEUE; i++ { fuzzerClearStemList(tls, *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8))) } (*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit = 0 if (clearHash != 0) && ((*fuzzer_cursor)(unsafe.Pointer(pCur)).FnStem != 0) { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FmxQueue = 0 (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem = uintptr(0) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpDone = uintptr(0) libc.Xmemset(tls, pCur+48 /* &.aQueue */, 0, uint64(unsafe.Sizeof([20]uintptr{}))) libc.Xmemset(tls, pCur+272 /* &.apHash */, 0, uint64(unsafe.Sizeof([4001]uintptr{}))) } (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnStem = 0 } // Close a fuzzer cursor. func fuzzerClose(tls *libc.TLS, cur uintptr) int32 { /* fuzzer.c:602:12: */ var pCur uintptr = cur fuzzerClearCursor(tls, pCur, 0) sqlite3.Xsqlite3_free(tls, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FzBuf) (*fuzzer_vtab)(unsafe.Pointer((*fuzzer_cursor)(unsafe.Pointer(pCur)).FpVtab)).FnCursor-- sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Compute the current output term for a fuzzer_stem. func fuzzerRender(tls *libc.TLS, pStem uintptr, pzBuf uintptr, pnBuf uintptr) int32 { /* fuzzer.c:614:12: */ var pRule uintptr = (*fuzzer_stem)(unsafe.Pointer(pStem)).FpRule var n int32 // Size of output term without nul-term var z uintptr // Buffer to assemble output term in n = ((int32((*fuzzer_stem)(unsafe.Pointer(pStem)).FnBasis) + int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnTo)) - int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom)) if (*(*int32)(unsafe.Pointer(pnBuf))) < (n + 1) { (*(*uintptr)(unsafe.Pointer(pzBuf))) = sqlite3.Xsqlite3_realloc(tls, *(*uintptr)(unsafe.Pointer(pzBuf)), (n + 100)) if (*(*uintptr)(unsafe.Pointer(pzBuf))) == uintptr(0) { return SQLITE_NOMEM } (*(*int32)(unsafe.Pointer(pnBuf))) = (n + 100) } n = int32((*fuzzer_stem)(unsafe.Pointer(pStem)).Fn) z = *(*uintptr)(unsafe.Pointer(pzBuf)) if n < 0 { libc.Xmemcpy(tls, z, (*fuzzer_stem)(unsafe.Pointer(pStem)).FzBasis, (uint64(int32((*fuzzer_stem)(unsafe.Pointer(pStem)).FnBasis) + 1))) } else { libc.Xmemcpy(tls, z, (*fuzzer_stem)(unsafe.Pointer(pStem)).FzBasis, uint64(n)) libc.Xmemcpy(tls, (z + uintptr(n)), pRule+28 /* &.zTo */, uint64((*fuzzer_rule)(unsafe.Pointer(pRule)).FnTo)) libc.Xmemcpy(tls, (z + uintptr((n + int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnTo)))), ((*fuzzer_stem)(unsafe.Pointer(pStem)).FzBasis + uintptr((n + int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom)))), (uint64(((int32((*fuzzer_stem)(unsafe.Pointer(pStem)).FnBasis) - n) - int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom)) + 1))) } return SQLITE_OK } // Compute a hash on zBasis. func fuzzerHash(tls *libc.TLS, z uintptr) uint32 { /* fuzzer.c:647:21: */ var h uint32 = uint32(0) for *(*int8)(unsafe.Pointer(z)) != 0 { h = (((h << 3) ^ (h >> 29)) ^ uint32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) } return (h % uint32(FUZZER_HASH)) } // Current cost of a stem func fuzzerCost(tls *libc.TLS, pStem uintptr) fuzzer_cost { /* fuzzer.c:656:20: */ return libc.AssignPtrInt32(pStem+36 /* &.rCostX */, ((*fuzzer_stem)(unsafe.Pointer(pStem)).FrBaseCost + (*fuzzer_rule)(unsafe.Pointer((*fuzzer_stem)(unsafe.Pointer(pStem)).FpRule)).FrCost)) } // Return 1 if the string to which the cursor is point has already // been emitted. Return 0 if not. Return -1 on a memory allocation // failures. func fuzzerSeen(tls *libc.TLS, pCur uintptr, pStem uintptr) int32 { /* fuzzer.c:694:12: */ var h uint32 var pLookup uintptr if fuzzerRender(tls, pStem, (pCur+216 /* &.zBuf */), (pCur+224 /* &.nBuf */)) == SQLITE_NOMEM { return -1 } h = fuzzerHash(tls, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FzBuf) pLookup = *(*uintptr)(unsafe.Pointer((pCur + 272 /* &.apHash */) + uintptr(h)*8)) for (pLookup != 0) && (libc.Xstrcmp(tls, (*fuzzer_stem)(unsafe.Pointer(pLookup)).FzBasis, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FzBuf) != 0) { pLookup = (*fuzzer_stem)(unsafe.Pointer(pLookup)).FpHash } return (libc.Bool32(pLookup != uintptr(0))) } // If argument pRule is NULL, this function returns false. // // Otherwise, it returns true if rule pRule should be skipped. A rule // should be skipped if it does not belong to rule-set iRuleset, or if // applying it to stem pStem would create a string longer than // FUZZER_MX_OUTPUT_LENGTH bytes. func fuzzerSkipRule(tls *libc.TLS, pRule uintptr, pStem uintptr, iRuleset int32) int32 { /* fuzzer.c:717:12: */ return (libc.Bool32((pRule != 0) && (((*fuzzer_rule)(unsafe.Pointer(pRule)).FiRuleset != iRuleset) || (((int32((*fuzzer_stem)(unsafe.Pointer(pStem)).FnBasis) + int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnTo)) - int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom)) > FUZZER_MX_OUTPUT_LENGTH)))) } // Advance a fuzzer_stem to its next value. Return 0 if there are // no more values that can be generated by this fuzzer_stem. Return // -1 on a memory allocation failure. func fuzzerAdvance(tls *libc.TLS, pCur uintptr, pStem uintptr) int32 { /* fuzzer.c:733:12: */ var pRule uintptr for (libc.AssignUintptr(&pRule, (*fuzzer_stem)(unsafe.Pointer(pStem)).FpRule)) != uintptr(0) { for int32((*fuzzer_stem)(unsafe.Pointer(pStem)).Fn) < (int32((*fuzzer_stem)(unsafe.Pointer(pStem)).FnBasis) - int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom)) { (*fuzzer_stem)(unsafe.Pointer(pStem)).Fn++ if (int32((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom) == 0) || (libc.Xmemcmp(tls, ((*fuzzer_stem)(unsafe.Pointer(pStem)).FzBasis+uintptr((*fuzzer_stem)(unsafe.Pointer(pStem)).Fn)), (*fuzzer_rule)(unsafe.Pointer(pRule)).FzFrom, uint64((*fuzzer_rule)(unsafe.Pointer(pRule)).FnFrom)) == 0) { // Found a rewrite case. Make sure it is not a duplicate var rc int32 = fuzzerSeen(tls, pCur, pStem) if rc < 0 { return -1 } if rc == 0 { fuzzerCost(tls, pStem) return 1 } } } (*fuzzer_stem)(unsafe.Pointer(pStem)).Fn = int8(-1) for ok := true; ok; ok = fuzzerSkipRule(tls, pRule, pStem, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRuleset) != 0 { pRule = (*fuzzer_rule)(unsafe.Pointer(pRule)).FpNext } (*fuzzer_stem)(unsafe.Pointer(pStem)).FpRule = pRule if (pRule != 0) && (fuzzerCost(tls, pStem) > (*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit) { (*fuzzer_stem)(unsafe.Pointer(pStem)).FpRule = uintptr(0) } } return 0 } // The two input stem lists are both sorted in order of increasing // rCostX. Merge them together into a single list, sorted by rCostX, and // return a pointer to the head of that new list. func fuzzerMergeStems(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* fuzzer.c:766:20: */ bp := tls.Alloc(48) defer tls.Free(48) // var head fuzzer_stem at bp, 48 var pTail uintptr pTail = bp /* &head */ for (pA != 0) && (pB != 0) { if (*fuzzer_stem)(unsafe.Pointer(pA)).FrCostX <= (*fuzzer_stem)(unsafe.Pointer(pB)).FrCostX { (*fuzzer_stem)(unsafe.Pointer(pTail)).FpNext = pA pTail = pA pA = (*fuzzer_stem)(unsafe.Pointer(pA)).FpNext } else { (*fuzzer_stem)(unsafe.Pointer(pTail)).FpNext = pB pTail = pB pB = (*fuzzer_stem)(unsafe.Pointer(pB)).FpNext } } if pA == uintptr(0) { (*fuzzer_stem)(unsafe.Pointer(pTail)).FpNext = pB } else { (*fuzzer_stem)(unsafe.Pointer(pTail)).FpNext = pA } return (*fuzzer_stem)(unsafe.Pointer(bp /* &head */)).FpNext } // Load pCur->pStem with the lowest-cost stem. Return a pointer // to the lowest-cost stem. func fuzzerLowestCostStem(tls *libc.TLS, pCur uintptr) uintptr { /* fuzzer.c:794:20: */ var pBest uintptr var pX uintptr var iBest int32 var i int32 if (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem == uintptr(0) { iBest = -1 pBest = uintptr(0) for i = 0; i <= (*fuzzer_cursor)(unsafe.Pointer(pCur)).FmxQueue; i++ { pX = *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8)) if pX == uintptr(0) { continue } if (pBest == uintptr(0)) || ((*fuzzer_stem)(unsafe.Pointer(pBest)).FrCostX > (*fuzzer_stem)(unsafe.Pointer(pX)).FrCostX) { pBest = pX iBest = i } } if pBest != 0 { *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(iBest)*8)) = (*fuzzer_stem)(unsafe.Pointer(pBest)).FpNext (*fuzzer_stem)(unsafe.Pointer(pBest)).FpNext = uintptr(0) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem = pBest } } return (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem } // Insert pNew into queue of pending stems. Then find the stem // with the lowest rCostX and move it into pCur->pStem. // list. The insert is done such the pNew is in the correct order // according to fuzzer_stem.zBaseCost+fuzzer_stem.pRule->rCost. func fuzzerInsert(tls *libc.TLS, pCur uintptr, pNew uintptr) uintptr { /* fuzzer.c:825:20: */ var pX uintptr var i int32 // If pCur->pStem exists and is greater than pNew, then make pNew // the new pCur->pStem and insert the old pCur->pStem instead. if ((libc.AssignUintptr(&pX, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem)) != uintptr(0)) && ((*fuzzer_stem)(unsafe.Pointer(pX)).FrCostX > (*fuzzer_stem)(unsafe.Pointer(pNew)).FrCostX) { (*fuzzer_stem)(unsafe.Pointer(pNew)).FpNext = uintptr(0) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem = pNew pNew = pX } // Insert the new value (*fuzzer_stem)(unsafe.Pointer(pNew)).FpNext = uintptr(0) pX = pNew for i = 0; i <= (*fuzzer_cursor)(unsafe.Pointer(pCur)).FmxQueue; i++ { if *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8)) != 0 { pX = fuzzerMergeStems(tls, pX, *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8)) = pX break } } if i > (*fuzzer_cursor)(unsafe.Pointer(pCur)).FmxQueue { if i < FUZZER_NQUEUE { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FmxQueue = i *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + uintptr(i)*8)) = pX } else { pX = fuzzerMergeStems(tls, pX, *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + 19*8))) *(*uintptr)(unsafe.Pointer((pCur + 48 /* &.aQueue */) + 19*8)) = pX } } return fuzzerLowestCostStem(tls, pCur) } // Allocate a new fuzzer_stem. Add it to the hash table but do not // link it into either the pCur->pStem or pCur->pDone lists. func fuzzerNewStem(tls *libc.TLS, pCur uintptr, zWord uintptr, rBaseCost fuzzer_cost) uintptr { /* fuzzer.c:868:20: */ var pNew uintptr var pRule uintptr var h uint32 pNew = sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(fuzzer_stem{})) + libc.Xstrlen(tls, zWord)) + uint64(1))) if pNew == uintptr(0) { return uintptr(0) } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(fuzzer_stem{}))) (*fuzzer_stem)(unsafe.Pointer(pNew)).FzBasis = (pNew + 1*48) (*fuzzer_stem)(unsafe.Pointer(pNew)).FnBasis = fuzzer_len(libc.Xstrlen(tls, zWord)) libc.Xmemcpy(tls, (*fuzzer_stem)(unsafe.Pointer(pNew)).FzBasis, zWord, (uint64(int32((*fuzzer_stem)(unsafe.Pointer(pNew)).FnBasis) + 1))) pRule = (*fuzzer_vtab)(unsafe.Pointer((*fuzzer_cursor)(unsafe.Pointer(pCur)).FpVtab)).FpRule for fuzzerSkipRule(tls, pRule, pNew, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRuleset) != 0 { pRule = (*fuzzer_rule)(unsafe.Pointer(pRule)).FpNext } (*fuzzer_stem)(unsafe.Pointer(pNew)).FpRule = pRule (*fuzzer_stem)(unsafe.Pointer(pNew)).Fn = int8(-1) (*fuzzer_stem)(unsafe.Pointer(pNew)).FrBaseCost = libc.AssignPtrInt32(pNew+36 /* &.rCostX */, rBaseCost) h = fuzzerHash(tls, (*fuzzer_stem)(unsafe.Pointer(pNew)).FzBasis) (*fuzzer_stem)(unsafe.Pointer(pNew)).FpHash = *(*uintptr)(unsafe.Pointer((pCur + 272 /* &.apHash */) + uintptr(h)*8)) *(*uintptr)(unsafe.Pointer((pCur + 272 /* &.apHash */) + uintptr(h)*8)) = pNew (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnStem++ return pNew } // Advance a cursor to its next row of output func fuzzerNext(tls *libc.TLS, cur uintptr) int32 { /* fuzzer.c:901:12: */ var pCur uintptr = cur var rc int32 var pStem uintptr var pNew uintptr (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRowid++ // Use the element the cursor is currently point to to create // a new stem and insert the new stem into the priority queue. pStem = (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem if (*fuzzer_stem)(unsafe.Pointer(pStem)).FrCostX > 0 { rc = fuzzerRender(tls, pStem, (pCur + 216 /* &.zBuf */), (pCur + 224 /* &.nBuf */)) if rc == SQLITE_NOMEM { return SQLITE_NOMEM } pNew = fuzzerNewStem(tls, pCur, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FzBuf, (*fuzzer_stem)(unsafe.Pointer(pStem)).FrCostX) if pNew != 0 { if fuzzerAdvance(tls, pCur, pNew) == 0 { (*fuzzer_stem)(unsafe.Pointer(pNew)).FpNext = (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpDone (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpDone = pNew } else { if fuzzerInsert(tls, pCur, pNew) == pNew { return SQLITE_OK } } } else { return SQLITE_NOMEM } } // Adjust the priority queue so that the first element of the // stem list is the next lowest cost word. for (libc.AssignUintptr(&pStem, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem)) != uintptr(0) { var res int32 = fuzzerAdvance(tls, pCur, pStem) if res < 0 { return SQLITE_NOMEM } else if res > 0 { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem = uintptr(0) pStem = fuzzerInsert(tls, pCur, pStem) if (libc.AssignInt32(&rc, fuzzerSeen(tls, pCur, pStem))) != 0 { if rc < 0 { return SQLITE_NOMEM } continue } return SQLITE_OK // New word found } (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem = uintptr(0) (*fuzzer_stem)(unsafe.Pointer(pStem)).FpNext = (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpDone (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpDone = pStem if fuzzerLowestCostStem(tls, pCur) != 0 { rc = fuzzerSeen(tls, pCur, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem) if rc < 0 { return SQLITE_NOMEM } if rc == 0 { return SQLITE_OK } } } // Reach this point only if queue has been exhausted and there is // nothing left to be output. (*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit = 0 return SQLITE_OK } // Called to "rewind" a cursor back to the beginning so that // it starts its output over again. Always called at least once // prior to any fuzzerColumn, fuzzerRowid, or fuzzerEof call. func fuzzerFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* fuzzer.c:969:12: */ var pCur uintptr = pVtabCursor var zWord uintptr = ts + 489 /* "" */ var pStem uintptr var idx int32 fuzzerClearCursor(tls, pCur, 1) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit = 2147483647 idx = 0 if (idxNum & 1) != 0 { zWord = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) idx++ } if (idxNum & 2) != 0 { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(idx)*8))) idx++ } if (idxNum & 4) != 0 { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRuleset = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(idx)*8))) idx++ } (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FpNext = (*fuzzer_vtab)(unsafe.Pointer((*fuzzer_cursor)(unsafe.Pointer(pCur)).FpVtab)).FpRule (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FrCost = 0 (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FnFrom = int8(0) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FnTo = int8(0) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FzFrom = ts + 489 /* "" */ (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRowid = int64(1) // If the query term is longer than FUZZER_MX_OUTPUT_LENGTH bytes, this // query will return zero rows. if int32(libc.Xstrlen(tls, zWord)) < FUZZER_MX_OUTPUT_LENGTH { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem = libc.AssignUintptr(&pStem, fuzzerNewStem(tls, pCur, zWord, 0)) if pStem == uintptr(0) { return SQLITE_NOMEM } (*fuzzer_stem)(unsafe.Pointer(pStem)).FpRule = (pCur + 240 /* &.nullRule */) (*fuzzer_stem)(unsafe.Pointer(pStem)).Fn = (*fuzzer_stem)(unsafe.Pointer(pStem)).FnBasis } else { (*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit = 0 } return SQLITE_OK } // Only the word and distance columns have values. All other columns // return NULL func fuzzerColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* fuzzer.c:1020:12: */ var pCur uintptr = cur if i == 0 { // the "word" column if fuzzerRender(tls, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem, (pCur+216 /* &.zBuf */), (pCur+224 /* &.nBuf */)) == SQLITE_NOMEM { return SQLITE_NOMEM } sqlite3.Xsqlite3_result_text(tls, ctx, (*fuzzer_cursor)(unsafe.Pointer(pCur)).FzBuf, -1, libc.UintptrFromInt32(-1)) } else if i == 1 { // the "distance" column sqlite3.Xsqlite3_result_int(tls, ctx, (*fuzzer_stem)(unsafe.Pointer((*fuzzer_cursor)(unsafe.Pointer(pCur)).FpStem)).FrCostX) } else { // All other columns are NULL sqlite3.Xsqlite3_result_null(tls, ctx) } return SQLITE_OK } // The rowid. func fuzzerRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* fuzzer.c:1041:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // When the fuzzer_cursor.rLimit value is 0 or less, that is a signal // that the cursor has nothing more to output. func fuzzerEof(tls *libc.TLS, cur uintptr) int32 { /* fuzzer.c:1051:12: */ var pCur uintptr = cur return (libc.Bool32((*fuzzer_cursor)(unsafe.Pointer(pCur)).FrLimit <= 0)) } // Search for terms of these forms: // // (A) word MATCH $str // (B1) distance < $value // (B2) distance <= $value // (C) ruleid == $ruleid // // The distance< and distance<= are both treated as distance<=. // The query plan number is a bit vector: // // bit 1: Term of the form (A) found // bit 2: Term like (B1) or (B2) found // bit 3: Term like (C) found // // If bit-1 is set, $str is always in filter.argv[0]. If bit-2 is set // then $value is in filter.argv[0] if bit-1 is clear and is in // filter.argv[1] if bit-1 is set. If bit-3 is set, then $ruleid is // in filter.argv[0] if bit-1 and bit-2 are both zero, is in // filter.argv[1] if exactly one of bit-1 and bit-2 are set, and is in // filter.argv[2] if both bit-1 and bit-2 are set. func fuzzerBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* fuzzer.c:1078:12: */ var iPlan int32 = 0 var iDistTerm int32 = -1 var iRulesetTerm int32 = -1 var i int32 var seenMatch int32 = 0 var pConstraint uintptr var rCost float64 = 1e12 pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 0) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH) { seenMatch = 1 } if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { goto __2 } if (((iPlan & 1) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 0)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH) { iPlan = iPlan | (1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) rCost = rCost / (1e6) } if (((iPlan & 2) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 1)) && ((int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LE)) { iPlan = iPlan | (2) iDistTerm = i rCost = rCost / (10.0) } if (((iPlan & 4) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == 2)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (4) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) iRulesetTerm = i rCost = rCost / (10.0) } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if (iPlan & 2) != 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iDistTerm)*8)).FargvIndex = (1 + (libc.Bool32((iPlan & 1) != 0))) } if (iPlan & 4) != 0 { var idx int32 = 1 if (iPlan & 1) != 0 { idx++ } if (iPlan & 2) != 0 { idx++ } (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRulesetTerm)*8)).FargvIndex = idx } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = iPlan if (((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1) && ((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn == 1)) && (int32((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc) == 0) { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } if (seenMatch != 0) && ((iPlan & 1) == 0) { rCost = 1e99 } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = rCost return SQLITE_OK } // A virtual table module that implements the "fuzzer". var fuzzerModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* fuzzer.c:1147:23 */ func sqlite3_fuzzer_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* fuzzer.c:1176:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3.Xsqlite3_create_module(tls, db, ts+5354 /* "fuzzer" */, uintptr(unsafe.Pointer(&fuzzerModule)), uintptr(0)) return rc } // Mark a function parameter as unused, to suppress nuisance compiler // warnings. // Implementation of the ieee754() function func ieee754func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:102:13: */ bp := tls.Alloc(168) defer tls.Free(168) if argc == 1 { var m sqlite3_int64 // var a sqlite3_int64 at bp+40, 8 // var r float64 at bp+24, 8 var e int32 var isNeg int32 // var zResult [100]int8 at bp+48, 100 if (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_BLOB) && (uint64(sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) == uint64(unsafe.Sizeof(float64(0)))) { var x uintptr = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) var i uint32 *(*sqlite3_uint64)(unsafe.Pointer(bp + 32 /* v */)) = uint64(0) for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(float64(0))); i++ { *(*sqlite3_uint64)(unsafe.Pointer(bp + 32 /* v */)) = ((*(*sqlite3_uint64)(unsafe.Pointer(bp + 32 /* v */)) << 8) | sqlite3_uint64(*(*uint8)(unsafe.Pointer(x + uintptr(i))))) } libc.Xmemcpy(tls, bp+24 /* &r */, bp+32 /* &v */, uint64(unsafe.Sizeof(float64(0)))) } else { *(*float64)(unsafe.Pointer(bp + 24 /* r */)) = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) } if *(*float64)(unsafe.Pointer(bp + 24 /* r */)) < 0.0 { isNeg = 1 *(*float64)(unsafe.Pointer(bp + 24 /* r */)) = -*(*float64)(unsafe.Pointer(bp + 24 /* r */)) } else { isNeg = 0 } libc.Xmemcpy(tls, bp+40 /* &a */, bp+24 /* &r */, uint64(unsafe.Sizeof(sqlite3_int64(0)))) if *(*sqlite3_int64)(unsafe.Pointer(bp + 40 /* a */)) == int64(0) { e = 0 m = int64(0) } else { e = (int32(*(*sqlite3_int64)(unsafe.Pointer(bp + 40 /* a */)) >> 52)) m = (*(*sqlite3_int64)(unsafe.Pointer(bp + 40 /* a */)) & ((sqlite3_int64((int64(1))) << 52) - int64(1))) if e == 0 { m <<= 1 } else { m = m | (sqlite3_int64((int64(1))) << 52) } for ((e < 1075) && (m > int64(0))) && ((m & int64(1)) == int64(0)) { m >>= 1 e++ } if isNeg != 0 { m = -m } } switch *(*int32)(unsafe.Pointer(sqlite3.Xsqlite3_user_data(tls, context))) { case 0: sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+48 /* &zResult[0] */, ts+5361, /* "ieee754(%lld,%d)" */ libc.VaList(bp, m, (e-1075))) sqlite3.Xsqlite3_result_text(tls, context, bp+48 /* &zResult[0] */, -1, libc.UintptrFromInt32(-1)) break fallthrough case 1: sqlite3.Xsqlite3_result_int64(tls, context, m) break fallthrough case 2: sqlite3.Xsqlite3_result_int(tls, context, (e - 1075)) break } } else { var m sqlite3_int64 var e sqlite3_int64 // var a sqlite3_int64 at bp+160, 8 // var r float64 at bp+152, 8 var isNeg int32 = 0 m = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) e = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) // Limit the range of e. Ticket 22dea1cfdb9151e4 2021-03-02 if e > int64(10000) { e = int64(10000) } else if e < int64(-10000) { e = int64(-10000) } if m < int64(0) { isNeg = 1 m = -m if m < int64(0) { return } } else if ((m == int64(0)) && (e > int64(-1000))) && (e < int64(1000)) { sqlite3.Xsqlite3_result_double(tls, context, 0.0) return } for ((m >> 32) & int64(0xffe00000)) != 0 { m >>= 1 e++ } for (m != int64(0)) && (((m >> 32) & int64(0xfff00000)) == int64(0)) { m <<= 1 e-- } e = e + (int64(1075)) if e <= int64(0) { // Subnormal m >>= (int64(1) - e) e = int64(0) } else if e > int64(0x7ff) { e = int64(0x7ff) } *(*sqlite3_int64)(unsafe.Pointer(bp + 160 /* a */)) = (m & ((sqlite3_int64((int64(1))) << 52) - int64(1))) *(*sqlite3_int64)(unsafe.Pointer(bp + 160 /* a */)) |= (e << 52) if isNeg != 0 { *(*sqlite3_int64)(unsafe.Pointer(bp + 160 /* a */)) |= libc.Int64FromUint64((sqlite3_uint64((uint64(1))) << 63)) } libc.Xmemcpy(tls, bp+152 /* &r */, bp+160 /* &a */, uint64(unsafe.Sizeof(float64(0)))) sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 152 /* r */))) } } // Functions to convert between blobs and floats. func ieee754func_from_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:213:13: */ bp := tls.Alloc(16) defer tls.Free(16) _ = argc if (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_BLOB) && (uint64(sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) == uint64(unsafe.Sizeof(float64(0)))) { // var r float64 at bp, 8 var x uintptr = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) var i uint32 *(*sqlite3_uint64)(unsafe.Pointer(bp + 8 /* v */)) = uint64(0) for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(float64(0))); i++ { *(*sqlite3_uint64)(unsafe.Pointer(bp + 8 /* v */)) = ((*(*sqlite3_uint64)(unsafe.Pointer(bp + 8 /* v */)) << 8) | sqlite3_uint64(*(*uint8)(unsafe.Pointer(x + uintptr(i))))) } libc.Xmemcpy(tls, bp /* &r */, bp+8 /* &v */, uint64(unsafe.Sizeof(float64(0)))) sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp /* r */))) } } func ieee754func_to_blob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* ieee754.c:233:13: */ bp := tls.Alloc(24) defer tls.Free(24) _ = argc if (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_FLOAT) || (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_INTEGER) { *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) // var v sqlite3_uint64 at bp, 8 // var a [8]uint8 at bp+16, 8 var i uint32 libc.Xmemcpy(tls, bp /* &v */, bp+8 /* &r */, uint64(unsafe.Sizeof(float64(0)))) for i = uint32(1); uint64(i) <= uint64(unsafe.Sizeof(float64(0))); i++ { *(*uint8)(unsafe.Pointer(bp + 16 /* &a[0] */ + uintptr((uint64(unsafe.Sizeof(float64(0))) - uint64(i))))) = (uint8(*(*sqlite3_uint64)(unsafe.Pointer(bp /* v */)) & uint64(0xff))) *(*sqlite3_uint64)(unsafe.Pointer(bp /* v */)) >>= 8 } sqlite3.Xsqlite3_result_blob(tls, context, bp+16 /* &a[0] */, int32(unsafe.Sizeof(float64(0))), libc.UintptrFromInt32(-1)) } } func sqlite3_ieee_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* ieee754.c:259:5: */ var i uint32 var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Unused parameter for i = uint32(0); (uint64(i) < (uint64(unsafe.Sizeof(aFunc1)) / uint64(unsafe.Sizeof(struct { FzFName uintptr FnArg int32 FiAux int32 FxFunc uintptr }{})))) && (rc == SQLITE_OK); i++ { rc = sqlite3.Xsqlite3_create_function(tls, db, aFunc1[i].FzFName, aFunc1[i].FnArg, (SQLITE_UTF8 | SQLITE_INNOCUOUS), (uintptr(unsafe.Pointer(&aFunc1)) + uintptr(i)*24 + 12 /* &.iAux */), aFunc1[i].FxFunc, uintptr(0), uintptr(0)) } return rc } var aFunc1 = [6]struct { FzFName uintptr FnArg int32 FiAux int32 FxFunc uintptr }{ {FzFName: ts + 5378 /* "ieee754" */, FnArg: 1, FxFunc: 0}, {FzFName: ts + 5378 /* "ieee754" */, FnArg: 2, FxFunc: 0}, {FzFName: ts + 5386 /* "ieee754_mantissa" */, FnArg: 1, FiAux: 1, FxFunc: 0}, {FzFName: ts + 5403 /* "ieee754_exponent" */, FnArg: 1, FiAux: 2, FxFunc: 0}, {FzFName: ts + 5420 /* "ieee754_to_blob" */, FnArg: 1, FxFunc: 0}, {FzFName: ts + 5436 /* "ieee754_from_blo..." */, FnArg: 1, FxFunc: 0}, } /* ieee754.c:269:5 */ // // END OF REGISTRATION API // //******* End of fts5.h ******** // This function is used to touch each page of a mapping of a memory // mapped SQLite database. Assuming that the system has sufficient free // memory and supports sufficiently large mappings, this causes the OS // to cache the entire database in main memory, making subsequent // database accesses faster. // // If the second parameter to this function is not NULL, it is the name of // the specific database to operate on (i.e. "main" or the name of an // attached database). // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. // It is not considered an error if the file is not memory-mapped, or if // the mapping does not span the entire file. If an error does occur, a // transaction may be left open on the database file. // // It is illegal to call this function when the database handle has an // open transaction. SQLITE_MISUSE is returned in this case. func sqlite3_mmap_warm(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* mmapwarm.c:37:5: */ bp := tls.Alloc(112) defer tls.Free(112) var rc int32 = SQLITE_OK var zSql uintptr = uintptr(0) var pgsz int32 = 0 var nTotal int32 = 0 if 0 == sqlite3.Xsqlite3_get_autocommit(tls, db) { return SQLITE_MISUSE } // Open a read-only transaction on the file in question zSql = sqlite3.Xsqlite3_mprintf(tls, ts+5454, /* "BEGIN; SELECT * ..." */ libc.VaList(bp, func() uintptr { if zDb != 0 { return ts + 5495 /* "'" */ } return ts + 489 /* "" */ }(), func() uintptr { if zDb != 0 { return zDb } return ts + 489 /* "" */ }(), func() uintptr { if zDb != 0 { return ts + 5497 /* "'." */ } return ts + 489 /* "" */ }())) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) // Find the SQLite page size of the file if rc == SQLITE_OK { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+5500, /* "PRAGMA %s%q%spag..." */ libc.VaList(bp+32, func() uintptr { if zDb != 0 { return ts + 5495 /* "'" */ } return ts + 489 /* "" */ }(), func() uintptr { if zDb != 0 { return zDb } return ts + 489 /* "" */ }(), func() uintptr { if zDb != 0 { return ts + 5497 /* "'." */ } return ts + 489 /* "" */ }())) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { *(*uintptr)(unsafe.Pointer(bp + 88 /* pPgsz */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+88 /* &pPgsz */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc == SQLITE_OK { if sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pPgsz */))) == SQLITE_ROW { pgsz = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pPgsz */)), 0) } rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pPgsz */))) } if (rc == SQLITE_OK) && (pgsz == 0) { rc = SQLITE_ERROR } } } // Touch each mmap'd page of the file if rc == SQLITE_OK { var rc2 int32 *(*uintptr)(unsafe.Pointer(bp + 96 /* pFd */)) = uintptr(0) rc = sqlite3.Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_FILE_POINTER, bp+96 /* &pFd */) if (rc == SQLITE_OK) && ((*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pFd */)))).FpMethods)).FiVersion >= 3) { var iPg sqlite3_int64 = int64(1) var p uintptr = (*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pFd */)))).FpMethods for 1 != 0 { // var pMap uintptr at bp+104, 8 rc = (*(*func(*libc.TLS, uintptr, sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer((p + 136 /* &.xFetch */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pFd */)), (sqlite3_int64(pgsz) * iPg), pgsz, bp+104 /* &pMap */) if (rc != SQLITE_OK) || (*(*uintptr)(unsafe.Pointer(bp + 104 /* pMap */)) == uintptr(0)) { break } nTotal = nTotal + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* pMap */)))))) nTotal = nTotal + (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* pMap */)) + uintptr((pgsz - 1)))))) rc = (*(*func(*libc.TLS, uintptr, sqlite3_int64, uintptr) int32)(unsafe.Pointer((p + 144 /* &.xUnfetch */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pFd */)), (sqlite3_int64(pgsz) * iPg), *(*uintptr)(unsafe.Pointer(bp + 104 /* pMap */))) if rc != SQLITE_OK { break } iPg++ } sqlite3.Xsqlite3_log(tls, SQLITE_OK, ts+5523 /* "sqlite3_mmap_war..." */, libc.VaList(bp+64, func() int64 { if iPg == int64(1) { return int64(0) } return iPg }(), sqlite3.Xsqlite3_db_filename(tls, db, zDb))) } rc2 = sqlite3.Xsqlite3_exec(tls, db, ts+5573 /* "END" */, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = rc2 } } return rc } // A structure to hold context of the next_char() computation across // nested function calls. type nextCharContext1 = struct { Fdb uintptr FpStmt uintptr FzPrefix uintptr FnPrefix int32 FnAlloc int32 FnUsed int32 _ [4]byte FaResult uintptr FmallocFailed int32 FotherError int32 } /* nextchar.c:63:9 */ // A structure to hold context of the next_char() computation across // nested function calls. type nextCharContext = nextCharContext1 /* nextchar.c:63:32 */ // Append a result character if the character is not already in the // result. func nextCharAppend(tls *libc.TLS, p uintptr, c uint32) { /* nextchar.c:80:13: */ var i int32 for i = 0; i < (*nextCharContext)(unsafe.Pointer(p)).FnUsed; i++ { if *(*uint32)(unsafe.Pointer((*nextCharContext)(unsafe.Pointer(p)).FaResult + uintptr(i)*4)) == c { return } } if ((*nextCharContext)(unsafe.Pointer(p)).FnUsed + 1) > (*nextCharContext)(unsafe.Pointer(p)).FnAlloc { var aNew uintptr var n int32 = (((*nextCharContext)(unsafe.Pointer(p)).FnAlloc * 2) + 30) aNew = sqlite3.Xsqlite3_realloc64(tls, (*nextCharContext)(unsafe.Pointer(p)).FaResult, (uint64(n) * uint64(unsafe.Sizeof(uint32(0))))) if aNew == uintptr(0) { (*nextCharContext)(unsafe.Pointer(p)).FmallocFailed = 1 return } else { (*nextCharContext)(unsafe.Pointer(p)).FaResult = aNew (*nextCharContext)(unsafe.Pointer(p)).FnAlloc = n } } *(*uint32)(unsafe.Pointer((*nextCharContext)(unsafe.Pointer(p)).FaResult + uintptr(libc.PostIncInt32(&(*nextCharContext)(unsafe.Pointer(p)).FnUsed, 1))*4)) = c } // Write a character into z[] as UTF8. Return the number of bytes needed // to hold the character func writeUtf8(tls *libc.TLS, z uintptr, c uint32) int32 { /* nextchar.c:104:12: */ if c < uint32(0x00080) { *(*uint8)(unsafe.Pointer(z)) = (uint8(c & uint32(0xff))) return 1 } if c < uint32(0x00800) { *(*uint8)(unsafe.Pointer(z)) = (uint8(0xC0 + int32((uint8((c >> 6) & uint32(0x1F)))))) *(*uint8)(unsafe.Pointer(z + 1)) = (uint8(0x80 + int32((uint8(c & uint32(0x3F)))))) return 2 } if c < uint32(0x10000) { *(*uint8)(unsafe.Pointer(z)) = (uint8(0xE0 + int32((uint8((c >> 12) & uint32(0x0F)))))) *(*uint8)(unsafe.Pointer(z + 1)) = (uint8(0x80 + int32((uint8((c >> 6) & uint32(0x3F)))))) *(*uint8)(unsafe.Pointer(z + 2)) = (uint8(0x80 + int32((uint8(c & uint32(0x3F)))))) return 3 } *(*uint8)(unsafe.Pointer(z)) = (uint8(0xF0 + int32((uint8((c >> 18) & uint32(0x07)))))) *(*uint8)(unsafe.Pointer(z + 1)) = (uint8(0x80 + int32((uint8((c >> 12) & uint32(0x3F)))))) *(*uint8)(unsafe.Pointer(z + 2)) = (uint8(0x80 + int32((uint8((c >> 6) & uint32(0x3F)))))) *(*uint8)(unsafe.Pointer(z + 3)) = (uint8(0x80 + int32((uint8(c & uint32(0x3F)))))) return 4 } // Read a UTF8 character out of z[] and write it into *pOut. Return // the number of bytes in z[] that were used to construct the character. func readUtf8(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* nextchar.c:131:12: */ var c uint32 = uint32(*(*uint8)(unsafe.Pointer(z))) if c < uint32(0xc0) { *(*uint32)(unsafe.Pointer(pOut)) = c return 1 } else { var n int32 = 1 c = uint32(validBits[(c - uint32(0xc0))]) for (int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) & 0xc0) == 0x80 { c = ((c << 6) + (uint32(0x3f & int32(*(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&n, 1)))))))) } if ((c < uint32(0x80)) || ((c & 0xFFFFF800) == uint32(0xD800))) || ((c & 0xFFFFFFFE) == uint32(0xFFFE)) { c = uint32(0xFFFD) } *(*uint32)(unsafe.Pointer(pOut)) = c return n } return int32(0) } var validBits = [64]uint8{ uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x10), uint8(0x11), uint8(0x12), uint8(0x13), uint8(0x14), uint8(0x15), uint8(0x16), uint8(0x17), uint8(0x18), uint8(0x19), uint8(0x1a), uint8(0x1b), uint8(0x1c), uint8(0x1d), uint8(0x1e), uint8(0x1f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), } /* nextchar.c:132:30 */ // The nextCharContext structure has been set up. Add all "next" characters // to the result set. func findNextChars(tls *libc.TLS, p uintptr) { /* nextchar.c:164:13: */ bp := tls.Alloc(12) defer tls.Free(12) var cPrev uint32 = uint32(0) // var zPrev [8]uint8 at bp, 8 var n int32 var rc int32 for { sqlite3.Xsqlite3_bind_text(tls, (*nextCharContext)(unsafe.Pointer(p)).FpStmt, 1, (*nextCharContext)(unsafe.Pointer(p)).FzPrefix, (*nextCharContext)(unsafe.Pointer(p)).FnPrefix, uintptr(0)) n = writeUtf8(tls, bp /* &zPrev[0] */, (cPrev + uint32(1))) sqlite3.Xsqlite3_bind_text(tls, (*nextCharContext)(unsafe.Pointer(p)).FpStmt, 2, bp /* zPrev */, n, uintptr(0)) rc = sqlite3.Xsqlite3_step(tls, (*nextCharContext)(unsafe.Pointer(p)).FpStmt) if rc == SQLITE_DONE { sqlite3.Xsqlite3_reset(tls, (*nextCharContext)(unsafe.Pointer(p)).FpStmt) return } else if rc != SQLITE_ROW { (*nextCharContext)(unsafe.Pointer(p)).FotherError = rc return } else { var zOut uintptr = sqlite3.Xsqlite3_column_text(tls, (*nextCharContext)(unsafe.Pointer(p)).FpStmt, 0) // var cNext uint32 at bp+8, 4 n = readUtf8(tls, (zOut + uintptr((*nextCharContext)(unsafe.Pointer(p)).FnPrefix)), bp+8 /* &cNext */) sqlite3.Xsqlite3_reset(tls, (*nextCharContext)(unsafe.Pointer(p)).FpStmt) nextCharAppend(tls, p, *(*uint32)(unsafe.Pointer(bp + 8 /* cNext */))) cPrev = *(*uint32)(unsafe.Pointer(bp + 8 /* cNext */)) if (*nextCharContext)(unsafe.Pointer(p)).FmallocFailed != 0 { return } } } } // next_character(A,T,F,W) // // Return a string composted of all next possible characters after // A for elements of T.F. If W is supplied, then it is an SQL expression // that limits the elements in T.F that are considered. func nextCharFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* nextchar.c:201:13: */ bp := tls.Alloc(160) defer tls.Free(160) // var c nextCharContext at bp+104, 56 var zTable uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var zField uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) var zWhere uintptr var zCollName uintptr var zWhereClause uintptr = uintptr(0) var zColl uintptr = uintptr(0) var zSql uintptr var rc int32 libc.Xmemset(tls, bp+104 /* &c */, 0, uint64(unsafe.Sizeof(nextCharContext{}))) (*nextCharContext)(unsafe.Pointer(bp + 104 /* &c */)).Fdb = sqlite3.Xsqlite3_context_db_handle(tls, context) (*nextCharContext)(unsafe.Pointer(bp + 104 /* &c */)).FzPrefix = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) (*nextCharContext)(unsafe.Pointer(bp + 104 /* &c */)).FnPrefix = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if ((zTable == uintptr(0)) || (zField == uintptr(0))) || ((*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FzPrefix == uintptr(0)) { return } if ((argc >= 4) && ((libc.AssignUintptr(&zWhere, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))))) != uintptr(0))) && (int32(*(*uint8)(unsafe.Pointer(zWhere))) != 0) { zWhereClause = sqlite3.Xsqlite3_mprintf(tls, ts+5577 /* "AND (%s)" */, libc.VaList(bp, zWhere)) if zWhereClause == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) return } } else { zWhereClause = ts + 489 /* "" */ } if ((argc >= 5) && ((libc.AssignUintptr(&zCollName, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))))) != uintptr(0))) && (int32(*(*uint8)(unsafe.Pointer(zCollName))) != 0) { zColl = sqlite3.Xsqlite3_mprintf(tls, ts+5586 /* "collate \"%w\"" */, libc.VaList(bp+16, zCollName)) if zColl == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) if *(*int8)(unsafe.Pointer(zWhereClause)) != 0 { sqlite3.Xsqlite3_free(tls, zWhereClause) } return } } else { zColl = ts + 489 /* "" */ } zSql = sqlite3.Xsqlite3_mprintf(tls, // 1114111 == 0x10ffff ts+5599, /* "SELECT %s FROM %..." */ libc.VaList(bp+32, zField, zTable, zField, zColl, zField, zColl, zWhereClause, zColl)) if *(*int8)(unsafe.Pointer(zWhereClause)) != 0 { sqlite3.Xsqlite3_free(tls, zWhereClause) } if *(*int8)(unsafe.Pointer(zColl)) != 0 { sqlite3.Xsqlite3_free(tls, zColl) } if zSql == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) return } rc = sqlite3.Xsqlite3_prepare_v2(tls, (*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).Fdb, zSql, -1, (bp + 104 /* &c */ + 8 /* &.pStmt */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc != 0 { sqlite3.Xsqlite3_result_error(tls, context, sqlite3.Xsqlite3_errmsg(tls, (*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).Fdb), -1) return } findNextChars(tls, bp+104 /* &c */) if (*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FmallocFailed != 0 { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else { var pRes uintptr pRes = sqlite3.Xsqlite3_malloc64(tls, (uint64(((*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FnUsed * 4) + 1))) if pRes == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else { var i int32 var n int32 = 0 for i = 0; i < (*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FnUsed; i++ { n = n + (writeUtf8(tls, (pRes + uintptr(n)), *(*uint32)(unsafe.Pointer((*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FaResult + uintptr(i)*4)))) } *(*uint8)(unsafe.Pointer(pRes + uintptr(n))) = uint8(0) sqlite3.Xsqlite3_result_text(tls, context, pRes, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } sqlite3.Xsqlite3_finalize(tls, (*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FpStmt) sqlite3.Xsqlite3_free(tls, (*nextCharContext)(unsafe.Pointer(bp+104 /* &c */)).FaResult) } func sqlite3_nextchar_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* nextchar.c:292:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Unused parameter rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5707 /* "next_char" */, 3, (SQLITE_UTF8 | SQLITE_INNOCUOUS), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{nextCharFunc})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5707 /* "next_char" */, 4, (SQLITE_UTF8 | SQLITE_INNOCUOUS), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{nextCharFunc})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5707 /* "next_char" */, 5, (SQLITE_UTF8 | SQLITE_INNOCUOUS), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{nextCharFunc})), uintptr(0), uintptr(0)) } return rc } // Implementation note: // // Much of the tokenizer logic is copied out of the tokenize.c source file // of SQLite. That logic could be simplified for this particular application, // but that would impose a risk of introducing subtle errors. It is best to // keep the code as close to the original as possible. // // The tokenize code is in sync with the SQLite core as of 2018-01-08. // Any future changes to the core tokenizer might require corresponding // adjustments to the tokenizer logic in this module. // Character classes for tokenizing // // In the sqlite3GetToken() function, a switch() on aiClass[c] is implemented // using a lookup table, whereas a switch() directly on c uses a binary search. // The lookup table is much faster. To maximize speed, and to ensure that // a lookup table is used, all of the classes need to be small integers and // all of them need to be used within the switch. var aiClass = [256]uint8{ // x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf /* 0x */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(7), uint8(7), uint8(27), uint8(7), uint8(7), uint8(27), uint8(27), /* 1x */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 2x */ uint8(7), uint8(15), uint8(8), uint8(5), uint8(4), uint8(22), uint8(24), uint8(8), uint8(17), uint8(18), uint8(21), uint8(20), uint8(23), uint8(11), uint8(26), uint8(16), /* 3x */ uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(5), uint8(19), uint8(12), uint8(14), uint8(13), uint8(6), /* 4x */ uint8(5), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), /* 5x */ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(1), uint8(1), uint8(9), uint8(27), uint8(27), uint8(27), uint8(1), /* 6x */ uint8(8), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), /* 7x */ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(1), uint8(1), uint8(27), uint8(10), uint8(27), uint8(25), uint8(27), /* 8x */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* 9x */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* Ax */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* Bx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* Cx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* Dx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* Ex */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), /* Fx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), } /* normalize.c:106:28 */ // An array to map all upper-case characters into their corresponding // lower-case character. // // SQLite only considers US-ASCII (or EBCDIC) characters. We do not // handle case conversions for the UTF character set since the tables // involved are nearly as big or bigger than SQLite itself. var sqlite3UpperToLower = [256]uint8{ uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), uint8(36), uint8(37), uint8(38), uint8(39), uint8(40), uint8(41), uint8(42), uint8(43), uint8(44), uint8(45), uint8(46), uint8(47), uint8(48), uint8(49), uint8(50), uint8(51), uint8(52), uint8(53), uint8(54), uint8(55), uint8(56), uint8(57), uint8(58), uint8(59), uint8(60), uint8(61), uint8(62), uint8(63), uint8(64), uint8(97), uint8(98), uint8(99), uint8(100), uint8(101), uint8(102), uint8(103), uint8(104), uint8(105), uint8(106), uint8(107), uint8(108), uint8(109), uint8(110), uint8(111), uint8(112), uint8(113), uint8(114), uint8(115), uint8(116), uint8(117), uint8(118), uint8(119), uint8(120), uint8(121), uint8(122), uint8(91), uint8(92), uint8(93), uint8(94), uint8(95), uint8(96), uint8(97), uint8(98), uint8(99), uint8(100), uint8(101), uint8(102), uint8(103), uint8(104), uint8(105), uint8(106), uint8(107), uint8(108), uint8(109), uint8(110), uint8(111), uint8(112), uint8(113), uint8(114), uint8(115), uint8(116), uint8(117), uint8(118), uint8(119), uint8(120), uint8(121), uint8(122), uint8(123), uint8(124), uint8(125), uint8(126), uint8(127), uint8(128), uint8(129), uint8(130), uint8(131), uint8(132), uint8(133), uint8(134), uint8(135), uint8(136), uint8(137), uint8(138), uint8(139), uint8(140), uint8(141), uint8(142), uint8(143), uint8(144), uint8(145), uint8(146), uint8(147), uint8(148), uint8(149), uint8(150), uint8(151), uint8(152), uint8(153), uint8(154), uint8(155), uint8(156), uint8(157), uint8(158), uint8(159), uint8(160), uint8(161), uint8(162), uint8(163), uint8(164), uint8(165), uint8(166), uint8(167), uint8(168), uint8(169), uint8(170), uint8(171), uint8(172), uint8(173), uint8(174), uint8(175), uint8(176), uint8(177), uint8(178), uint8(179), uint8(180), uint8(181), uint8(182), uint8(183), uint8(184), uint8(185), uint8(186), uint8(187), uint8(188), uint8(189), uint8(190), uint8(191), uint8(192), uint8(193), uint8(194), uint8(195), uint8(196), uint8(197), uint8(198), uint8(199), uint8(200), uint8(201), uint8(202), uint8(203), uint8(204), uint8(205), uint8(206), uint8(207), uint8(208), uint8(209), uint8(210), uint8(211), uint8(212), uint8(213), uint8(214), uint8(215), uint8(216), uint8(217), uint8(218), uint8(219), uint8(220), uint8(221), uint8(222), uint8(223), uint8(224), uint8(225), uint8(226), uint8(227), uint8(228), uint8(229), uint8(230), uint8(231), uint8(232), uint8(233), uint8(234), uint8(235), uint8(236), uint8(237), uint8(238), uint8(239), uint8(240), uint8(241), uint8(242), uint8(243), uint8(244), uint8(245), uint8(246), uint8(247), uint8(248), uint8(249), uint8(250), uint8(251), uint8(252), uint8(253), uint8(254), uint8(255), } /* normalize.c:133:28 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: // // isspace() 0x01 // isalpha() 0x02 // isdigit() 0x04 // isalnum() 0x06 // isxdigit() 0x08 // toupper() 0x20 // SQLite identifier character 0x40 // Quote character 0x80 // // Bit 0x20 is set if the mapped character requires translation to upper // case. i.e. if the character is a lower-case ASCII character. // If x is a lower-case ASCII character, then its upper-case equivalent // is (x - 0x20). Therefore toupper() can be implemented as: // // (x & ~(map[x]&0x20)) // // The equivalent of tolower() is implemented using the sqlite3UpperToLower[] // array. tolower() is used more often than toupper() by SQLite. // // Bit 0x40 is set if the character is non-alphanumeric and can be used in an // SQLite identifier. Identifiers are alphanumerics, "_", "$", and any // non-ASCII UTF character. Hence the test for whether or not a character is // part of an identifier is 0x46. var sqlite3CtypeMap = [256]uint8{ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 00..07 ........ uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x00), // 08..0f ........ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 10..17 ........ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 18..1f ........ uint8(0x01), uint8(0x00), uint8(0x80), uint8(0x00), uint8(0x40), uint8(0x00), uint8(0x00), uint8(0x80), // 20..27 !"#$%&' uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 28..2f ()*+,-./ uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), uint8(0x0c), // 30..37 01234567 uint8(0x0c), uint8(0x0c), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 38..3f 89:;<=>? uint8(0x00), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x0a), uint8(0x02), // 40..47 @ABCDEFG uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), // 48..4f HIJKLMNO uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x02), // 50..57 PQRSTUVW uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x80), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x40), // 58..5f XYZ[\]^_ uint8(0x80), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x2a), uint8(0x22), // 60..67 `abcdefg uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), // 68..6f hijklmno uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x22), // 70..77 pqrstuvw uint8(0x22), uint8(0x22), uint8(0x22), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), // 78..7f xyz{|}~. uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 80..87 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 88..8f ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 90..97 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // 98..9f ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // a0..a7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // a8..af ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // b0..b7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // b8..bf ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // c0..c7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // c8..cf ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // d0..d7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // d8..df ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e0..e7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ } /* normalize.c:179:28 */ // If X is a character that can be used in an identifier then // IdChar(X) will be true. Otherwise it is false. // // For ASCII, any character with the high-order bit set is // allowed in an identifier. For 7-bit characters, // sqlite3IsIdChar[X] must be 1. // // For EBCDIC, the rules are more complex but have the same // end result. // // Ticket #1066. the SQL standard does not allow '$' in the // middle of identifiers. But many SQL implementations do. // SQLite will allow '$' in identifiers for compatibility. // But the feature is undocumented. // Ignore testcase() macros // Token values // Disable nuisence warnings about case fall-through // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. func sqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* normalize.c:300:12: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte // of the token. See the comment on the CC_ defines // above. case CC_SPACE: { for i = 1; (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x01) != 0; i++ { } *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE return i } case CC_MINUS: { if int32(*(*uint8)(unsafe.Pointer(z + 1))) == '-' { for i = 2; ((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != 0) && (c != '\n'); i++ { } *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE return i } *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_LP: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_RP: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_SEMI: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_PLUS: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_STAR: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_SLASH: { if (int32(*(*uint8)(unsafe.Pointer(z + 1))) != '*') || (int32(*(*uint8)(unsafe.Pointer(z + 2))) == 0) { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } i = 3 c = int32(*(*uint8)(unsafe.Pointer(z + 2))) for ; ((c != '*') || (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != '/')) && ((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != 0); i++ { } if c != 0 { i++ } *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE return i } case CC_PERCENT: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_EQ: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return (1 + (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(z + 1))) == '='))) } case CC_LT: { if (libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + 1))))) == '=' { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } else if c == '>' { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } else if c == '<' { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } else { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } } fallthrough case CC_GT: { if (libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + 1))))) == '=' { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } else if c == '>' { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } else { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } } fallthrough case CC_BANG: { if int32(*(*uint8)(unsafe.Pointer(z + 1))) != '=' { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR return 1 } else { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } } fallthrough case CC_PIPE: { if int32(*(*uint8)(unsafe.Pointer(z + 1))) != '|' { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } else { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 2 } } fallthrough case CC_COMMA: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_AND: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_TILDA: { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } case CC_QUOTE: { var delim int32 = int32(*(*uint8)(unsafe.Pointer(z))) for i = 1; (libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != 0; i++ { if c == delim { if int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))) == delim { i++ } else { break } } } if c == '\'' { *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL return (i + 1) } else if c != 0 { *(*int32)(unsafe.Pointer(tokenType)) = TK_NAME return (i + 1) } else { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR return i } } fallthrough case CC_DOT: { if !((int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + 1))]) & 0x04) != 0) { *(*int32)(unsafe.Pointer(tokenType)) = TK_PUNCT return 1 } // If the next character is a digit, this is a floating point // number that begins with ".". Fall thru into the next case /* no break */ } fallthrough case CC_DIGIT: { *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL if ((int32(*(*uint8)(unsafe.Pointer(z))) == '0') && ((int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'x') || (int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'X'))) && ((int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + 2))]) & 0x08) != 0) { for i = 3; (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x08) != 0; i++ { } return i } for i = 0; (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x04) != 0; i++ { } if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == '.' { i++ for (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x04) != 0 { i++ } *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL } if ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == 'e') || (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == 'E')) && (((int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))]) & 0x04) != 0) || (((int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))) == '+') || (int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))) == '-')) && ((int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr((i + 2))))]) & 0x04) != 0))) { i = i + (2) for (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x04) != 0 { i++ } *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL } for (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x46) != 0 { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR i++ } return i } case CC_QUOTE2: { i = 1 c = int32(*(*uint8)(unsafe.Pointer(z))) for ; (c != ']') && ((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != 0); i++ { } *(*int32)(unsafe.Pointer(tokenType)) = func() int32 { if c == ']' { return TK_NAME } return TK_ERROR }() return i } case CC_VARNUM: { *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL for i = 1; (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x04) != 0; i++ { } return i } case CC_DOLLAR: fallthrough case CC_VARALPHA: { var n int32 = 0 *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL for i = 1; (libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != 0; i++ { if (int32(sqlite3CtypeMap[uint8(c)]) & 0x46) != 0 { n++ } else if (c == '(') && (n > 0) { for ok := true; ok; ok = ((((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != 0) && !((int32(sqlite3CtypeMap[uint8(c)]) & 0x01) != 0)) && (c != ')')) { i++ } if c == ')' { i++ } else { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR } break } else if (c == ':') && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))) == ':') { i++ } else { break } } if n == 0 { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR } return i } case CC_KYWD: { for i = 1; int32(aiClass[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) <= CC_KYWD; i++ { } if (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x46) != 0 { // This token started out using characters that can appear in keywords, // but z[i] is a character not allowed within keywords, so this must // be an identifier instead i++ break } *(*int32)(unsafe.Pointer(tokenType)) = TK_NAME return i } case CC_X: { if int32(*(*uint8)(unsafe.Pointer(z + 1))) == '\'' { *(*int32)(unsafe.Pointer(tokenType)) = TK_LITERAL for i = 2; (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x08) != 0; i++ { } if (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != '\'') || ((i % 2) != 0) { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR for (*(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != '\'') { i++ } } if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 { i++ } return i } // If it is not a BLOB literal, then it must be an ID, since no // SQL keywords start with the letter 'x'. Fall through /* no break */ } fallthrough case CC_ID: { i = 1 break } default: { *(*int32)(unsafe.Pointer(tokenType)) = TK_ERROR return 1 } } for (int32(sqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i)))]) & 0x46) != 0 { i++ } *(*int32)(unsafe.Pointer(tokenType)) = TK_NAME return i } func sqlite3_normalize(tls *libc.TLS, zSql uintptr) uintptr { /* normalize.c:555:6: */ bp := tls.Alloc(4) defer tls.Free(4) var z uintptr // The output string var nZ sqlite3_int64 // Size of the output string in bytes var nSql sqlite3_int64 // Size of the input string in bytes var i int32 // Next character to read from zSql[] var j int32 // Next slot to fill in on z[] // var tokenType int32 at bp, 4 // Type of the next token var n int32 // Size of the next token var k int32 // Loop counter nSql = sqlite3_int64(libc.Xstrlen(tls, zSql)) nZ = nSql z = sqlite3.Xsqlite3_malloc64(tls, (uint64(nZ + int64(2)))) if z == uintptr(0) { return uintptr(0) } for i = libc.AssignInt32(&j, 0); *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0; i = i + (n) { n = sqlite3GetToken(tls, (zSql + uintptr(i)), bp /* &tokenType */) switch *(*int32)(unsafe.Pointer(bp /* tokenType */)) { case TK_SPACE: { break } case TK_ERROR: { sqlite3.Xsqlite3_free(tls, z) return uintptr(0) } case TK_LITERAL: { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8('?') break } case TK_PUNCT: fallthrough case TK_NAME: { if (n == 4) && (sqlite3.Xsqlite3_strnicmp(tls, (zSql+uintptr(i)), ts+5717 /* "NULL" */, 4) == 0) { if (((j >= 3) && (libc.Xstrncmp(tls, ((z+uintptr(j))-uintptr(2)), ts+5722 /* "is" */, uint64(2)) == 0)) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 3)))))]) & 0x46) != 0)) || (((j >= 4) && (libc.Xstrncmp(tls, ((z+uintptr(j))-uintptr(3)), ts+5725 /* "not" */, uint64(3)) == 0)) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 4)))))]) & 0x46) != 0)) { // NULL is a keyword in this case, not a literal value } else { // Here the NULL is a literal value *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8('?') break } } if ((j > 0) && ((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 1)))))]) & 0x46) != 0)) && ((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zSql + uintptr(i))))]) & 0x46) != 0) { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8(' ') } for k = 0; k < n; k++ { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8(sqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zSql + uintptr((i + k)))))]) } break } } } for (j > 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((j - 1))))) == ' ') { j-- } if (j > 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((j - 1))))) != ';') { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8(';') } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) // Make a second pass converting "in(...)" where the "..." is not a // SELECT statement into "in(?,?,?)" for i = 0; i < j; i = n { var zIn uintptr = libc.Xstrstr(tls, (z + uintptr(i)), ts+5729 /* "in(" */) var nParen int32 if zIn == uintptr(0) { break } n = ((int32((int64(zIn) - int64(z)) / 1)) + 3) // Index of first char past "in(" if (n != 0) && ((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + libc.UintptrFromInt32(-1))))]) & 0x46) != 0) { continue } if (libc.Xstrncmp(tls, zIn, ts+5733 /* "in(select" */, uint64(9)) == 0) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + 9)))]) & 0x46) != 0) { continue } if (libc.Xstrncmp(tls, zIn, ts+5743 /* "in(with" */, uint64(7)) == 0) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + 7)))]) & 0x46) != 0) { continue } nParen = 1 k = 0 for ; *(*int8)(unsafe.Pointer(z + uintptr((n + k)))) != 0; k++ { if int32(*(*int8)(unsafe.Pointer(z + uintptr((n + k))))) == '(' { nParen++ } if int32(*(*int8)(unsafe.Pointer(z + uintptr((n + k))))) == ')' { nParen-- if nParen == 0 { break } } } // k is the number of bytes in the "..." within "in(...)" if k < 5 { z = sqlite3.Xsqlite3_realloc64(tls, z, (uint64((j + (5 - k)) + 1))) if z == uintptr(0) { return uintptr(0) } libc.Xmemmove(tls, ((z + uintptr(n)) + uintptr(5)), ((z + uintptr(n)) + uintptr(k)), (uint64(j - (n + k)))) } else if k > 5 { libc.Xmemmove(tls, ((z + uintptr(n)) + uintptr(5)), ((z + uintptr(n)) + uintptr(k)), (uint64(j - (n + k)))) } j = ((j - k) + 5) *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) libc.Xmemcpy(tls, (z + uintptr(n)), ts+5751 /* "?,?,?" */, uint64(5)) } return z } // For testing purposes, or to build a stand-alone SQL normalizer program, // compile this one source file with the -DSQLITE_NORMALIZE_CLI and link // it against any SQLite library. The resulting command-line program will // run sqlite3_normalize() over the text of all files named on the command- // line and show the result on standard output. // The following object is the session context for a single percentile() // function. We have to remember all input Y values until the very end. // Those values are accumulated in the Percentile.a[] array. type Percentile1 = struct { FnAlloc uint32 FnUsed uint32 FrPct float64 Fa uintptr } /* percentile.c:71:9 */ // The following object is the session context for a single percentile() // function. We have to remember all input Y values until the very end. // Those values are accumulated in the Percentile.a[] array. type Percentile = Percentile1 /* percentile.c:71:27 */ // Return TRUE if the input floating-point number is an infinity. func isInfinity(tls *libc.TLS, r float64) int32 { /* percentile.c:82:12: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = r // var u sqlite3_uint64 at bp, 8 libc.Xmemcpy(tls, bp /* &u */, bp+8 /* &r */, uint64(unsafe.Sizeof(sqlite3_uint64(0)))) return (libc.Bool32(((*(*sqlite3_uint64)(unsafe.Pointer(bp /* u */)) >> 52) & uint64(0x7ff)) == uint64(0x7ff))) } // Return TRUE if two doubles differ by 0.001 or less func sameValue(tls *libc.TLS, a float64, b float64) int32 { /* percentile.c:92:12: */ a = a - (b) return (libc.Bool32((a >= -0.001) && (a <= 0.001))) } // The "step" function for percentile(Y,P) is called once for each // input row. func percentStep(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* percentile.c:101:13: */ var p uintptr var rPct float64 var eType int32 var y float64 // Requirement 3: P must be a number between 0 and 100 eType = sqlite3.Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rPct = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if (((eType != SQLITE_INTEGER) && (eType != SQLITE_FLOAT)) || (rPct < 0.0)) || (rPct > 100.0) { sqlite3.Xsqlite3_result_error(tls, pCtx, ts+5757 /* "2nd argument to ..." */, -1) return } // Allocate the session context. p = sqlite3.Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(Percentile{}))) if p == uintptr(0) { return } // Remember the P value. Throw an error if the P value is different // from any prior row, per Requirement (2). if (*Percentile)(unsafe.Pointer(p)).FrPct == 0.0 { (*Percentile)(unsafe.Pointer(p)).FrPct = (rPct + 1.0) } else if !(sameValue(tls, (*Percentile)(unsafe.Pointer(p)).FrPct, (rPct+1.0)) != 0) { sqlite3.Xsqlite3_result_error(tls, pCtx, ts+5824 /* "2nd argument to ..." */, -1) return } // Ignore rows for which Y is NULL eType = sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) if eType == SQLITE_NULL { return } // If not NULL, then Y must be numeric. Otherwise throw an error. // Requirement 4 if (eType != SQLITE_INTEGER) && (eType != SQLITE_FLOAT) { sqlite3.Xsqlite3_result_error(tls, pCtx, ts+5888 /* "1st argument to ..." */, -1) return } // Throw an error if the Y value is infinity or NaN y = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) if isInfinity(tls, y) != 0 { sqlite3.Xsqlite3_result_error(tls, pCtx, ts+5932 /* "Inf input to per..." */, -1) return } // Allocate and store the Y if (*Percentile)(unsafe.Pointer(p)).FnUsed >= (*Percentile)(unsafe.Pointer(p)).FnAlloc { var n uint32 = (((*Percentile)(unsafe.Pointer(p)).FnAlloc * uint32(2)) + uint32(250)) var a uintptr = sqlite3.Xsqlite3_realloc64(tls, (*Percentile)(unsafe.Pointer(p)).Fa, (uint64(unsafe.Sizeof(float64(0))) * uint64(n))) if a == uintptr(0) { sqlite3.Xsqlite3_free(tls, (*Percentile)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Percentile{}))) sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) return } (*Percentile)(unsafe.Pointer(p)).FnAlloc = n (*Percentile)(unsafe.Pointer(p)).Fa = a } *(*float64)(unsafe.Pointer((*Percentile)(unsafe.Pointer(p)).Fa + uintptr(libc.PostIncUint32(&(*Percentile)(unsafe.Pointer(p)).FnUsed, 1))*8)) = y } // Compare to doubles for sorting using qsort() func doubleCmp(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* percentile.c:170:25: */ var a float64 = *(*float64)(unsafe.Pointer(pA)) var b float64 = *(*float64)(unsafe.Pointer(pB)) if a == b { return 0 } if a < b { return -1 } return +1 } // Called to compute the final output of percentile() and to clean // up all allocated memory. func percentFinal(tls *libc.TLS, pCtx uintptr) { /* percentile.c:182:13: */ var p uintptr var i1 uint32 var i2 uint32 var v1 float64 var v2 float64 var ix float64 var vx float64 p = sqlite3.Xsqlite3_aggregate_context(tls, pCtx, 0) if p == uintptr(0) { return } if (*Percentile)(unsafe.Pointer(p)).Fa == uintptr(0) { return } if (*Percentile)(unsafe.Pointer(p)).FnUsed != 0 { libc.Xqsort(tls, (*Percentile)(unsafe.Pointer(p)).Fa, uint64((*Percentile)(unsafe.Pointer(p)).FnUsed), uint64(unsafe.Sizeof(float64(0))), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{doubleCmp}))) ix = ((((*Percentile)(unsafe.Pointer(p)).FrPct - 1.0) * (float64((*Percentile)(unsafe.Pointer(p)).FnUsed - uint32(1)))) * 0.01) i1 = uint32(ix) if (ix == float64(i1)) || (i1 == ((*Percentile)(unsafe.Pointer(p)).FnUsed - uint32(1))) { i2 = i1 } else { i2 = (i1 + uint32(1)) } v1 = *(*float64)(unsafe.Pointer((*Percentile)(unsafe.Pointer(p)).Fa + uintptr(i1)*8)) v2 = *(*float64)(unsafe.Pointer((*Percentile)(unsafe.Pointer(p)).Fa + uintptr(i2)*8)) vx = (v1 + ((v2 - v1) * (ix - float64(i1)))) sqlite3.Xsqlite3_result_double(tls, pCtx, vx) } sqlite3.Xsqlite3_free(tls, (*Percentile)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Percentile{}))) } func sqlite3_percentile_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* percentile.c:208:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Unused parameter rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5958 /* "percentile" */, 2, (SQLITE_UTF8 | SQLITE_INNOCUOUS), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{percentStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{percentFinal}))) return rc } // Static assertion. Requires support in the compiler. // prefixes_vtab is a subclass of sqlite3_vtab which is // underlying representation of the virtual table type prefixes_vtab1 = struct{ Fbase sqlite3_vtab } /* prefixes.c:33:9 */ // Static assertion. Requires support in the compiler. // prefixes_vtab is a subclass of sqlite3_vtab which is // underlying representation of the virtual table type prefixes_vtab = prefixes_vtab1 /* prefixes.c:33:30 */ // prefixes_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result type prefixes_cursor1 = struct { Fbase sqlite3_vtab_cursor FiRowid sqlite3_int64 FzStr uintptr FnStr int32 _ [4]byte } /* prefixes.c:43:9 */ // prefixes_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result type prefixes_cursor = prefixes_cursor1 /* prefixes.c:43:32 */ // The prefixesConnect() method is invoked to create a new // template virtual table. // // Think of this routine as the constructor for prefixes_vtab objects. // // All this routine needs to do is: // // (1) Allocate the prefixes_vtab object and initialize all fields. // // (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the // result set of queries against the virtual table will look like. func prefixesConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* prefixes.c:64:12: */ var pNew uintptr var rc int32 rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+5969 /* "CREATE TABLE pre..." */) if rc == SQLITE_OK { pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(prefixes_vtab{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(prefixes_vtab{}))) sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) } return rc } // This method is the destructor for prefixes_vtab objects. func prefixesDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* prefixes.c:90:12: */ var p uintptr = pVtab sqlite3.Xsqlite3_free(tls, p) return SQLITE_OK } // Constructor for a new prefixes_cursor object. func prefixesOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* prefixes.c:99:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(prefixes_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(prefixes_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Destructor for a prefixes_cursor. func prefixesClose(tls *libc.TLS, cur uintptr) int32 { /* prefixes.c:111:12: */ var pCur uintptr = cur sqlite3.Xsqlite3_free(tls, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Advance a prefixes_cursor to its next row of output. func prefixesNext(tls *libc.TLS, cur uintptr) int32 { /* prefixes.c:122:12: */ var pCur uintptr = cur (*prefixes_cursor)(unsafe.Pointer(pCur)).FiRowid++ return SQLITE_OK } // Return values of columns for the row at which the prefixes_cursor // is currently pointing. func prefixesColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* prefixes.c:132:12: */ var pCur uintptr = cur switch i { case 0: sqlite3.Xsqlite3_result_text(tls, ctx, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr, ((*prefixes_cursor)(unsafe.Pointer(pCur)).FnStr - int32((*prefixes_cursor)(unsafe.Pointer(pCur)).FiRowid)), uintptr(0)) break default: sqlite3.Xsqlite3_result_text(tls, ctx, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr, (*prefixes_cursor)(unsafe.Pointer(pCur)).FnStr, uintptr(0)) break } return SQLITE_OK } // Return the rowid for the current row. In this implementation, the // rowid is the same as the output value. func prefixesRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* prefixes.c:154:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*prefixes_cursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // Return TRUE if the cursor has been moved off of the last // row of output. func prefixesEof(tls *libc.TLS, cur uintptr) int32 { /* prefixes.c:164:12: */ var pCur uintptr = cur return (libc.Bool32((*prefixes_cursor)(unsafe.Pointer(pCur)).FiRowid > sqlite3_int64((*prefixes_cursor)(unsafe.Pointer(pCur)).FnStr))) } // This method is called to "rewind" the prefixes_cursor object back // to the first row of output. This method is always called at least // once prior to any call to prefixesColumn() or prefixesRowid() or // prefixesEof(). func prefixesFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* prefixes.c:175:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pCur uintptr = pVtabCursor sqlite3.Xsqlite3_free(tls, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr) if argc > 0 { (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))))) (*prefixes_cursor)(unsafe.Pointer(pCur)).FnStr = func() int32 { if (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr != 0 { return int32(libc.Xstrlen(tls, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr)) } return 0 }() } else { (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr = uintptr(0) (*prefixes_cursor)(unsafe.Pointer(pCur)).FnStr = 0 } (*prefixes_cursor)(unsafe.Pointer(pCur)).FiRowid = int64(0) return SQLITE_OK } // SQLite will invoke this method one or more times while planning a query // that uses the virtual table. This routine needs to create // a query plan for each invocation and compute an estimated cost for that // plan. func prefixesBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* prefixes.c:199:12: */ // Search for a usable equality constraint against column 1 // (original_string) and use it if at all possible var i int32 var p uintptr i = 0 p = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if (*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn != 1 { goto __2 } if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) != SQLITE_INDEX_CONSTRAINT_EQ { goto __2 } if !(int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable) != 0) { goto __2 } (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(10) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(10) return SQLITE_OK } goto __2 __2: i++ p += 12 goto __1 goto __3 __3: ; (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1000000000) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(1000000000) return SQLITE_OK } // This following structure defines all the methods for the // virtual table. var prefixesModule = sqlite3_module{ /* xConnect */ FxConnect: 0, /* xBestIndex */ FxBestIndex: 0, /* xDisconnect */ FxDisconnect: 0, /* xOpen */ FxOpen: 0, /* xClose */ FxClose: 0, /* xFilter */ FxFilter: 0, /* xNext */ FxNext: 0, /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, } /* prefixes.c:227:23 */ // This is a copy of the SQLITE_SKIP_UTF8(zIn) macro in sqliteInt.h. // // Assuming zIn points to the first byte of a UTF-8 character, // advance zIn to point to the first byte of the next UTF-8 character. // Implementation of function prefix_length(). This function accepts two // strings as arguments and returns the length in characters (not bytes), // of the longest prefix shared by the two strings. For example: // // prefix_length('abcdxxx', 'abcyy') == 3 // prefix_length('abcdxxx', 'bcyyy') == 0 // prefix_length('abcdxxx', 'ab') == 2 // prefix_length('ab', 'abcd') == 2 // // This function assumes the input is well-formed utf-8. If it is not, // it is possible for this function to return -1. func prefixLengthFunc(tls *libc.TLS, ctx uintptr, nVal int32, apVal uintptr) { /* prefixes.c:279:13: */ var nByte int32 // Number of bytes to compare var nRet int32 = 0 // Return value var zL uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))) var zR uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) var nL int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal))) var nR int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) var i int32 nByte = func() int32 { if nL > nR { return nL } return nR }() for i = 0; i < nByte; i++ { if int32(*(*uint8)(unsafe.Pointer(zL + uintptr(i)))) != int32(*(*uint8)(unsafe.Pointer(zR + uintptr(i)))) { break } if (int32(*(*uint8)(unsafe.Pointer(zL + uintptr(i)))) & 0xC0) != 0x80 { nRet++ } } if (int32(*(*uint8)(unsafe.Pointer(zL + uintptr(i)))) & 0xC0) == 0x80 { nRet-- } sqlite3.Xsqlite3_result_int(tls, ctx, nRet) } func sqlite3_prefixes_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* prefixes.c:305:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3.Xsqlite3_create_module(tls, db, ts+6033 /* "prefixes" */, uintptr(unsafe.Pointer(&prefixesModule)), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6042 /* "prefix_length" */, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{prefixLengthFunc})), uintptr(0), uintptr(0)) } return rc } // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. // // This header file is also used by the loadext.c source file // (part of the main SQLite library - not an extension) so that // it can get access to the sqlite3_api_routines structure // definition. But the main library does not want to redefine // the API. So the redefinition macros are only valid if the // SQLITE_CORE macros is undefined. // This case when the file is being statically linked into the // application // The following #defines change the names of some functions implemented in // this file to prevent name collisions with C-library functions of the // same name. // The end-of-input character // The NFA is implemented as sequence of opcodes taken from the following // set. Each opcode has a single integer argument. // Each opcode is a "state" in the NFA type ReStateNumber = uint16 /* regexp.c:98:24 */ // Because this is an NFA and not a DFA, multiple states can be active at // once. An instance of the following object records all active states in // the NFA. The implementation is optimized for the common case where the // number of actives states is small. type ReStateSet1 = struct { FnState uint32 _ [4]byte FaState uintptr } /* regexp.c:105:9 */ // Because this is an NFA and not a DFA, multiple states can be active at // once. An instance of the following object records all active states in // the NFA. The implementation is optimized for the common case where the // number of actives states is small. type ReStateSet = ReStateSet1 /* regexp.c:108:3 */ // An input string read one character at a time. type ReInput1 = struct { Fz uintptr Fi int32 Fmx int32 } /* regexp.c:112:9 */ // An input string read one character at a time. type ReInput = ReInput1 /* regexp.c:112:24 */ // A compiled NFA (or an NFA that is in the process of being compiled) is // an instance of the following object. type ReCompiled1 = struct { FsIn ReInput FzErr uintptr FaOp uintptr FaArg uintptr FxNextChar uintptr FzInit [12]uint8 FnInit int32 FnState uint32 FnAlloc uint32 } /* regexp.c:122:9 */ // A compiled NFA (or an NFA that is in the process of being compiled) is // an instance of the following object. type ReCompiled = ReCompiled1 /* regexp.c:122:27 */ // Add a state to the given state set if it is not already there func re_add_state(tls *libc.TLS, pSet uintptr, newState int32) { /* regexp.c:136:13: */ var i uint32 for i = uint32(0); i < (*ReStateSet)(unsafe.Pointer(pSet)).FnState; i++ { if int32(*(*ReStateNumber)(unsafe.Pointer((*ReStateSet)(unsafe.Pointer(pSet)).FaState + uintptr(i)*2))) == newState { return } } *(*ReStateNumber)(unsafe.Pointer((*ReStateSet)(unsafe.Pointer(pSet)).FaState + uintptr(libc.PostIncUint32(&(*ReStateSet)(unsafe.Pointer(pSet)).FnState, 1))*2)) = ReStateNumber(newState) } // Extract the next unicode character from *pzIn and return it. Advance // *pzIn to the first byte past the end of the character returned. To // be clear: this routine converts utf8 to unicode. This routine is // optimized for the common case where the next character is a single byte. func re_next_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:147:17: */ var c uint32 if (*ReInput)(unsafe.Pointer(p)).Fi >= (*ReInput)(unsafe.Pointer(p)).Fmx { return uint32(0) } c = uint32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(libc.PostIncInt32(&(*ReInput)(unsafe.Pointer(p)).Fi, 1))))) if c >= uint32(0x80) { if (((c & uint32(0xe0)) == uint32(0xc0)) && ((*ReInput)(unsafe.Pointer(p)).Fi < (*ReInput)(unsafe.Pointer(p)).Fmx)) && ((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr((*ReInput)(unsafe.Pointer(p)).Fi)))) & 0xc0) == 0x80) { c = (((c & uint32(0x1f)) << 6) | (uint32(int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(libc.PostIncInt32(&(*ReInput)(unsafe.Pointer(p)).Fi, 1))))) & 0x3f))) if c < uint32(0x80) { c = uint32(0xfffd) } } else if ((((c & uint32(0xf0)) == uint32(0xe0)) && (((*ReInput)(unsafe.Pointer(p)).Fi + 1) < (*ReInput)(unsafe.Pointer(p)).Fmx)) && ((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr((*ReInput)(unsafe.Pointer(p)).Fi)))) & 0xc0) == 0x80)) && ((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(((*ReInput)(unsafe.Pointer(p)).Fi + 1))))) & 0xc0) == 0x80) { c = ((((c & uint32(0x0f)) << 12) | (uint32((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr((*ReInput)(unsafe.Pointer(p)).Fi)))) & 0x3f) << 6))) | (uint32(int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(((*ReInput)(unsafe.Pointer(p)).Fi + 1))))) & 0x3f))) *(*int32)(unsafe.Pointer(p + 8 /* &.i */)) += (2) if (c <= uint32(0x7ff)) || ((c >= uint32(0xd800)) && (c <= uint32(0xdfff))) { c = uint32(0xfffd) } } else if (((((c & uint32(0xf8)) == uint32(0xf0)) && (((*ReInput)(unsafe.Pointer(p)).Fi + 3) < (*ReInput)(unsafe.Pointer(p)).Fmx)) && ((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr((*ReInput)(unsafe.Pointer(p)).Fi)))) & 0xc0) == 0x80)) && ((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(((*ReInput)(unsafe.Pointer(p)).Fi + 1))))) & 0xc0) == 0x80)) && ((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(((*ReInput)(unsafe.Pointer(p)).Fi + 2))))) & 0xc0) == 0x80) { c = (((((c & uint32(0x07)) << 18) | (uint32((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr((*ReInput)(unsafe.Pointer(p)).Fi)))) & 0x3f) << 12))) | (uint32((int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(((*ReInput)(unsafe.Pointer(p)).Fi + 1))))) & 0x3f) << 6))) | (uint32(int32(*(*uint8)(unsafe.Pointer((*ReInput)(unsafe.Pointer(p)).Fz + uintptr(((*ReInput)(unsafe.Pointer(p)).Fi + 2))))) & 0x3f))) *(*int32)(unsafe.Pointer(p + 8 /* &.i */)) += (3) if (c <= uint32(0xffff)) || (c > uint32(0x10ffff)) { c = uint32(0xfffd) } } else { c = uint32(0xfffd) } } return c } func re_next_char_nocase(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:172:17: */ var c uint32 = re_next_char(tls, p) if (c >= uint32('A')) && (c <= uint32('Z')) { c = c + (uint32('a' - 'A')) } return c } // Return true if c is a perl "word" character: [A-Za-z0-9_] func re_word_char(tls *libc.TLS, c int32) int32 { /* regexp.c:179:12: */ return (libc.Bool32(((((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'z'))) || ((c >= 'A') && (c <= 'Z'))) || (c == '_'))) } // Return true if c is a "digit" character: [0-9] func re_digit_char(tls *libc.TLS, c int32) int32 { /* regexp.c:185:12: */ return (libc.Bool32((c >= '0') && (c <= '9'))) } // Return true if c is a perl "space" character: [ \t\r\n\v\f] func re_space_char(tls *libc.TLS, c int32) int32 { /* regexp.c:190:12: */ return (libc.Bool32((((((c == ' ') || (c == '\t')) || (c == '\n')) || (c == '\r')) || (c == '\v')) || (c == '\f'))) } // Run a compiled regular expression on the zero-terminated input // string zIn[]. Return true on a match and false if there is no match. func sqlite3re_match(tls *libc.TLS, pRe uintptr, zIn uintptr, nIn int32) int32 { /* regexp.c:197:12: */ bp := tls.Alloc(248) defer tls.Free(248) // var aStateSet [2]ReStateSet at bp, 32 var pThis uintptr var pNext uintptr // var aSpace [100]ReStateNumber at bp+32, 200 var pToFree uintptr var i uint32 var iSwap uint32 var c int32 var cPrev int32 var rc int32 // var in ReInput at bp+232, 16 var x uint8 var j int32 var n int32 var hit int32 var x1 int32 i = uint32(0) iSwap = uint32(0) c = (RE_EOF + 1) cPrev = 0 rc = 0 (*ReInput)(unsafe.Pointer(bp + 232 /* &in */)).Fz = zIn (*ReInput)(unsafe.Pointer(bp + 232 /* &in */)).Fi = 0 (*ReInput)(unsafe.Pointer(bp + 232 /* &in */)).Fmx = func() int32 { if nIn >= 0 { return nIn } return int32(libc.Xstrlen(tls, zIn)) }() // Look for the initial prefix match, if there is one. if !((*ReCompiled)(unsafe.Pointer(pRe)).FnInit != 0) { goto __1 } x = *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */))) __2: if !((((*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fi + (*ReCompiled)(unsafe.Pointer(pRe)).FnInit) <= (*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fmx) && ((int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fi)))) != int32(x)) || (libc.Xstrncmp(tls, (zIn+uintptr((*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fi)), pRe+48 /* &.zInit */, uint64((*ReCompiled)(unsafe.Pointer(pRe)).FnInit)) != 0))) { goto __3 } (*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fi++ goto __2 __3: ; if !(((*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fi + (*ReCompiled)(unsafe.Pointer(pRe)).FnInit) > (*ReInput)(unsafe.Pointer(bp+232 /* &in */)).Fmx) { goto __4 } return 0 __4: ; __1: ; if !(uint64((*ReCompiled)(unsafe.Pointer(pRe)).FnState) <= (uint64(unsafe.Sizeof([100]ReStateNumber{})) / (uint64(unsafe.Sizeof(ReStateNumber(0))) * uint64(2)))) { goto __5 } pToFree = uintptr(0) (*ReStateSet)(unsafe.Pointer(bp /* &aStateSet */)).FaState = bp + 32 /* &aSpace[0] */ goto __6 __5: pToFree = sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(ReStateNumber(0))) * uint64(2)) * uint64((*ReCompiled)(unsafe.Pointer(pRe)).FnState))) if !(pToFree == uintptr(0)) { goto __7 } return -1 __7: ; (*ReStateSet)(unsafe.Pointer(bp /* &aStateSet */)).FaState = pToFree __6: ; (*ReStateSet)(unsafe.Pointer(bp /* &aStateSet */ + 1*16)).FaState = ((*ReStateSet)(unsafe.Pointer(bp /* &aStateSet */)).FaState + uintptr((*ReCompiled)(unsafe.Pointer(pRe)).FnState)*2) pNext = (bp /* &aStateSet */ + 1*16) (*ReStateSet)(unsafe.Pointer(pNext)).FnState = uint32(0) re_add_state(tls, pNext, 0) __8: if !((c != RE_EOF) && ((*ReStateSet)(unsafe.Pointer(pNext)).FnState > uint32(0))) { goto __9 } cPrev = c c = int32((*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer((pRe + 40 /* &.xNextChar */))))(tls, bp+232 /* &in */)) pThis = pNext pNext = (bp /* &aStateSet */ + uintptr(iSwap)*16) iSwap = (uint32(1) - iSwap) (*ReStateSet)(unsafe.Pointer(pNext)).FnState = uint32(0) i = uint32(0) __10: if !(i < (*ReStateSet)(unsafe.Pointer(pThis)).FnState) { goto __12 } x1 = int32(*(*ReStateNumber)(unsafe.Pointer((*ReStateSet)(unsafe.Pointer(pThis)).FaState + uintptr(i)*2))) switch int32(*(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaOp + uintptr(x1)))) { case RE_OP_MATCH: goto __14 case RE_OP_ANY: goto __15 case RE_OP_WORD: goto __16 case RE_OP_NOTWORD: goto __17 case RE_OP_DIGIT: goto __18 case RE_OP_NOTDIGIT: goto __19 case RE_OP_SPACE: goto __20 case RE_OP_NOTSPACE: goto __21 case RE_OP_BOUNDARY: goto __22 case RE_OP_ANYSTAR: goto __23 case RE_OP_FORK: goto __24 case RE_OP_GOTO: goto __25 case RE_OP_ACCEPT: goto __26 case RE_OP_CC_INC: goto __27 case RE_OP_CC_EXC: goto __28 } goto __13 __14: if !(*(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr(x1)*4)) == c) { goto __29 } re_add_state(tls, pNext, (x1 + 1)) __29: ; goto __13 __15: re_add_state(tls, pNext, (x1 + 1)) goto __13 __16: if !(re_word_char(tls, c) != 0) { goto __30 } re_add_state(tls, pNext, (x1 + 1)) __30: ; goto __13 __17: if !(!(re_word_char(tls, c) != 0)) { goto __31 } re_add_state(tls, pNext, (x1 + 1)) __31: ; goto __13 __18: if !(re_digit_char(tls, c) != 0) { goto __32 } re_add_state(tls, pNext, (x1 + 1)) __32: ; goto __13 __19: if !(!(re_digit_char(tls, c) != 0)) { goto __33 } re_add_state(tls, pNext, (x1 + 1)) __33: ; goto __13 __20: if !(re_space_char(tls, c) != 0) { goto __34 } re_add_state(tls, pNext, (x1 + 1)) __34: ; goto __13 __21: if !(!(re_space_char(tls, c) != 0)) { goto __35 } re_add_state(tls, pNext, (x1 + 1)) __35: ; goto __13 __22: if !(re_word_char(tls, c) != re_word_char(tls, cPrev)) { goto __36 } re_add_state(tls, pThis, (x1 + 1)) __36: ; goto __13 __23: re_add_state(tls, pNext, x1) re_add_state(tls, pThis, (x1 + 1)) goto __13 __24: re_add_state(tls, pThis, (x1 + *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr(x1)*4)))) re_add_state(tls, pThis, (x1 + 1)) goto __13 __25: re_add_state(tls, pThis, (x1 + *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr(x1)*4)))) goto __13 __26: rc = 1 goto re_match_end __27: __28: j = 1 n = *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr(x1)*4)) hit = 0 j = 1 __37: if !((j > 0) && (j < n)) { goto __39 } if !(int32(*(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaOp + uintptr((x1 + j))))) == RE_OP_CC_VALUE) { goto __40 } if !(*(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr((x1+j))*4)) == c) { goto __42 } hit = 1 j = -1 __42: ; goto __41 __40: if !((*(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr((x1+j))*4)) <= c) && (*(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr(((x1+j)+1))*4)) >= c)) { goto __43 } hit = 1 j = -1 goto __44 __43: j++ __44: ; __41: ; goto __38 __38: j++ goto __37 goto __39 __39: ; if !(int32(*(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaOp + uintptr(x1)))) == RE_OP_CC_EXC) { goto __45 } hit = libc.BoolInt32(!(hit != 0)) __45: ; if !(hit != 0) { goto __46 } re_add_state(tls, pNext, (x1 + n)) __46: ; goto __13 __13: ; goto __11 __11: i++ goto __10 goto __12 __12: ; goto __8 __9: ; i = uint32(0) __47: if !(i < (*ReStateSet)(unsafe.Pointer(pNext)).FnState) { goto __49 } if !(int32(*(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaOp + uintptr(*(*ReStateNumber)(unsafe.Pointer((*ReStateSet)(unsafe.Pointer(pNext)).FaState + uintptr(i)*2)))))) == RE_OP_ACCEPT) { goto __50 } rc = 1 goto __49 __50: ; goto __48 __48: i++ goto __47 goto __49 __49: ; re_match_end: sqlite3.Xsqlite3_free(tls, pToFree) return rc } // Resize the opcode and argument arrays for an RE under construction. func re_resize(tls *libc.TLS, p uintptr, N int32) int32 { /* regexp.c:337:12: */ var aOp uintptr var aArg uintptr aOp = sqlite3.Xsqlite3_realloc64(tls, (*ReCompiled)(unsafe.Pointer(p)).FaOp, (uint64(N) * uint64(unsafe.Sizeof(int8(0))))) if aOp == uintptr(0) { return 1 } (*ReCompiled)(unsafe.Pointer(p)).FaOp = aOp aArg = sqlite3.Xsqlite3_realloc64(tls, (*ReCompiled)(unsafe.Pointer(p)).FaArg, (uint64(N) * uint64(unsafe.Sizeof(int32(0))))) if aArg == uintptr(0) { return 1 } (*ReCompiled)(unsafe.Pointer(p)).FaArg = aArg (*ReCompiled)(unsafe.Pointer(p)).FnAlloc = uint32(N) return 0 } // Insert a new opcode and argument into an RE under construction. The // insertion point is just prior to existing opcode iBefore. func re_insert(tls *libc.TLS, p uintptr, iBefore int32, op int32, arg int32) int32 { /* regexp.c:353:12: */ var i int32 if ((*ReCompiled)(unsafe.Pointer(p)).FnAlloc <= (*ReCompiled)(unsafe.Pointer(p)).FnState) && (re_resize(tls, p, (int32((*ReCompiled)(unsafe.Pointer(p)).FnAlloc*uint32(2)))) != 0) { return 0 } for i = int32((*ReCompiled)(unsafe.Pointer(p)).FnState); i > iBefore; i-- { *(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaOp + uintptr(i))) = *(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaOp + uintptr((i - 1)))) *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr(i)*4)) = *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr((i-1))*4)) } (*ReCompiled)(unsafe.Pointer(p)).FnState++ *(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaOp + uintptr(iBefore))) = int8(op) *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr(iBefore)*4)) = arg return iBefore } // Append a new opcode and argument to the end of the RE under construction. func re_append(tls *libc.TLS, p uintptr, op int32, arg int32) int32 { /* regexp.c:368:12: */ return re_insert(tls, p, int32((*ReCompiled)(unsafe.Pointer(p)).FnState), op, arg) } // Make a copy of N opcodes starting at iStart onto the end of the RE // under construction. func re_copy(tls *libc.TLS, p uintptr, iStart int32, N int32) { /* regexp.c:375:13: */ if (((*ReCompiled)(unsafe.Pointer(p)).FnState + uint32(N)) >= (*ReCompiled)(unsafe.Pointer(p)).FnAlloc) && (re_resize(tls, p, (int32(((*ReCompiled)(unsafe.Pointer(p)).FnAlloc*uint32(2))+uint32(N)))) != 0) { return } libc.Xmemcpy(tls, ((*ReCompiled)(unsafe.Pointer(p)).FaOp + uintptr((*ReCompiled)(unsafe.Pointer(p)).FnState)), ((*ReCompiled)(unsafe.Pointer(p)).FaOp + uintptr(iStart)), (uint64(N) * uint64(unsafe.Sizeof(int8(0))))) libc.Xmemcpy(tls, ((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr((*ReCompiled)(unsafe.Pointer(p)).FnState)*4), ((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr(iStart)*4), (uint64(N) * uint64(unsafe.Sizeof(int32(0))))) *(*uint32)(unsafe.Pointer(p + 64 /* &.nState */)) += (uint32(N)) } // Return true if c is a hexadecimal digit character: [0-9a-fA-F] // If c is a hex digit, also set *pV = (*pV)*16 + valueof(c). If // c is not a hex digit *pV is unchanged. func re_hex(tls *libc.TLS, c int32, pV uintptr) int32 { /* regexp.c:386:12: */ if (c >= '0') && (c <= '9') { c = c - ('0') } else if (c >= 'a') && (c <= 'f') { c = c - ('a' - 10) } else if (c >= 'A') && (c <= 'F') { c = c - ('A' - 10) } else { return 0 } *(*int32)(unsafe.Pointer(pV)) = (((*(*int32)(unsafe.Pointer(pV))) * 16) + (c & 0xff)) return 1 } // A backslash character has been seen, read the next character and // return its interpretation. func re_esc_char(tls *libc.TLS, p uintptr) uint32 { /* regexp.c:403:17: */ bp := tls.Alloc(4) defer tls.Free(4) var i int32 *(*int32)(unsafe.Pointer(bp /* v */)) = 0 var c int8 if (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi >= (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fmx { return uint32(0) } c = int8(*(*uint8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fz + uintptr((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi)))) if (int32(c) == 'u') && (((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi + 4) < (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fmx) { var zIn uintptr = ((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fz + uintptr((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi)) if (((re_hex(tls, int32(*(*uint8)(unsafe.Pointer(zIn + 1))), bp /* &v */) != 0) && (re_hex(tls, int32(*(*uint8)(unsafe.Pointer(zIn + 2))), bp /* &v */) != 0)) && (re_hex(tls, int32(*(*uint8)(unsafe.Pointer(zIn + 3))), bp /* &v */) != 0)) && (re_hex(tls, int32(*(*uint8)(unsafe.Pointer(zIn + 4))), bp /* &v */) != 0) { *(*int32)(unsafe.Pointer(p /* &.sIn */ + 8 /* &.i */)) += (5) return uint32(*(*int32)(unsafe.Pointer(bp /* v */))) } } if (int32(c) == 'x') && (((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi + 2) < (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fmx) { var zIn uintptr = ((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fz + uintptr((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi)) if (re_hex(tls, int32(*(*uint8)(unsafe.Pointer(zIn + 1))), bp /* &v */) != 0) && (re_hex(tls, int32(*(*uint8)(unsafe.Pointer(zIn + 2))), bp /* &v */) != 0) { *(*int32)(unsafe.Pointer(p /* &.sIn */ + 8 /* &.i */)) += (3) return uint32(*(*int32)(unsafe.Pointer(bp /* v */))) } } for i = 0; (zEsc[i] != 0) && (int32(zEsc[i]) != int32(c)); i++ { } if zEsc[i] != 0 { if i < 6 { c = zTrans[i] } (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ } else { (*ReCompiled)(unsafe.Pointer(p)).FzErr = ts + 6056 /* "unknown \\ escape" */ } return uint32(c) } var zEsc = *(*[21]int8)(unsafe.Pointer(ts + 6073 /* "afnrtv\\()*.+?[$^..." */)) /* regexp.c:404:21 */ var zTrans = *(*[7]int8)(unsafe.Pointer(ts + 6094 /* "\a\f\n\r\t\v" */)) /* regexp.c:405:21 */ // Peek at the next byte of input func rePeek(tls *libc.TLS, p uintptr) uint8 { /* regexp.c:444:22: */ if (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi < (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fmx { return *(*uint8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fz + uintptr((*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi))) } return uint8(0) } // Compile RE text into a sequence of opcodes. Continue up to the // first unmatched ")" character, then return. If an error is found, // return a pointer to the error message string. func re_subcompile_re(tls *libc.TLS, p uintptr) uintptr { /* regexp.c:452:19: */ var zErr uintptr var iStart int32 var iEnd int32 var iGoto int32 iStart = int32((*ReCompiled)(unsafe.Pointer(p)).FnState) zErr = re_subcompile_string(tls, p) if zErr != 0 { return zErr } for int32(rePeek(tls, p)) == '|' { iEnd = int32((*ReCompiled)(unsafe.Pointer(p)).FnState) re_insert(tls, p, iStart, RE_OP_FORK, ((iEnd + 2) - iStart)) iGoto = re_append(tls, p, RE_OP_GOTO, 0) (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ zErr = re_subcompile_string(tls, p) if zErr != 0 { return zErr } *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr(iGoto)*4)) = (int32((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iGoto))) } return uintptr(0) } // Compile an element of regular expression text (anything that can be // an operand to the "|" operator). Return NULL on success or a pointer // to the error message if there is a problem. func re_subcompile_string(tls *libc.TLS, p uintptr) uintptr { /* regexp.c:474:19: */ var iPrev int32 = -1 var iStart int32 var c uint32 var zErr uintptr for (libc.AssignUint32(&c, (*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer((p + 40 /* &.xNextChar */))))(tls, (p /* &.sIn */)))) != uint32(0) { iStart = int32((*ReCompiled)(unsafe.Pointer(p)).FnState) switch c { case uint32('|'): fallthrough case uint32('$'): fallthrough case uint32(')'): { (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi-- return uintptr(0) } case uint32('('): { zErr = re_subcompile_re(tls, p) if zErr != 0 { return zErr } if int32(rePeek(tls, p)) != ')' { return ts + 6101 /* "unmatched '('" */ } (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ break } case uint32('.'): { if int32(rePeek(tls, p)) == '*' { re_append(tls, p, RE_OP_ANYSTAR, 0) (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ } else { re_append(tls, p, RE_OP_ANY, 0) } break } case uint32('*'): { if iPrev < 0 { return ts + 6115 /* "'*' without oper..." */ } re_insert(tls, p, iPrev, RE_OP_GOTO, (int32(((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iPrev)) + uint32(1)))) re_append(tls, p, RE_OP_FORK, (int32((uint32(iPrev) - (*ReCompiled)(unsafe.Pointer(p)).FnState) + uint32(1)))) break } case uint32('+'): { if iPrev < 0 { return ts + 6135 /* "'+' without oper..." */ } re_append(tls, p, RE_OP_FORK, (int32(uint32(iPrev) - (*ReCompiled)(unsafe.Pointer(p)).FnState))) break } case uint32('?'): { if iPrev < 0 { return ts + 6155 /* "'?' without oper..." */ } re_insert(tls, p, iPrev, RE_OP_FORK, (int32(((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iPrev)) + uint32(1)))) break } case uint32('{'): { var m int32 = 0 var n int32 = 0 var sz int32 var j int32 if iPrev < 0 { return ts + 6175 /* "'{m,n}' without ..." */ } for ((libc.AssignUint32(&c, uint32(rePeek(tls, p)))) >= uint32('0')) && (c <= uint32('9')) { m = (int32(((uint32(m * 10)) + c) - uint32('0'))) (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ } n = m if c == uint32(',') { (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ n = 0 for ((libc.AssignUint32(&c, uint32(rePeek(tls, p)))) >= uint32('0')) && (c <= uint32('9')) { n = (int32(((uint32(n * 10)) + c) - uint32('0'))) (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ } } if c != uint32('}') { return ts + 6199 /* "unmatched '{'" */ } if (n > 0) && (n < m) { return ts + 6213 /* "n less than m in..." */ } (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ sz = (int32((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iPrev))) if m == 0 { if n == 0 { return ts + 6238 /* "both m and n are..." */ } re_insert(tls, p, iPrev, RE_OP_FORK, (sz + 1)) n-- } else { for j = 1; j < m; j++ { re_copy(tls, p, iPrev, sz) } } for j = m; j < n; j++ { re_append(tls, p, RE_OP_FORK, (sz + 1)) re_copy(tls, p, iPrev, sz) } if (n == 0) && (m > 0) { re_append(tls, p, RE_OP_FORK, -sz) } break } case uint32('['): { var iFirst int32 = int32((*ReCompiled)(unsafe.Pointer(p)).FnState) if int32(rePeek(tls, p)) == '^' { re_append(tls, p, RE_OP_CC_EXC, 0) (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ } else { re_append(tls, p, RE_OP_CC_INC, 0) } for (libc.AssignUint32(&c, (*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer((p + 40 /* &.xNextChar */))))(tls, (p /* &.sIn */)))) != uint32(0) { if (c == uint32('[')) && (int32(rePeek(tls, p)) == ':') { return ts + 6271 /* "POSIX character ..." */ } if c == uint32('\\') { c = re_esc_char(tls, p) } if int32(rePeek(tls, p)) == '-' { re_append(tls, p, RE_OP_CC_RANGE, int32(c)) (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ c = (*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer((p + 40 /* &.xNextChar */))))(tls, (p /* &.sIn */)) if c == uint32('\\') { c = re_esc_char(tls, p) } re_append(tls, p, RE_OP_CC_RANGE, int32(c)) } else { re_append(tls, p, RE_OP_CC_VALUE, int32(c)) } if int32(rePeek(tls, p)) == ']' { (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ break } } if c == uint32(0) { return ts + 6309 /* "unclosed '['" */ } *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr(iFirst)*4)) = (int32((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iFirst))) break } case uint32('\\'): { var specialOp int32 = 0 switch int32(rePeek(tls, p)) { case 'b': specialOp = RE_OP_BOUNDARY break case 'd': specialOp = RE_OP_DIGIT break case 'D': specialOp = RE_OP_NOTDIGIT break case 's': specialOp = RE_OP_SPACE break case 'S': specialOp = RE_OP_NOTSPACE break case 'w': specialOp = RE_OP_WORD break case 'W': specialOp = RE_OP_NOTWORD break } if specialOp != 0 { (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ re_append(tls, p, specialOp, 0) } else { c = re_esc_char(tls, p) re_append(tls, p, RE_OP_MATCH, int32(c)) } break } default: { re_append(tls, p, RE_OP_MATCH, int32(c)) break } } iPrev = iStart } return uintptr(0) } // Free and reclaim all the memory used by a previously compiled // regular expression. Applications should invoke this routine once // for every call to re_compile() to avoid memory leaks. func sqlite3re_free(tls *libc.TLS, pRe uintptr) { /* regexp.c:613:13: */ if pRe != 0 { sqlite3.Xsqlite3_free(tls, (*ReCompiled)(unsafe.Pointer(pRe)).FaOp) sqlite3.Xsqlite3_free(tls, (*ReCompiled)(unsafe.Pointer(pRe)).FaArg) sqlite3.Xsqlite3_free(tls, pRe) } } // Compile a textual regular expression in zIn[] into a compiled regular // expression suitable for us by re_match() and return a pointer to the // compiled regular expression in *ppRe. Return NULL on success or an // error message if something goes wrong. func sqlite3re_compile(tls *libc.TLS, ppRe uintptr, zIn uintptr, noCase int32) uintptr { /* regexp.c:627:19: */ var pRe uintptr var zErr uintptr var i int32 var j int32 *(*uintptr)(unsafe.Pointer(ppRe)) = uintptr(0) pRe = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(ReCompiled{}))) if pRe == uintptr(0) { return ts + 1930 /* "out of memory" */ } libc.Xmemset(tls, pRe, 0, uint64(unsafe.Sizeof(ReCompiled{}))) (*ReCompiled)(unsafe.Pointer(pRe)).FxNextChar = func() uintptr { if noCase != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uint32 }{re_next_char_nocase})) } return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uint32 }{re_next_char})) }() if re_resize(tls, pRe, 30) != 0 { sqlite3re_free(tls, pRe) return ts + 1930 /* "out of memory" */ } if int32(*(*int8)(unsafe.Pointer(zIn))) == '^' { zIn++ } else { re_append(tls, pRe, RE_OP_ANYSTAR, 0) } (*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fz = zIn (*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fi = 0 (*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fmx = int32(libc.Xstrlen(tls, zIn)) zErr = re_subcompile_re(tls, pRe) if zErr != 0 { sqlite3re_free(tls, pRe) return zErr } if (int32(rePeek(tls, pRe)) == '$') && (((*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fi + 1) >= (*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fmx) { re_append(tls, pRe, RE_OP_MATCH, RE_EOF) re_append(tls, pRe, RE_OP_ACCEPT, 0) *(*uintptr)(unsafe.Pointer(ppRe)) = pRe } else if (*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fi >= (*ReCompiled)(unsafe.Pointer(pRe)).FsIn.Fmx { re_append(tls, pRe, RE_OP_ACCEPT, 0) *(*uintptr)(unsafe.Pointer(ppRe)) = pRe } else { sqlite3re_free(tls, pRe) return ts + 6322 /* "unrecognized cha..." */ } // The following is a performance optimization. If the regex begins with // ".*" (if the input regex lacks an initial "^") and afterwards there are // one or more matching characters, enter those matching characters into // zInit[]. The re_match() routine can then search ahead in the input // string looking for the initial match without having to run the whole // regex engine over the string. Do not worry able trying to match // unicode characters beyond plane 0 - those are very rare and this is // just an optimization. if int32(*(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaOp))) == RE_OP_ANYSTAR { j = 0 i = 1 for ; (uint64(j) < (uint64(unsafe.Sizeof([12]uint8{})) - uint64(2))) && (int32(*(*int8)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaOp + uintptr(i)))) == RE_OP_MATCH); i++ { var x uint32 = uint32(*(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(pRe)).FaArg + uintptr(i)*4))) if x <= uint32(127) { *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr(libc.PostIncInt32(&j, 1)))) = uint8(x) } else if x <= uint32(0xfff) { *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr(libc.PostIncInt32(&j, 1)))) = (uint8(uint32(0xc0) | (x >> 6))) *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr(libc.PostIncInt32(&j, 1)))) = (uint8(uint32(0x80) | (x & uint32(0x3f)))) } else if x <= uint32(0xffff) { *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr(libc.PostIncInt32(&j, 1)))) = (uint8(uint32(0xd0) | (x >> 12))) *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr(libc.PostIncInt32(&j, 1)))) = (uint8(uint32(0x80) | ((x >> 6) & uint32(0x3f)))) *(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr(libc.PostIncInt32(&j, 1)))) = (uint8(uint32(0x80) | (x & uint32(0x3f)))) } else { break } } if (j > 0) && (int32(*(*uint8)(unsafe.Pointer((pRe + 48 /* &.zInit */) + uintptr((j - 1))))) == 0) { j-- } (*ReCompiled)(unsafe.Pointer(pRe)).FnInit = j } return (*ReCompiled)(unsafe.Pointer(pRe)).FzErr } // Implementation of the regexp() SQL function. This function implements // the build-in REGEXP operator. The first argument to the function is the // pattern and the second argument is the string. So, the SQL statements: // // A REGEXP B // // is implemented as regexp(B,A). func re_sql_func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* regexp.c:707:13: */ bp := tls.Alloc(8) defer tls.Free(8) // var pRe uintptr at bp, 8 // Compiled regular expression var zPattern uintptr // The regular expression var zStr uintptr // String being searched var zErr uintptr // Compile error message var setAux int32 = 0 // True to invoke sqlite3_set_auxdata() *(*uintptr)(unsafe.Pointer(bp /* pRe */)) = sqlite3.Xsqlite3_get_auxdata(tls, context, 0) if *(*uintptr)(unsafe.Pointer(bp /* pRe */)) == uintptr(0) { zPattern = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zPattern == uintptr(0) { return } zErr = sqlite3re_compile(tls, bp /* &pRe */, zPattern, 0) if zErr != 0 { sqlite3re_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pRe */))) sqlite3.Xsqlite3_result_error(tls, context, zErr, -1) return } if *(*uintptr)(unsafe.Pointer(bp /* pRe */)) == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) return } setAux = 1 } zStr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if zStr != uintptr(0) { sqlite3.Xsqlite3_result_int(tls, context, sqlite3re_match(tls, *(*uintptr)(unsafe.Pointer(bp /* pRe */)), zStr, -1)) } if setAux != 0 { sqlite3.Xsqlite3_set_auxdata(tls, context, 0, *(*uintptr)(unsafe.Pointer(bp /* pRe */)), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3re_free}))) } } // Invoke this routine to register the regexp() function with the // SQLite database connection. func sqlite3_regexp_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* regexp.c:750:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6345 /* "regexp" */, 2, (SQLITE_UTF8 | SQLITE_INNOCUOUS), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{re_sql_func})), uintptr(0), uintptr(0)) return rc } // Static assertion. Requires support in the compiler. // remember(V,PTR) // // Return the integer value V. Also save the value of V in a // C-language variable whose address is PTR. func rememberFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* remember.c:45:13: */ var v sqlite3_int64 var ptr uintptr v = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) ptr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), ts+3931 /* "carray" */) if ptr != 0 { *(*sqlite3_int64)(unsafe.Pointer(ptr)) = v } sqlite3.Xsqlite3_result_int64(tls, pCtx, v) } func sqlite3_remember_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* remember.c:62:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6352 /* "remember" */, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rememberFunc})), uintptr(0), uintptr(0)) return rc } // series_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result type series_cursor1 = struct { Fbase sqlite3_vtab_cursor FisDesc int32 _ [4]byte FiRowid sqlite3_int64 FiValue sqlite3_int64 FmnValue sqlite3_int64 FmxValue sqlite3_int64 FiStep sqlite3_int64 } /* series.c:83:9 */ // series_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans // over rows of the result type series_cursor = series_cursor1 /* series.c:83:30 */ // The seriesConnect() method is invoked to create a new // series_vtab that describes the generate_series virtual table. // // Think of this routine as the constructor for series_vtab objects. // // All this routine needs to do is: // // (1) Allocate the series_vtab object and initialize all fields. // // (2) Tell SQLite (via the sqlite3_declare_vtab() interface) what the // result set of queries against generate_series will look like. func seriesConnect(tls *libc.TLS, db uintptr, pUnused uintptr, argcUnused int32, argvUnused uintptr, ppVtab uintptr, pzErrUnused uintptr) int32 { /* series.c:107:12: */ var pNew uintptr var rc int32 // Column numbers _ = pUnused _ = argcUnused _ = argvUnused _ = pzErrUnused rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+6361 /* "CREATE TABLE x(v..." */) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vtab{})))) if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(sqlite3_vtab{}))) sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) } return rc } // This method is the destructor for series_cursor objects. func seriesDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* series.c:141:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // Constructor for a new series_cursor object. func seriesOpen(tls *libc.TLS, pUnused uintptr, ppCursor uintptr) int32 { /* series.c:149:12: */ var pCur uintptr _ = pUnused pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(series_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(series_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Destructor for a series_cursor. func seriesClose(tls *libc.TLS, cur uintptr) int32 { /* series.c:162:12: */ sqlite3.Xsqlite3_free(tls, cur) return SQLITE_OK } // Advance a series_cursor to its next row of output. func seriesNext(tls *libc.TLS, cur uintptr) int32 { /* series.c:171:12: */ var pCur uintptr = cur if (*series_cursor)(unsafe.Pointer(pCur)).FisDesc != 0 { *(*sqlite3_int64)(unsafe.Pointer(pCur + 24 /* &.iValue */)) -= ((*series_cursor)(unsafe.Pointer(pCur)).FiStep) } else { *(*sqlite3_int64)(unsafe.Pointer(pCur + 24 /* &.iValue */)) += ((*series_cursor)(unsafe.Pointer(pCur)).FiStep) } (*series_cursor)(unsafe.Pointer(pCur)).FiRowid++ return SQLITE_OK } // Return values of columns for the row at which the series_cursor // is currently pointing. func seriesColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* series.c:186:12: */ var pCur uintptr = cur var x sqlite3_int64 = int64(0) switch i { case SERIES_COLUMN_START: x = (*series_cursor)(unsafe.Pointer(pCur)).FmnValue break case SERIES_COLUMN_STOP: x = (*series_cursor)(unsafe.Pointer(pCur)).FmxValue break case SERIES_COLUMN_STEP: x = (*series_cursor)(unsafe.Pointer(pCur)).FiStep break default: x = (*series_cursor)(unsafe.Pointer(pCur)).FiValue break } sqlite3.Xsqlite3_result_int64(tls, ctx, x) return SQLITE_OK } // Return the rowid for the current row. In this implementation, the // first row returned is assigned rowid value 1, and each subsequent // row a value 1 more than that of the previous. func seriesRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* series.c:208:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*series_cursor)(unsafe.Pointer(pCur)).FiRowid return SQLITE_OK } // Return TRUE if the cursor has been moved off of the last // row of output. func seriesEof(tls *libc.TLS, cur uintptr) int32 { /* series.c:218:12: */ var pCur uintptr = cur if (*series_cursor)(unsafe.Pointer(pCur)).FisDesc != 0 { return (libc.Bool32((*series_cursor)(unsafe.Pointer(pCur)).FiValue < (*series_cursor)(unsafe.Pointer(pCur)).FmnValue)) } else { return (libc.Bool32((*series_cursor)(unsafe.Pointer(pCur)).FiValue > (*series_cursor)(unsafe.Pointer(pCur)).FmxValue)) } return int32(0) } // True to cause run-time checking of the start=, stop=, and/or step= // parameters. The only reason to do this is for testing the // constraint checking logic for virtual tables in the SQLite core. // This method is called to "rewind" the series_cursor object back // to the first row of output. This method is always called at least // once prior to any call to seriesColumn() or seriesRowid() or // seriesEof(). // // The query plan selected by seriesBestIndex is passed in the idxNum // parameter. (idxStr is not used in this implementation.) idxNum // is a bitmask showing which constraints are available: // // 1: start=VALUE // 2: stop=VALUE // 4: step=VALUE // // Also, if bit 8 is set, that means that the series should be output // in descending order rather than in ascending order. If bit 16 is // set, then output must appear in ascending order. // // This routine should initialize the cursor and position it so that it // is pointing at the first row, or pointing off the end of the table // (so that seriesEof() will return true) if the table is empty. func seriesFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStrUnused uintptr, argc int32, argv uintptr) int32 { /* series.c:257:12: */ var pCur uintptr = pVtabCursor var i int32 = 0 _ = idxStrUnused if (idxNum & 1) != 0 { (*series_cursor)(unsafe.Pointer(pCur)).FmnValue = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&i, 1))*8))) } else { (*series_cursor)(unsafe.Pointer(pCur)).FmnValue = int64(0) } if (idxNum & 2) != 0 { (*series_cursor)(unsafe.Pointer(pCur)).FmxValue = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&i, 1))*8))) } else { (*series_cursor)(unsafe.Pointer(pCur)).FmxValue = int64(0xffffffff) } if (idxNum & 4) != 0 { (*series_cursor)(unsafe.Pointer(pCur)).FiStep = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&i, 1))*8))) if (*series_cursor)(unsafe.Pointer(pCur)).FiStep == int64(0) { (*series_cursor)(unsafe.Pointer(pCur)).FiStep = int64(1) } else if (*series_cursor)(unsafe.Pointer(pCur)).FiStep < int64(0) { (*series_cursor)(unsafe.Pointer(pCur)).FiStep = -(*series_cursor)(unsafe.Pointer(pCur)).FiStep if (idxNum & 16) == 0 { idxNum = idxNum | (8) } } } else { (*series_cursor)(unsafe.Pointer(pCur)).FiStep = int64(1) } for i = 0; i < argc; i++ { if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) == SQLITE_NULL { // If any of the constraints have a NULL value, then return no rows. // See ticket https://www.sqlite.org/src/info/fac496b61722daf2 (*series_cursor)(unsafe.Pointer(pCur)).FmnValue = int64(1) (*series_cursor)(unsafe.Pointer(pCur)).FmxValue = int64(0) break } } if (idxNum & 8) != 0 { (*series_cursor)(unsafe.Pointer(pCur)).FisDesc = 1 (*series_cursor)(unsafe.Pointer(pCur)).FiValue = (*series_cursor)(unsafe.Pointer(pCur)).FmxValue if (*series_cursor)(unsafe.Pointer(pCur)).FiStep > int64(0) { *(*sqlite3_int64)(unsafe.Pointer(pCur + 24 /* &.iValue */)) -= (((*series_cursor)(unsafe.Pointer(pCur)).FmxValue - (*series_cursor)(unsafe.Pointer(pCur)).FmnValue) % (*series_cursor)(unsafe.Pointer(pCur)).FiStep) } } else { (*series_cursor)(unsafe.Pointer(pCur)).FisDesc = 0 (*series_cursor)(unsafe.Pointer(pCur)).FiValue = (*series_cursor)(unsafe.Pointer(pCur)).FmnValue } (*series_cursor)(unsafe.Pointer(pCur)).FiRowid = int64(1) return SQLITE_OK } // SQLite will invoke this method one or more times while planning a query // that uses the generate_series virtual table. This routine needs to create // a query plan for each invocation and compute an estimated cost for that // plan. // // In this implementation idxNum is used to represent the // query plan. idxStr is unused. // // The query plan is represented by bits in idxNum: // // (1) start = $value -- constraint exists // (2) stop = $value -- constraint exists // (4) step = $value -- constraint exists // (8) output in descending order func seriesBestIndex(tls *libc.TLS, tabUnused uintptr, pIdxInfo uintptr) int32 { /* series.c:325:12: */ bp := tls.Alloc(12) defer tls.Free(12) var i int32 var j int32 // Loop over constraints var idxNum int32 = 0 // The query plan bitmask var unusableMask int32 = 0 // Mask of unusable constraints var nArg int32 = 0 // Number of arguments that seriesFilter() expects // var aIdx [3]int32 at bp, 12 // Constraints on start, stop, and step var pConstraint uintptr // This implementation assumes that the start, stop, and step columns // are the last three columns in the virtual table. _ = tabUnused *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */)) = libc.AssignPtrInt32(bp /* &aIdx */ +1*4, libc.AssignPtrInt32(bp /* &aIdx */ +2*4, -1)) pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { var iCol int32 // 0 for start, 1 for stop, 2 for step var iMask int32 // bitmask for those column if (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn < SERIES_COLUMN_START { goto __2 } iCol = ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn - SERIES_COLUMN_START) iMask = (int32(1) << iCol) if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { unusableMask = unusableMask | (iMask) goto __2 } else if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { idxNum = idxNum | (iMask) *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */ + uintptr(iCol)*4)) = i } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; for i = 0; i < 3; i++ { if (libc.AssignInt32(&j, *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */ + uintptr(i)*4)))) >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).FargvIndex = libc.PreIncInt32(&nArg, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = libc.BoolUint8(!(1 != 0)) } } if (unusableMask & ^idxNum) != 0 { // The start, stop, and step columns are inputs. Therefore if there // are unusable constraints on any of start, stop, or step then // this plan is unusable return SQLITE_CONSTRAINT } if (idxNum & 3) == 3 { // Both start= and stop= boundaries are available. This is the // the preferred case (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = (float64(2 - (libc.Bool32((idxNum & 4) != 0)))) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(1000) if (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1 { if (*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc != 0 { idxNum = idxNum | (8) } else { idxNum = idxNum | (16) } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } } else { // If either boundary is missing, we have to generate a huge span // of numbers. Make this case very expensive so that the query // planner will work hard to avoid it. (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(2147483647) } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum return SQLITE_OK } // This following structure defines all the methods for the // generate_series virtual table. var seriesModule = sqlite3_module{ // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName } /* series.c:397:23 */ func sqlite3_series_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* series.c:429:5: */ var rc int32 = SQLITE_OK _ = pApi if sqlite3.Xsqlite3_libversion_number(tls) < 3008012 { *(*uintptr)(unsafe.Pointer(pzErrMsg)) = sqlite3.Xsqlite3_mprintf(tls, ts+6420 /* "generate_series(..." */, 0) return SQLITE_ERROR } rc = sqlite3.Xsqlite3_create_module(tls, db, ts+6470 /* "generate_series" */, uintptr(unsafe.Pointer(&seriesModule)), uintptr(0)) return rc } type u16 = uint16 /* spellfix.c:34:26 */ // Character classes for ASCII characters: // // 0 '' Silent letters: H W // 1 'A' Any vowel: A E I O U (Y) // 2 'B' A bilabeal stop or fricative: B F P V W // 3 'C' Other fricatives or back stops: C G J K Q S X Z // 4 'D' Alveolar stops: D T // 5 'H' Letter H at the beginning of a word // 6 'L' Glide: L // 7 'R' Semivowel: R // 8 'M' Nasals: M N // 9 'Y' Letter Y at the beginning of a word. // 10 '9' Digits: 0 1 2 3 4 5 6 7 8 9 // 11 ' ' White space // 12 '?' Other. // The following table gives the character class for non-initial ASCII // characters. var midClass = [128]uint8{ /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_SPACE) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_SPACE) /* */, uint8(CCLASS_SPACE) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_SPACE), /* ! */ uint8(CCLASS_OTHER) /* " */, uint8(CCLASS_OTHER) /* # */, uint8(CCLASS_OTHER), /* $ */ uint8(CCLASS_OTHER) /* % */, uint8(CCLASS_OTHER) /* & */, uint8(CCLASS_OTHER), /* ' */ uint8(CCLASS_SILENT) /* ( */, uint8(CCLASS_OTHER) /* ) */, uint8(CCLASS_OTHER), /* * */ uint8(CCLASS_OTHER) /* + */, uint8(CCLASS_OTHER) /* , */, uint8(CCLASS_OTHER), /* - */ uint8(CCLASS_OTHER) /* . */, uint8(CCLASS_OTHER) /* / */, uint8(CCLASS_OTHER), /* 0 */ uint8(CCLASS_DIGIT) /* 1 */, uint8(CCLASS_DIGIT) /* 2 */, uint8(CCLASS_DIGIT), /* 3 */ uint8(CCLASS_DIGIT) /* 4 */, uint8(CCLASS_DIGIT) /* 5 */, uint8(CCLASS_DIGIT), /* 6 */ uint8(CCLASS_DIGIT) /* 7 */, uint8(CCLASS_DIGIT) /* 8 */, uint8(CCLASS_DIGIT), /* 9 */ uint8(CCLASS_DIGIT) /* : */, uint8(CCLASS_OTHER) /* ; */, uint8(CCLASS_OTHER), /* < */ uint8(CCLASS_OTHER) /* = */, uint8(CCLASS_OTHER) /* > */, uint8(CCLASS_OTHER), /* ? */ uint8(CCLASS_OTHER) /* @ */, uint8(CCLASS_OTHER) /* A */, uint8(CCLASS_VOWEL), /* B */ uint8(CCLASS_B) /* C */, uint8(CCLASS_C) /* D */, uint8(CCLASS_D), /* E */ uint8(CCLASS_VOWEL) /* F */, uint8(CCLASS_B) /* G */, uint8(CCLASS_C), /* H */ uint8(CCLASS_SILENT) /* I */, uint8(CCLASS_VOWEL) /* J */, uint8(CCLASS_C), /* K */ uint8(CCLASS_C) /* L */, uint8(CCLASS_L) /* M */, uint8(CCLASS_M), /* N */ uint8(CCLASS_M) /* O */, uint8(CCLASS_VOWEL) /* P */, uint8(CCLASS_B), /* Q */ uint8(CCLASS_C) /* R */, uint8(CCLASS_R) /* S */, uint8(CCLASS_C), /* T */ uint8(CCLASS_D) /* U */, uint8(CCLASS_VOWEL) /* V */, uint8(CCLASS_B), /* W */ uint8(CCLASS_B) /* X */, uint8(CCLASS_C) /* Y */, uint8(CCLASS_VOWEL), /* Z */ uint8(CCLASS_C) /* [ */, uint8(CCLASS_OTHER) /* \ */, uint8(CCLASS_OTHER), /* ] */ uint8(CCLASS_OTHER) /* ^ */, uint8(CCLASS_OTHER) /* _ */, uint8(CCLASS_OTHER), /* ` */ uint8(CCLASS_OTHER) /* a */, uint8(CCLASS_VOWEL) /* b */, uint8(CCLASS_B), /* c */ uint8(CCLASS_C) /* d */, uint8(CCLASS_D) /* e */, uint8(CCLASS_VOWEL), /* f */ uint8(CCLASS_B) /* g */, uint8(CCLASS_C) /* h */, uint8(CCLASS_SILENT), /* i */ uint8(CCLASS_VOWEL) /* j */, uint8(CCLASS_C) /* k */, uint8(CCLASS_C), /* l */ uint8(CCLASS_L) /* m */, uint8(CCLASS_M) /* n */, uint8(CCLASS_M), /* o */ uint8(CCLASS_VOWEL) /* p */, uint8(CCLASS_B) /* q */, uint8(CCLASS_C), /* r */ uint8(CCLASS_R) /* s */, uint8(CCLASS_C) /* t */, uint8(CCLASS_D), /* u */ uint8(CCLASS_VOWEL) /* v */, uint8(CCLASS_B) /* w */, uint8(CCLASS_B), /* x */ uint8(CCLASS_C) /* y */, uint8(CCLASS_VOWEL) /* z */, uint8(CCLASS_C), /* { */ uint8(CCLASS_OTHER) /* | */, uint8(CCLASS_OTHER) /* } */, uint8(CCLASS_OTHER), /* ~ */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), } /* spellfix.c:75:28 */ // This tables gives the character class for ASCII characters that form the // initial character of a word. The only difference from midClass is with // the letters H, W, and Y. var initClass = [128]uint8{ /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_SPACE) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_SPACE) /* */, uint8(CCLASS_SPACE) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), /* */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER) /* */, uint8(CCLASS_SPACE), /* ! */ uint8(CCLASS_OTHER) /* " */, uint8(CCLASS_OTHER) /* # */, uint8(CCLASS_OTHER), /* $ */ uint8(CCLASS_OTHER) /* % */, uint8(CCLASS_OTHER) /* & */, uint8(CCLASS_OTHER), /* ' */ uint8(CCLASS_OTHER) /* ( */, uint8(CCLASS_OTHER) /* ) */, uint8(CCLASS_OTHER), /* * */ uint8(CCLASS_OTHER) /* + */, uint8(CCLASS_OTHER) /* , */, uint8(CCLASS_OTHER), /* - */ uint8(CCLASS_OTHER) /* . */, uint8(CCLASS_OTHER) /* / */, uint8(CCLASS_OTHER), /* 0 */ uint8(CCLASS_DIGIT) /* 1 */, uint8(CCLASS_DIGIT) /* 2 */, uint8(CCLASS_DIGIT), /* 3 */ uint8(CCLASS_DIGIT) /* 4 */, uint8(CCLASS_DIGIT) /* 5 */, uint8(CCLASS_DIGIT), /* 6 */ uint8(CCLASS_DIGIT) /* 7 */, uint8(CCLASS_DIGIT) /* 8 */, uint8(CCLASS_DIGIT), /* 9 */ uint8(CCLASS_DIGIT) /* : */, uint8(CCLASS_OTHER) /* ; */, uint8(CCLASS_OTHER), /* < */ uint8(CCLASS_OTHER) /* = */, uint8(CCLASS_OTHER) /* > */, uint8(CCLASS_OTHER), /* ? */ uint8(CCLASS_OTHER) /* @ */, uint8(CCLASS_OTHER) /* A */, uint8(CCLASS_VOWEL), /* B */ uint8(CCLASS_B) /* C */, uint8(CCLASS_C) /* D */, uint8(CCLASS_D), /* E */ uint8(CCLASS_VOWEL) /* F */, uint8(CCLASS_B) /* G */, uint8(CCLASS_C), /* H */ uint8(CCLASS_SILENT) /* I */, uint8(CCLASS_VOWEL) /* J */, uint8(CCLASS_C), /* K */ uint8(CCLASS_C) /* L */, uint8(CCLASS_L) /* M */, uint8(CCLASS_M), /* N */ uint8(CCLASS_M) /* O */, uint8(CCLASS_VOWEL) /* P */, uint8(CCLASS_B), /* Q */ uint8(CCLASS_C) /* R */, uint8(CCLASS_R) /* S */, uint8(CCLASS_C), /* T */ uint8(CCLASS_D) /* U */, uint8(CCLASS_VOWEL) /* V */, uint8(CCLASS_B), /* W */ uint8(CCLASS_B) /* X */, uint8(CCLASS_C) /* Y */, uint8(CCLASS_Y), /* Z */ uint8(CCLASS_C) /* [ */, uint8(CCLASS_OTHER) /* \ */, uint8(CCLASS_OTHER), /* ] */ uint8(CCLASS_OTHER) /* ^ */, uint8(CCLASS_OTHER) /* _ */, uint8(CCLASS_OTHER), /* ` */ uint8(CCLASS_OTHER) /* a */, uint8(CCLASS_VOWEL) /* b */, uint8(CCLASS_B), /* c */ uint8(CCLASS_C) /* d */, uint8(CCLASS_D) /* e */, uint8(CCLASS_VOWEL), /* f */ uint8(CCLASS_B) /* g */, uint8(CCLASS_C) /* h */, uint8(CCLASS_SILENT), /* i */ uint8(CCLASS_VOWEL) /* j */, uint8(CCLASS_C) /* k */, uint8(CCLASS_C), /* l */ uint8(CCLASS_L) /* m */, uint8(CCLASS_M) /* n */, uint8(CCLASS_M), /* o */ uint8(CCLASS_VOWEL) /* p */, uint8(CCLASS_B) /* q */, uint8(CCLASS_C), /* r */ uint8(CCLASS_R) /* s */, uint8(CCLASS_C) /* t */, uint8(CCLASS_D), /* u */ uint8(CCLASS_VOWEL) /* v */, uint8(CCLASS_B) /* w */, uint8(CCLASS_B), /* x */ uint8(CCLASS_C) /* y */, uint8(CCLASS_Y) /* z */, uint8(CCLASS_C), /* { */ uint8(CCLASS_OTHER) /* | */, uint8(CCLASS_OTHER) /* } */, uint8(CCLASS_OTHER), /* ~ */ uint8(CCLASS_OTHER) /* */, uint8(CCLASS_OTHER), } /* spellfix.c:125:28 */ // Mapping from the character class number (0-13) to a symbol for each // character class. Note that initClass[] can be used to map the class // symbol back into the class number. var className = *(*[14]uint8)(unsafe.Pointer(ts + 6486 /* ".ABCDHLRMY9 ?" */)) /* spellfix.c:176:28 */ // Generate a "phonetic hash" from a string of ASCII characters // in zIn[0..nIn-1]. // // * Map characters by character class as defined above. // * Omit double-letters // * Omit vowels beside R and L // * Omit T when followed by CH // * Omit W when followed by R // * Omit D when followed by J or G // * Omit K in KN or G in GN at the beginning of a word // // Space to hold the result is obtained from sqlite3_malloc() // // Return NULL if memory allocation fails. func phoneticHash(tls *libc.TLS, zIn uintptr, nIn int32) uintptr { /* spellfix.c:194:22: */ var zOut uintptr = sqlite3.Xsqlite3_malloc64(tls, (uint64(nIn + 1))) var i int32 var nOut int32 = 0 var cPrev int8 = int8(0x77) var cPrevX int8 = int8(0x77) var aClass uintptr = uintptr(unsafe.Pointer(&initClass)) if zOut == uintptr(0) { return uintptr(0) } if nIn > 2 { switch int32(*(*uint8)(unsafe.Pointer(zIn))) { case 'g': fallthrough case 'k': { if int32(*(*uint8)(unsafe.Pointer(zIn + 1))) == 'n' { zIn++ nIn-- } break } } } for i = 0; i < nIn; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(zIn + uintptr(i))) if (i + 1) < nIn { if (int32(c) == 'w') && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((i + 1))))) == 'r') { continue } if (int32(c) == 'd') && ((int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((i + 1))))) == 'j') || (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((i + 1))))) == 'g')) { continue } if (i + 2) < nIn { if ((int32(c) == 't') && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((i + 1))))) == 'c')) && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((i + 2))))) == 'h') { continue } } } c = *(*uint8)(unsafe.Pointer(aClass + uintptr((int32(c) & 0x7f)))) if int32(c) == CCLASS_SPACE { continue } if (int32(c) == CCLASS_OTHER) && (int32(cPrev) != CCLASS_DIGIT) { continue } aClass = uintptr(unsafe.Pointer(&midClass)) if (int32(c) == CCLASS_VOWEL) && ((int32(cPrevX) == CCLASS_R) || (int32(cPrevX) == CCLASS_L)) { continue /* No vowels beside L or R */ } if ((int32(c) == CCLASS_R) || (int32(c) == CCLASS_L)) && (int32(cPrevX) == CCLASS_VOWEL) { nOut-- // No vowels beside L or R } cPrev = int8(c) if int32(c) == CCLASS_SILENT { continue } cPrevX = int8(c) c = className[c] if (nOut == 0) || (int32(c) != int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((nOut - 1)))))) { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = c } } *(*uint8)(unsafe.Pointer(zOut + uintptr(nOut))) = uint8(0) return zOut } // This is an SQL function wrapper around phoneticHash(). See // the description of phoneticHash() for additional information. func phoneticHashSqlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* spellfix.c:246:13: */ var zIn uintptr var zOut uintptr zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { return } zOut = phoneticHash(tls, zIn, sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) if zOut == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else { sqlite3.Xsqlite3_result_text(tls, context, zOut, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } // Return the character class number for a character given its // context. func characterClass(tls *libc.TLS, cPrev int8, c int8) int8 { /* spellfix.c:268:13: */ if int32(cPrev) == 0 { return int8(initClass[(int32(c) & 0x7f)]) } return int8(midClass[(int32(c) & 0x7f)]) } // Return the cost of inserting or deleting character c immediately // following character cPrev. If cPrev==0, that means c is the first // character of the word. func insertOrDeleteCost(tls *libc.TLS, cPrev int8, c int8, cNext int8) int32 { /* spellfix.c:277:12: */ var classC int8 = characterClass(tls, cPrev, c) var classCprev int8 if int32(classC) == CCLASS_SILENT { // Insert or delete "silent" characters such as H or W return 1 } if int32(cPrev) == int32(c) { // Repeated characters, or miss a repeat return 10 } if (int32(classC) == CCLASS_VOWEL) && ((int32(cPrev) == 'r') || (int32(cNext) == 'r')) { return 20 // Insert a vowel before or after 'r' } classCprev = characterClass(tls, cPrev, cPrev) if int32(classC) == int32(classCprev) { if int32(classC) == CCLASS_VOWEL { // Remove or add a new vowel to a vowel cluster return 15 } else { // Remove or add a consonant not in the same class return 50 } } // any other character insertion or deletion return 100 } // Divide the insertion cost by this factor when appending to the // end of the word. // Return the cost of substituting cTo in place of cFrom assuming // the previous character is cPrev. If cPrev==0 then cTo is the first // character of the word. func substituteCost(tls *libc.TLS, cPrev int8, cFrom int8, cTo int8) int32 { /* spellfix.c:318:12: */ var classFrom int8 var classTo int8 if int32(cFrom) == int32(cTo) { // Exact match return 0 } if (int32(cFrom) == (int32(cTo) ^ 0x20)) && (((int32(cTo) >= 'A') && (int32(cTo) <= 'Z')) || ((int32(cTo) >= 'a') && (int32(cTo) <= 'z'))) { // differ only in case return 0 } classFrom = characterClass(tls, cPrev, cFrom) classTo = characterClass(tls, cPrev, cTo) if int32(classFrom) == int32(classTo) { // Same character class return 40 } if (((int32(classFrom) >= CCLASS_B) && (int32(classFrom) <= CCLASS_Y)) && (int32(classTo) >= CCLASS_B)) && (int32(classTo) <= CCLASS_Y) { // Convert from one consonant to another, but in a different class return 75 } // Any other subsitution return 100 } // Given two strings zA and zB which are pure ASCII, return the cost // of transforming zA into zB. If zA ends with '*' assume that it is // a prefix of zB and give only minimal penalty for extra characters // on the end of zB. // // Smaller numbers mean a closer match. // // Negative values indicate an error: // -1 One of the inputs is NULL // -2 Non-ASCII characters on input // -3 Unable to allocate memory // // If pnMatch is not NULL, then *pnMatch is set to the number of bytes // of zB that matched the pattern in zA. If zA does not end with a '*', // then this value is always the number of bytes in zB (i.e. strlen(zB)). // If zA does end in a '*', then it is the number of bytes in the prefix // of zB that was deemed to match zA. func editdist1(tls *libc.TLS, zA uintptr, zB uintptr, pnMatch uintptr) int32 { /* spellfix.c:362:12: */ bp := tls.Alloc(300) defer tls.Free(300) var nA int32 var nB int32 // Number of characters in zA[] and zB[] var xA int32 var xB int32 // Loop counters for zA[] and zB[] var cA int8 = int8(0) var cB int8 // Current character of zA and zB var cAprev int8 var cBprev int8 // Previous character of zA and zB var cAnext int8 var cBnext int8 // Next character in zA and zB var d int32 // North-west cost value var dc int32 = 0 // North-west character value var res int32 // Final result var m uintptr // The cost matrix var cx uintptr // Corresponding character values var toFree uintptr = uintptr(0) // Malloced space var nMatch int32 = 0 // var mStack [75]int32 at bp, 300 // Stack space to use if not too much is needed // Early out if either input is NULL if (zA == uintptr(0)) || (zB == uintptr(0)) { return -1 } // Skip any common prefix for (*(*int8)(unsafe.Pointer(zA)) != 0) && (int32(*(*int8)(unsafe.Pointer(zA))) == int32(*(*int8)(unsafe.Pointer(zB)))) { dc = int32(*(*int8)(unsafe.Pointer(zA))) zA++ zB++ nMatch++ } if pnMatch != 0 { *(*int32)(unsafe.Pointer(pnMatch)) = nMatch } if (int32(*(*int8)(unsafe.Pointer(zA))) == 0) && (int32(*(*int8)(unsafe.Pointer(zB))) == 0) { return 0 } // Verify input strings and measure their lengths for nA = 0; *(*int8)(unsafe.Pointer(zA + uintptr(nA))) != 0; nA++ { if (int32(*(*int8)(unsafe.Pointer(zA + uintptr(nA)))) & 0x80) != 0 { return -2 } } for nB = 0; *(*int8)(unsafe.Pointer(zB + uintptr(nB))) != 0; nB++ { if (int32(*(*int8)(unsafe.Pointer(zB + uintptr(nB)))) & 0x80) != 0 { return -2 } } // Special processing if either string is empty if nA == 0 { cBprev = int8(dc) for xB = libc.AssignInt32(&res, 0); (int32(libc.AssignInt8(&cB, *(*int8)(unsafe.Pointer(zB + uintptr(xB)))))) != 0; xB++ { res = res + (insertOrDeleteCost(tls, cBprev, cB, *(*int8)(unsafe.Pointer(zB + uintptr((xB + 1))))) / FINAL_INS_COST_DIV) cBprev = cB } return res } if nB == 0 { cAprev = int8(dc) for xA = libc.AssignInt32(&res, 0); (int32(libc.AssignInt8(&cA, *(*int8)(unsafe.Pointer(zA + uintptr(xA)))))) != 0; xA++ { res = res + (insertOrDeleteCost(tls, cAprev, cA, *(*int8)(unsafe.Pointer(zA + uintptr((xA + 1)))))) cAprev = cA } return res } // A is a prefix of B if (int32(*(*int8)(unsafe.Pointer(zA))) == '*') && (int32(*(*int8)(unsafe.Pointer(zA + 1))) == 0) { return 0 } // Allocate and initialize the Wagner matrix if uint64(nB) < ((uint64(unsafe.Sizeof([75]int32{})) * uint64(4)) / (uint64(unsafe.Sizeof(int32(0))) * uint64(5))) { m = bp /* &mStack[0] */ } else { m = libc.AssignUintptr(&toFree, sqlite3.Xsqlite3_malloc64(tls, (((uint64((nB+1)*5))*uint64(unsafe.Sizeof(int32(0))))/uint64(4)))) if m == uintptr(0) { return -3 } } cx = (m + uintptr((nB+1))*4) // Compute the Wagner edit distance *(*int32)(unsafe.Pointer(m)) = 0 *(*int8)(unsafe.Pointer(cx)) = int8(dc) cBprev = int8(dc) for xB = 1; xB <= nB; xB++ { cBnext = *(*int8)(unsafe.Pointer(zB + uintptr(xB))) cB = *(*int8)(unsafe.Pointer(zB + uintptr((xB - 1)))) *(*int8)(unsafe.Pointer(cx + uintptr(xB))) = cB *(*int32)(unsafe.Pointer(m + uintptr(xB)*4)) = (*(*int32)(unsafe.Pointer(m + uintptr((xB-1))*4)) + insertOrDeleteCost(tls, cBprev, cB, cBnext)) cBprev = cB } cAprev = int8(dc) for xA = 1; xA <= nA; xA++ { var lastA int32 = (libc.Bool32(xA == nA)) cA = *(*int8)(unsafe.Pointer(zA + uintptr((xA - 1)))) cAnext = *(*int8)(unsafe.Pointer(zA + uintptr(xA))) if (int32(cA) == '*') && (lastA != 0) { break } d = *(*int32)(unsafe.Pointer(m)) dc = int32(*(*int8)(unsafe.Pointer(cx))) *(*int32)(unsafe.Pointer(m)) = (d + insertOrDeleteCost(tls, cAprev, cA, cAnext)) cBprev = int8(0) for xB = 1; xB <= nB; xB++ { var totalCost int32 var insCost int32 var delCost int32 var subCost int32 var ncx int32 cB = *(*int8)(unsafe.Pointer(zB + uintptr((xB - 1)))) cBnext = *(*int8)(unsafe.Pointer(zB + uintptr(xB))) // Cost to insert cB insCost = insertOrDeleteCost(tls, *(*int8)(unsafe.Pointer(cx + uintptr((xB - 1)))), cB, cBnext) if lastA != 0 { insCost = insCost / (FINAL_INS_COST_DIV) } // Cost to delete cA delCost = insertOrDeleteCost(tls, *(*int8)(unsafe.Pointer(cx + uintptr(xB))), cA, cBnext) // Cost to substitute cA->cB subCost = substituteCost(tls, *(*int8)(unsafe.Pointer(cx + uintptr((xB - 1)))), cA, cB) // Best cost totalCost = (insCost + *(*int32)(unsafe.Pointer(m + uintptr((xB-1))*4))) ncx = int32(cB) if (delCost + *(*int32)(unsafe.Pointer(m + uintptr(xB)*4))) < totalCost { totalCost = (delCost + *(*int32)(unsafe.Pointer(m + uintptr(xB)*4))) ncx = int32(cA) } if (subCost + d) < totalCost { totalCost = (subCost + d) } // Update the matrix d = *(*int32)(unsafe.Pointer(m + uintptr(xB)*4)) dc = int32(*(*int8)(unsafe.Pointer(cx + uintptr(xB)))) *(*int32)(unsafe.Pointer(m + uintptr(xB)*4)) = totalCost *(*int8)(unsafe.Pointer(cx + uintptr(xB))) = int8(ncx) cBprev = cB } cAprev = cA } // Free the wagner matrix and return the result if int32(cA) == '*' { res = *(*int32)(unsafe.Pointer(m + 1*4)) for xB = 1; xB <= nB; xB++ { if *(*int32)(unsafe.Pointer(m + uintptr(xB)*4)) < res { res = *(*int32)(unsafe.Pointer(m + uintptr(xB)*4)) if pnMatch != 0 { *(*int32)(unsafe.Pointer(pnMatch)) = (xB + nMatch) } } } } else { res = *(*int32)(unsafe.Pointer(m + uintptr(nB)*4)) // In the current implementation, pnMatch is always NULL if zA does // not end in "*" } sqlite3.Xsqlite3_free(tls, toFree) return res } // Function: editdist(A,B) // // Return the cost of transforming string A into string B. Both strings // must be pure ASCII text. If A ends with '*' then it is assumed to be // a prefix of B and extra characters on the end of B have minimal additional // cost. func editdistSqlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* spellfix.c:518:13: */ var res int32 = editdist1(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))), uintptr(0)) if res < 0 { if res == (-3) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else if res == (-2) { sqlite3.Xsqlite3_result_error(tls, context, ts+6500 /* "non-ASCII input ..." */, -1) } else { sqlite3.Xsqlite3_result_error(tls, context, ts+6530 /* "NULL input to ed..." */, -1) } } else { sqlite3.Xsqlite3_result_int(tls, context, res) } } // End of the fixed-cost edit distance implementation // // // Begin: Configurable cost unicode edit distance routines // Forward declaration of structures type EditDist3Cost1 = struct { FpNext uintptr FnFrom u8 FnTo u8 FiCost u16 Fa [4]int8 } /* spellfix.c:546:9 */ // End of the fixed-cost edit distance implementation // // // Begin: Configurable cost unicode edit distance routines // Forward declaration of structures type EditDist3Cost = EditDist3Cost1 /* spellfix.c:546:30 */ type EditDist3Config1 = struct { FnLang int32 _ [4]byte Fa uintptr } /* spellfix.c:547:9 */ type EditDist3Config = EditDist3Config1 /* spellfix.c:547:32 */ type EditDist3From1 = struct { FnSubst int32 FnDel int32 FnByte int32 _ [4]byte FapSubst uintptr FapDel uintptr } /* spellfix.c:549:9 */ type EditDist3From = EditDist3From1 /* spellfix.c:549:30 */ type EditDist3FromString1 = struct { Fz uintptr Fn int32 FisPrefix int32 Fa uintptr } /* spellfix.c:550:9 */ type EditDist3FromString = EditDist3FromString1 /* spellfix.c:550:36 */ type EditDist3To1 = struct { FnIns int32 FnByte int32 FapIns uintptr } /* spellfix.c:551:9 */ type EditDist3To = EditDist3To1 /* spellfix.c:551:28 */ type EditDist3ToString1 = struct { Fz uintptr Fn int32 _ [4]byte Fa uintptr } /* spellfix.c:552:9 */ type EditDist3ToString = EditDist3ToString1 /* spellfix.c:552:34 */ type EditDist3Lang1 = struct { FiLang int32 FiInsCost int32 FiDelCost int32 FiSubCost int32 FpCost uintptr } /* spellfix.c:547:9 */ type EditDist3Lang = EditDist3Lang1 /* spellfix.c:553:30 */ // The default EditDist3Lang object, with default costs. var editDist3Lang = EditDist3Lang{FiInsCost: 100, FiDelCost: 100, FiSubCost: 150} /* spellfix.c:583:28 */ // Clear or delete an instance of the object that records all edit-distance // weights. func editDist3ConfigClear(tls *libc.TLS, p uintptr) { /* spellfix.c:640:13: */ var i int32 if p == uintptr(0) { return } for i = 0; i < (*EditDist3Config)(unsafe.Pointer(p)).FnLang; i++ { var pCost uintptr var pNext uintptr pCost = (*EditDist3Lang)(unsafe.Pointer((*EditDist3Config)(unsafe.Pointer(p)).Fa + uintptr(i)*24)).FpCost for pCost != 0 { pNext = (*EditDist3Cost)(unsafe.Pointer(pCost)).FpNext sqlite3.Xsqlite3_free(tls, pCost) pCost = pNext } } sqlite3.Xsqlite3_free(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(EditDist3Config{}))) } func editDist3ConfigDelete(tls *libc.TLS, pIn uintptr) { /* spellfix.c:655:13: */ var p uintptr = pIn editDist3ConfigClear(tls, p) sqlite3.Xsqlite3_free(tls, p) } // Compare the FROM values of two EditDist3Cost objects, for sorting. // Return negative, zero, or positive if the A is less than, equal to, // or greater than B. func editDist3CostCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* spellfix.c:665:12: */ var n int32 = int32((*EditDist3Cost)(unsafe.Pointer(pA)).FnFrom) var rc int32 if n > int32((*EditDist3Cost)(unsafe.Pointer(pB)).FnFrom) { n = int32((*EditDist3Cost)(unsafe.Pointer(pB)).FnFrom) } rc = libc.Xstrncmp(tls, pA+12 /* &.a */, pB+12 /* &.a */, uint64(n)) if rc == 0 { rc = (int32((*EditDist3Cost)(unsafe.Pointer(pA)).FnFrom) - int32((*EditDist3Cost)(unsafe.Pointer(pB)).FnFrom)) } return rc } // Merge together two sorted lists of EditDist3Cost objects, in order // of increasing FROM. func editDist3CostMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* spellfix.c:678:22: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pHead */)) = uintptr(0) var ppTail uintptr = bp /* &pHead */ var p uintptr for (pA != 0) && (pB != 0) { if editDist3CostCompare(tls, pA, pB) <= 0 { p = pA pA = (*EditDist3Cost)(unsafe.Pointer(pA)).FpNext } else { p = pB pB = (*EditDist3Cost)(unsafe.Pointer(pB)).FpNext } *(*uintptr)(unsafe.Pointer(ppTail)) = p ppTail = (p /* &.pNext */) } if pA != 0 { *(*uintptr)(unsafe.Pointer(ppTail)) = pA } else { *(*uintptr)(unsafe.Pointer(ppTail)) = pB } return *(*uintptr)(unsafe.Pointer(bp /* pHead */)) } // Sort a list of EditDist3Cost objects into order of increasing FROM func editDist3CostSort(tls *libc.TLS, pList uintptr) uintptr { /* spellfix.c:707:22: */ bp := tls.Alloc(480) defer tls.Free(480) // var ap [60]uintptr at bp, 480 var p uintptr var i int32 var mx int32 = 0 *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + 1*8)) = uintptr(0) for pList != 0 { p = pList pList = (*EditDist3Cost)(unsafe.Pointer(p)).FpNext (*EditDist3Cost)(unsafe.Pointer(p)).FpNext = uintptr(0) for i = 0; *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr(i)*8)) != 0; i++ { p = editDist3CostMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr(i)*8)), p) *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr(i)*8)) = uintptr(0) } *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr(i)*8)) = p if i > mx { mx = i *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr((i+1))*8)) = uintptr(0) } } p = uintptr(0) for i = 0; i <= mx; i++ { if *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr(i)*8)) != 0 { p = editDist3CostMerge(tls, p, *(*uintptr)(unsafe.Pointer(bp /* &ap[0] */ + uintptr(i)*8))) } } return p } // Load all edit-distance weights from a table. func editDist3ConfigLoad(tls *libc.TLS, p uintptr, db uintptr, zTable uintptr) int32 { /* spellfix.c:737:12: */ bp := tls.Alloc(24) defer tls.Free(24) // var pStmt uintptr at bp+16, 8 var rc int32 var rc2 int32 var zSql uintptr var iLangPrev int32 = -9999 var pLang uintptr = uintptr(0) zSql = sqlite3.Xsqlite3_mprintf(tls, ts+6555 /* "SELECT iLang, cF..." */, libc.VaList(bp, zTable)) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_prepare(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc != 0 { return rc } editDist3ConfigClear(tls, p) for sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) == SQLITE_ROW { var iLang int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) var zFrom uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) var nFrom int32 if zFrom != 0 { nFrom = sqlite3.Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) } else { nFrom = 0 } var zTo uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 2) var nTo int32 if zTo != 0 { nTo = sqlite3.Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 2) } else { nTo = 0 } var iCost int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 3) if (nFrom > 100) || (nTo > 100) { continue } if iCost < 0 { continue } if iCost >= 10000 { continue } // Costs above 10K are considered infinite if (pLang == uintptr(0)) || (iLang != iLangPrev) { var pNew uintptr pNew = sqlite3.Xsqlite3_realloc64(tls, (*EditDist3Config)(unsafe.Pointer(p)).Fa, ((uint64((*EditDist3Config)(unsafe.Pointer(p)).FnLang + 1)) * uint64(unsafe.Sizeof(EditDist3Lang{})))) if pNew == uintptr(0) { rc = SQLITE_NOMEM break } (*EditDist3Config)(unsafe.Pointer(p)).Fa = pNew pLang = ((*EditDist3Config)(unsafe.Pointer(p)).Fa + uintptr((*EditDist3Config)(unsafe.Pointer(p)).FnLang)*24) (*EditDist3Config)(unsafe.Pointer(p)).FnLang++ (*EditDist3Lang)(unsafe.Pointer(pLang)).FiLang = iLang (*EditDist3Lang)(unsafe.Pointer(pLang)).FiInsCost = 100 (*EditDist3Lang)(unsafe.Pointer(pLang)).FiDelCost = 100 (*EditDist3Lang)(unsafe.Pointer(pLang)).FiSubCost = 150 (*EditDist3Lang)(unsafe.Pointer(pLang)).FpCost = uintptr(0) iLangPrev = iLang } if ((nFrom == 1) && (int32(*(*int8)(unsafe.Pointer(zFrom))) == '?')) && (nTo == 0) { (*EditDist3Lang)(unsafe.Pointer(pLang)).FiDelCost = iCost } else if ((nFrom == 0) && (nTo == 1)) && (int32(*(*int8)(unsafe.Pointer(zTo))) == '?') { (*EditDist3Lang)(unsafe.Pointer(pLang)).FiInsCost = iCost } else if (((nFrom == 1) && (nTo == 1)) && (int32(*(*int8)(unsafe.Pointer(zFrom))) == '?')) && (int32(*(*int8)(unsafe.Pointer(zTo))) == '?') { (*EditDist3Lang)(unsafe.Pointer(pLang)).FiSubCost = iCost } else { var pCost uintptr var nExtra int32 = ((nFrom + nTo) - 4) if nExtra < 0 { nExtra = 0 } pCost = sqlite3.Xsqlite3_malloc64(tls, (uint64(unsafe.Sizeof(EditDist3Cost{})) + uint64(nExtra))) if pCost == uintptr(0) { rc = SQLITE_NOMEM break } (*EditDist3Cost)(unsafe.Pointer(pCost)).FnFrom = u8(nFrom) (*EditDist3Cost)(unsafe.Pointer(pCost)).FnTo = u8(nTo) (*EditDist3Cost)(unsafe.Pointer(pCost)).FiCost = u16(iCost) libc.Xmemcpy(tls, pCost+12 /* &.a */, zFrom, uint64(nFrom)) libc.Xmemcpy(tls, ((pCost + 12 /* &.a */) + uintptr(nFrom)), zTo, uint64(nTo)) (*EditDist3Cost)(unsafe.Pointer(pCost)).FpNext = (*EditDist3Lang)(unsafe.Pointer(pLang)).FpCost (*EditDist3Lang)(unsafe.Pointer(pLang)).FpCost = pCost } } rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc == SQLITE_OK { rc = rc2 } if rc == SQLITE_OK { var iLang int32 for iLang = 0; iLang < (*EditDist3Config)(unsafe.Pointer(p)).FnLang; iLang++ { (*EditDist3Lang)(unsafe.Pointer((*EditDist3Config)(unsafe.Pointer(p)).Fa + uintptr(iLang)*24)).FpCost = editDist3CostSort(tls, (*EditDist3Lang)(unsafe.Pointer((*EditDist3Config)(unsafe.Pointer(p)).Fa+uintptr(iLang)*24)).FpCost) } } return rc } // Return the length (in bytes) of a utf-8 character. Or return a maximum // of N. func utf8Len(tls *libc.TLS, c uint8, N int32) int32 { /* spellfix.c:818:12: */ var len int32 = 1 if int32(c) > 0x7f { if (int32(c) & 0xe0) == 0xc0 { len = 2 } else if (int32(c) & 0xf0) == 0xe0 { len = 3 } else { len = 4 } } if len > N { len = N } return len } // Return TRUE (non-zero) if the To side of the given cost matches // the given string. func matchTo(tls *libc.TLS, p uintptr, z uintptr, n int32) int32 { /* spellfix.c:837:12: */ if int32(*(*int8)(unsafe.Pointer((p + 12 /* &.a */) + uintptr((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)))) != int32(*(*int8)(unsafe.Pointer(z))) { return 0 } if int32((*EditDist3Cost)(unsafe.Pointer(p)).FnTo) > n { return 0 } if libc.Xstrncmp(tls, ((p+12 /* &.a */)+uintptr((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)), z, uint64((*EditDist3Cost)(unsafe.Pointer(p)).FnTo)) != 0 { return 0 } return 1 } // Return TRUE (non-zero) if the From side of the given cost matches // the given string. func matchFrom(tls *libc.TLS, p uintptr, z uintptr, n int32) int32 { /* spellfix.c:849:12: */ if (*EditDist3Cost)(unsafe.Pointer(p)).FnFrom != 0 { if int32(*(*int8)(unsafe.Pointer((p + 12 /* &.a */)))) != int32(*(*int8)(unsafe.Pointer(z))) { return 0 } if libc.Xstrncmp(tls, p+12 /* &.a */, z, uint64((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)) != 0 { return 0 } } return 1 } // Return TRUE (non-zero) of the next FROM character and the next TO // character are the same. func matchFromTo(tls *libc.TLS, pStr uintptr, n1 int32, z2 uintptr, n2 int32) int32 { /* spellfix.c:862:12: */ var b1 int32 = (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(pStr)).Fa + uintptr(n1)*32)).FnByte if b1 > n2 { return 0 } if int32(*(*int8)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(pStr)).Fz + uintptr(n1)))) != int32(*(*int8)(unsafe.Pointer(z2))) { return 0 } if libc.Xstrncmp(tls, ((*EditDist3FromString)(unsafe.Pointer(pStr)).Fz+uintptr(n1)), z2, uint64(b1)) != 0 { return 0 } return 1 } // Delete an EditDist3FromString objecct func editDist3FromStringDelete(tls *libc.TLS, p uintptr) { /* spellfix.c:879:13: */ var i int32 if p != 0 { for i = 0; i < (*EditDist3FromString)(unsafe.Pointer(p)).Fn; i++ { sqlite3.Xsqlite3_free(tls, (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(p)).Fa+uintptr(i)*32)).FapDel) sqlite3.Xsqlite3_free(tls, (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(p)).Fa+uintptr(i)*32)).FapSubst) } sqlite3.Xsqlite3_free(tls, p) } } // Create a EditDist3FromString object. func editDist3FromStringNew(tls *libc.TLS, pLang uintptr, z uintptr, n int32) uintptr { /* spellfix.c:893:28: */ var pStr uintptr var p uintptr var i int32 if z == uintptr(0) { return uintptr(0) } if n < 0 { n = int32(libc.Xstrlen(tls, z)) } pStr = sqlite3.Xsqlite3_malloc64(tls, (((uint64(unsafe.Sizeof(EditDist3FromString{})) + (uint64(unsafe.Sizeof(EditDist3From{})) * uint64(n))) + uint64(n)) + uint64(1))) if pStr == uintptr(0) { return uintptr(0) } (*EditDist3FromString)(unsafe.Pointer(pStr)).Fa = (pStr + 1*24) libc.Xmemset(tls, (*EditDist3FromString)(unsafe.Pointer(pStr)).Fa, 0, (uint64(unsafe.Sizeof(EditDist3From{})) * uint64(n))) (*EditDist3FromString)(unsafe.Pointer(pStr)).Fn = n (*EditDist3FromString)(unsafe.Pointer(pStr)).Fz = ((*EditDist3FromString)(unsafe.Pointer(pStr)).Fa + uintptr(n)*32) libc.Xmemcpy(tls, (*EditDist3FromString)(unsafe.Pointer(pStr)).Fz, z, (uint64(n + 1))) if (n != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((n - 1))))) == '*') { (*EditDist3FromString)(unsafe.Pointer(pStr)).FisPrefix = 1 n-- (*EditDist3FromString)(unsafe.Pointer(pStr)).Fn-- *(*int8)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(pStr)).Fz + uintptr(n))) = int8(0) } else { (*EditDist3FromString)(unsafe.Pointer(pStr)).FisPrefix = 0 } for i = 0; i < n; i++ { var pFrom uintptr = ((*EditDist3FromString)(unsafe.Pointer(pStr)).Fa + uintptr(i)*32) libc.Xmemset(tls, pFrom, 0, uint64(unsafe.Sizeof(EditDist3From{}))) (*EditDist3From)(unsafe.Pointer(pFrom)).FnByte = utf8Len(tls, uint8(*(*int8)(unsafe.Pointer(z + uintptr(i)))), (n - i)) for p = (*EditDist3Lang)(unsafe.Pointer(pLang)).FpCost; p != 0; p = (*EditDist3Cost)(unsafe.Pointer(p)).FpNext { var apNew uintptr if (i + int32((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)) > n { continue } if matchFrom(tls, p, (z+uintptr(i)), (n-i)) == 0 { continue } if int32((*EditDist3Cost)(unsafe.Pointer(p)).FnTo) == 0 { apNew = sqlite3.Xsqlite3_realloc64(tls, (*EditDist3From)(unsafe.Pointer(pFrom)).FapDel, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64((*EditDist3From)(unsafe.Pointer(pFrom)).FnDel + 1)))) if apNew == uintptr(0) { break } (*EditDist3From)(unsafe.Pointer(pFrom)).FapDel = apNew *(*uintptr)(unsafe.Pointer(apNew + uintptr(libc.PostIncInt32(&(*EditDist3From)(unsafe.Pointer(pFrom)).FnDel, 1))*8)) = p } else { apNew = sqlite3.Xsqlite3_realloc64(tls, (*EditDist3From)(unsafe.Pointer(pFrom)).FapSubst, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64((*EditDist3From)(unsafe.Pointer(pFrom)).FnSubst + 1)))) if apNew == uintptr(0) { break } (*EditDist3From)(unsafe.Pointer(pFrom)).FapSubst = apNew *(*uintptr)(unsafe.Pointer(apNew + uintptr(libc.PostIncInt32(&(*EditDist3From)(unsafe.Pointer(pFrom)).FnSubst, 1))*8)) = p } } if p != 0 { editDist3FromStringDelete(tls, pStr) pStr = uintptr(0) break } } return pStr } // Update entry m[i] such that it is the minimum of its current value // and m[j]+iCost. func updateCost(tls *libc.TLS, m uintptr, i int32, j int32, iCost int32) { /* spellfix.c:955:13: */ var b uint32 b = (*(*uint32)(unsafe.Pointer(m + uintptr(j)*4)) + uint32(iCost)) if b < *(*uint32)(unsafe.Pointer(m + uintptr(i)*4)) { *(*uint32)(unsafe.Pointer(m + uintptr(i)*4)) = b } } // How much stack space (int bytes) to use for Wagner matrix in // editDist3Core(). If more space than this is required, the entire // matrix is taken from the heap. To reduce the load on the memory // allocator, make this value as large as practical for the // architecture in use. // Compute the edit distance between two strings. // // If an error occurs, return a negative number which is the error code. // // If pnMatch is not NULL, then *pnMatch is set to the number of characters // (not bytes) in z2 that matched the search pattern in *pFrom. If pFrom does // not contain the pattern for a prefix-search, then this is always the number // of characters in z2. If pFrom does contain a prefix search pattern, then // it is the number of characters in the prefix of z2 that was deemed to // match pFrom. func editDist3Core(tls *libc.TLS, pFrom uintptr, z2 uintptr, n2 int32, pLang uintptr, pnMatch uintptr) int32 { /* spellfix.c:990:12: */ bp := tls.Alloc(1048) defer tls.Free(1048) var k int32 var n int32 var i1 int32 var b1 int32 var i2 int32 var b2 int32 // var f EditDist3FromString at bp+1024, 24 var a2 uintptr var m uintptr var pToFree uintptr var szRow int32 var p uintptr var res int32 var nByte sqlite3_uint64 // var stackSpace [256]uint32 at bp, 1024 var apNew uintptr var cx int32 // Index of current cell var cxp int32 // Index of cell immediately to the left var cxd int32 // Index of cell to the left and one row above var cxu int32 var rx int32 // Starting index for current row var rxp int32 var b int32 var nExtra int32 *(*EditDist3FromString)(unsafe.Pointer(bp + 1024 /* f */)) = *(*EditDist3FromString)(unsafe.Pointer(pFrom)) // allocate the Wagner matrix and the aTo[] array for the TO string n = (((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fn + 1) * (n2 + 1)) n = ((n + 1) & libc.CplInt32(1)) nByte = ((uint64(n) * uint64(unsafe.Sizeof(uint32(0)))) + (uint64(unsafe.Sizeof(EditDist3To{})) * uint64(n2))) if !(nByte <= sqlite3_uint64(unsafe.Sizeof([256]uint32{}))) { goto __1 } m = bp /* &stackSpace[0] */ pToFree = uintptr(0) goto __2 __1: m = libc.AssignUintptr(&pToFree, sqlite3.Xsqlite3_malloc64(tls, nByte)) if !(m == uintptr(0)) { goto __3 } return -1 __3: ; // Out of memory __2: ; a2 = (m + uintptr(n)*4) libc.Xmemset(tls, a2, 0, (uint64(unsafe.Sizeof(EditDist3To{})) * uint64(n2))) // Fill in the a1[] matrix for all characters of the TO string i2 = 0 __4: if !(i2 < n2) { goto __6 } (*EditDist3To)(unsafe.Pointer(a2 + uintptr(i2)*16)).FnByte = utf8Len(tls, uint8(*(*int8)(unsafe.Pointer(z2 + uintptr(i2)))), (n2 - i2)) p = (*EditDist3Lang)(unsafe.Pointer(pLang)).FpCost __7: if !(p != 0) { goto __9 } if !(int32((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom) > 0) { goto __10 } goto __9 __10: ; if !((i2 + int32((*EditDist3Cost)(unsafe.Pointer(p)).FnTo)) > n2) { goto __11 } goto __8 __11: ; if !(int32(*(*int8)(unsafe.Pointer((p + 12 /* &.a */)))) > int32(*(*int8)(unsafe.Pointer(z2 + uintptr(i2))))) { goto __12 } goto __9 __12: ; if !(matchTo(tls, p, (z2+uintptr(i2)), (n2-i2)) == 0) { goto __13 } goto __8 __13: ; (*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FnIns++ apNew = sqlite3.Xsqlite3_realloc64(tls, (*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FapIns, (uint64(unsafe.Sizeof(uintptr(0))) * uint64((*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FnIns))) if !(apNew == uintptr(0)) { goto __14 } res = -1 // Out of memory goto editDist3Abort __14: ; (*EditDist3To)(unsafe.Pointer(a2 + uintptr(i2)*16)).FapIns = apNew *(*uintptr)(unsafe.Pointer((*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FapIns + uintptr(((*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FnIns-1))*8)) = p goto __8 __8: p = (*EditDist3Cost)(unsafe.Pointer(p)).FpNext goto __7 goto __9 __9: ; goto __5 __5: i2++ goto __4 goto __6 __6: ; // Prepare to compute the minimum edit distance szRow = ((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fn + 1) libc.Xmemset(tls, m, 0x01, ((uint64((n2 + 1) * szRow)) * uint64(unsafe.Sizeof(uint32(0))))) *(*uint32)(unsafe.Pointer(m)) = uint32(0) // First fill in the top-row of the matrix with FROM deletion costs i1 = 0 __15: if !(i1 < (*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fn) { goto __17 } b1 = (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa + uintptr(i1)*32)).FnByte updateCost(tls, m, (i1 + b1), i1, (*EditDist3Lang)(unsafe.Pointer(pLang)).FiDelCost) k = 0 __18: if !(k < (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa+uintptr(i1)*32)).FnDel) { goto __20 } p = *(*uintptr)(unsafe.Pointer((*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa+uintptr(i1)*32)).FapDel + uintptr(k)*8)) updateCost(tls, m, (i1 + int32((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)), i1, int32((*EditDist3Cost)(unsafe.Pointer(p)).FiCost)) goto __19 __19: k++ goto __18 goto __20 __20: ; goto __16 __16: i1 = i1 + (b1) goto __15 goto __17 __17: ; // Fill in all subsequent rows, top-to-bottom, left-to-right i2 = 0 __21: if !(i2 < n2) { goto __23 } // Starting index for previous row b2 = (*EditDist3To)(unsafe.Pointer(a2 + uintptr(i2)*16)).FnByte rx = (szRow * (i2 + b2)) rxp = (szRow * i2) updateCost(tls, m, rx, rxp, (*EditDist3Lang)(unsafe.Pointer(pLang)).FiInsCost) k = 0 __24: if !(k < (*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FnIns) { goto __26 } p = *(*uintptr)(unsafe.Pointer((*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FapIns + uintptr(k)*8)) updateCost(tls, m, (szRow * (i2 + int32((*EditDist3Cost)(unsafe.Pointer(p)).FnTo))), rxp, int32((*EditDist3Cost)(unsafe.Pointer(p)).FiCost)) goto __25 __25: k++ goto __24 goto __26 __26: ; i1 = 0 __27: if !(i1 < (*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fn) { goto __29 } // Index of cell immediately above b1 = (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa + uintptr(i1)*32)).FnByte cxp = (rx + i1) cx = (cxp + b1) cxd = (rxp + i1) cxu = (cxd + b1) updateCost(tls, m, cx, cxp, (*EditDist3Lang)(unsafe.Pointer(pLang)).FiDelCost) k = 0 __30: if !(k < (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa+uintptr(i1)*32)).FnDel) { goto __32 } p = *(*uintptr)(unsafe.Pointer((*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa+uintptr(i1)*32)).FapDel + uintptr(k)*8)) updateCost(tls, m, (cxp + int32((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)), cxp, int32((*EditDist3Cost)(unsafe.Pointer(p)).FiCost)) goto __31 __31: k++ goto __30 goto __32 __32: ; updateCost(tls, m, cx, cxu, (*EditDist3Lang)(unsafe.Pointer(pLang)).FiInsCost) if !(matchFromTo(tls, bp+1024 /* &f */, i1, (z2+uintptr(i2)), (n2-i2)) != 0) { goto __33 } updateCost(tls, m, cx, cxd, 0) __33: ; updateCost(tls, m, cx, cxd, (*EditDist3Lang)(unsafe.Pointer(pLang)).FiSubCost) k = 0 __34: if !(k < (*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa+uintptr(i1)*32)).FnSubst) { goto __36 } p = *(*uintptr)(unsafe.Pointer((*EditDist3From)(unsafe.Pointer((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).Fa+uintptr(i1)*32)).FapSubst + uintptr(k)*8)) if !(matchTo(tls, p, (z2+uintptr(i2)), (n2-i2)) != 0) { goto __37 } updateCost(tls, m, ((cxd + int32((*EditDist3Cost)(unsafe.Pointer(p)).FnFrom)) + (szRow * int32((*EditDist3Cost)(unsafe.Pointer(p)).FnTo))), cxd, int32((*EditDist3Cost)(unsafe.Pointer(p)).FiCost)) __37: ; goto __35 __35: k++ goto __34 goto __36 __36: ; goto __28 __28: i1 = i1 + (b1) goto __27 goto __29 __29: ; goto __22 __22: i2 = i2 + (b2) goto __21 goto __23 __23: ; // Free memory allocations and return the result res = int32(*(*uint32)(unsafe.Pointer(m + uintptr(((szRow*(n2+1))-1))*4))) n = n2 if !((*EditDist3FromString)(unsafe.Pointer(bp+1024 /* &f */)).FisPrefix != 0) { goto __38 } i2 = 1 __39: if !(i2 <= n2) { goto __41 } b = int32(*(*uint32)(unsafe.Pointer(m + uintptr(((szRow*i2)-1))*4))) if !(b <= res) { goto __42 } res = b n = (i2 - 1) __42: ; goto __40 __40: i2++ goto __39 goto __41 __41: ; __38: ; if !(pnMatch != 0) { goto __43 } nExtra = 0 k = 0 __44: if !(k < n) { goto __46 } if !((int32(*(*int8)(unsafe.Pointer(z2 + uintptr(k)))) & 0xc0) == 0x80) { goto __47 } nExtra++ __47: ; goto __45 __45: k++ goto __44 goto __46 __46: ; *(*int32)(unsafe.Pointer(pnMatch)) = (n - nExtra) __43: ; editDist3Abort: i2 = 0 __48: if !(i2 < n2) { goto __50 } sqlite3.Xsqlite3_free(tls, (*EditDist3To)(unsafe.Pointer(a2+uintptr(i2)*16)).FapIns) goto __49 __49: i2++ goto __48 goto __50 __50: ; sqlite3.Xsqlite3_free(tls, pToFree) return res } // Get an appropriate EditDist3Lang object. func editDist3FindLang(tls *libc.TLS, pConfig uintptr, iLang int32) uintptr { /* spellfix.c:1150:28: */ var i int32 for i = 0; i < (*EditDist3Config)(unsafe.Pointer(pConfig)).FnLang; i++ { if (*EditDist3Lang)(unsafe.Pointer((*EditDist3Config)(unsafe.Pointer(pConfig)).Fa+uintptr(i)*24)).FiLang == iLang { return ((*EditDist3Config)(unsafe.Pointer(pConfig)).Fa + uintptr(i)*24) } } return uintptr(unsafe.Pointer(&editDist3Lang)) } // Function: editdist3(A,B,iLang) // editdist3(tablename) // // Return the cost of transforming string A into string B using edit // weights for iLang. // // The second form loads edit weights into memory from a table. func editDist3SqlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* spellfix.c:1170:13: */ var pConfig uintptr = sqlite3.Xsqlite3_user_data(tls, context) var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context) var rc int32 if argc == 1 { var zTable uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) rc = editDist3ConfigLoad(tls, pConfig, db, zTable) if rc != 0 { sqlite3.Xsqlite3_result_error_code(tls, context, rc) } } else { var zA uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var zB uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var nA int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var nB int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var iLang int32 if argc == 3 { iLang = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) } else { iLang = 0 } var pLang uintptr = editDist3FindLang(tls, pConfig, iLang) var pFrom uintptr var dist int32 pFrom = editDist3FromStringNew(tls, pLang, zA, nA) if pFrom == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) return } dist = editDist3Core(tls, pFrom, zB, nB, pLang, uintptr(0)) editDist3FromStringDelete(tls, pFrom) if dist == (-1) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else { sqlite3.Xsqlite3_result_int(tls, context, dist) } } } // Register the editDist3 function with SQLite func editDist3Install(tls *libc.TLS, db uintptr) int32 { /* spellfix.c:1210:12: */ var rc int32 var pConfig uintptr = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(EditDist3Config{}))) if pConfig == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pConfig, 0, uint64(unsafe.Sizeof(EditDist3Config{}))) rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+6627, /* "editdist3" */ 2, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), pConfig, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{editDist3SqlFunc})), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+6627, /* "editdist3" */ 3, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), pConfig, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{editDist3SqlFunc})), uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+6627, /* "editdist3" */ 1, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), pConfig, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{editDist3SqlFunc})), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{editDist3ConfigDelete}))) } else { sqlite3.Xsqlite3_free(tls, pConfig) } return rc } // End configurable cost unicode edit distance routines // // // Begin transliterate unicode-to-ascii implementation // This lookup table is used to help decode the first byte of // a multi-byte UTF8 character. var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x10), uint8(0x11), uint8(0x12), uint8(0x13), uint8(0x14), uint8(0x15), uint8(0x16), uint8(0x17), uint8(0x18), uint8(0x19), uint8(0x1a), uint8(0x1b), uint8(0x1c), uint8(0x1d), uint8(0x1e), uint8(0x1f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), } /* spellfix.c:1243:28 */ // Return the value of the first UTF-8 character in the string. func utf8Read(tls *libc.TLS, z uintptr, n int32, pSize uintptr) int32 { /* spellfix.c:1258:12: */ var c int32 var i int32 // All callers to this routine (in the current implementation) // always have n>0. if 0 != 0 { c = libc.AssignInt32(&i, 0) } else { c = int32(*(*uint8)(unsafe.Pointer(z))) i = 1 if c >= 0xc0 { c = int32(sqlite3Utf8Trans1[(c - 0xc0)]) for (i < n) && ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) & 0xc0) == 0x80) { c = ((c << 6) + (0x3f & int32(*(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1))))))) } } } *(*int32)(unsafe.Pointer(pSize)) = i return c } // Return the number of characters in the utf-8 string in the nIn byte // buffer pointed to by zIn. func utf8Charlen(tls *libc.TLS, zIn uintptr, nIn int32) int32 { /* spellfix.c:1283:12: */ bp := tls.Alloc(4) defer tls.Free(4) var i int32 var nChar int32 = 0 for i = 0; i < nIn; nChar++ { // var sz int32 at bp, 4 utf8Read(tls, (zIn + uintptr(i)), (nIn - i), bp /* &sz */) i = i + (*(*int32)(unsafe.Pointer(bp /* sz */))) } return nChar } type Transliteration1 = struct { FcFrom uint16 FcTo0 uint8 FcTo1 uint8 FcTo2 uint8 FcTo3 uint8 } /* spellfix.c:1294:9 */ type Transliteration = Transliteration1 /* spellfix.c:1294:32 */ // Table of translations from unicode characters into ASCII. var translit = [389]Transliteration{ {FcFrom: uint16(0x00A0), FcTo0: uint8(0x20)}, //   to {FcFrom: uint16(0x00B5), FcTo0: uint8(0x75)}, // µ to u {FcFrom: uint16(0x00C0), FcTo0: uint8(0x41)}, // À to A {FcFrom: uint16(0x00C1), FcTo0: uint8(0x41)}, // Á to A {FcFrom: uint16(0x00C2), FcTo0: uint8(0x41)}, //  to A {FcFrom: uint16(0x00C3), FcTo0: uint8(0x41)}, // à to A {FcFrom: uint16(0x00C4), FcTo0: uint8(0x41), FcTo1: uint8(0x65)}, // Ä to Ae {FcFrom: uint16(0x00C5), FcTo0: uint8(0x41), FcTo1: uint8(0x61)}, // Å to Aa {FcFrom: uint16(0x00C6), FcTo0: uint8(0x41), FcTo1: uint8(0x45)}, // Æ to AE {FcFrom: uint16(0x00C7), FcTo0: uint8(0x43)}, // Ç to C {FcFrom: uint16(0x00C8), FcTo0: uint8(0x45)}, // È to E {FcFrom: uint16(0x00C9), FcTo0: uint8(0x45)}, // É to E {FcFrom: uint16(0x00CA), FcTo0: uint8(0x45)}, // Ê to E {FcFrom: uint16(0x00CB), FcTo0: uint8(0x45)}, // Ë to E {FcFrom: uint16(0x00CC), FcTo0: uint8(0x49)}, // Ì to I {FcFrom: uint16(0x00CD), FcTo0: uint8(0x49)}, // Í to I {FcFrom: uint16(0x00CE), FcTo0: uint8(0x49)}, // Î to I {FcFrom: uint16(0x00CF), FcTo0: uint8(0x49)}, // Ï to I {FcFrom: uint16(0x00D0), FcTo0: uint8(0x44)}, // Ð to D {FcFrom: uint16(0x00D1), FcTo0: uint8(0x4E)}, // Ñ to N {FcFrom: uint16(0x00D2), FcTo0: uint8(0x4F)}, // Ò to O {FcFrom: uint16(0x00D3), FcTo0: uint8(0x4F)}, // Ó to O {FcFrom: uint16(0x00D4), FcTo0: uint8(0x4F)}, // Ô to O {FcFrom: uint16(0x00D5), FcTo0: uint8(0x4F)}, // Õ to O {FcFrom: uint16(0x00D6), FcTo0: uint8(0x4F), FcTo1: uint8(0x65)}, // Ö to Oe {FcFrom: uint16(0x00D7), FcTo0: uint8(0x78)}, // × to x {FcFrom: uint16(0x00D8), FcTo0: uint8(0x4F)}, // Ø to O {FcFrom: uint16(0x00D9), FcTo0: uint8(0x55)}, // Ù to U {FcFrom: uint16(0x00DA), FcTo0: uint8(0x55)}, // Ú to U {FcFrom: uint16(0x00DB), FcTo0: uint8(0x55)}, // Û to U {FcFrom: uint16(0x00DC), FcTo0: uint8(0x55), FcTo1: uint8(0x65)}, // Ü to Ue {FcFrom: uint16(0x00DD), FcTo0: uint8(0x59)}, // Ý to Y {FcFrom: uint16(0x00DE), FcTo0: uint8(0x54), FcTo1: uint8(0x68)}, // Þ to Th {FcFrom: uint16(0x00DF), FcTo0: uint8(0x73), FcTo1: uint8(0x73)}, // ß to ss {FcFrom: uint16(0x00E0), FcTo0: uint8(0x61)}, // à to a {FcFrom: uint16(0x00E1), FcTo0: uint8(0x61)}, // á to a {FcFrom: uint16(0x00E2), FcTo0: uint8(0x61)}, // â to a {FcFrom: uint16(0x00E3), FcTo0: uint8(0x61)}, // ã to a {FcFrom: uint16(0x00E4), FcTo0: uint8(0x61), FcTo1: uint8(0x65)}, // ä to ae {FcFrom: uint16(0x00E5), FcTo0: uint8(0x61), FcTo1: uint8(0x61)}, // å to aa {FcFrom: uint16(0x00E6), FcTo0: uint8(0x61), FcTo1: uint8(0x65)}, // æ to ae {FcFrom: uint16(0x00E7), FcTo0: uint8(0x63)}, // ç to c {FcFrom: uint16(0x00E8), FcTo0: uint8(0x65)}, // è to e {FcFrom: uint16(0x00E9), FcTo0: uint8(0x65)}, // é to e {FcFrom: uint16(0x00EA), FcTo0: uint8(0x65)}, // ê to e {FcFrom: uint16(0x00EB), FcTo0: uint8(0x65)}, // ë to e {FcFrom: uint16(0x00EC), FcTo0: uint8(0x69)}, // ì to i {FcFrom: uint16(0x00ED), FcTo0: uint8(0x69)}, // í to i {FcFrom: uint16(0x00EE), FcTo0: uint8(0x69)}, // î to i {FcFrom: uint16(0x00EF), FcTo0: uint8(0x69)}, // ï to i {FcFrom: uint16(0x00F0), FcTo0: uint8(0x64)}, // ð to d {FcFrom: uint16(0x00F1), FcTo0: uint8(0x6E)}, // ñ to n {FcFrom: uint16(0x00F2), FcTo0: uint8(0x6F)}, // ò to o {FcFrom: uint16(0x00F3), FcTo0: uint8(0x6F)}, // ó to o {FcFrom: uint16(0x00F4), FcTo0: uint8(0x6F)}, // ô to o {FcFrom: uint16(0x00F5), FcTo0: uint8(0x6F)}, // õ to o {FcFrom: uint16(0x00F6), FcTo0: uint8(0x6F), FcTo1: uint8(0x65)}, // ö to oe {FcFrom: uint16(0x00F7), FcTo0: uint8(0x3A)}, // ÷ to : {FcFrom: uint16(0x00F8), FcTo0: uint8(0x6F)}, // ø to o {FcFrom: uint16(0x00F9), FcTo0: uint8(0x75)}, // ù to u {FcFrom: uint16(0x00FA), FcTo0: uint8(0x75)}, // ú to u {FcFrom: uint16(0x00FB), FcTo0: uint8(0x75)}, // û to u {FcFrom: uint16(0x00FC), FcTo0: uint8(0x75), FcTo1: uint8(0x65)}, // ü to ue {FcFrom: uint16(0x00FD), FcTo0: uint8(0x79)}, // ý to y {FcFrom: uint16(0x00FE), FcTo0: uint8(0x74), FcTo1: uint8(0x68)}, // þ to th {FcFrom: uint16(0x00FF), FcTo0: uint8(0x79)}, // ÿ to y {FcFrom: uint16(0x0100), FcTo0: uint8(0x41)}, // Ā to A {FcFrom: uint16(0x0101), FcTo0: uint8(0x61)}, // ā to a {FcFrom: uint16(0x0102), FcTo0: uint8(0x41)}, // Ă to A {FcFrom: uint16(0x0103), FcTo0: uint8(0x61)}, // ă to a {FcFrom: uint16(0x0104), FcTo0: uint8(0x41)}, // Ą to A {FcFrom: uint16(0x0105), FcTo0: uint8(0x61)}, // ą to a {FcFrom: uint16(0x0106), FcTo0: uint8(0x43)}, // Ć to C {FcFrom: uint16(0x0107), FcTo0: uint8(0x63)}, // ć to c {FcFrom: uint16(0x0108), FcTo0: uint8(0x43), FcTo1: uint8(0x68)}, // Ĉ to Ch {FcFrom: uint16(0x0109), FcTo0: uint8(0x63), FcTo1: uint8(0x68)}, // ĉ to ch {FcFrom: uint16(0x010A), FcTo0: uint8(0x43)}, // Ċ to C {FcFrom: uint16(0x010B), FcTo0: uint8(0x63)}, // ċ to c {FcFrom: uint16(0x010C), FcTo0: uint8(0x43)}, // Č to C {FcFrom: uint16(0x010D), FcTo0: uint8(0x63)}, // č to c {FcFrom: uint16(0x010E), FcTo0: uint8(0x44)}, // Ď to D {FcFrom: uint16(0x010F), FcTo0: uint8(0x64)}, // ď to d {FcFrom: uint16(0x0110), FcTo0: uint8(0x44)}, // Đ to D {FcFrom: uint16(0x0111), FcTo0: uint8(0x64)}, // đ to d {FcFrom: uint16(0x0112), FcTo0: uint8(0x45)}, // Ē to E {FcFrom: uint16(0x0113), FcTo0: uint8(0x65)}, // ē to e {FcFrom: uint16(0x0114), FcTo0: uint8(0x45)}, // Ĕ to E {FcFrom: uint16(0x0115), FcTo0: uint8(0x65)}, // ĕ to e {FcFrom: uint16(0x0116), FcTo0: uint8(0x45)}, // Ė to E {FcFrom: uint16(0x0117), FcTo0: uint8(0x65)}, // ė to e {FcFrom: uint16(0x0118), FcTo0: uint8(0x45)}, // Ę to E {FcFrom: uint16(0x0119), FcTo0: uint8(0x65)}, // ę to e {FcFrom: uint16(0x011A), FcTo0: uint8(0x45)}, // Ě to E {FcFrom: uint16(0x011B), FcTo0: uint8(0x65)}, // ě to e {FcFrom: uint16(0x011C), FcTo0: uint8(0x47), FcTo1: uint8(0x68)}, // Ĝ to Gh {FcFrom: uint16(0x011D), FcTo0: uint8(0x67), FcTo1: uint8(0x68)}, // ĝ to gh {FcFrom: uint16(0x011E), FcTo0: uint8(0x47)}, // Ğ to G {FcFrom: uint16(0x011F), FcTo0: uint8(0x67)}, // ğ to g {FcFrom: uint16(0x0120), FcTo0: uint8(0x47)}, // Ġ to G {FcFrom: uint16(0x0121), FcTo0: uint8(0x67)}, // ġ to g {FcFrom: uint16(0x0122), FcTo0: uint8(0x47)}, // Ģ to G {FcFrom: uint16(0x0123), FcTo0: uint8(0x67)}, // ģ to g {FcFrom: uint16(0x0124), FcTo0: uint8(0x48), FcTo1: uint8(0x68)}, // Ĥ to Hh {FcFrom: uint16(0x0125), FcTo0: uint8(0x68), FcTo1: uint8(0x68)}, // ĥ to hh {FcFrom: uint16(0x0126), FcTo0: uint8(0x48)}, // Ħ to H {FcFrom: uint16(0x0127), FcTo0: uint8(0x68)}, // ħ to h {FcFrom: uint16(0x0128), FcTo0: uint8(0x49)}, // Ĩ to I {FcFrom: uint16(0x0129), FcTo0: uint8(0x69)}, // ĩ to i {FcFrom: uint16(0x012A), FcTo0: uint8(0x49)}, // Ī to I {FcFrom: uint16(0x012B), FcTo0: uint8(0x69)}, // ī to i {FcFrom: uint16(0x012C), FcTo0: uint8(0x49)}, // Ĭ to I {FcFrom: uint16(0x012D), FcTo0: uint8(0x69)}, // ĭ to i {FcFrom: uint16(0x012E), FcTo0: uint8(0x49)}, // Į to I {FcFrom: uint16(0x012F), FcTo0: uint8(0x69)}, // į to i {FcFrom: uint16(0x0130), FcTo0: uint8(0x49)}, // İ to I {FcFrom: uint16(0x0131), FcTo0: uint8(0x69)}, // ı to i {FcFrom: uint16(0x0132), FcTo0: uint8(0x49), FcTo1: uint8(0x4A)}, // IJ to IJ {FcFrom: uint16(0x0133), FcTo0: uint8(0x69), FcTo1: uint8(0x6A)}, // ij to ij {FcFrom: uint16(0x0134), FcTo0: uint8(0x4A), FcTo1: uint8(0x68)}, // Ĵ to Jh {FcFrom: uint16(0x0135), FcTo0: uint8(0x6A), FcTo1: uint8(0x68)}, // ĵ to jh {FcFrom: uint16(0x0136), FcTo0: uint8(0x4B)}, // Ķ to K {FcFrom: uint16(0x0137), FcTo0: uint8(0x6B)}, // ķ to k {FcFrom: uint16(0x0138), FcTo0: uint8(0x6B)}, // ĸ to k {FcFrom: uint16(0x0139), FcTo0: uint8(0x4C)}, // Ĺ to L {FcFrom: uint16(0x013A), FcTo0: uint8(0x6C)}, // ĺ to l {FcFrom: uint16(0x013B), FcTo0: uint8(0x4C)}, // Ļ to L {FcFrom: uint16(0x013C), FcTo0: uint8(0x6C)}, // ļ to l {FcFrom: uint16(0x013D), FcTo0: uint8(0x4C)}, // Ľ to L {FcFrom: uint16(0x013E), FcTo0: uint8(0x6C)}, // ľ to l {FcFrom: uint16(0x013F), FcTo0: uint8(0x4C), FcTo1: uint8(0x2E)}, // Ŀ to L. {FcFrom: uint16(0x0140), FcTo0: uint8(0x6C), FcTo1: uint8(0x2E)}, // ŀ to l. {FcFrom: uint16(0x0141), FcTo0: uint8(0x4C)}, // Ł to L {FcFrom: uint16(0x0142), FcTo0: uint8(0x6C)}, // ł to l {FcFrom: uint16(0x0143), FcTo0: uint8(0x4E)}, // Ń to N {FcFrom: uint16(0x0144), FcTo0: uint8(0x6E)}, // ń to n {FcFrom: uint16(0x0145), FcTo0: uint8(0x4E)}, // Ņ to N {FcFrom: uint16(0x0146), FcTo0: uint8(0x6E)}, // ņ to n {FcFrom: uint16(0x0147), FcTo0: uint8(0x4E)}, // Ň to N {FcFrom: uint16(0x0148), FcTo0: uint8(0x6E)}, // ň to n {FcFrom: uint16(0x0149), FcTo0: uint8(0x27), FcTo1: uint8(0x6E)}, // ʼn to 'n {FcFrom: uint16(0x014A), FcTo0: uint8(0x4E), FcTo1: uint8(0x47)}, // Ŋ to NG {FcFrom: uint16(0x014B), FcTo0: uint8(0x6E), FcTo1: uint8(0x67)}, // ŋ to ng {FcFrom: uint16(0x014C), FcTo0: uint8(0x4F)}, // Ō to O {FcFrom: uint16(0x014D), FcTo0: uint8(0x6F)}, // ō to o {FcFrom: uint16(0x014E), FcTo0: uint8(0x4F)}, // Ŏ to O {FcFrom: uint16(0x014F), FcTo0: uint8(0x6F)}, // ŏ to o {FcFrom: uint16(0x0150), FcTo0: uint8(0x4F)}, // Ő to O {FcFrom: uint16(0x0151), FcTo0: uint8(0x6F)}, // ő to o {FcFrom: uint16(0x0152), FcTo0: uint8(0x4F), FcTo1: uint8(0x45)}, // Œ to OE {FcFrom: uint16(0x0153), FcTo0: uint8(0x6F), FcTo1: uint8(0x65)}, // œ to oe {FcFrom: uint16(0x0154), FcTo0: uint8(0x52)}, // Ŕ to R {FcFrom: uint16(0x0155), FcTo0: uint8(0x72)}, // ŕ to r {FcFrom: uint16(0x0156), FcTo0: uint8(0x52)}, // Ŗ to R {FcFrom: uint16(0x0157), FcTo0: uint8(0x72)}, // ŗ to r {FcFrom: uint16(0x0158), FcTo0: uint8(0x52)}, // Ř to R {FcFrom: uint16(0x0159), FcTo0: uint8(0x72)}, // ř to r {FcFrom: uint16(0x015A), FcTo0: uint8(0x53)}, // Ś to S {FcFrom: uint16(0x015B), FcTo0: uint8(0x73)}, // ś to s {FcFrom: uint16(0x015C), FcTo0: uint8(0x53), FcTo1: uint8(0x68)}, // Ŝ to Sh {FcFrom: uint16(0x015D), FcTo0: uint8(0x73), FcTo1: uint8(0x68)}, // ŝ to sh {FcFrom: uint16(0x015E), FcTo0: uint8(0x53)}, // Ş to S {FcFrom: uint16(0x015F), FcTo0: uint8(0x73)}, // ş to s {FcFrom: uint16(0x0160), FcTo0: uint8(0x53)}, // Š to S {FcFrom: uint16(0x0161), FcTo0: uint8(0x73)}, // š to s {FcFrom: uint16(0x0162), FcTo0: uint8(0x54)}, // Ţ to T {FcFrom: uint16(0x0163), FcTo0: uint8(0x74)}, // ţ to t {FcFrom: uint16(0x0164), FcTo0: uint8(0x54)}, // Ť to T {FcFrom: uint16(0x0165), FcTo0: uint8(0x74)}, // ť to t {FcFrom: uint16(0x0166), FcTo0: uint8(0x54)}, // Ŧ to T {FcFrom: uint16(0x0167), FcTo0: uint8(0x74)}, // ŧ to t {FcFrom: uint16(0x0168), FcTo0: uint8(0x55)}, // Ũ to U {FcFrom: uint16(0x0169), FcTo0: uint8(0x75)}, // ũ to u {FcFrom: uint16(0x016A), FcTo0: uint8(0x55)}, // Ū to U {FcFrom: uint16(0x016B), FcTo0: uint8(0x75)}, // ū to u {FcFrom: uint16(0x016C), FcTo0: uint8(0x55)}, // Ŭ to U {FcFrom: uint16(0x016D), FcTo0: uint8(0x75)}, // ŭ to u {FcFrom: uint16(0x016E), FcTo0: uint8(0x55)}, // Ů to U {FcFrom: uint16(0x016F), FcTo0: uint8(0x75)}, // ů to u {FcFrom: uint16(0x0170), FcTo0: uint8(0x55)}, // Ű to U {FcFrom: uint16(0x0171), FcTo0: uint8(0x75)}, // ű to u {FcFrom: uint16(0x0172), FcTo0: uint8(0x55)}, // Ų to U {FcFrom: uint16(0x0173), FcTo0: uint8(0x75)}, // ų to u {FcFrom: uint16(0x0174), FcTo0: uint8(0x57)}, // Ŵ to W {FcFrom: uint16(0x0175), FcTo0: uint8(0x77)}, // ŵ to w {FcFrom: uint16(0x0176), FcTo0: uint8(0x59)}, // Ŷ to Y {FcFrom: uint16(0x0177), FcTo0: uint8(0x79)}, // ŷ to y {FcFrom: uint16(0x0178), FcTo0: uint8(0x59)}, // Ÿ to Y {FcFrom: uint16(0x0179), FcTo0: uint8(0x5A)}, // Ź to Z {FcFrom: uint16(0x017A), FcTo0: uint8(0x7A)}, // ź to z {FcFrom: uint16(0x017B), FcTo0: uint8(0x5A)}, // Ż to Z {FcFrom: uint16(0x017C), FcTo0: uint8(0x7A)}, // ż to z {FcFrom: uint16(0x017D), FcTo0: uint8(0x5A)}, // Ž to Z {FcFrom: uint16(0x017E), FcTo0: uint8(0x7A)}, // ž to z {FcFrom: uint16(0x017F), FcTo0: uint8(0x73)}, // ſ to s {FcFrom: uint16(0x0192), FcTo0: uint8(0x66)}, // ƒ to f {FcFrom: uint16(0x0218), FcTo0: uint8(0x53)}, // Ș to S {FcFrom: uint16(0x0219), FcTo0: uint8(0x73)}, // ș to s {FcFrom: uint16(0x021A), FcTo0: uint8(0x54)}, // Ț to T {FcFrom: uint16(0x021B), FcTo0: uint8(0x74)}, // ț to t {FcFrom: uint16(0x0386), FcTo0: uint8(0x41)}, // Ά to A {FcFrom: uint16(0x0388), FcTo0: uint8(0x45)}, // Έ to E {FcFrom: uint16(0x0389), FcTo0: uint8(0x49)}, // Ή to I {FcFrom: uint16(0x038A), FcTo0: uint8(0x49)}, // Ί to I {FcFrom: uint16(0x038C), FcTo0: uint8(0x4f)}, // Ό to O {FcFrom: uint16(0x038E), FcTo0: uint8(0x59)}, // Ύ to Y {FcFrom: uint16(0x038F), FcTo0: uint8(0x4f)}, // Ώ to O {FcFrom: uint16(0x0390), FcTo0: uint8(0x69)}, // ΐ to i {FcFrom: uint16(0x0391), FcTo0: uint8(0x41)}, // Α to A {FcFrom: uint16(0x0392), FcTo0: uint8(0x42)}, // Β to B {FcFrom: uint16(0x0393), FcTo0: uint8(0x47)}, // Γ to G {FcFrom: uint16(0x0394), FcTo0: uint8(0x44)}, // Δ to D {FcFrom: uint16(0x0395), FcTo0: uint8(0x45)}, // Ε to E {FcFrom: uint16(0x0396), FcTo0: uint8(0x5a)}, // Ζ to Z {FcFrom: uint16(0x0397), FcTo0: uint8(0x49)}, // Η to I {FcFrom: uint16(0x0398), FcTo0: uint8(0x54), FcTo1: uint8(0x68)}, // Θ to Th {FcFrom: uint16(0x0399), FcTo0: uint8(0x49)}, // Ι to I {FcFrom: uint16(0x039A), FcTo0: uint8(0x4b)}, // Κ to K {FcFrom: uint16(0x039B), FcTo0: uint8(0x4c)}, // Λ to L {FcFrom: uint16(0x039C), FcTo0: uint8(0x4d)}, // Μ to M {FcFrom: uint16(0x039D), FcTo0: uint8(0x4e)}, // Ν to N {FcFrom: uint16(0x039E), FcTo0: uint8(0x58)}, // Ξ to X {FcFrom: uint16(0x039F), FcTo0: uint8(0x4f)}, // Ο to O {FcFrom: uint16(0x03A0), FcTo0: uint8(0x50)}, // Π to P {FcFrom: uint16(0x03A1), FcTo0: uint8(0x52)}, // Ρ to R {FcFrom: uint16(0x03A3), FcTo0: uint8(0x53)}, // Σ to S {FcFrom: uint16(0x03A4), FcTo0: uint8(0x54)}, // Τ to T {FcFrom: uint16(0x03A5), FcTo0: uint8(0x59)}, // Υ to Y {FcFrom: uint16(0x03A6), FcTo0: uint8(0x46)}, // Φ to F {FcFrom: uint16(0x03A7), FcTo0: uint8(0x43), FcTo1: uint8(0x68)}, // Χ to Ch {FcFrom: uint16(0x03A8), FcTo0: uint8(0x50), FcTo1: uint8(0x73)}, // Ψ to Ps {FcFrom: uint16(0x03A9), FcTo0: uint8(0x4f)}, // Ω to O {FcFrom: uint16(0x03AA), FcTo0: uint8(0x49)}, // Ϊ to I {FcFrom: uint16(0x03AB), FcTo0: uint8(0x59)}, // Ϋ to Y {FcFrom: uint16(0x03AC), FcTo0: uint8(0x61)}, // ά to a {FcFrom: uint16(0x03AD), FcTo0: uint8(0x65)}, // έ to e {FcFrom: uint16(0x03AE), FcTo0: uint8(0x69)}, // ή to i {FcFrom: uint16(0x03AF), FcTo0: uint8(0x69)}, // ί to i {FcFrom: uint16(0x03B1), FcTo0: uint8(0x61)}, // α to a {FcFrom: uint16(0x03B2), FcTo0: uint8(0x62)}, // β to b {FcFrom: uint16(0x03B3), FcTo0: uint8(0x67)}, // γ to g {FcFrom: uint16(0x03B4), FcTo0: uint8(0x64)}, // δ to d {FcFrom: uint16(0x03B5), FcTo0: uint8(0x65)}, // ε to e {FcFrom: uint16(0x03B6), FcTo0: uint8(0x7a)}, // ζ to z {FcFrom: uint16(0x03B7), FcTo0: uint8(0x69)}, // η to i {FcFrom: uint16(0x03B8), FcTo0: uint8(0x74), FcTo1: uint8(0x68)}, // θ to th {FcFrom: uint16(0x03B9), FcTo0: uint8(0x69)}, // ι to i {FcFrom: uint16(0x03BA), FcTo0: uint8(0x6b)}, // κ to k {FcFrom: uint16(0x03BB), FcTo0: uint8(0x6c)}, // λ to l {FcFrom: uint16(0x03BC), FcTo0: uint8(0x6d)}, // μ to m {FcFrom: uint16(0x03BD), FcTo0: uint8(0x6e)}, // ν to n {FcFrom: uint16(0x03BE), FcTo0: uint8(0x78)}, // ξ to x {FcFrom: uint16(0x03BF), FcTo0: uint8(0x6f)}, // ο to o {FcFrom: uint16(0x03C0), FcTo0: uint8(0x70)}, // π to p {FcFrom: uint16(0x03C1), FcTo0: uint8(0x72)}, // ρ to r {FcFrom: uint16(0x03C3), FcTo0: uint8(0x73)}, // σ to s {FcFrom: uint16(0x03C4), FcTo0: uint8(0x74)}, // τ to t {FcFrom: uint16(0x03C5), FcTo0: uint8(0x79)}, // υ to y {FcFrom: uint16(0x03C6), FcTo0: uint8(0x66)}, // φ to f {FcFrom: uint16(0x03C7), FcTo0: uint8(0x63), FcTo1: uint8(0x68)}, // χ to ch {FcFrom: uint16(0x03C8), FcTo0: uint8(0x70), FcTo1: uint8(0x73)}, // ψ to ps {FcFrom: uint16(0x03C9), FcTo0: uint8(0x6f)}, // ω to o {FcFrom: uint16(0x03CA), FcTo0: uint8(0x69)}, // ϊ to i {FcFrom: uint16(0x03CB), FcTo0: uint8(0x79)}, // ϋ to y {FcFrom: uint16(0x03CC), FcTo0: uint8(0x6f)}, // ό to o {FcFrom: uint16(0x03CD), FcTo0: uint8(0x79)}, // ύ to y {FcFrom: uint16(0x03CE), FcTo0: uint8(0x69)}, // ώ to i {FcFrom: uint16(0x0400), FcTo0: uint8(0x45)}, // Ѐ to E {FcFrom: uint16(0x0401), FcTo0: uint8(0x45)}, // Ё to E {FcFrom: uint16(0x0402), FcTo0: uint8(0x44)}, // Ђ to D {FcFrom: uint16(0x0403), FcTo0: uint8(0x47)}, // Ѓ to G {FcFrom: uint16(0x0404), FcTo0: uint8(0x45)}, // Є to E {FcFrom: uint16(0x0405), FcTo0: uint8(0x5a)}, // Ѕ to Z {FcFrom: uint16(0x0406), FcTo0: uint8(0x49)}, // І to I {FcFrom: uint16(0x0407), FcTo0: uint8(0x49)}, // Ї to I {FcFrom: uint16(0x0408), FcTo0: uint8(0x4a)}, // Ј to J {FcFrom: uint16(0x0409), FcTo0: uint8(0x49)}, // Љ to I {FcFrom: uint16(0x040A), FcTo0: uint8(0x4e)}, // Њ to N {FcFrom: uint16(0x040B), FcTo0: uint8(0x44)}, // Ћ to D {FcFrom: uint16(0x040C), FcTo0: uint8(0x4b)}, // Ќ to K {FcFrom: uint16(0x040D), FcTo0: uint8(0x49)}, // Ѝ to I {FcFrom: uint16(0x040E), FcTo0: uint8(0x55)}, // Ў to U {FcFrom: uint16(0x040F), FcTo0: uint8(0x44)}, // Џ to D {FcFrom: uint16(0x0410), FcTo0: uint8(0x41)}, // А to A {FcFrom: uint16(0x0411), FcTo0: uint8(0x42)}, // Б to B {FcFrom: uint16(0x0412), FcTo0: uint8(0x56)}, // В to V {FcFrom: uint16(0x0413), FcTo0: uint8(0x47)}, // Г to G {FcFrom: uint16(0x0414), FcTo0: uint8(0x44)}, // Д to D {FcFrom: uint16(0x0415), FcTo0: uint8(0x45)}, // Е to E {FcFrom: uint16(0x0416), FcTo0: uint8(0x5a), FcTo1: uint8(0x68)}, // Ж to Zh {FcFrom: uint16(0x0417), FcTo0: uint8(0x5a)}, // З to Z {FcFrom: uint16(0x0418), FcTo0: uint8(0x49)}, // И to I {FcFrom: uint16(0x0419), FcTo0: uint8(0x49)}, // Й to I {FcFrom: uint16(0x041A), FcTo0: uint8(0x4b)}, // К to K {FcFrom: uint16(0x041B), FcTo0: uint8(0x4c)}, // Л to L {FcFrom: uint16(0x041C), FcTo0: uint8(0x4d)}, // М to M {FcFrom: uint16(0x041D), FcTo0: uint8(0x4e)}, // Н to N {FcFrom: uint16(0x041E), FcTo0: uint8(0x4f)}, // О to O {FcFrom: uint16(0x041F), FcTo0: uint8(0x50)}, // П to P {FcFrom: uint16(0x0420), FcTo0: uint8(0x52)}, // Р to R {FcFrom: uint16(0x0421), FcTo0: uint8(0x53)}, // С to S {FcFrom: uint16(0x0422), FcTo0: uint8(0x54)}, // Т to T {FcFrom: uint16(0x0423), FcTo0: uint8(0x55)}, // У to U {FcFrom: uint16(0x0424), FcTo0: uint8(0x46)}, // Ф to F {FcFrom: uint16(0x0425), FcTo0: uint8(0x4b), FcTo1: uint8(0x68)}, // Х to Kh {FcFrom: uint16(0x0426), FcTo0: uint8(0x54), FcTo1: uint8(0x63)}, // Ц to Tc {FcFrom: uint16(0x0427), FcTo0: uint8(0x43), FcTo1: uint8(0x68)}, // Ч to Ch {FcFrom: uint16(0x0428), FcTo0: uint8(0x53), FcTo1: uint8(0x68)}, // Ш to Sh {FcFrom: uint16(0x0429), FcTo0: uint8(0x53), FcTo1: uint8(0x68), FcTo2: uint8(0x63), FcTo3: uint8(0x68)}, // Щ to Shch {FcFrom: uint16(0x042A), FcTo0: uint8(0x61)}, // to A {FcFrom: uint16(0x042B), FcTo0: uint8(0x59)}, // Ы to Y {FcFrom: uint16(0x042C), FcTo0: uint8(0x59)}, // to Y {FcFrom: uint16(0x042D), FcTo0: uint8(0x45)}, // Э to E {FcFrom: uint16(0x042E), FcTo0: uint8(0x49), FcTo1: uint8(0x75)}, // Ю to Iu {FcFrom: uint16(0x042F), FcTo0: uint8(0x49), FcTo1: uint8(0x61)}, // Я to Ia {FcFrom: uint16(0x0430), FcTo0: uint8(0x61)}, // а to a {FcFrom: uint16(0x0431), FcTo0: uint8(0x62)}, // б to b {FcFrom: uint16(0x0432), FcTo0: uint8(0x76)}, // в to v {FcFrom: uint16(0x0433), FcTo0: uint8(0x67)}, // г to g {FcFrom: uint16(0x0434), FcTo0: uint8(0x64)}, // д to d {FcFrom: uint16(0x0435), FcTo0: uint8(0x65)}, // е to e {FcFrom: uint16(0x0436), FcTo0: uint8(0x7a), FcTo1: uint8(0x68)}, // ж to zh {FcFrom: uint16(0x0437), FcTo0: uint8(0x7a)}, // з to z {FcFrom: uint16(0x0438), FcTo0: uint8(0x69)}, // и to i {FcFrom: uint16(0x0439), FcTo0: uint8(0x69)}, // й to i {FcFrom: uint16(0x043A), FcTo0: uint8(0x6b)}, // к to k {FcFrom: uint16(0x043B), FcTo0: uint8(0x6c)}, // л to l {FcFrom: uint16(0x043C), FcTo0: uint8(0x6d)}, // м to m {FcFrom: uint16(0x043D), FcTo0: uint8(0x6e)}, // н to n {FcFrom: uint16(0x043E), FcTo0: uint8(0x6f)}, // о to o {FcFrom: uint16(0x043F), FcTo0: uint8(0x70)}, // п to p {FcFrom: uint16(0x0440), FcTo0: uint8(0x72)}, // р to r {FcFrom: uint16(0x0441), FcTo0: uint8(0x73)}, // с to s {FcFrom: uint16(0x0442), FcTo0: uint8(0x74)}, // т to t {FcFrom: uint16(0x0443), FcTo0: uint8(0x75)}, // у to u {FcFrom: uint16(0x0444), FcTo0: uint8(0x66)}, // ф to f {FcFrom: uint16(0x0445), FcTo0: uint8(0x6b), FcTo1: uint8(0x68)}, // х to kh {FcFrom: uint16(0x0446), FcTo0: uint8(0x74), FcTo1: uint8(0x63)}, // ц to tc {FcFrom: uint16(0x0447), FcTo0: uint8(0x63), FcTo1: uint8(0x68)}, // ч to ch {FcFrom: uint16(0x0448), FcTo0: uint8(0x73), FcTo1: uint8(0x68)}, // ш to sh {FcFrom: uint16(0x0449), FcTo0: uint8(0x73), FcTo1: uint8(0x68), FcTo2: uint8(0x63), FcTo3: uint8(0x68)}, // щ to shch {FcFrom: uint16(0x044A), FcTo0: uint8(0x61)}, // to a {FcFrom: uint16(0x044B), FcTo0: uint8(0x79)}, // ы to y {FcFrom: uint16(0x044C), FcTo0: uint8(0x79)}, // to y {FcFrom: uint16(0x044D), FcTo0: uint8(0x65)}, // э to e {FcFrom: uint16(0x044E), FcTo0: uint8(0x69), FcTo1: uint8(0x75)}, // ю to iu {FcFrom: uint16(0x044F), FcTo0: uint8(0x69), FcTo1: uint8(0x61)}, // я to ia {FcFrom: uint16(0x0450), FcTo0: uint8(0x65)}, // ѐ to e {FcFrom: uint16(0x0451), FcTo0: uint8(0x65)}, // ё to e {FcFrom: uint16(0x0452), FcTo0: uint8(0x64)}, // ђ to d {FcFrom: uint16(0x0453), FcTo0: uint8(0x67)}, // ѓ to g {FcFrom: uint16(0x0454), FcTo0: uint8(0x65)}, // є to e {FcFrom: uint16(0x0455), FcTo0: uint8(0x7a)}, // ѕ to z {FcFrom: uint16(0x0456), FcTo0: uint8(0x69)}, // і to i {FcFrom: uint16(0x0457), FcTo0: uint8(0x69)}, // ї to i {FcFrom: uint16(0x0458), FcTo0: uint8(0x6a)}, // ј to j {FcFrom: uint16(0x0459), FcTo0: uint8(0x69)}, // љ to i {FcFrom: uint16(0x045A), FcTo0: uint8(0x6e)}, // њ to n {FcFrom: uint16(0x045B), FcTo0: uint8(0x64)}, // ћ to d {FcFrom: uint16(0x045C), FcTo0: uint8(0x6b)}, // ќ to k {FcFrom: uint16(0x045D), FcTo0: uint8(0x69)}, // ѝ to i {FcFrom: uint16(0x045E), FcTo0: uint8(0x75)}, // ў to u {FcFrom: uint16(0x045F), FcTo0: uint8(0x64)}, // џ to d {FcFrom: uint16(0x1E02), FcTo0: uint8(0x42)}, // Ḃ to B {FcFrom: uint16(0x1E03), FcTo0: uint8(0x62)}, // ḃ to b {FcFrom: uint16(0x1E0A), FcTo0: uint8(0x44)}, // Ḋ to D {FcFrom: uint16(0x1E0B), FcTo0: uint8(0x64)}, // ḋ to d {FcFrom: uint16(0x1E1E), FcTo0: uint8(0x46)}, // Ḟ to F {FcFrom: uint16(0x1E1F), FcTo0: uint8(0x66)}, // ḟ to f {FcFrom: uint16(0x1E40), FcTo0: uint8(0x4D)}, // Ṁ to M {FcFrom: uint16(0x1E41), FcTo0: uint8(0x6D)}, // ṁ to m {FcFrom: uint16(0x1E56), FcTo0: uint8(0x50)}, // Ṗ to P {FcFrom: uint16(0x1E57), FcTo0: uint8(0x70)}, // ṗ to p {FcFrom: uint16(0x1E60), FcTo0: uint8(0x53)}, // Ṡ to S {FcFrom: uint16(0x1E61), FcTo0: uint8(0x73)}, // ṡ to s {FcFrom: uint16(0x1E6A), FcTo0: uint8(0x54)}, // Ṫ to T {FcFrom: uint16(0x1E6B), FcTo0: uint8(0x74)}, // ṫ to t {FcFrom: uint16(0x1E80), FcTo0: uint8(0x57)}, // Ẁ to W {FcFrom: uint16(0x1E81), FcTo0: uint8(0x77)}, // ẁ to w {FcFrom: uint16(0x1E82), FcTo0: uint8(0x57)}, // Ẃ to W {FcFrom: uint16(0x1E83), FcTo0: uint8(0x77)}, // ẃ to w {FcFrom: uint16(0x1E84), FcTo0: uint8(0x57)}, // Ẅ to W {FcFrom: uint16(0x1E85), FcTo0: uint8(0x77)}, // ẅ to w {FcFrom: uint16(0x1EF2), FcTo0: uint8(0x59)}, // Ỳ to Y {FcFrom: uint16(0x1EF3), FcTo0: uint8(0x79)}, // ỳ to y {FcFrom: uint16(0xFB00), FcTo0: uint8(0x66), FcTo1: uint8(0x66)}, // ff to ff {FcFrom: uint16(0xFB01), FcTo0: uint8(0x66), FcTo1: uint8(0x69)}, // fi to fi {FcFrom: uint16(0xFB02), FcTo0: uint8(0x66), FcTo1: uint8(0x6C)}, // fl to fl {FcFrom: uint16(0xFB05), FcTo0: uint8(0x73), FcTo1: uint8(0x74)}, // ſt to st {FcFrom: uint16(0xFB06), FcTo0: uint8(0x73), FcTo1: uint8(0x74)}, // st to st } /* spellfix.c:1306:30 */ func spellfixFindTranslit(tls *libc.TLS, c int32, pxTop uintptr) uintptr { /* spellfix.c:1698:30: */ *(*int32)(unsafe.Pointer(pxTop)) = (int32((uint64(unsafe.Sizeof(translit)) / uint64(unsafe.Sizeof(Transliteration{}))) - uint64(1))) return uintptr(unsafe.Pointer(&translit)) } // Convert the input string from UTF-8 into pure ASCII by converting // all non-ASCII characters to some combination of characters in the // ASCII subset. // // The returned string might contain more characters than the input. // // Space to hold the returned string comes from sqlite3_malloc() and // should be freed by the caller. func transliterate(tls *libc.TLS, zIn uintptr, nIn int32) uintptr { /* spellfix.c:1713:22: */ bp := tls.Alloc(8) defer tls.Free(8) var zOut uintptr = sqlite3.Xsqlite3_malloc64(tls, (uint64((nIn * 4) + 1))) var c int32 // var sz int32 at bp, 4 var nOut int32 if zOut == uintptr(0) { return uintptr(0) } nOut = 0 for nIn > 0 { c = utf8Read(tls, zIn, nIn, bp /* &sz */) zIn += uintptr(*(*int32)(unsafe.Pointer(bp /* sz */))) nIn = nIn - (*(*int32)(unsafe.Pointer(bp /* sz */))) if c <= 127 { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = uint8(c) } else { // var xTop int32 at bp+4, 4 var xBtm int32 var x int32 var tbl uintptr = spellfixFindTranslit(tls, c, bp+4 /* &xTop */) xBtm = 0 for *(*int32)(unsafe.Pointer(bp + 4 /* xTop */)) >= xBtm { x = ((*(*int32)(unsafe.Pointer(bp + 4 /* xTop */)) + xBtm) / 2) if int32((*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcFrom) == c { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = (*Transliteration)(unsafe.Pointer(tbl + uintptr(x)*6)).FcTo0 if (*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcTo1 != 0 { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = (*Transliteration)(unsafe.Pointer(tbl + uintptr(x)*6)).FcTo1 if (*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcTo2 != 0 { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = (*Transliteration)(unsafe.Pointer(tbl + uintptr(x)*6)).FcTo2 if (*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcTo3 != 0 { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = (*Transliteration)(unsafe.Pointer(tbl + uintptr(x)*6)).FcTo3 } } } c = 0 break } else if int32((*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcFrom) > c { *(*int32)(unsafe.Pointer(bp + 4 /* xTop */)) = (x - 1) } else { xBtm = (x + 1) } } if c != 0 { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&nOut, 1)))) = uint8('?') } } } *(*uint8)(unsafe.Pointer(zOut + uintptr(nOut))) = uint8(0) return zOut } // Return the number of characters in the shortest prefix of the input // string that transliterates to an ASCII string nTrans bytes or longer. // Or, if the transliteration of the input string is less than nTrans // bytes in size, return the number of characters in the input string. func translen_to_charlen(tls *libc.TLS, zIn uintptr, nIn int32, nTrans int32) int32 { /* spellfix.c:1771:12: */ bp := tls.Alloc(8) defer tls.Free(8) var i int32 var c int32 // var sz int32 at bp, 4 var nOut int32 var nChar int32 i = libc.AssignInt32(&nOut, 0) for nChar = 0; (i < nIn) && (nOut < nTrans); nChar++ { c = utf8Read(tls, (zIn + uintptr(i)), (nIn - i), bp /* &sz */) i = i + (*(*int32)(unsafe.Pointer(bp /* sz */))) nOut++ if c >= 128 { // var xTop int32 at bp+4, 4 var xBtm int32 var x int32 var tbl uintptr = spellfixFindTranslit(tls, c, bp+4 /* &xTop */) xBtm = 0 for *(*int32)(unsafe.Pointer(bp + 4 /* xTop */)) >= xBtm { x = ((*(*int32)(unsafe.Pointer(bp + 4 /* xTop */)) + xBtm) / 2) if int32((*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcFrom) == c { if (*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcTo1 != 0 { nOut++ if (*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcTo2 != 0 { nOut++ if (*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcTo3 != 0 { nOut++ } } } break } else if int32((*Transliteration)(unsafe.Pointer(tbl+uintptr(x)*6)).FcFrom) > c { *(*int32)(unsafe.Pointer(bp + 4 /* xTop */)) = (x - 1) } else { xBtm = (x + 1) } } } } return nChar } // spellfix1_translit(X) // // Convert a string that contains non-ASCII Roman characters into // pure ASCII. func transliterateSqlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* spellfix.c:1817:13: */ var zIn uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nIn int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var zOut uintptr = transliterate(tls, zIn, nIn) if zOut == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else { sqlite3.Xsqlite3_result_text(tls, context, zOut, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } // spellfix1_scriptcode(X) // // Try to determine the dominant script used by the word X and return // its ISO 15924 numeric code. // // The current implementation only understands the following scripts: // // 215 (Latin) // 220 (Cyrillic) // 200 (Greek) // // This routine will return 998 if the input X contains characters from // two or more of the above scripts or 999 if X contains no characters // from any of the above scripts. func scriptCodeSqlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* spellfix.c:1848:13: */ bp := tls.Alloc(4) defer tls.Free(4) var zIn uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nIn int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var c int32 // var sz int32 at bp, 4 var scriptMask int32 = 0 var res int32 var seenDigit int32 = 0 for nIn > 0 { c = utf8Read(tls, zIn, nIn, bp /* &sz */) zIn += uintptr(*(*int32)(unsafe.Pointer(bp /* sz */))) nIn = nIn - (*(*int32)(unsafe.Pointer(bp /* sz */))) if c < 0x02af { if (c >= 0x80) || (int32(midClass[(c&0x7f)]) < CCLASS_DIGIT) { scriptMask = scriptMask | (SCRIPT_LATIN) } else if (c >= '0') && (c <= '9') { seenDigit = 1 } } else if (c >= 0x0400) && (c <= 0x04ff) { scriptMask = scriptMask | (SCRIPT_CYRILLIC) } else if (c >= 0x0386) && (c <= 0x03ce) { scriptMask = scriptMask | (SCRIPT_GREEK) } else if (c >= 0x0590) && (c <= 0x05ff) { scriptMask = scriptMask | (SCRIPT_HEBREW) } else if (c >= 0x0600) && (c <= 0x06ff) { scriptMask = scriptMask | (SCRIPT_ARABIC) } } if (scriptMask == 0) && (seenDigit != 0) { scriptMask = SCRIPT_LATIN } switch scriptMask { case 0: res = 999 break case SCRIPT_LATIN: res = 215 break case SCRIPT_CYRILLIC: res = 220 break case SCRIPT_GREEK: res = 200 break case SCRIPT_HEBREW: res = 125 break case SCRIPT_ARABIC: res = 160 break default: res = 998 break } sqlite3.Xsqlite3_result_int(tls, context, res) } // End transliterate // // // Begin spellfix1 virtual table. // Maximum length of a phonehash used for querying the shadow table // Maximum number of hash strings to examine per query type spellfix1_vtab1 = struct { Fbase sqlite3_vtab Fdb uintptr FzDbName uintptr FzTableName uintptr FzCostTable uintptr FpConfig3 uintptr } /* spellfix.c:1910:9 */ // End transliterate // // // Begin spellfix1 virtual table. // Maximum length of a phonehash used for querying the shadow table // Maximum number of hash strings to examine per query type spellfix1_vtab = spellfix1_vtab1 /* spellfix.c:1910:31 */ type spellfix1_cursor1 = struct { Fbase sqlite3_vtab_cursor FpVTab uintptr FzPattern uintptr FidxNum int32 FnRow int32 FnAlloc int32 FiRow int32 FiLang int32 FiTop int32 FiScope int32 FnSearch int32 FpFullScan uintptr Fa uintptr } /* spellfix.c:1911:9 */ type spellfix1_cursor = spellfix1_cursor1 /* spellfix.c:1911:33 */ // Fuzzy-search cursor object type spellfix1_row = struct { FiRowid sqlite3_int64 FzWord uintptr FiRank int32 FiDistance int32 FiScore int32 FiMatchlen int32 FzHash [32]int8 } /* spellfix.c:1911:9 */ // Construct one or more SQL statements from the format string given // and then evaluate those statements. The success code is written // into *pRc. // // If *pRc is initially non-zero then this routine is a no-op. func spellfix1DbExec(tls *libc.TLS, pRc uintptr, db uintptr, zFormat uintptr, va uintptr) { /* spellfix.c:1955:13: */ var ap va_list _ = ap var zSql uintptr if *(*int32)(unsafe.Pointer(pRc)) != 0 { return } ap = va zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap) _ = ap if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } else { *(*int32)(unsafe.Pointer(pRc)) = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) } } // xDisconnect/xDestroy method for the fuzzy-search module. func spellfix1Uninit(tls *libc.TLS, isDestroy int32, pVTab uintptr) int32 { /* spellfix.c:1978:12: */ bp := tls.Alloc(28) defer tls.Free(28) var p uintptr = pVTab *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK if isDestroy != 0 { var db uintptr = (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb spellfix1DbExec(tls, bp+24 /* &rc */, db, ts+6637, /* "DROP TABLE IF EX..." */ libc.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName)) } if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName) editDist3ConfigDelete(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3) sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable) sqlite3.Xsqlite3_free(tls, p) } return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } func spellfix1Disconnect(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1994:12: */ return spellfix1Uninit(tls, 0, pVTab) } func spellfix1Destroy(tls *libc.TLS, pVTab uintptr) int32 { /* spellfix.c:1997:12: */ return spellfix1Uninit(tls, 1, pVTab) } // Make a copy of a string. Remove leading and trailing whitespace // and dequote it. func spellfix1Dequote(tls *libc.TLS, zIn uintptr) uintptr { /* spellfix.c:2005:13: */ bp := tls.Alloc(16) defer tls.Free(16) var zOut uintptr var i int32 var j int32 var c int8 for libc.Xisspace(tls, int32(uint8(*(*int8)(unsafe.Pointer(zIn))))) != 0 { zIn++ } zOut = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zIn)) if zOut == uintptr(0) { return uintptr(0) } i = int32(libc.Xstrlen(tls, zOut)) *(*int8)(unsafe.Pointer(zOut + uintptr(i))) = int8(0) c = *(*int8)(unsafe.Pointer(zOut)) if (int32(c) == '\'') || (int32(c) == '"') { i = 1 j = 0 for ; 1 != 0; i++ { *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&j, 1)))) = *(*int8)(unsafe.Pointer(zOut + uintptr(i))) if int32(*(*int8)(unsafe.Pointer(zOut + uintptr(i)))) == int32(c) { if int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == int32(c) { i++ } else { *(*int8)(unsafe.Pointer(zOut + uintptr((j - 1)))) = int8(0) break } } } } return zOut } // xConnect/xCreate method for the spellfix1 module. Arguments are: // // argv[0] -> module name ("spellfix1") // argv[1] -> database name // argv[2] -> table name // argv[3].. -> optional arguments (i.e. "edit_cost_table" parameter) func spellfix1Init(tls *libc.TLS, isCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2043:12: */ bp := tls.Alloc(92) defer tls.Free(92) var pNew uintptr = uintptr(0) // const char *zModule = argv[0]; // not used var zDbName uintptr = *(*uintptr)(unsafe.Pointer(argv + 1*8)) var zTableName uintptr = *(*uintptr)(unsafe.Pointer(argv + 2*8)) var nDbName int32 *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_OK var i int32 nDbName = int32(libc.Xstrlen(tls, zDbName)) pNew = sqlite3.Xsqlite3_malloc64(tls, ((uint64(unsafe.Sizeof(spellfix1_vtab{})) + uint64(nDbName)) + uint64(1))) if pNew == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_NOMEM } else { libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(spellfix1_vtab{}))) (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzDbName = (pNew + 1*64) libc.Xmemcpy(tls, (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzDbName, zDbName, (uint64(nDbName + 1))) (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zTableName)) (*spellfix1_vtab)(unsafe.Pointer(pNew)).Fdb = db if (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzTableName == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_NOMEM } else { sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+6674 /* "CREATE TABLE x(w..." */) } if (*(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == SQLITE_OK) && (isCreate != 0) { spellfix1DbExec(tls, bp+88 /* &rc */, db, ts+6828, /* "CREATE TABLE IF ..." */ libc.VaList(bp+16, zDbName, zTableName)) spellfix1DbExec(tls, bp+88 /* &rc */, db, ts+6962, /* "CREATE INDEX IF ..." */ libc.VaList(bp+40, zDbName, zTableName, zTableName)) } for i = 3; (*(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == SQLITE_OK) && (i < argc); i++ { if (libc.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ts+7047 /* "edit_cost_table=" */, uint64(16)) == 0) && ((*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable == uintptr(0)) { (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable = spellfix1Dequote(tls, (*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + 16)) if (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_NOMEM } continue } *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7064 /* "bad argument to ..." */, libc.VaList(bp+72, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_ERROR } } if (*(*int32)(unsafe.Pointer(bp + 88 /* rc */)) != 0) && (pNew != 0) { *(*uintptr)(unsafe.Pointer(ppVTab)) = uintptr(0) spellfix1Uninit(tls, 0, (pNew /* &.base */)) } else { *(*uintptr)(unsafe.Pointer(ppVTab)) = pNew } return *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) } // The xConnect and xCreate methods func spellfix1Connect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2133:12: */ return spellfix1Init(tls, 0, db, pAux, argc, argv, ppVTab, pzErr) } func spellfix1Create(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* spellfix.c:2142:12: */ return spellfix1Init(tls, 1, db, pAux, argc, argv, ppVTab, pzErr) } // Clear all of the content from a cursor. func spellfix1ResetCursor(tls *libc.TLS, pCur uintptr) { /* spellfix.c:2155:13: */ var i int32 for i = 0; i < (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow; i++ { sqlite3.Xsqlite3_free(tls, (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr(i)*64)).FzWord) } (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow = 0 (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow = 0 (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnSearch = 0 if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan != 0 { sqlite3.Xsqlite3_finalize(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan) (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan = uintptr(0) } } // Resize the cursor to hold up to N rows of content func spellfix1ResizeCursor(tls *libc.TLS, pCur uintptr, N int32) { /* spellfix.c:2172:13: */ var aNew uintptr aNew = sqlite3.Xsqlite3_realloc64(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa, (uint64(unsafe.Sizeof(spellfix1_row{})) * uint64(N))) if (aNew == uintptr(0)) && (N > 0) { spellfix1ResetCursor(tls, pCur) sqlite3.Xsqlite3_free(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa) (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc = 0 (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa = uintptr(0) } else { (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc = N (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa = aNew } } // Close a fuzzy-search cursor. func spellfix1Close(tls *libc.TLS, cur uintptr) int32 { /* spellfix.c:2191:12: */ var pCur uintptr = cur spellfix1ResetCursor(tls, pCur) spellfix1ResizeCursor(tls, pCur, 0) sqlite3.Xsqlite3_free(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FzPattern) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // // The plan number is a bitmask of the SPELLFIX_IDXNUM_* values defined // above. // // filter.argv[*] values contains $str, $langid, $top, $scope and $rowid // if specified and in that order. func spellfix1BestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* spellfix.c:2217:12: */ var iPlan int32 = 0 var iLangTerm int32 = -1 var iTopTerm int32 = -1 var iScopeTerm int32 = -1 var iDistTerm int32 = -1 var iRowidTerm int32 = -1 var i int32 var pConstraint uintptr pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { goto __2 } // Terms of the form: word MATCH $str if (((iPlan & SPELLFIX_IDXNUM_MATCH) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == SPELLFIX_COL_WORD)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH) { iPlan = iPlan | (SPELLFIX_IDXNUM_MATCH) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) } // Terms of the form: langid = $langid if (((iPlan & SPELLFIX_IDXNUM_LANGID) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == SPELLFIX_COL_LANGID)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (SPELLFIX_IDXNUM_LANGID) iLangTerm = i } // Terms of the form: top = $top if (((iPlan & SPELLFIX_IDXNUM_TOP) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == SPELLFIX_COL_TOP)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (SPELLFIX_IDXNUM_TOP) iTopTerm = i } // Terms of the form: scope = $scope if (((iPlan & SPELLFIX_IDXNUM_SCOPE) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == SPELLFIX_COL_SCOPE)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (SPELLFIX_IDXNUM_SCOPE) iScopeTerm = i } // Terms of the form: distance < $dist or distance <= $dist if (((iPlan & (0x10 | 0x20)) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn == SPELLFIX_COL_DISTANCE)) && ((int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LE)) { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT { iPlan = iPlan | (SPELLFIX_IDXNUM_DISTLT) } else { iPlan = iPlan | (SPELLFIX_IDXNUM_DISTLE) } iDistTerm = i } // Terms of the form: distance < $dist or distance <= $dist if (((iPlan & SPELLFIX_IDXNUM_ROWID) == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn < 0)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { iPlan = iPlan | (SPELLFIX_IDXNUM_ROWID) iRowidTerm = i } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if (iPlan & SPELLFIX_IDXNUM_MATCH) != 0 { var idx int32 = 2 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = iPlan if (((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1) && ((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn == SPELLFIX_COL_SCORE)) && (int32((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc) == 0) { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 // Default order by iScore } if (iPlan & SPELLFIX_IDXNUM_LANGID) != 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iLangTerm)*8)).FargvIndex = libc.PostIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iLangTerm)*8)).Fomit = uint8(1) } if (iPlan & SPELLFIX_IDXNUM_TOP) != 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iTopTerm)*8)).FargvIndex = libc.PostIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iTopTerm)*8)).Fomit = uint8(1) } if (iPlan & SPELLFIX_IDXNUM_SCOPE) != 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iScopeTerm)*8)).FargvIndex = libc.PostIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iScopeTerm)*8)).Fomit = uint8(1) } if (iPlan & (0x10 | 0x20)) != 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iDistTerm)*8)).FargvIndex = libc.PostIncInt32(&idx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iDistTerm)*8)).Fomit = uint8(1) } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1e5 } else if (iPlan & SPELLFIX_IDXNUM_ROWID) != 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = SPELLFIX_IDXNUM_ROWID (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(5) } else { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 0 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1e50 } return SQLITE_OK } // Open a new fuzzy-search cursor. func spellfix1Open(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* spellfix.c:2331:12: */ var p uintptr = pVTab var pCur uintptr pCur = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(spellfix1_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(spellfix1_cursor{}))) (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpVTab = p *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Adjust a distance measurement by the words rank in order to show // preference to common words. func spellfix1Score(tls *libc.TLS, iDistance int32, iRank int32) int32 { /* spellfix.c:2346:12: */ var iLog2 int32 iLog2 = 0 __1: if !(iRank > 0) { goto __3 } { } goto __2 __2: iLog2++ iRank >>= 1 goto __1 goto __3 __3: ; return ((iDistance + 32) - iLog2) } // Compare two spellfix1_row objects for sorting purposes in qsort() such // that they sort in order of increasing distance. func spellfix1RowCompare(tls *libc.TLS, A uintptr, B uintptr) int32 { /* spellfix.c:2356:25: */ var a uintptr = A var b uintptr = B return ((*spellfix1_row)(unsafe.Pointer(a)).FiScore - (*spellfix1_row)(unsafe.Pointer(b)).FiScore) } // A structure used to pass information from spellfix1FilterForMatch() // into spellfix1RunQuery(). type MatchQuery1 = struct { FpCur uintptr FpStmt uintptr FzHash [32]int8 FzPattern uintptr FnPattern int32 _ [4]byte FpMatchStr3 uintptr FpConfig3 uintptr FpLang uintptr FiLang int32 FiScope int32 FiMaxDist int32 Frc int32 FnRun int32 FazPrior [1][32]int8 _ [4]byte } /* spellfix.c:2366:9 */ // A structure used to pass information from spellfix1FilterForMatch() // into spellfix1RunQuery(). type MatchQuery = MatchQuery1 /* spellfix.c:2381:3 */ // Run a query looking for the best matches against zPattern using // zHash as the character class seed hash. func spellfix1RunQuery(tls *libc.TLS, p uintptr, zQuery uintptr, nQuery int32) { /* spellfix.c:2387:13: */ bp := tls.Alloc(84) defer tls.Free(84) var zK1 uintptr var zWord uintptr var iDist int32 var iRank int32 var iScore int32 var iWorst int32 = 0 var idx int32 var idxWorst int32 = -1 var i int32 var iScope int32 = (*MatchQuery)(unsafe.Pointer(p)).FiScope var pCur uintptr = (*MatchQuery)(unsafe.Pointer(p)).FpCur var pStmt uintptr = (*MatchQuery)(unsafe.Pointer(p)).FpStmt // var zHash1 [32]int8 at bp+16, 32 // var zHash2 [32]int8 at bp+48, 32 var zClass uintptr var nClass int32 var rc int32 if ((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa == uintptr(0)) || ((*MatchQuery)(unsafe.Pointer(p)).Frc != 0) { return } // Prior memory allocation failure zClass = phoneticHash(tls, zQuery, nQuery) if zClass == uintptr(0) { (*MatchQuery)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM return } nClass = int32(libc.Xstrlen(tls, zClass)) if nClass > (SPELLFIX_MX_HASH - 2) { nClass = (SPELLFIX_MX_HASH - 2) *(*int8)(unsafe.Pointer(zClass + uintptr(nClass))) = int8(0) } if nClass <= iScope { if nClass > 2 { iScope = (nClass - 1) } else { iScope = nClass } } libc.Xmemcpy(tls, bp+16 /* &zHash1[0] */, zClass, uint64(iScope)) sqlite3.Xsqlite3_free(tls, zClass) *(*int8)(unsafe.Pointer(bp + 16 /* &zHash1[0] */ + uintptr(iScope))) = int8(0) libc.Xmemcpy(tls, bp+48 /* &zHash2[0] */, bp+16 /* &zHash1[0] */, uint64(iScope)) *(*int8)(unsafe.Pointer(bp + 48 /* &zHash2[0] */ + uintptr(iScope))) = int8('Z') *(*int8)(unsafe.Pointer(bp + 48 /* &zHash2[0] */ + uintptr((iScope + 1)))) = int8(0) libc.Xmemcpy(tls, ((p + 108 /* &.azPrior */) + uintptr(libc.PostIncInt32(&(*MatchQuery)(unsafe.Pointer(p)).FnRun, 1))*32), bp+16 /* &zHash1[0] */, (uint64(iScope + 1))) if (sqlite3.Xsqlite3_bind_text(tls, pStmt, 1, bp+16 /* &zHash1[0] */, -1, uintptr(0)) == SQLITE_NOMEM) || (sqlite3.Xsqlite3_bind_text(tls, pStmt, 2, bp+48 /* &zHash2[0] */, -1, uintptr(0)) == SQLITE_NOMEM) { (*MatchQuery)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM return } for sqlite3.Xsqlite3_step(tls, pStmt) == SQLITE_ROW { *(*int32)(unsafe.Pointer(bp + 80 /* iMatchlen */)) = -1 iRank = sqlite3.Xsqlite3_column_int(tls, pStmt, 2) if (*MatchQuery)(unsafe.Pointer(p)).FpMatchStr3 != 0 { var nWord int32 = sqlite3.Xsqlite3_column_bytes(tls, pStmt, 1) zWord = sqlite3.Xsqlite3_column_text(tls, pStmt, 1) iDist = editDist3Core(tls, (*MatchQuery)(unsafe.Pointer(p)).FpMatchStr3, zWord, nWord, (*MatchQuery)(unsafe.Pointer(p)).FpLang, bp+80 /* &iMatchlen */) } else { zK1 = sqlite3.Xsqlite3_column_text(tls, pStmt, 3) if zK1 == uintptr(0) { continue } iDist = editdist1(tls, (*MatchQuery)(unsafe.Pointer(p)).FzPattern, zK1, uintptr(0)) } if iDist < 0 { (*MatchQuery)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break } (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnSearch++ // If there is a "distance < $dist" or "distance <= $dist" constraint, // check if this row meets it. If not, jump back up to the top of the // loop to process the next row. Otherwise, if the row does match the // distance constraint, check if the pCur->a[] array is already full. // If it is and no explicit "top = ?" constraint was present in the // query, grow the array to ensure there is room for the new entry. if (*MatchQuery)(unsafe.Pointer(p)).FiMaxDist >= 0 { if iDist > (*MatchQuery)(unsafe.Pointer(p)).FiMaxDist { continue } if ((*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow >= (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc) && (((*spellfix1_cursor)(unsafe.Pointer(pCur)).FidxNum & SPELLFIX_IDXNUM_TOP) == 0) { spellfix1ResizeCursor(tls, pCur, (((*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc * 2) + 10)) if (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa == uintptr(0) { break } } } iScore = spellfix1Score(tls, iDist, iRank) if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow < (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc { idx = (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow } else if iScore < iWorst { idx = idxWorst sqlite3.Xsqlite3_free(tls, (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr(idx)*64)).FzWord) } else { continue } (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FzWord = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_column_text(tls, pStmt, 1))) if (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr(idx)*64)).FzWord == uintptr(0) { (*MatchQuery)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break } (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FiRowid = sqlite3.Xsqlite3_column_int64(tls, pStmt, 0) (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FiRank = iRank (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FiDistance = iDist (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FiScore = iScore (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FiMatchlen = *(*int32)(unsafe.Pointer(bp + 80 /* iMatchlen */)) libc.Xmemcpy(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr(idx)*64+32 /* &.zHash */, bp+16 /* &zHash1[0] */, (uint64(iScope + 1))) if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow < (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc { (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow++ } if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow == (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnAlloc { iWorst = (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa)).FiScore idxWorst = 0 for i = 1; i < (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow; i++ { iScore = (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(i)*64)).FiScore if iWorst < iScore { iWorst = iScore idxWorst = i } } } } rc = sqlite3.Xsqlite3_reset(tls, pStmt) if rc != 0 { (*MatchQuery)(unsafe.Pointer(p)).Frc = rc } } // This version of the xFilter method work if the MATCH term is present // and we are doing a scan. func spellfix1FilterForMatch(tls *libc.TLS, pCur uintptr, argc int32, argv uintptr) int32 { /* spellfix.c:2526:12: */ bp := tls.Alloc(184) defer tls.Free(184) var idxNum int32 var zMatchThis uintptr // RHS of the MATCH operator var pMatchStr3 uintptr // zMatchThis as an editdist string var zPattern uintptr // Transliteration of zMatchThis var nPattern int32 // Length of zPattern var iLimit int32 // Max number of rows of output var iScope int32 // Use this many characters of zClass var iLang int32 // Language code var zSql uintptr // SQL of shadow table query // var pStmt uintptr at bp+176, 8 // Shadow table query var rc int32 // Result code var idx int32 // Next available filter parameter var p uintptr // The virtual table that owns pCur // var x MatchQuery at bp+32, 144 idxNum = (*spellfix1_cursor)(unsafe.Pointer(pCur)).FidxNum pMatchStr3 = uintptr(0) iLimit = 20 iScope = 3 iLang = 0 *(*uintptr)(unsafe.Pointer(bp + 176 /* pStmt */)) = uintptr(0) idx = 1 p = (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpVTab // For passing info to RunQuery() // Load the cost table if we have not already done so if !(((*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable != uintptr(0)) && ((*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 == uintptr(0))) { goto __1 } (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(EditDist3Config{}))) if !((*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 == uintptr(0)) { goto __2 } return SQLITE_NOMEM __2: ; libc.Xmemset(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3, 0, uint64(unsafe.Sizeof(EditDist3Config{}))) rc = editDist3ConfigLoad(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3, (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable) if !(rc != 0) { goto __3 } return rc __3: ; __1: ; libc.Xmemset(tls, bp+32 /* &x */, 0, uint64(unsafe.Sizeof(MatchQuery{}))) (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiScope = 3 // Default scope if none specified by "WHERE scope=N" (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiMaxDist = -1 // Maximum allowed edit distance if !((idxNum & 2) != 0) { goto __4 } iLang = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&idx, 1))*8))) __4: ; if !((idxNum & 4) != 0) { goto __5 } iLimit = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&idx, 1))*8))) if !(iLimit < 1) { goto __6 } iLimit = 1 __6: ; __5: ; if !((idxNum & 8) != 0) { goto __7 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiScope = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&idx, 1))*8))) if !((*MatchQuery)(unsafe.Pointer(bp+32 /* &x */)).FiScope < 1) { goto __8 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiScope = 1 __8: ; if !((*MatchQuery)(unsafe.Pointer(bp+32 /* &x */)).FiScope > (SPELLFIX_MX_HASH - 2)) { goto __9 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiScope = (SPELLFIX_MX_HASH - 2) __9: ; __7: ; if !((idxNum & (16 | 32)) != 0) { goto __10 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiMaxDist = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(libc.PostIncInt32(&idx, 1))*8))) if !((idxNum & 16) != 0) { goto __11 } (*MatchQuery)(unsafe.Pointer(bp+32 /* &x */)).FiMaxDist-- __11: ; if !((*MatchQuery)(unsafe.Pointer(bp+32 /* &x */)).FiMaxDist < 0) { goto __12 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiMaxDist = 0 __12: ; __10: ; spellfix1ResetCursor(tls, pCur) spellfix1ResizeCursor(tls, pCur, iLimit) zMatchThis = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if !(zMatchThis == uintptr(0)) { goto __13 } return SQLITE_OK __13: ; if !((*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 != 0) { goto __14 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FpLang = editDist3FindLang(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3, iLang) pMatchStr3 = editDist3FromStringNew(tls, (*MatchQuery)(unsafe.Pointer(bp+32 /* &x */)).FpLang, zMatchThis, -1) if !(pMatchStr3 == uintptr(0)) { goto __16 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).Frc = SQLITE_NOMEM goto filter_exit __16: ; goto __15 __14: (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FpLang = uintptr(0) __15: ; zPattern = transliterate(tls, zMatchThis, sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) sqlite3.Xsqlite3_free(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FzPattern) (*spellfix1_cursor)(unsafe.Pointer(pCur)).FzPattern = zPattern if !(zPattern == uintptr(0)) { goto __17 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).Frc = SQLITE_NOMEM goto filter_exit __17: ; nPattern = int32(libc.Xstrlen(tls, zPattern)) if !(int32(*(*int8)(unsafe.Pointer(zPattern + uintptr((nPattern - 1))))) == '*') { goto __18 } nPattern-- __18: ; zSql = sqlite3.Xsqlite3_mprintf(tls, ts+7098, /* "SELECT id, word,..." */ libc.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, iLang)) if !(zSql == uintptr(0)) { goto __19 } (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).Frc = SQLITE_NOMEM *(*uintptr)(unsafe.Pointer(bp + 176 /* pStmt */)) = uintptr(0) goto filter_exit __19: ; rc = sqlite3.Xsqlite3_prepare_v2(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb, zSql, -1, bp+176 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiLang = iLang (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FpCur = pCur (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 176 /* pStmt */)) (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FzPattern = zPattern (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FnPattern = nPattern (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FpMatchStr3 = pMatchStr3 (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FiLang = iLang (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).Frc = rc (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).FpConfig3 = (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 if !((*MatchQuery)(unsafe.Pointer(bp+32 /* &x */)).Frc == SQLITE_OK) { goto __20 } spellfix1RunQuery(tls, bp+32 /* &x */, zPattern, nPattern) __20: ; if !((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa != 0) { goto __21 } libc.Xqsort(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa, uint64((*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow), uint64(unsafe.Sizeof(spellfix1_row{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{spellfix1RowCompare}))) (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiTop = iLimit (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiScope = iScope goto __22 __21: (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).Frc = SQLITE_NOMEM __22: ; filter_exit: sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pStmt */))) editDist3FromStringDelete(tls, pMatchStr3) return (*MatchQuery)(unsafe.Pointer(bp + 32 /* &x */)).Frc } // This version of xFilter handles a full-table scan case func spellfix1FilterForFullScan(tls *libc.TLS, pCur uintptr, argc int32, argv uintptr) int32 { /* spellfix.c:2641:12: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 = SQLITE_OK var idxNum int32 = (*spellfix1_cursor)(unsafe.Pointer(pCur)).FidxNum var zSql uintptr var pVTab uintptr = (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpVTab spellfix1ResetCursor(tls, pCur) zSql = sqlite3.Xsqlite3_mprintf(tls, ts+7198, /* "SELECT word, ran..." */ libc.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(pVTab)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(pVTab)).FzTableName, func() uintptr { if (idxNum & 64) != 0 { return ts + 7257 /* " WHERE rowid=?" */ } return ts + 489 /* "" */ }())) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_prepare_v2(tls, (*spellfix1_vtab)(unsafe.Pointer(pVTab)).Fdb, zSql, -1, (pCur + 56 /* &.pFullScan */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if (rc == SQLITE_OK) && ((idxNum & 64) != 0) { rc = sqlite3.Xsqlite3_bind_value(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan, 1, *(*uintptr)(unsafe.Pointer(argv))) } (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow = libc.AssignPtrInt32(pCur+36 /* &.iRow */, 0) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_step(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan) if rc == SQLITE_ROW { (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow = -1 rc = SQLITE_OK } if rc == SQLITE_DONE { rc = SQLITE_OK } } else { (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow = 0 } return rc } // Called to "rewind" a cursor back to the beginning so that // it starts its output over again. Always called at least once // prior to any spellfix1Column, spellfix1Rowid, or spellfix1Eof call. func spellfix1Filter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* spellfix.c:2681:12: */ var pCur uintptr = cur var rc int32 (*spellfix1_cursor)(unsafe.Pointer(pCur)).FidxNum = idxNum if (idxNum & 1) != 0 { rc = spellfix1FilterForMatch(tls, pCur, argc, argv) } else { rc = spellfix1FilterForFullScan(tls, pCur, argc, argv) } return rc } // Advance a cursor to its next row of output func spellfix1Next(tls *libc.TLS, cur uintptr) int32 { /* spellfix.c:2701:12: */ var pCur uintptr = cur var rc int32 = SQLITE_OK if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow < (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow { if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan != 0 { rc = sqlite3.Xsqlite3_step(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan) if rc != SQLITE_ROW { (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow = (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow } if (rc == SQLITE_ROW) || (rc == SQLITE_DONE) { rc = SQLITE_OK } } else { (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow++ } } return rc } // Return TRUE if we are at the end-of-file func spellfix1Eof(tls *libc.TLS, cur uintptr) int32 { /* spellfix.c:2719:12: */ var pCur uintptr = cur return (libc.Bool32((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow >= (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnRow)) } // Return columns from the current row. func spellfix1Column(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* spellfix.c:2727:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pCur uintptr = cur if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan != 0 { if i <= SPELLFIX_COL_LANGID { sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan, i)) } else { sqlite3.Xsqlite3_result_null(tls, ctx) } return SQLITE_OK } switch i { case SPELLFIX_COL_WORD: { sqlite3.Xsqlite3_result_text(tls, ctx, (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FzWord, -1, uintptr(0)) break } case SPELLFIX_COL_RANK: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FiRank) break } case SPELLFIX_COL_DISTANCE: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FiDistance) break } case SPELLFIX_COL_LANGID: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiLang) break } case SPELLFIX_COL_SCORE: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FiScore) break } case SPELLFIX_COL_MATCHLEN: { *(*int32)(unsafe.Pointer(bp /* iMatchlen */)) = (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FiMatchlen if *(*int32)(unsafe.Pointer(bp /* iMatchlen */)) < 0 { var nPattern int32 = int32(libc.Xstrlen(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FzPattern)) var zWord uintptr = (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FzWord var nWord int32 = int32(libc.Xstrlen(tls, zWord)) if (nPattern > 0) && (int32(*(*int8)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).FzPattern + uintptr((nPattern - 1))))) == '*') { var zTranslit uintptr var res int32 zTranslit = transliterate(tls, zWord, nWord) if !(zTranslit != 0) { return SQLITE_NOMEM } res = editdist1(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FzPattern, zTranslit, bp /* &iMatchlen */) sqlite3.Xsqlite3_free(tls, zTranslit) if res < 0 { return SQLITE_NOMEM } *(*int32)(unsafe.Pointer(bp /* iMatchlen */)) = translen_to_charlen(tls, zWord, nWord, *(*int32)(unsafe.Pointer(bp /* iMatchlen */))) } else { *(*int32)(unsafe.Pointer(bp /* iMatchlen */)) = utf8Charlen(tls, zWord, nWord) } } sqlite3.Xsqlite3_result_int(tls, ctx, *(*int32)(unsafe.Pointer(bp /* iMatchlen */))) break } case SPELLFIX_COL_PHONEHASH: { sqlite3.Xsqlite3_result_text(tls, ctx, (*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64+32 /* &.zHash */, -1, uintptr(0)) break } case SPELLFIX_COL_TOP: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiTop) break } case SPELLFIX_COL_SCOPE: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FiScope) break } case SPELLFIX_COL_SRCHCNT: { sqlite3.Xsqlite3_result_int(tls, ctx, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FnSearch) break } default: { sqlite3.Xsqlite3_result_null(tls, ctx) break } } return SQLITE_OK } // The rowid. func spellfix1Rowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* spellfix.c:2813:12: */ var pCur uintptr = cur if (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan != 0 { *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_column_int64(tls, (*spellfix1_cursor)(unsafe.Pointer(pCur)).FpFullScan, 4) } else { *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr((*spellfix1_cursor)(unsafe.Pointer(pCur)).FiRow)*64)).FiRowid } return SQLITE_OK } // This function is called by the xUpdate() method. It returns a string // containing the conflict mode that xUpdate() should use for the current // operation. One of: "ROLLBACK", "IGNORE", "ABORT" or "REPLACE". func spellfix1GetConflict(tls *libc.TLS, db uintptr) uintptr { /* spellfix.c:2828:19: */ var eConflict int32 = sqlite3.Xsqlite3_vtab_on_conflict(tls, db) return azConflict[(eConflict - 1)] } var azConflict = [5]uintptr{ // Note: Instead of "FAIL" - "ABORT". ts + 7272 /* "ROLLBACK" */, ts + 7281 /* "IGNORE" */, ts + 7288 /* "ABORT" */, ts + 7288 /* "ABORT" */, ts + 7294, /* "REPLACE" */ } /* spellfix.c:2829:21 */ // The xUpdate() method. func spellfix1Update(tls *libc.TLS, pVTab uintptr, argc int32, argv uintptr, pRowid uintptr) int32 { /* spellfix.c:2851:12: */ bp := tls.Alloc(332) defer tls.Free(332) *(*int32)(unsafe.Pointer(bp + 328 /* rc */)) = SQLITE_OK var rowid sqlite3_int64 var newRowid sqlite3_int64 var p uintptr = pVTab var db uintptr = (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb if argc == 1 { // A delete operation on the rowid given by argv[0] rowid = libc.AssignPtrInt64(pRowid, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) spellfix1DbExec(tls, bp+328 /* &rc */, db, ts+7302, /* "DELETE FROM \"%w\"..." */ libc.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, rowid)) } else { var zWord uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) var nWord int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) var iLang int32 = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) var iRank int32 = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) var zSoundslike uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 12*8))) var nSoundslike int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 12*8))) var zK1 uintptr var zK2 uintptr var i int32 var c int8 var zConflict uintptr = spellfix1GetConflict(tls, db) if zWord == uintptr(0) { // Inserts of the form: INSERT INTO table(command) VALUES('xyzzy'); // cause zWord to be NULL, so we look at the "command" column to see // what special actions to take var zCmd uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 13*8))) if zCmd == uintptr(0) { (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+7345, /* "NOT NULL constra..." */ libc.VaList(bp+32, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName)) return (SQLITE_CONSTRAINT | (int32(5) << 8)) } if libc.Xstrcmp(tls, zCmd, ts+7381 /* "reset" */) == 0 { // Reset the edit cost table (if there is one). editDist3ConfigDelete(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3) (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 = uintptr(0) return SQLITE_OK } if libc.Xstrncmp(tls, zCmd, ts+7047 /* "edit_cost_table=" */, uint64(16)) == 0 { editDist3ConfigDelete(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3) (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 = uintptr(0) sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable) (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable = spellfix1Dequote(tls, (zCmd + uintptr(16))) if (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable == uintptr(0) { return SQLITE_NOMEM } if (int32(*(*int8)(unsafe.Pointer((*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable))) == 0) || (sqlite3.Xsqlite3_stricmp(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable, ts+7387 /* "null" */) == 0) { sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable) (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable = uintptr(0) } return SQLITE_OK } (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+7392, /* "unknown value fo..." */ libc.VaList(bp+48, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, zCmd)) return SQLITE_ERROR } if iRank < 1 { iRank = 1 } if zSoundslike != 0 { zK1 = transliterate(tls, zSoundslike, nSoundslike) } else { zK1 = transliterate(tls, zWord, nWord) } if zK1 == uintptr(0) { return SQLITE_NOMEM } for i = 0; (int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(zK1 + uintptr(i)))))) != 0; i++ { if (int32(c) >= 'A') && (int32(c) <= 'Z') { *(*int8)(unsafe.Pointer(zK1 + uintptr(i))) += int8(('a' - 'A')) } } zK2 = phoneticHash(tls, zK1, i) if zK2 == uintptr(0) { sqlite3.Xsqlite3_free(tls, zK1) return SQLITE_NOMEM } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == SQLITE_NULL { spellfix1DbExec(tls, bp+328 /* &rc */, db, ts+7427, /* "INSERT INTO \"%w\"..." */ libc.VaList(bp+72, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, iRank, iLang, zWord, zK1, zWord, zK2)) } else { newRowid = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) spellfix1DbExec(tls, bp+328 /* &rc */, db, ts+7513, /* "INSERT OR %s INT..." */ libc.VaList(bp+144, zConflict, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, newRowid, iRank, iLang, zWord, zK1, zWord, zK2)) } *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_last_insert_rowid(tls, db) } else { rowid = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) newRowid = libc.AssignPtrInt64(pRowid, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) spellfix1DbExec(tls, bp+328 /* &rc */, db, ts+7613, /* "UPDATE OR %s \"%w..." */ libc.VaList(bp+232, zConflict, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, newRowid, iRank, iLang, zWord, zK1, zWord, zK2, rowid)) } sqlite3.Xsqlite3_free(tls, zK1) sqlite3.Xsqlite3_free(tls, zK2) } return *(*int32)(unsafe.Pointer(bp + 328 /* rc */)) } // Rename the spellfix1 table. func spellfix1Rename(tls *libc.TLS, pVTab uintptr, zNew uintptr) int32 { /* spellfix.c:2966:12: */ bp := tls.Alloc(52) defer tls.Free(52) var p uintptr = pVTab var db uintptr = (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zNewName uintptr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zNew)) if zNewName == uintptr(0) { return SQLITE_NOMEM } spellfix1DbExec(tls, bp+48 /* &rc */, db, ts+7722, /* "ALTER TABLE \"%w\"..." */ libc.VaList(bp+16, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, zNewName)) if *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName) (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName = zNewName } else { sqlite3.Xsqlite3_free(tls, zNewName) } return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) } // A virtual table module that provides fuzzy search. var spellfix1Module = sqlite3_module{ // iVersion FxCreate: 0, // xCreate - handle CREATE VIRTUAL TABLE FxConnect: 0, // xConnect - reconnected to an existing table FxBestIndex: 0, // xBestIndex - figure out how to do a query FxDisconnect: 0, // xDisconnect - close a connection FxDestroy: 0, // xDestroy - handle DROP TABLE FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xFindMethod FxRename: 0, // xRename } /* spellfix.c:2991:23 */ // Register the various functions and the virtual table. func spellfix1Register(tls *libc.TLS, db uintptr) int32 { /* spellfix.c:3017:12: */ var rc int32 = SQLITE_OK var i int32 rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7771 /* "spellfix1_transl..." */, 1, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{transliterateSqlFunc})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7790 /* "spellfix1_editdi..." */, 2, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{editdistSqlFunc})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7809 /* "spellfix1_phoneh..." */, 1, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{phoneticHashSqlFunc})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7829 /* "spellfix1_script..." */, 1, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{scriptCodeSqlFunc})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_module(tls, db, ts+7850 /* "spellfix1" */, uintptr(unsafe.Pointer(&spellfix1Module)), uintptr(0)) } if rc == SQLITE_OK { rc = editDist3Install(tls, db) } // Verify sanity of the translit[] table for i = 0; uint64(i) < ((uint64(unsafe.Sizeof(translit)) / uint64(unsafe.Sizeof(Transliteration{}))) - uint64(1)); i++ { } return rc } // Extension load function. func sqlite3_spellfix_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* spellfix.c:3061:5: */ _ = pApi return spellfix1Register(tls, db) return SQLITE_OK } // Determine if this is running on a big-endian or little-endian // processor // Constants for the largest and smallest possible 64-bit signed integers. // These macros are designed to work correctly on both 32-bit and 64-bit // compilers. // Return TRUE if character c is a whitespace character func totypeIsspace(tls *libc.TLS, c uint8) int32 { /* totype.c:70:12: */ return (libc.Bool32((((((int32(c) == ' ') || (int32(c) == '\t')) || (int32(c) == '\n')) || (int32(c) == '\v')) || (int32(c) == '\f')) || (int32(c) == '\r'))) } // Return TRUE if character c is a digit func totypeIsdigit(tls *libc.TLS, c uint8) int32 { /* totype.c:77:12: */ return (libc.Bool32((int32(c) >= '0') && (int32(c) <= '9'))) } // Compare the 19-character string zNum against the text representation // value 2^63: 9223372036854775808. Return negative, zero, or positive // if zNum is less than, equal to, or greater than the string. // Note that zNum must contain exactly 19 characters. // // Unlike memcmp() this routine is guaranteed to return the difference // in the values of the last digit if the only difference is in the // last digit. So, for example, // // totypeCompare2pow63("9223372036854775800") // // will return -8. func totypeCompare2pow63(tls *libc.TLS, zNum uintptr) int32 { /* totype.c:95:12: */ var c int32 = 0 var i int32 // 012345678901234567 var pow63 uintptr = ts + 7860 /* "9223372036854775..." */ for i = 0; (c == 0) && (i < 18); i++ { c = ((int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10) } if c == 0 { c = (int32(*(*int8)(unsafe.Pointer(zNum + 18))) - '8') } return c } // Convert zNum to a 64-bit signed integer. // // If the zNum value is representable as a 64-bit twos-complement // integer, then write that value into *pNum and return 0. // // If zNum is exactly 9223372036854665808, return 2. This special // case is broken out because while 9223372036854665808 cannot be a // signed 64-bit integer, its negative -9223372036854665808 can be. // // If zNum is too big for a 64-bit integer and is not // 9223372036854665808 or if zNum contains any non-numeric text, // then return 1. // // The string is not necessarily zero-terminated. func totypeAtoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32) int32 { /* totype.c:125:12: */ var u sqlite3_uint64 = uint64(0) var neg int32 = 0 // assume positive var i int32 var c int32 = 0 var nonNum int32 = 0 var zStart uintptr var zEnd uintptr = (zNum + uintptr(length)) for (zNum < zEnd) && (totypeIsspace(tls, uint8(*(*int8)(unsafe.Pointer(zNum)))) != 0) { zNum++ } if zNum < zEnd { if int32(*(*int8)(unsafe.Pointer(zNum))) == '-' { neg = 1 zNum++ } else if int32(*(*int8)(unsafe.Pointer(zNum))) == '+' { zNum++ } } zStart = zNum for (zNum < zEnd) && (int32(*(*int8)(unsafe.Pointer(zNum))) == '0') { zNum++ } // Skip leading zeros. for i = 0; (((zNum + uintptr(i)) < zEnd) && ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))))) >= '0')) && (c <= '9'); i++ { u = (((u * uint64(10)) + sqlite3_uint64(c)) - uint64('0')) } if u > (uint64(int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) { *(*sqlite3_int64)(unsafe.Pointer(pNum)) = ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) } else if neg != 0 { *(*sqlite3_int64)(unsafe.Pointer(pNum)) = -sqlite3_int64(u) } else { *(*sqlite3_int64)(unsafe.Pointer(pNum)) = sqlite3_int64(u) } if ((((c != 0) && ((zNum + uintptr(i)) < zEnd)) || ((i == 0) && (zStart == zNum))) || (i > 19)) || (nonNum != 0) { // zNum is empty or contains non-numeric text or is longer // than 19 digits (thus guaranteeing that it is too large) return 1 } else if i < 19 { // Less than 19 digits, so we know that it fits in 64 bits return 0 } else { // zNum is a 19-digit numbers. Compare it against 9223372036854775808. c = totypeCompare2pow63(tls, zNum) if c < 0 { // zNum is less than 9223372036854775808 so it fits return 0 } else if c > 0 { // zNum is greater than 9223372036854775808 so it overflows return 1 } else { // zNum is exactly 9223372036854775808. Fits if negative. The // special case 2 overflow if positive if neg != 0 { return 0 } return 2 } } return int32(0) } // The string z[] is an text representation of a real number. // Convert this string to a double and write it into *pResult. // // The string is not necessarily zero-terminated. // // Return TRUE if the result is a valid real number (or integer) and FALSE // if the string is empty or contains extraneous text. Valid numbers // are in one of these formats: // // [+-]digits[E[+-]digits] // [+-]digits.[digits][E[+-]digits] // [+-].digits[E[+-]digits] // // Leading and trailing whitespace is ignored for the purpose of determining // validity. // // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. func totypeAtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32) int32 { /* totype.c:204:12: */ var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) var sign int32 // sign of significand var s sqlite3_int64 // significand var d int32 // adjust exponent for shifting decimal point var esign int32 // sign of exponent var e int32 // exponent var eValid int32 // True exponent is either not used or is well-formed var result float64 var nDigits int32 var nonNum int32 var scale float64 zEnd = (z + uintptr(length)) sign = 1 s = int64(0) d = 0 esign = 1 e = 0 eValid = 1 nDigits = 0 nonNum = 0 *(*float64)(unsafe.Pointer(pResult)) = 0.0 // Default return value, in case of an error // skip leading spaces __1: if !((z < zEnd) && (totypeIsspace(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) { goto __2 } z++ goto __1 __2: ; if !(z >= zEnd) { goto __3 } return 0 __3: ; // get sign of significand if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') { goto __4 } sign = -1 z++ goto __5 __4: if !(int32(*(*int8)(unsafe.Pointer(z))) == '+') { goto __6 } z++ __6: ; __5: ; // skip leading zeroes __7: if !((z < zEnd) && (int32(*(*int8)(unsafe.Pointer(z))) == '0')) { goto __8 } z++ nDigits++ goto __7 __8: ; // copy max significant digits to significand __9: if !(((z < zEnd) && (totypeIsdigit(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) && (s < (((int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) - int64(9)) / int64(10)))) { goto __10 } s = ((s * int64(10)) + (sqlite3_int64(int32(*(*int8)(unsafe.Pointer(z))) - '0'))) z++ nDigits++ goto __9 __10: ; // skip non-significant significand digits // (increase exponent by d to shift decimal left) __11: if !((z < zEnd) && (totypeIsdigit(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) { goto __12 } z++ nDigits++ d++ goto __11 __12: ; if !(z >= zEnd) { goto __13 } goto totype_atof_calc __13: ; // if decimal point is present if !(int32(*(*int8)(unsafe.Pointer(z))) == '.') { goto __14 } z++ // copy digits from after decimal to significand // (decrease exponent by d to shift decimal right) __15: if !(((z < zEnd) && (totypeIsdigit(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) && (s < (((int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) - int64(9)) / int64(10)))) { goto __16 } s = ((s * int64(10)) + (sqlite3_int64(int32(*(*int8)(unsafe.Pointer(z))) - '0'))) z++ nDigits++ d-- goto __15 __16: ; // skip non-significant digits __17: if !((z < zEnd) && (totypeIsdigit(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) { goto __18 } z++ nDigits++ goto __17 __18: ; __14: ; if !(z >= zEnd) { goto __19 } goto totype_atof_calc __19: ; // if exponent is present if !((int32(*(*int8)(unsafe.Pointer(z))) == 'e') || (int32(*(*int8)(unsafe.Pointer(z))) == 'E')) { goto __20 } z++ eValid = 0 if !(z >= zEnd) { goto __21 } goto totype_atof_calc __21: ; // get sign of exponent if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') { goto __22 } esign = -1 z++ goto __23 __22: if !(int32(*(*int8)(unsafe.Pointer(z))) == '+') { goto __24 } z++ __24: ; __23: ; // copy digits to exponent __25: if !((z < zEnd) && (totypeIsdigit(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) { goto __26 } if e < 10000 { e = ((e * 10) + (int32(*(*int8)(unsafe.Pointer(z))) - '0')) } else { e = 10000 } z++ eValid = 1 goto __25 __26: ; __20: ; // skip trailing spaces if !((nDigits != 0) && (eValid != 0)) { goto __27 } __28: if !((z < zEnd) && (totypeIsspace(tls, uint8(*(*int8)(unsafe.Pointer(z)))) != 0)) { goto __29 } z++ goto __28 __29: ; __27: ; totype_atof_calc: // adjust exponent by d, and update sign e = ((e * esign) + d) if !(e < 0) { goto __30 } esign = -1 e = e * (-1) goto __31 __30: esign = 1 __31: ; // if 0 significand if !(!(s != 0)) { goto __32 } // In the IEEE 754 standard, zero is signed. // Add the sign if we've seen at least one digit if (sign < 0) && (nDigits != 0) { result = -libc.Float64FromFloat64(float64(0)) } else { result = float64(0) } goto __33 __32: // attempt to reduce exponent if !(esign > 0) { goto __34 } __36: if !((s < ((int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) / int64(10))) && (e > 0)) { goto __37 } e-- s = s * (int64(10)) goto __36 __37: ; goto __35 __34: __38: if !(!((int32(s % int64(10))) != 0) && (e > 0)) { goto __39 } e-- s = s / (int64(10)) goto __38 __39: ; __35: ; // adjust the sign of significand if sign < 0 { s = -s } else { s = s } // if exponent, scale significand as appropriate // and store in result. if !(e != 0) { goto __40 } scale = 1.0 // attempt to handle extremely small/large numbers better if !((e > 307) && (e < 342)) { goto __42 } __44: if !((e % 308) != 0) { goto __45 } scale = scale * (1.0e+1) e = e - (1) goto __44 __45: ; if !(esign < 0) { goto __46 } result = (float64(s) / scale) result = result / (1.0e+308) goto __47 __46: result = (float64(s) * scale) result = result * (1.0e+308) __47: ; goto __43 __42: if !(e >= 342) { goto __48 } if !(esign < 0) { goto __50 } result = (0.0 * float64(s)) goto __51 __50: result = ((libc.Float64(1e308) * libc.Float64(1e308)) * float64(s)) // Infinity __51: ; goto __49 __48: // 1.0e+22 is the largest power of 10 than can be // represented exactly. __52: if !((e % 22) != 0) { goto __53 } scale = scale * (1.0e+1) e = e - (1) goto __52 __53: ; __54: if !(e > 0) { goto __55 } scale = scale * (1.0e+22) e = e - (22) goto __54 __55: ; if !(esign < 0) { goto __56 } result = (float64(s) / scale) goto __57 __56: result = (float64(s) * scale) __57: ; __49: ; __43: ; goto __41 __40: result = float64(s) __41: ; __33: ; // store the result *(*float64)(unsafe.Pointer(pResult)) = result // return true if number and no extra non-whitespace chracters after return (libc.Bool32((((z >= zEnd) && (nDigits > 0)) && (eValid != 0)) && (nonNum == 0))) } // tointeger(X): If X is any value (integer, double, blob, or string) that // can be losslessly converted into an integer, then make the conversion and // return the result. Otherwise, return NULL. func tointegerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* totype.c:358:13: */ bp := tls.Alloc(24) defer tls.Free(24) _ = argc switch sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_FLOAT: { var rVal float64 = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) var iVal sqlite3_int64 = sqlite3_int64(rVal) if rVal == float64(iVal) { sqlite3.Xsqlite3_result_int64(tls, context, iVal) } break } case SQLITE_INTEGER: { sqlite3.Xsqlite3_result_int64(tls, context, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) break } case SQLITE_BLOB: { var zBlob uintptr = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) if zBlob != 0 { var nBlob int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if uint64(nBlob) == uint64(unsafe.Sizeof(sqlite3_int64(0))) { // var iVal sqlite3_int64 at bp+8, 8 if 0 != 0 { var i int32 // var zBlobRev [8]uint8 at bp, 8 for i = 0; uint64(i) < uint64(unsafe.Sizeof(sqlite3_int64(0))); i++ { *(*uint8)(unsafe.Pointer(bp /* &zBlobRev[0] */ + uintptr(i))) = *(*uint8)(unsafe.Pointer(zBlob + uintptr(((uint64(unsafe.Sizeof(sqlite3_int64(0))) - uint64(1)) - uint64(i))))) } libc.Xmemcpy(tls, bp+8 /* &iVal */, bp /* &zBlobRev[0] */, uint64(unsafe.Sizeof(sqlite3_int64(0)))) } else { libc.Xmemcpy(tls, bp+8 /* &iVal */, zBlob, uint64(unsafe.Sizeof(sqlite3_int64(0)))) } sqlite3.Xsqlite3_result_int64(tls, context, *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* iVal */))) } } break } case SQLITE_TEXT: { var zStr uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zStr != 0 { var nStr int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if (nStr != 0) && !(totypeIsspace(tls, *(*uint8)(unsafe.Pointer(zStr))) != 0) { // var iVal sqlite3_int64 at bp+16, 8 if !(totypeAtoi64(tls, zStr, bp+16 /* &iVal */, nStr) != 0) { sqlite3.Xsqlite3_result_int64(tls, context, *(*sqlite3_int64)(unsafe.Pointer(bp + 16 /* iVal */))) } } } break } default: { break } } } // toreal(X): If X is any value (integer, double, blob, or string) that can // be losslessly converted into a real number, then do so and return that // real number. Otherwise return NULL. func torealFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* totype.c:428:13: */ bp := tls.Alloc(24) defer tls.Free(24) _ = argc switch sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_FLOAT: { sqlite3.Xsqlite3_result_double(tls, context, sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv)))) break } case SQLITE_INTEGER: { var iVal sqlite3_int64 = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) var rVal float64 = float64(iVal) if iVal == sqlite3_int64(rVal) { sqlite3.Xsqlite3_result_double(tls, context, rVal) } break } case SQLITE_BLOB: { var zBlob uintptr = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) if zBlob != 0 { var nBlob int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if uint64(nBlob) == uint64(unsafe.Sizeof(float64(0))) { // var rVal float64 at bp+8, 8 if 1 != 0 { var i int32 // var zBlobRev [8]uint8 at bp, 8 for i = 0; uint64(i) < uint64(unsafe.Sizeof(float64(0))); i++ { *(*uint8)(unsafe.Pointer(bp /* &zBlobRev[0] */ + uintptr(i))) = *(*uint8)(unsafe.Pointer(zBlob + uintptr(((uint64(unsafe.Sizeof(float64(0))) - uint64(1)) - uint64(i))))) } libc.Xmemcpy(tls, bp+8 /* &rVal */, bp /* &zBlobRev[0] */, uint64(unsafe.Sizeof(float64(0)))) } else { libc.Xmemcpy(tls, bp+8 /* &rVal */, zBlob, uint64(unsafe.Sizeof(float64(0)))) } sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 8 /* rVal */))) } } break } case SQLITE_TEXT: { var zStr uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zStr != 0 { var nStr int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if ((nStr != 0) && !(totypeIsspace(tls, *(*uint8)(unsafe.Pointer(zStr))) != 0)) && !(totypeIsspace(tls, *(*uint8)(unsafe.Pointer(zStr + uintptr((nStr - 1))))) != 0) { // var rVal float64 at bp+16, 8 if totypeAtoF(tls, zStr, bp+16 /* &rVal */, nStr) != 0 { sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 16 /* rVal */))) return } } } break } default: { break } } } func sqlite3_totype_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* totype.c:497:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Unused parameter rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7879 /* "tointeger" */, 1, ((SQLITE_UTF8 | SQLITE_DETERMINISTIC) | SQLITE_INNOCUOUS), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tointegerFunc})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7889 /* "toreal" */, 1, ((SQLITE_UTF8 | SQLITE_DETERMINISTIC) | SQLITE_INNOCUOUS), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{torealFunc})), uintptr(0), uintptr(0)) } return rc } // Largest and smallest possible 64-bit signed integers. These macros // copied from sqliteInt.h. // The following is also copied from sqliteInt.h. To facilitate coverage // testing. // The swarmvtab module attempts to keep the number of open database files // at or below this limit. This may not be possible if there are too many // simultaneous queries. type UnionCsr1 = struct { Fbase sqlite3_vtab_cursor FpStmt uintptr FiMaxRowid sqlite3_int64 FiTab int32 _ [4]byte } /* unionvtab.c:181:9 */ // Largest and smallest possible 64-bit signed integers. These macros // copied from sqliteInt.h. // The following is also copied from sqliteInt.h. To facilitate coverage // testing. // The swarmvtab module attempts to keep the number of open database files // at or below this limit. This may not be possible if there are too many // simultaneous queries. type UnionCsr = UnionCsr1 /* unionvtab.c:181:25 */ type UnionTab1 = struct { Fbase sqlite3_vtab Fdb uintptr FbSwarm int32 FiPK int32 FnSrc int32 _ [4]byte FaSrc uintptr FbHasContext int32 _ [4]byte FzSourceStr uintptr FpNotFound uintptr FpOpenClose uintptr FpClosable uintptr FnOpen int32 FnMaxOpen int32 } /* unionvtab.c:182:9 */ type UnionTab = UnionTab1 /* unionvtab.c:182:25 */ type UnionSrc1 = struct { FzDb uintptr FzTab uintptr FiMin sqlite3_int64 FiMax sqlite3_int64 FzFile uintptr FzContext uintptr FnUser int32 _ [4]byte Fdb uintptr FpNextClosable uintptr } /* unionvtab.c:182:9 */ type UnionSrc = UnionSrc1 /* unionvtab.c:183:25 */ // Given UnionTab table pTab and UnionSrc object pSrc, return the database // handle that should be used to access the table identified by pSrc. This // is the main db handle for "unionvtab" tables, or the source-specific // handle for "swarmvtab". // If *pRc is other than SQLITE_OK when this function is called, it // always returns NULL. Otherwise, it attempts to allocate and return // a pointer to nByte bytes of zeroed memory. If the memory allocation // is attempted but fails, NULL is returned and *pRc is set to // SQLITE_NOMEM. func unionMalloc(tls *libc.TLS, pRc uintptr, nByte sqlite3_int64) uintptr { /* unionvtab.c:253:13: */ var pRet uintptr if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = sqlite3.Xsqlite3_malloc64(tls, uint64(nByte)) if pRet != 0 { libc.Xmemset(tls, pRet, 0, size_t(nByte)) } else { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } } else { pRet = uintptr(0) } return pRet } // If *pRc is other than SQLITE_OK when this function is called, it // always returns NULL. Otherwise, it attempts to allocate and return // a copy of the nul-terminated string passed as the second argument. // If the allocation is attempted but fails, NULL is returned and *pRc is // set to SQLITE_NOMEM. func unionStrdup(tls *libc.TLS, pRc uintptr, zIn uintptr) uintptr { /* unionvtab.c:276:13: */ var zRet uintptr = uintptr(0) if zIn != 0 { var nByte sqlite3_int64 = (sqlite3_int64(libc.Xstrlen(tls, zIn) + uint64(1))) zRet = unionMalloc(tls, pRc, nByte) if zRet != 0 { libc.Xmemcpy(tls, zRet, zIn, size_t(nByte)) } } return zRet } // If the first character of the string passed as the only argument to this // function is one of the 4 that may be used as an open quote character // in SQL, this function assumes that the input is a well-formed quoted SQL // string. In this case the string is dequoted in place. // // If the first character of the input is not an open quote, then this // function is a no-op. func unionDequote(tls *libc.TLS, z uintptr) { /* unionvtab.c:297:13: */ if z != 0 { var q int8 = *(*int8)(unsafe.Pointer(z)) // Set stack variable q to the close-quote character if (((int32(q) == '[') || (int32(q) == '\'')) || (int32(q) == '"')) || (int32(q) == '`') { var iIn int32 = 1 var iOut int32 = 0 if int32(q) == '[' { q = int8(']') } for *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { if int32(*(*int8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) { if int32(*(*int8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(q) { // Character iIn was the close quote. iIn++ break } else { // Character iIn and iIn+1 form an escaped quote character. Skip // the input cursor past both and copy a single quote character // to the output buffer. iIn = iIn + (2) *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = q } } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1)))) } } *(*int8)(unsafe.Pointer(z + uintptr(iOut))) = int8(0) } } } // This function is a no-op if *pRc is set to other than SQLITE_OK when it // is called. NULL is returned in this case. // // Otherwise, the SQL statement passed as the third argument is prepared // against the database handle passed as the second. If the statement is // successfully prepared, a pointer to the new statement handle is // returned. It is the responsibility of the caller to eventually free the // statement by calling sqlite3_finalize(). Alternatively, if statement // compilation fails, NULL is returned, *pRc is set to an SQLite error // code and *pzErr may be set to an error message buffer allocated by // sqlite3_malloc(). func unionPrepare(tls *libc.TLS, pRc uintptr, db uintptr, zSql uintptr, pzErr uintptr) uintptr { /* unionvtab.c:341:21: */ bp := tls.Alloc(24) defer tls.Free(24) *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var rc int32 = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16 /* &pRet */, uintptr(0)) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7896 /* "sql error: %s" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) *(*int32)(unsafe.Pointer(pRc)) = rc } } return *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) } // Like unionPrepare(), except prepare the results of vprintf(zFmt, ...) // instead of a constant SQL string. func unionPreparePrintf(tls *libc.TLS, pRc uintptr, pzErr uintptr, db uintptr, zFmt uintptr, va uintptr) uintptr { /* unionvtab.c:363:21: */ var pRet uintptr = uintptr(0) var zSql uintptr var ap va_list _ = ap ap = va zSql = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } else { pRet = unionPrepare(tls, pRc, db, zSql, pzErr) } } sqlite3.Xsqlite3_free(tls, zSql) _ = ap return pRet } // Call sqlite3_reset() on SQL statement pStmt. If *pRc is set to // SQLITE_OK when this function is called, then it is set to the // value returned by sqlite3_reset() before this function exits. // In this case, *pzErr may be set to point to an error message // buffer allocated by sqlite3_malloc(). // Call sqlite3_finalize() on SQL statement pStmt. If *pRc is set to // SQLITE_OK when this function is called, then it is set to the // value returned by sqlite3_finalize() before this function exits. func unionFinalize(tls *libc.TLS, pRc uintptr, pStmt uintptr, pzErr uintptr) { /* unionvtab.c:414:13: */ bp := tls.Alloc(16) defer tls.Free(16) var db uintptr = sqlite3.Xsqlite3_db_handle(tls, pStmt) var rc int32 = sqlite3.Xsqlite3_finalize(tls, pStmt) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = rc if rc != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) } } } // If an "openclose" UDF was supplied when this virtual table was created, // invoke it now. The first argument passed is the name of the database // file for source pSrc. The second is integer value bClose. // // If successful, return SQLITE_OK. Otherwise an SQLite error code. In this // case if argument pzErr is not NULL, also set (*pzErr) to an English // language error message. The caller is responsible for eventually freeing // any error message using sqlite3_free(). func unionInvokeOpenClose(tls *libc.TLS, pTab uintptr, pSrc uintptr, bClose int32, pzErr uintptr) int32 { /* unionvtab.c:435:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK if (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose != 0 { sqlite3.Xsqlite3_bind_text(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose, 1, (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile, -1, uintptr(0)) if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { sqlite3.Xsqlite3_bind_text(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose, 2, (*UnionSrc)(unsafe.Pointer(pSrc)).FzContext, -1, uintptr(0)) } sqlite3.Xsqlite3_bind_int(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose, (2 + (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext), bClose) sqlite3.Xsqlite3_step(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose) if SQLITE_OK != (libc.AssignInt32(&rc, sqlite3.Xsqlite3_reset(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose))) { if pzErr != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*UnionTab)(unsafe.Pointer(pTab)).Fdb))) } } } return rc } // This function is a no-op for unionvtab. For swarmvtab, it attempts to // close open database files until at most nMax are open. An SQLite error // code is returned if an error occurs, or SQLITE_OK otherwise. func unionCloseSources(tls *libc.TLS, pTab uintptr, nMax int32) { /* unionvtab.c:463:13: */ for ((*UnionTab)(unsafe.Pointer(pTab)).FpClosable != 0) && ((*UnionTab)(unsafe.Pointer(pTab)).FnOpen > nMax) { var p uintptr var pp uintptr for pp = (pTab + 88 /* &.pClosable */); (*UnionSrc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextClosable != 0; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 64 /* &.pNextClosable */) { } p = *(*uintptr)(unsafe.Pointer(pp)) sqlite3.Xsqlite3_close(tls, (*UnionSrc)(unsafe.Pointer(p)).Fdb) (*UnionSrc)(unsafe.Pointer(p)).Fdb = uintptr(0) *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) (*UnionTab)(unsafe.Pointer(pTab)).FnOpen-- unionInvokeOpenClose(tls, pTab, p, 1, uintptr(0)) } } // xDisconnect method. func unionDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* unionvtab.c:481:12: */ if pVtab != 0 { var pTab uintptr = pVtab var i int32 for i = 0; i < (*UnionTab)(unsafe.Pointer(pTab)).FnSrc; i++ { var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(i)*72) var bHaveSrcDb int32 = (libc.Bool32((*UnionSrc)(unsafe.Pointer(pSrc)).Fdb != uintptr(0))) sqlite3.Xsqlite3_close(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb) if bHaveSrcDb != 0 { unionInvokeOpenClose(tls, pTab, pSrc, 1, uintptr(0)) } sqlite3.Xsqlite3_free(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb) sqlite3.Xsqlite3_free(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab) sqlite3.Xsqlite3_free(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile) sqlite3.Xsqlite3_free(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzContext) } sqlite3.Xsqlite3_finalize(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound) sqlite3.Xsqlite3_finalize(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose) sqlite3.Xsqlite3_free(tls, (*UnionTab)(unsafe.Pointer(pTab)).FzSourceStr) sqlite3.Xsqlite3_free(tls, (*UnionTab)(unsafe.Pointer(pTab)).FaSrc) sqlite3.Xsqlite3_free(tls, pTab) } return SQLITE_OK } // Check that the table identified by pSrc is a rowid table. If not, // return SQLITE_ERROR and set (*pzErr) to point to an English language // error message. If the table is a rowid table and no error occurs, // return SQLITE_OK and leave (*pzErr) unmodified. func unionIsIntkeyTable(tls *libc.TLS, db uintptr, pSrc uintptr, pzErr uintptr) int32 { /* unionvtab.c:512:12: */ bp := tls.Alloc(44) defer tls.Free(44) *(*int32)(unsafe.Pointer(bp + 40 /* bPk */)) = 0 *(*uintptr)(unsafe.Pointer(bp + 32 /* zType */)) = uintptr(0) var rc int32 sqlite3.Xsqlite3_table_column_metadata(tls, db, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, ts+7910 /* "_rowid_" */, bp+32 /* &zType */, uintptr(0), uintptr(0), bp+40 /* &bPk */, uintptr(0)) rc = sqlite3.Xsqlite3_errcode(tls, db) if (rc == SQLITE_ERROR) || ((rc == SQLITE_OK) && (!(*(*int32)(unsafe.Pointer(bp + 40 /* bPk */)) != 0) || (sqlite3.Xsqlite3_stricmp(tls, ts+7918 /* "integer" */, *(*uintptr)(unsafe.Pointer(bp + 32 /* zType */))) != 0))) { rc = SQLITE_ERROR *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7926, /* "no such rowid ta..." */ libc.VaList(bp, func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb } return ts + 489 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return ts + 7954 /* "." */ } return ts + 489 /* "" */ }(), (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab)) } return rc } // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. In this case it returns NULL. // // Otherwise, this function checks that the source table passed as the // second argument (a) exists, (b) is not a view and (c) has a column // named "_rowid_" of type "integer" that is the primary key. // If this is not the case, *pRc is set to SQLITE_ERROR and NULL is // returned. // // Finally, if the source table passes the checks above, a nul-terminated // string describing the column names and types belonging to the source // table is returned. Tables with the same set of column names and types // cause this function to return identical strings. Is is the responsibility // of the caller to free the returned string using sqlite3_free() when // it is no longer required. func unionSourceToStr(tls *libc.TLS, pRc uintptr, pTab uintptr, pSrc uintptr, pzErr uintptr) uintptr { /* unionvtab.c:555:13: */ bp := tls.Alloc(4) defer tls.Free(4) var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var db uintptr = func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { return (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb } return (*UnionTab)(unsafe.Pointer(pTab)).Fdb }() *(*int32)(unsafe.Pointer(bp /* rc */)) = unionIsIntkeyTable(tls, db, pSrc, pzErr) var pStmt uintptr = unionPrepare(tls, bp /* &rc */, db, ts+7956 /* "SELECT group_con..." */, pzErr) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_bind_text(tls, pStmt, 1, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, -1, uintptr(0)) sqlite3.Xsqlite3_bind_text(tls, pStmt, 2, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb, -1, uintptr(0)) if SQLITE_ROW == sqlite3.Xsqlite3_step(tls, pStmt) { var z uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 0) zRet = unionStrdup(tls, bp /* &rc */, z) } unionFinalize(tls, bp /* &rc */, pStmt, pzErr) } *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp /* rc */)) } return zRet } // Check that all configured source tables exist and have the same column // names and datatypes. If this is not the case, or if some other error // occurs, return an SQLite error code. In this case *pzErr may be set // to point to an error message buffer allocated by sqlite3_mprintf(). // Or, if no problems regarding the source tables are detected and no // other error occurs, SQLITE_OK is returned. func unionSourceCheck(tls *libc.TLS, pTab uintptr, pzErr uintptr) int32 { /* unionvtab.c:592:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var z0 uintptr = uintptr(0) var i int32 z0 = unionSourceToStr(tls, bp /* &rc */, pTab, ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc), pzErr) for i = 1; i < (*UnionTab)(unsafe.Pointer(pTab)).FnSrc; i++ { var z uintptr = unionSourceToStr(tls, bp /* &rc */, pTab, ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(i)*72), pzErr) if (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (sqlite3.Xsqlite3_stricmp(tls, z, z0) != 0) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8040 /* "source table sch..." */, 0) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR } sqlite3.Xsqlite3_free(tls, z) } sqlite3.Xsqlite3_free(tls, z0) return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Try to open the swarmvtab database. If initially unable, invoke the // not-found callback UDF and then try again. func unionOpenDatabaseInner(tls *libc.TLS, pTab uintptr, pSrc uintptr, pzErr uintptr) int32 { /* unionvtab.c:616:12: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 rc = unionInvokeOpenClose(tls, pTab, pSrc, 0, pzErr) if rc != SQLITE_OK { return rc } rc = sqlite3.Xsqlite3_open_v2(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile, (pSrc + 56 /* &.db */), openFlags, uintptr(0)) if rc == SQLITE_OK { return rc } if (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound != 0 { sqlite3.Xsqlite3_close(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb) (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb = uintptr(0) sqlite3.Xsqlite3_bind_text(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound, 1, (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile, -1, uintptr(0)) if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { sqlite3.Xsqlite3_bind_text(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound, 2, (*UnionSrc)(unsafe.Pointer(pSrc)).FzContext, -1, uintptr(0)) } sqlite3.Xsqlite3_step(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound) if SQLITE_OK != (libc.AssignInt32(&rc, sqlite3.Xsqlite3_reset(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound))) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*UnionTab)(unsafe.Pointer(pTab)).Fdb))) return rc } rc = sqlite3.Xsqlite3_open_v2(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile, (pSrc + 56 /* &.db */), openFlags, uintptr(0)) } if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, sqlite3.Xsqlite3_errmsg(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb))) } return rc } var openFlags int32 = (SQLITE_OPEN_READONLY | SQLITE_OPEN_URI) /* unionvtab.c:617:20 */ // This function may only be called for swarmvtab tables. The results of // calling it on a unionvtab table are undefined. // // For a swarmvtab table, this function ensures that source database iSrc // is open. If the database is opened successfully and the schema is as // expected, or if it is already open when this function is called, SQLITE_OK // is returned. // // Alternatively If an error occurs while opening the databases, or if the // database schema is unsuitable, an SQLite error code is returned and (*pzErr) // may be set to point to an English language error message. In this case it is // the responsibility of the caller to eventually free the error message buffer // using sqlite3_free(). func unionOpenDatabase(tls *libc.TLS, pTab uintptr, iSrc int32, pzErr uintptr) int32 { /* unionvtab.c:660:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(iSrc)*72) if (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb == uintptr(0) { unionCloseSources(tls, pTab, ((*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen - 1)) *(*int32)(unsafe.Pointer(bp /* rc */)) = unionOpenDatabaseInner(tls, pTab, pSrc, pzErr) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { var z uintptr = unionSourceToStr(tls, bp /* &rc */, pTab, pSrc, pzErr) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { if (*UnionTab)(unsafe.Pointer(pTab)).FzSourceStr == uintptr(0) { (*UnionTab)(unsafe.Pointer(pTab)).FzSourceStr = z } else { if sqlite3.Xsqlite3_stricmp(tls, z, (*UnionTab)(unsafe.Pointer(pTab)).FzSourceStr) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8040 /* "source table sch..." */, 0) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR } sqlite3.Xsqlite3_free(tls, z) } } } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { (*UnionSrc)(unsafe.Pointer(pSrc)).FpNextClosable = (*UnionTab)(unsafe.Pointer(pTab)).FpClosable (*UnionTab)(unsafe.Pointer(pTab)).FpClosable = pSrc (*UnionTab)(unsafe.Pointer(pTab)).FnOpen++ } else { sqlite3.Xsqlite3_close(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb) (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb = uintptr(0) unionInvokeOpenClose(tls, pTab, pSrc, 1, uintptr(0)) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // This function is a no-op for unionvtab tables. For swarmvtab, increment // the reference count for source table iTab. If the reference count was // zero before it was incremented, also remove the source from the closable // list. func unionIncrRefcount(tls *libc.TLS, pTab uintptr, iTab int32) { /* unionvtab.c:704:13: */ if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(iTab)*72) if (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser == 0 { var pp uintptr for pp = (pTab + 88 /* &.pClosable */); *(*uintptr)(unsafe.Pointer(pp)) != pSrc; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 64 /* &.pNextClosable */) { } *(*uintptr)(unsafe.Pointer(pp)) = (*UnionSrc)(unsafe.Pointer(pSrc)).FpNextClosable (*UnionSrc)(unsafe.Pointer(pSrc)).FpNextClosable = uintptr(0) } (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser++ } } // Finalize the SQL statement pCsr->pStmt and return the result. // // If this is a swarmvtab table (not unionvtab) and pCsr->pStmt was not // NULL when this function was called, also decrement the reference // count on the associated source table. If this means the source tables // refcount is now zero, add it to the closable list. func unionFinalizeCsrStmt(tls *libc.TLS, pCsr uintptr) int32 { /* unionvtab.c:726:12: */ var rc int32 = SQLITE_OK if (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt != 0 { var pTab uintptr = (*UnionCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr((*UnionCsr)(unsafe.Pointer(pCsr)).FiTab)*72) rc = sqlite3.Xsqlite3_finalize(tls, (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt) (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt = uintptr(0) if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser-- if (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser == 0 { (*UnionSrc)(unsafe.Pointer(pSrc)).FpNextClosable = (*UnionTab)(unsafe.Pointer(pTab)).FpClosable (*UnionTab)(unsafe.Pointer(pTab)).FpClosable = pSrc } unionCloseSources(tls, pTab, (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen) } } return rc } // Return true if the argument is a space, tab, CR or LF character. func union_isspace(tls *libc.TLS, c int8) int32 { /* unionvtab.c:749:12: */ return (libc.Bool32((((int32(c) == ' ') || (int32(c) == '\n')) || (int32(c) == '\r')) || (int32(c) == '\t'))) } // Return true if the argument is an alphanumeric character in the // ASCII range. func union_isidchar(tls *libc.TLS, c int8) int32 { /* unionvtab.c:757:12: */ return (libc.Bool32((((int32(c) >= 'a') && (int32(c) <= 'z')) || ((int32(c) >= 'A') && (int32(c) < 'Z'))) || ((int32(c) >= '0') && (int32(c) <= '9')))) } // This function is called to handle all arguments following the first // (the SQL statement) passed to a swarmvtab (not unionvtab) CREATE // VIRTUAL TABLE statement. It may bind parameters to the SQL statement // or configure members of the UnionTab object passed as the second // argument. // // Refer to header comments at the top of this file for a description // of the arguments parsed. // // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. Otherwise, if an error occurs, *pRc is set to an SQLite error // code. In this case *pzErr may be set to point to a buffer containing // an English language error message. It is the responsibility of the // caller to eventually free the buffer using sqlite3_free(). func unionConfigureVtab(tls *libc.TLS, pRc uintptr, pTab uintptr, pStmt uintptr, nArg int32, azArg uintptr, pzErr uintptr) { /* unionvtab.c:777:13: */ bp := tls.Alloc(116) defer tls.Free(116) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = *(*int32)(unsafe.Pointer(pRc)) var i int32 if *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) == SQLITE_OK { (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext = (libc.Bool32(sqlite3.Xsqlite3_column_count(tls, pStmt) > 4)) } for i = 0; (*(*int32)(unsafe.Pointer(bp + 112 /* rc */)) == SQLITE_OK) && (i < nArg); i++ { var zArg uintptr = unionStrdup(tls, bp+112 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8))) if zArg != 0 { var nOpt int32 = 0 // Size of option name in bytes var zOpt uintptr // Pointer to option name var zVal uintptr // Pointer to value unionDequote(tls, zArg) zOpt = zArg for union_isspace(tls, *(*int8)(unsafe.Pointer(zOpt))) != 0 { zOpt++ } zVal = zOpt if int32(*(*int8)(unsafe.Pointer(zVal))) == ':' { zVal++ } for union_isidchar(tls, *(*int8)(unsafe.Pointer(zVal))) != 0 { zVal++ } nOpt = (int32((int64(zVal) - int64(zOpt)) / 1)) for union_isspace(tls, *(*int8)(unsafe.Pointer(zVal))) != 0 { zVal++ } if int32(*(*int8)(unsafe.Pointer(zVal))) == '=' { *(*int8)(unsafe.Pointer(zOpt + uintptr(nOpt))) = int8(0) zVal++ for union_isspace(tls, *(*int8)(unsafe.Pointer(zVal))) != 0 { zVal++ } zVal = unionStrdup(tls, bp+112 /* &rc */, zVal) if zVal != 0 { unionDequote(tls, zVal) if int32(*(*int8)(unsafe.Pointer(zOpt))) == ':' { // A value to bind to the SQL statement var iParam int32 = sqlite3.Xsqlite3_bind_parameter_index(tls, pStmt, zOpt) if iParam == 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8069 /* "swarmvtab: no su..." */, libc.VaList(bp, zOpt)) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = sqlite3.Xsqlite3_bind_text(tls, pStmt, iParam, zVal, -1, libc.UintptrFromInt32(-1)) } } else if (nOpt == 7) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+8106 /* "maxopen" */, 7)) { (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen = libc.Xatoi(tls, zVal) if (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen <= 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8114 /* "swarmvtab: illeg..." */, 0) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = SQLITE_ERROR } } else if (nOpt == 7) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+8147 /* "missing" */, 7)) { if (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8155 /* "swarmvtab: dupli..." */, 0) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = SQLITE_ERROR } else { (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound = unionPreparePrintf(tls, bp+112 /* &rc */, pzErr, (*UnionTab)(unsafe.Pointer(pTab)).Fdb, ts+8193 /* "SELECT \"%w\"(?%s)" */, libc.VaList(bp+16, zVal, func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { return ts + 8210 /* ",?" */ } return ts + 489 /* "" */ }())) } } else if (nOpt == 9) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+8213 /* "openclose" */, 9)) { if (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8223 /* "swarmvtab: dupli..." */, 0) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = SQLITE_ERROR } else { (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose = unionPreparePrintf(tls, bp+112 /* &rc */, pzErr, (*UnionTab)(unsafe.Pointer(pTab)).Fdb, ts+8263 /* "SELECT \"%w\"(?,?%..." */, libc.VaList(bp+40, zVal, func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { return ts + 8210 /* ",?" */ } return ts + 489 /* "" */ }())) } } else { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8282 /* "swarmvtab: unrec..." */, libc.VaList(bp+64, zOpt)) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = SQLITE_ERROR } sqlite3.Xsqlite3_free(tls, zVal) } } else { if (i == 0) && (nArg == 1) { (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound = unionPreparePrintf(tls, bp+112 /* &rc */, pzErr, (*UnionTab)(unsafe.Pointer(pTab)).Fdb, ts+8317 /* "SELECT \"%w\"(?)" */, libc.VaList(bp+80, zArg)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8332 /* "swarmvtab: parse..." */, libc.VaList(bp+96, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)))) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = SQLITE_ERROR } } sqlite3.Xsqlite3_free(tls, zArg) } } *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) } // xConnect/xCreate method. // // The argv[] array contains the following: // // argv[0] -> module name ("unionvtab" or "swarmvtab") // argv[1] -> database name // argv[2] -> table name // argv[3] -> SQL statement // argv[4] -> not-found callback UDF name func unionConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* unionvtab.c:883:12: */ bp := tls.Alloc(76) defer tls.Free(76) var pTab uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = SQLITE_OK var bSwarm int32 = func() int32 { if pAux == uintptr(0) { return 0 } return 1 }() var zVtab uintptr = func() uintptr { if bSwarm != 0 { return ts + 8359 /* "swarmvtab" */ } return ts + 8369 /* "unionvtab" */ }() if sqlite3.Xsqlite3_stricmp(tls, ts+8379 /* "temp" */, *(*uintptr)(unsafe.Pointer(argv + 1*8))) != 0 { // unionvtab tables may only be created in the temp schema *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8384 /* "%s tables must b..." */, libc.VaList(bp, zVtab)) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = SQLITE_ERROR } else if (argc < 4) || ((argc > 4) && (bSwarm == 0)) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8425 /* "wrong number of ..." */, libc.VaList(bp+16, zVtab)) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = SQLITE_ERROR } else { var nAlloc int32 = 0 // Allocated size of pTab->aSrc[] var pStmt uintptr = uintptr(0) // Argument statement var zArg uintptr = unionStrdup(tls, bp+72 /* &rc */, *(*uintptr)(unsafe.Pointer(argv + 3*8))) // Copy of argument to CVT // Prepare the SQL statement. Instead of executing it directly, sort // the results by the "minimum rowid" field. This makes it easier to // check that there are no rowid range overlaps between source tables // and that the UnionTab.aSrc[] array is always sorted by rowid. unionDequote(tls, zArg) pStmt = unionPreparePrintf(tls, bp+72 /* &rc */, pzErr, db, ts+8458 /* "SELECT * FROM (%..." */, libc.VaList(bp+32, zArg)) // Allocate the UnionTab structure pTab = unionMalloc(tls, bp+72 /* &rc */, int64(unsafe.Sizeof(UnionTab{}))) if pTab != 0 { (*UnionTab)(unsafe.Pointer(pTab)).Fdb = db (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm = bSwarm (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen = SWARMVTAB_MAX_OPEN } // Parse other CVT arguments, if any if bSwarm != 0 { unionConfigureVtab(tls, bp+72 /* &rc */, pTab, pStmt, (argc - 4), (argv + 4*8), pzErr) } // Iterate through the rows returned by the SQL statement specified // as an argument to the CREATE VIRTUAL TABLE statement. for (*(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, pStmt)) { var zDb uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 0) var zTab uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 1) var iMin sqlite3_int64 = sqlite3.Xsqlite3_column_int64(tls, pStmt, 2) var iMax sqlite3_int64 = sqlite3.Xsqlite3_column_int64(tls, pStmt, 3) var pSrc uintptr // Grow the pTab->aSrc[] array if required. if nAlloc <= (*UnionTab)(unsafe.Pointer(pTab)).FnSrc { var nNew int32 if nAlloc != 0 { nNew = (nAlloc * 2) } else { nNew = 8 } var aNew uintptr = sqlite3.Xsqlite3_realloc64(tls, (*UnionTab)(unsafe.Pointer(pTab)).FaSrc, (uint64(nNew) * uint64(unsafe.Sizeof(UnionSrc{})))) if aNew == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = SQLITE_NOMEM break } else { libc.Xmemset(tls, (aNew + uintptr((*UnionTab)(unsafe.Pointer(pTab)).FnSrc)*72), 0, ((uint64(nNew - (*UnionTab)(unsafe.Pointer(pTab)).FnSrc)) * uint64(unsafe.Sizeof(UnionSrc{})))) (*UnionTab)(unsafe.Pointer(pTab)).FaSrc = aNew nAlloc = nNew } } // Check for problems with the specified range of rowids if (iMax < iMin) || (((*UnionTab)(unsafe.Pointer(pTab)).FnSrc > 0) && (iMin <= (*UnionSrc)(unsafe.Pointer((*UnionTab)(unsafe.Pointer(pTab)).FaSrc+uintptr(((*UnionTab)(unsafe.Pointer(pTab)).FnSrc-1))*72)).FiMax)) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8488 /* "rowid range mism..." */, 0) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = SQLITE_ERROR } if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK { pSrc = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(libc.PostIncInt32(&(*UnionTab)(unsafe.Pointer(pTab)).FnSrc, 1))*72) (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab = unionStrdup(tls, bp+72 /* &rc */, zTab) (*UnionSrc)(unsafe.Pointer(pSrc)).FiMin = iMin (*UnionSrc)(unsafe.Pointer(pSrc)).FiMax = iMax if bSwarm != 0 { (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile = unionStrdup(tls, bp+72 /* &rc */, zDb) } else { (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb = unionStrdup(tls, bp+72 /* &rc */, zDb) } if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { var zContext uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 4) (*UnionSrc)(unsafe.Pointer(pSrc)).FzContext = unionStrdup(tls, bp+72 /* &rc */, zContext) } } } unionFinalize(tls, bp+72 /* &rc */, pStmt, pzErr) pStmt = uintptr(0) // It is an error if the SELECT statement returned zero rows. If only // because there is no way to determine the schema of the virtual // table in this case. if (*(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK) && ((*UnionTab)(unsafe.Pointer(pTab)).FnSrc == 0) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8515 /* "no source tables..." */, 0) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = SQLITE_ERROR } // For unionvtab, verify that all source tables exist and have // compatible schemas. For swarmvtab, attach the first database and // check that the first table is a rowid table only. if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK { if bSwarm != 0 { *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = unionOpenDatabase(tls, pTab, 0, pzErr) } else { *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = unionSourceCheck(tls, pTab, pzErr) } } // Compose a CREATE TABLE statement and pass it to declare_vtab() if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK { var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc) var tdb uintptr = func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { return (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb } return (*UnionTab)(unsafe.Pointer(pTab)).Fdb }() pStmt = unionPreparePrintf(tls, bp+72 /* &rc */, pzErr, tdb, ts+8543, /* "SELECT 'CREATE T..." */ libc.VaList(bp+48, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb)) } if (*(*int32)(unsafe.Pointer(bp + 72 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, pStmt)) { var zDecl uintptr = sqlite3.Xsqlite3_column_text(tls, pStmt, 0) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = sqlite3.Xsqlite3_declare_vtab(tls, db, zDecl) (*UnionTab)(unsafe.Pointer(pTab)).FiPK = sqlite3.Xsqlite3_column_int(tls, pStmt, 1) } unionFinalize(tls, bp+72 /* &rc */, pStmt, pzErr) } if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) != SQLITE_OK { unionDisconnect(tls, pTab) pTab = uintptr(0) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab return *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) } // xOpen func unionOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* unionvtab.c:1033:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pCsr uintptr *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK _ = p // Suppress harmless warning pCsr = unionMalloc(tls, bp /* &rc */, int64(unsafe.Sizeof(UnionCsr{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCsr /* &.base */) return *(*int32)(unsafe.Pointer(bp /* rc */)) } // xClose func unionClose(tls *libc.TLS, cur uintptr) int32 { /* unionvtab.c:1045:12: */ var pCsr uintptr = cur unionFinalizeCsrStmt(tls, pCsr) sqlite3.Xsqlite3_free(tls, pCsr) return SQLITE_OK } // This function does the work of the xNext() method. Except that, if it // returns SQLITE_ROW, it should be called again within the same xNext() // method call. See unionNext() for details. func doUnionNext(tls *libc.TLS, pCsr uintptr) int32 { /* unionvtab.c:1057:12: */ bp := tls.Alloc(36) defer tls.Free(36) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK if sqlite3.Xsqlite3_step(tls, (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt) != SQLITE_ROW { var pTab uintptr = (*UnionCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = unionFinalizeCsrStmt(tls, pCsr) if (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK) && ((*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0) { (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab++ if (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab < (*UnionTab)(unsafe.Pointer(pTab)).FnSrc { var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr((*UnionCsr)(unsafe.Pointer(pCsr)).FiTab)*72) if (*UnionCsr)(unsafe.Pointer(pCsr)).FiMaxRowid >= (*UnionSrc)(unsafe.Pointer(pSrc)).FiMin { // It is necessary to scan the next table. *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = unionOpenDatabase(tls, pTab, (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab, (pTab /* &.base */ + 16 /* &.zErrMsg */)) (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt = unionPreparePrintf(tls, bp+32 /* &rc */, (pTab /* &.base */ + 16 /* &.zErrMsg */), (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb, ts+8721, /* "SELECT rowid, * ..." */ libc.VaList(bp, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FiMax > (*UnionCsr)(unsafe.Pointer(pCsr)).FiMaxRowid { return ts + 8753 /* "WHERE _rowid_ <=" */ } return ts + 8770 /* "-- " */ }(), (*UnionCsr)(unsafe.Pointer(pCsr)).FiMaxRowid)) if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { unionIncrRefcount(tls, pTab, (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ROW } } } } } return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } // xNext func unionNext(tls *libc.TLS, cur uintptr) int32 { /* unionvtab.c:1092:12: */ var rc int32 for ok := true; ok; ok = (rc == SQLITE_ROW) { rc = doUnionNext(tls, cur) } return rc } // xColumn func unionColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* unionvtab.c:1103:12: */ var pCsr uintptr = cur sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt, (i+1))) return SQLITE_OK } // xRowid func unionRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* unionvtab.c:1116:12: */ var pCsr uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_column_int64(tls, (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt, 0) return SQLITE_OK } // xEof func unionEof(tls *libc.TLS, cur uintptr) int32 { /* unionvtab.c:1125:12: */ var pCsr uintptr = cur return (libc.Bool32((*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt == uintptr(0))) } // xFilter func unionFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* unionvtab.c:1133:12: */ bp := tls.Alloc(140) defer tls.Free(140) var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var pCsr uintptr = pVtabCursor *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = SQLITE_OK var i int32 var zSql uintptr = uintptr(0) var bZero int32 = 0 var iMin sqlite3_int64 = ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) var iMax sqlite3_int64 = (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) _ = idxStr // Suppress harmless warning if idxNum == SQLITE_INDEX_CONSTRAINT_EQ { iMin = libc.AssignInt64(&iMax, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) } else { if (idxNum & (SQLITE_INDEX_CONSTRAINT_LE | SQLITE_INDEX_CONSTRAINT_LT)) != 0 { iMax = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if (idxNum & SQLITE_INDEX_CONSTRAINT_LT) != 0 { if iMax == ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) { bZero = 1 } else { iMax-- } } } if (idxNum & (SQLITE_INDEX_CONSTRAINT_GE | SQLITE_INDEX_CONSTRAINT_GT)) != 0 { iMin = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((argc-1))*8))) if (idxNum & SQLITE_INDEX_CONSTRAINT_GT) != 0 { if iMin == (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) { bZero = 1 } else { iMin++ } } } } unionFinalizeCsrStmt(tls, pCsr) if bZero != 0 { return SQLITE_OK } for i = 0; i < (*UnionTab)(unsafe.Pointer(pTab)).FnSrc; i++ { var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(i)*72) if (iMin > (*UnionSrc)(unsafe.Pointer(pSrc)).FiMax) || (iMax < (*UnionSrc)(unsafe.Pointer(pSrc)).FiMin) { continue } zSql = sqlite3.Xsqlite3_mprintf(tls, ts+8774 /* "%z%sSELECT rowid..." */, libc.VaList(bp, zSql, func() uintptr { if zSql != 0 { return ts + 8808 /* " UNION ALL " */ } return ts + 489 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return ts + 5495 /* "'" */ } return ts + 489 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb } return ts + 489 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return ts + 5497 /* "'." */ } return ts + 489 /* "" */ }(), (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = SQLITE_NOMEM break } if iMin == iMax { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+8820 /* "%z WHERE rowid=%..." */, libc.VaList(bp+56, zSql, iMin)) } else { var zWhere uintptr = ts + 8840 /* "WHERE" */ if (iMin != ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)))) && (iMin > (*UnionSrc)(unsafe.Pointer(pSrc)).FiMin) { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+8846 /* "%z WHERE rowid>=..." */, libc.VaList(bp+80, zSql, iMin)) zWhere = ts + 8867 /* "AND" */ } if (iMax != (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) && (iMax < (*UnionSrc)(unsafe.Pointer(pSrc)).FiMax) { zSql = sqlite3.Xsqlite3_mprintf(tls, ts+8871 /* "%z %s rowid<=%ll..." */, libc.VaList(bp+104, zSql, zWhere, iMax)) } } if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab = i (*UnionCsr)(unsafe.Pointer(pCsr)).FiMaxRowid = iMax *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = unionOpenDatabase(tls, pTab, i, (pTab /* &.base */ + 16 /* &.zErrMsg */)) break } } if zSql == uintptr(0) { return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } else { var db uintptr = func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { return (*UnionSrc)(unsafe.Pointer(((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr((*UnionCsr)(unsafe.Pointer(pCsr)).FiTab)*72))).Fdb } return (*UnionTab)(unsafe.Pointer(pTab)).Fdb }() (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt = unionPrepare(tls, bp+136 /* &rc */, db, zSql, (pTab /* &.base */ + 16 /* &.zErrMsg */)) if (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt != 0 { unionIncrRefcount(tls, pTab, (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab) } sqlite3.Xsqlite3_free(tls, zSql) } if *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } return unionNext(tls, pVtabCursor) } // xBestIndex. // // This implementation searches for constraints on the rowid field. EQ, // LE, LT, GE and GT are handled. // // If there is an EQ comparison, then idxNum is set to INDEX_CONSTRAINT_EQ. // In this case the only argument passed to xFilter is the rhs of the == // operator. // // Otherwise, if an LE or LT constraint is found, then the INDEX_CONSTRAINT_LE // or INDEX_CONSTRAINT_LT (but not both) bit is set in idxNum. The first // argument to xFilter is the rhs of the <= or < operator. Similarly, if // an GE or GT constraint is found, then the INDEX_CONSTRAINT_GE or // INDEX_CONSTRAINT_GT bit is set in idxNum. The rhs of the >= or > operator // is passed as either the first or second argument to xFilter, depending // on whether or not there is also a LT|LE constraint. func unionBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* unionvtab.c:1266:12: */ var pTab uintptr = tab var iEq int32 = -1 var iLt int32 = -1 var iGt int32 = -1 var i int32 for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; i++ { var p uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(i)*12) if ((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0) && (((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn < 0) || ((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn == (*UnionTab)(unsafe.Pointer(pTab)).FiPK)) { switch int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) { case SQLITE_INDEX_CONSTRAINT_EQ: iEq = i break fallthrough case SQLITE_INDEX_CONSTRAINT_LE: fallthrough case SQLITE_INDEX_CONSTRAINT_LT: iLt = i break fallthrough case SQLITE_INDEX_CONSTRAINT_GE: fallthrough case SQLITE_INDEX_CONSTRAINT_GT: iGt = i break } } } if iEq >= 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxFlags = SQLITE_INDEX_SCAN_UNIQUE (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3.0 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = SQLITE_INDEX_CONSTRAINT_EQ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iEq)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iEq)*8)).Fomit = uint8(1) } else { var iCons int32 = 1 var idxNum int32 = 0 var nRow sqlite3_int64 = int64(1000000) if iLt >= 0 { nRow = (nRow / int64(2)) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iLt)*8)).FargvIndex = libc.PostIncInt32(&iCons, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iLt)*8)).Fomit = uint8(1) idxNum = idxNum | (int32((*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(iLt)*12)).Fop)) } if iGt >= 0 { nRow = (nRow / int64(2)) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iGt)*8)).FargvIndex = libc.PostIncInt32(&iCons, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iGt)*8)).Fomit = uint8(1) idxNum = idxNum | (int32((*sqlite3_index_constraint)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(iGt)*12)).Fop)) } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = nRow (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = (3.0 * float64(nRow)) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum } return SQLITE_OK } // Register the unionvtab virtual table module with database handle db. func createUnionVtab(tls *libc.TLS, db uintptr) int32 { /* unionvtab.c:1329:12: */ var rc int32 rc = sqlite3.Xsqlite3_create_module(tls, db, ts+8369 /* "unionvtab" */, uintptr(unsafe.Pointer(&unionModule)), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_module(tls, db, ts+8359 /* "swarmvtab" */, uintptr(unsafe.Pointer(&unionModule)), db) } return rc } var unionModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, // xBestIndex - query planner FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName } /* unionvtab.c:1330:25 */ func sqlite3_unionvtab_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* unionvtab.c:1370:5: */ var rc int32 = SQLITE_OK _ = pApi _ = pzErrMsg // Suppress harmless warning rc = createUnionVtab(tls, db) return rc } // A wholenumber cursor object type wholenumber_cursor1 = struct { Fbase sqlite3_vtab_cursor FiValue sqlite3_int64 FmxValue sqlite3_int64 } /* wholenumber.c:34:9 */ // A wholenumber cursor object type wholenumber_cursor = wholenumber_cursor1 /* wholenumber.c:34:35 */ // Methods for the wholenumber module func wholenumberConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* wholenumber.c:42:12: */ var pNew uintptr pNew = libc.AssignPtrUintptr(ppVtab, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vtab{})))) if pNew == uintptr(0) { return SQLITE_NOMEM } sqlite3.Xsqlite3_declare_vtab(tls, db, ts+8889 /* "CREATE TABLE x(v..." */) sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_INNOCUOUS, 0) libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(sqlite3_vtab{}))) return SQLITE_OK } // Note that for this virtual table, the xCreate and xConnect // methods are identical. func wholenumberDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* wholenumber.c:60:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // The xDisconnect and xDestroy methods are also the same // Open a new wholenumber cursor. func wholenumberOpen(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* wholenumber.c:70:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(wholenumber_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(wholenumber_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Close a wholenumber cursor. func wholenumberClose(tls *libc.TLS, cur uintptr) int32 { /* wholenumber.c:82:12: */ sqlite3.Xsqlite3_free(tls, cur) return SQLITE_OK } // Advance a cursor to its next row of output func wholenumberNext(tls *libc.TLS, cur uintptr) int32 { /* wholenumber.c:91:12: */ var pCur uintptr = cur (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue++ return SQLITE_OK } // Return the value associated with a wholenumber. func wholenumberColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* wholenumber.c:100:12: */ var pCur uintptr = cur sqlite3.Xsqlite3_result_int64(tls, ctx, (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue) return SQLITE_OK } // The rowid. func wholenumberRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* wholenumber.c:113:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue return SQLITE_OK } // When the wholenumber_cursor.rLimit value is 0 or less, that is a signal // that the cursor has nothing more to output. func wholenumberEof(tls *libc.TLS, cur uintptr) int32 { /* wholenumber.c:123:12: */ var pCur uintptr = cur return (libc.Bool32(((*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue > (*wholenumber_cursor)(unsafe.Pointer(pCur)).FmxValue) || ((*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue == int64(0)))) } // Called to "rewind" a cursor back to the beginning so that // it starts its output over again. Always called at least once // prior to any wholenumberColumn, wholenumberRowid, or wholenumberEof call. // // idxNum Constraints // ------ --------------------- // 0 (none) // 1 value > $argv0 // 2 value >= $argv0 // 4 value < $argv0 // 8 value <= $argv0 // // 5 value > $argv0 AND value < $argv1 // 6 value >= $argv0 AND value < $argv1 // 9 value > $argv0 AND value <= $argv1 // 10 value >= $argv0 AND value <= $argv1 func wholenumberFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* wholenumber.c:146:12: */ var pCur uintptr = pVtabCursor var v sqlite3_int64 var i int32 = 0 (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue = int64(1) (*wholenumber_cursor)(unsafe.Pointer(pCur)).FmxValue = int64(0xffffffff) // 4294967295 if (idxNum & 3) != 0 { v = (sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) + (sqlite3_int64(idxNum & 1))) if (v > (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue) && (v <= (*wholenumber_cursor)(unsafe.Pointer(pCur)).FmxValue) { (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue = v } i++ } if (idxNum & 12) != 0 { v = (sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) - (sqlite3_int64((idxNum >> 2) & 1))) if (v >= (*wholenumber_cursor)(unsafe.Pointer(pCur)).FiValue) && (v < (*wholenumber_cursor)(unsafe.Pointer(pCur)).FmxValue) { (*wholenumber_cursor)(unsafe.Pointer(pCur)).FmxValue = v } } return SQLITE_OK } // Search for terms of these forms: // // (1) value > $value // (2) value >= $value // (4) value < $value // (8) value <= $value // // idxNum is an ORed combination of 1 or 2 with 4 or 8. func wholenumberBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* wholenumber.c:178:12: */ var i int32 var idxNum int32 = 0 var argvIdx int32 = 1 var ltIdx int32 = -1 var gtIdx int32 = -1 var pConstraint uintptr pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: if !(i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { goto __3 } { if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { goto __2 } if ((idxNum & 3) == 0) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_GT) { idxNum = idxNum | (1) ltIdx = i } if ((idxNum & 3) == 0) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_GE) { idxNum = idxNum | (2) ltIdx = i } if ((idxNum & 12) == 0) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LT) { idxNum = idxNum | (4) gtIdx = i } if ((idxNum & 12) == 0) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_LE) { idxNum = idxNum | (8) gtIdx = i } } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum if ltIdx >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ltIdx)*8)).FargvIndex = libc.PostIncInt32(&argvIdx, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ltIdx)*8)).Fomit = uint8(1) } if gtIdx >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(gtIdx)*8)).FargvIndex = argvIdx (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(gtIdx)*8)).Fomit = uint8(1) } if ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1) && (int32((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc) == 0) { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } if (idxNum & 12) == 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1e99 } else if (idxNum & 3) == 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(5) } else { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1) } return SQLITE_OK } // A virtual table module that provides read-only access to a // Tcl global variable namespace. var wholenumberModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* wholenumber.c:236:23 */ func sqlite3_wholenumber_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* wholenumber.c:264:5: */ var rc int32 = SQLITE_OK _ = pApi rc = sqlite3.Xsqlite3_create_module(tls, db, ts+8911 /* "wholenumber" */, uintptr(unsafe.Pointer(&wholenumberModule)), uintptr(0)) return rc } // ISO C Standard: 7.17 Common definitions // Any one of these symbols __need_* means that GNU libc // wants us just to define one data type. So don't define // the symbols that indicate this file's entire job has been done. // snaroff@next.com says the NeXT needs this. // Irix 5.1 needs this. // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are // defined if the corresponding type is *not* defined. // FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ // Sequent's header files use _PTRDIFF_T_ in some conflicting way. // Just ignore it. // On VxWorks, may have defined macros like // _TYPE_size_t which will typedef size_t. fixincludes patched the // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is // not defined, and so that defining this macro defines _GCC_SIZE_T. // If we find that the macros are still defined at this point, we must // invoke them so that the type is defined as expected. // In case nobody has defined these types, but we aren't running under // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and // __WCHAR_TYPE__ have reasonable values. This can happen if the // parts of GCC is compiled by an older compiler, that actually // include gstddef.h, such as collect2. // Signed type of difference of two pointers. // Define this type if we are doing the whole job, // or if we want this type in particular. // If this symbol has done its job, get rid of it. // Unsigned type of `sizeof' something. // Define this type if we are doing the whole job, // or if we want this type in particular. // Wide character type. // Locale-writers should change this as necessary to // be big enough to hold unique values not between 0 and 127, // and not (wchar_t) -1, for each defined multibyte character. // Define this type if we are doing the whole job, // or if we want this type in particular. // In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. // are already defined. // BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. // A null pointer constant. // Offset of member MEMBER in a struct of type TYPE. // Type whose alignment is supported in every context and is at least // as great as that of any standard type not using alignment // specifiers. type max_align_t = struct { F__max_align_ll int64 F__max_align_ld float64 } /* stddef.h:427:3 */ // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.17 Common definitions type z_size_t = size_t /* zconf.h:248:21 */ // Maximum value for memLevel in deflateInit2 // Maximum value for windowBits in deflateInit2 and inflateInit2. // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files // created by gzip. (Files created by minigzip can still be extracted by // gzip.) // The memory requirements for deflate are (in bytes): // (1 << (windowBits+2)) + (1 << (memLevel+9)) // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) // plus a few kilobytes for small objects. For example, if you want to reduce // the default memory requirements from 256K to 128K, compile with // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" // Of course this will generally degrade compression (there's no free lunch). // // The memory requirements for inflate are (in bytes) 1 << windowBits // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes // for small objects. // Type declarations // The following definitions for FAR are needed only for MSDOS mixed // model programming (small or medium model with some far allocations). // This was tested only with MSC; for other MSDOS compilers you may have // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, // just define FAR to be empty. // If building or using zlib as a DLL, define ZLIB_DLL. // This is not mandatory, but it offers a little performance increase. // If building or using zlib with the WINAPI/WINAPIV calling convention, // define ZLIB_WINAPI. // Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. type Byte = uint8 /* zconf.h:391:24 */ // 8 bits type uInt = uint32 /* zconf.h:393:24 */ // 16 bits or more type uLong = uint32 /* zconf.h:394:24 */ // 32 bits or more type Bytef = Byte /* zconf.h:400:22 */ type charf = int8 /* zconf.h:402:19 */ type intf = int32 /* zconf.h:403:19 */ type uIntf = uInt /* zconf.h:404:19 */ type uLongf = uLong /* zconf.h:405:19 */ type voidpc = uintptr /* zconf.h:408:23 */ type voidpf = uintptr /* zconf.h:409:23 */ type voidp = uintptr /* zconf.h:410:23 */ // Copyright (C) 1992-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation; either version 3, or (at your option) any later // version. // // GCC is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // This administrivia gets added to the beginning of limits.h // if the system has its own version of limits.h. // We use _GCC_LIMITS_H_ because we want this not to match // any macros that the system's limits.h uses for its own purposes. // Use "..." so that we find syslimits.h only in this same directory. // syslimits.h stands for the system's own limits.h file. // If we can use it ok unmodified, then we install this text. // If fixincludes fixes it, then the fixed version is installed // instead of this text. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // File system limits // // NOTE: Apparently the actual size of PATH_MAX is 260, but a space is // required for the NUL. TODO: Test? // NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. // Copyright (C) 1991-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation; either version 3, or (at your option) any later // version. // // GCC is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // Number of bits in a `char'. // Maximum length of a multibyte character. // Minimum and maximum values a `signed char' can hold. // Maximum value an `unsigned char' can hold. (Minimum is 0). // Minimum and maximum values a `char' can hold. // Minimum and maximum values a `signed short int' can hold. // Maximum value an `unsigned short int' can hold. (Minimum is 0). // Minimum and maximum values a `signed int' can hold. // Maximum value an `unsigned int' can hold. (Minimum is 0). // Minimum and maximum values a `signed long int' can hold. // (Same as `int'). // Maximum value an `unsigned long int' can hold. (Minimum is 0). // Minimum and maximum values a `signed long long int' can hold. // Maximum value an `unsigned long long int' can hold. (Minimum is 0). // Minimum and maximum values a `signed long long int' can hold. // Maximum value an `unsigned long long int' can hold. (Minimum is 0). // This administrivia gets added to the end of limits.h // if the system has its own version of limits.h. type z_crc_t = uint32 /* zconf.h:429:17 */ // Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with GCC; see the file COPYING. If not, write to // the Free Software Foundation, 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. // As a special exception, if you include this header file into source // files compiled by GCC, this header file does not by itself cause // the resulting executable to be covered by the GNU General Public // License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General // Public License. // ISO C Standard: 7.15 Variable arguments // include mingw stuff // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.15 Variable arguments // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // ISO C Standard: 7.17 Common definitions // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.17 Common definitions // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even // though the former does not conform to the LFS document), but considering // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as // equivalently requesting no 64-bit operations // MVS linker does not support external names larger than 8 bytes // // The 'zlib' compression library provides in-memory compression and // decompression functions, including integrity checks of the uncompressed data. // This version of the library supports only one compression method (deflation) // but other algorithms will be added later and will have the same stream // interface. // // Compression can be done in a single step if the buffers are large enough, // or can be done by repeated calls of the compression function. In the latter // case, the application must provide more input and/or consume the output // (providing more output space) before each call. // // The compressed data format used by default by the in-memory functions is // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped // around a deflate stream, which is itself documented in RFC 1951. // // The library also supports reading and writing files in gzip (.gz) format // with an interface similar to that of stdio using the functions that start // with "gz". The gzip format is different from the zlib format. gzip is a // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. // // This library can optionally read and write gzip and raw deflate streams in // memory as well. // // The zlib format was designed to be compact and fast for use in memory // and on communications channels. The gzip format was designed for single- // file compression on file systems, has a larger header than zlib to maintain // directory information, and uses a different, slower check method than zlib. // // The library does not install any signal handler. The decoder checks // the consistency of the compressed data, so the library should never crash // even in the case of corrupted input. type alloc_func = uintptr /* zlib.h:81:16 */ type free_func = uintptr /* zlib.h:82:16 */ type z_stream_s = struct { Fnext_in uintptr Favail_in uInt Ftotal_in uLong Fnext_out uintptr Favail_out uInt Ftotal_out uLong Fmsg uintptr Fstate uintptr Fzalloc alloc_func Fzfree free_func Fopaque voidpf Fdata_type int32 Fadler uLong Freserved uLong _ [4]byte } /* zlib.h:86:9 */ type z_stream = z_stream_s /* zlib.h:106:3 */ type z_streamp = uintptr /* zlib.h:108:22 */ // // gzip header information passed to and from zlib routines. See RFC 1952 // for more details on the meanings of these fields. type gz_header_s = struct { Ftext int32 Ftime uLong Fxflags int32 Fos int32 Fextra uintptr Fextra_len uInt Fextra_max uInt Fname uintptr Fname_max uInt _ [4]byte Fcomment uintptr Fcomm_max uInt Fhcrc int32 Fdone int32 _ [4]byte } /* zlib.h:114:9 */ // // gzip header information passed to and from zlib routines. See RFC 1952 // for more details on the meanings of these fields. type gz_header = gz_header_s /* zlib.h:129:3 */ type gz_headerp = uintptr /* zlib.h:131:23 */ // // inflateGetHeader() requests that gzip header information be stored in the // provided gz_header structure. inflateGetHeader() may be called after // inflateInit2() or inflateReset(), and before the first call of inflate(). // As inflate() processes the gzip stream, head->done is zero until the header // is completed, at which time head->done is set to one. If a zlib stream is // being decoded, then head->done is set to -1 to indicate that there will be // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be // used to force inflate() to return immediately after header processing is // complete and before any actual data is decompressed. // // The text, time, xflags, and os fields are filled in with the gzip header // contents. hcrc is set to true if there is a header CRC. (The header CRC // was valid if done is set to one.) If extra is not Z_NULL, then extra_max // contains the maximum number of bytes to write to extra. Once done is true, // extra_len contains the actual extra field length, and extra contains the // extra field, or that field truncated if extra_max is less than extra_len. // If name is not Z_NULL, then up to name_max characters are written there, // terminated with a zero unless the length is greater than name_max. If // comment is not Z_NULL, then up to comm_max characters are written there, // terminated with a zero unless the length is greater than comm_max. When any // of extra, name, or comment are not Z_NULL and the respective field is not // present in the header, then that field is set to Z_NULL to signal its // absence. This allows the use of deflateSetHeader() with the returned // structure to duplicate the header. However if those fields are set to // allocated memory, then the application will need to save those pointers // elsewhere so that they can be eventually freed. // // If inflateGetHeader is not used, then the header information is simply // discarded. The header is always checked for validity, including the header // CRC if present. inflateReset() will reset the process to discard the header // information. The application would need to call inflateGetHeader() again to // retrieve the header from the next gzip stream. // // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source // stream state was inconsistent. // // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, // unsigned char FAR *window)); // // Initialize the internal stream state for decompression using inflateBack() // calls. The fields zalloc, zfree and opaque in strm must be initialized // before the call. If zalloc and zfree are Z_NULL, then the default library- // derived memory allocation routines are used. windowBits is the base two // logarithm of the window size, in the range 8..15. window is a caller // supplied buffer of that size. Except for special applications where it is // assured that deflate was used with small window sizes, windowBits must be 15 // and a 32K byte window must be supplied to be able to decompress general // deflate streams. // // See inflateBack() for the usage of these routines. // // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of // the parameters are invalid, Z_MEM_ERROR if the internal state could not be // allocated, or Z_VERSION_ERROR if the version of the library does not match // the version of the header file. type in_func = uintptr /* zlib.h:1092:18 */ type out_func = uintptr /* zlib.h:1094:13 */ // // Same as uncompress, except that sourceLen is a pointer, where the // length of the source is *sourceLen. On return, *sourceLen is the number of // source bytes consumed. // gzip file access functions // // This library supports reading and writing files in gzip (.gz) format with // an interface similar to that of stdio, using the functions that start with // "gz". The gzip format is different from the zlib format. gzip is a gzip // wrapper, documented in RFC 1952, wrapped around a deflate stream. type gzFile_s = struct { Fhave uint32 _ [4]byte Fnext uintptr Fpos int32 _ [4]byte } /* zlib.h:1300:9 */ // // Same as uncompress, except that sourceLen is a pointer, where the // length of the source is *sourceLen. On return, *sourceLen is the number of // source bytes consumed. // gzip file access functions // // This library supports reading and writing files in gzip (.gz) format with // an interface similar to that of stdio, using the functions that start with // "gz". The gzip format is different from the zlib format. gzip is a gzip // wrapper, documented in RFC 1952, wrapped around a deflate stream. type gzFile = uintptr /* zlib.h:1300:25 */ // Definitions for mode bitmasks S_IFDIR, S_IFREG and S_IFLNK. // // In some ways it would be better to obtain these values from system // header files. But, the dependency is undesirable and (a) these // have been stable for decades, (b) the values are part of POSIX and // are also made explicit in [man stat], and (c) are part of the // file format for zip archives. var ZIPFILE_SCHEMA = // 0: Name of file in zip archive // 1: POSIX mode for file // 2: Last modification time (secs since 1970) // 3: Size of object // 4: Raw data // 5: Uncompressed data // 6: Compression method (integer) // 7: Name of zip file *(*[91]int8)(unsafe.Pointer(ts + 8923 /* "CREATE TABLE y(n..." */)) /* zipfile.c:77:19 */ // Magic numbers used to read and write zip files. // // ZIPFILE_NEWENTRY_MADEBY: // Use this value for the "version-made-by" field in new zip file // entries. The upper byte indicates "unix", and the lower byte // indicates that the zip file matches pkzip specification 3.0. // This is what info-zip seems to do. // // ZIPFILE_NEWENTRY_REQUIRED: // Value for "version-required-to-extract" field of new entries. // Version 2.0 is required to support folders and deflate compression. // // ZIPFILE_NEWENTRY_FLAGS: // Value for "general-purpose-bit-flags" field of new entries. Bit // 11 means "utf-8 filename and comment". // // ZIPFILE_SIGNATURE_CDS: // First 4 bytes of a valid CDS record. // // ZIPFILE_SIGNATURE_LFH: // First 4 bytes of a valid LFH record. // // ZIPFILE_SIGNATURE_EOCD // First 4 bytes of a valid EOCD record. // The sizes of the fixed-size part of each of the three main data // structures in a zip archive. // 4.3.16 End of central directory record: // // end of central dir signature 4 bytes (0x06054b50) // number of this disk 2 bytes // number of the disk with the // start of the central directory 2 bytes // total number of entries in the // central directory on this disk 2 bytes // total number of entries in // the central directory 2 bytes // size of the central directory 4 bytes // offset of start of central // directory with respect to // the starting disk number 4 bytes // .ZIP file comment length 2 bytes // .ZIP file comment (variable size) type ZipfileEOCD1 = struct { FiDisk u16 FiFirstDisk u16 FnEntry u16 FnEntryTotal u16 FnSize u32 FiOffset u32 } /* zipfile.c:153:9 */ // Magic numbers used to read and write zip files. // // ZIPFILE_NEWENTRY_MADEBY: // Use this value for the "version-made-by" field in new zip file // entries. The upper byte indicates "unix", and the lower byte // indicates that the zip file matches pkzip specification 3.0. // This is what info-zip seems to do. // // ZIPFILE_NEWENTRY_REQUIRED: // Value for "version-required-to-extract" field of new entries. // Version 2.0 is required to support folders and deflate compression. // // ZIPFILE_NEWENTRY_FLAGS: // Value for "general-purpose-bit-flags" field of new entries. Bit // 11 means "utf-8 filename and comment". // // ZIPFILE_SIGNATURE_CDS: // First 4 bytes of a valid CDS record. // // ZIPFILE_SIGNATURE_LFH: // First 4 bytes of a valid LFH record. // // ZIPFILE_SIGNATURE_EOCD // First 4 bytes of a valid EOCD record. // The sizes of the fixed-size part of each of the three main data // structures in a zip archive. // 4.3.16 End of central directory record: // // end of central dir signature 4 bytes (0x06054b50) // number of this disk 2 bytes // number of the disk with the // start of the central directory 2 bytes // total number of entries in the // central directory on this disk 2 bytes // total number of entries in // the central directory 2 bytes // size of the central directory 4 bytes // offset of start of central // directory with respect to // the starting disk number 4 bytes // .ZIP file comment length 2 bytes // .ZIP file comment (variable size) type ZipfileEOCD = ZipfileEOCD1 /* zipfile.c:153:28 */ // 4.3.12 Central directory structure: // // ... // // central file header signature 4 bytes (0x02014b50) // version made by 2 bytes // version needed to extract 2 bytes // general purpose bit flag 2 bytes // compression method 2 bytes // last mod file time 2 bytes // last mod file date 2 bytes // crc-32 4 bytes // compressed size 4 bytes // uncompressed size 4 bytes // file name length 2 bytes // extra field length 2 bytes // file comment length 2 bytes // disk number start 2 bytes // internal file attributes 2 bytes // external file attributes 4 bytes // relative offset of local header 4 bytes type ZipfileCDS1 = struct { FiVersionMadeBy u16 FiVersionExtract u16 Fflags u16 FiCompression u16 FmTime u16 FmDate u16 Fcrc32 u32 FszCompressed u32 FszUncompressed u32 FnFile u16 FnExtra u16 FnComment u16 FiDiskStart u16 FiInternalAttr u16 _ [2]byte FiExternalAttr u32 FiOffset u32 _ [4]byte FzFile uintptr } /* zipfile.c:186:9 */ // 4.3.12 Central directory structure: // // ... // // central file header signature 4 bytes (0x02014b50) // version made by 2 bytes // version needed to extract 2 bytes // general purpose bit flag 2 bytes // compression method 2 bytes // last mod file time 2 bytes // last mod file date 2 bytes // crc-32 4 bytes // compressed size 4 bytes // uncompressed size 4 bytes // file name length 2 bytes // extra field length 2 bytes // file comment length 2 bytes // disk number start 2 bytes // internal file attributes 2 bytes // external file attributes 4 bytes // relative offset of local header 4 bytes type ZipfileCDS = ZipfileCDS1 /* zipfile.c:186:27 */ // 4.3.7 Local file header: // // local file header signature 4 bytes (0x04034b50) // version needed to extract 2 bytes // general purpose bit flag 2 bytes // compression method 2 bytes // last mod file time 2 bytes // last mod file date 2 bytes // crc-32 4 bytes // compressed size 4 bytes // uncompressed size 4 bytes // file name length 2 bytes // extra field length 2 bytes // type ZipfileLFH1 = struct { FiVersionExtract u16 Fflags u16 FiCompression u16 FmTime u16 FmDate u16 _ [2]byte Fcrc32 u32 FszCompressed u32 FszUncompressed u32 FnFile u16 FnExtra u16 } /* zipfile.c:223:9 */ // 4.3.7 Local file header: // // local file header signature 4 bytes (0x04034b50) // version needed to extract 2 bytes // general purpose bit flag 2 bytes // compression method 2 bytes // last mod file time 2 bytes // last mod file date 2 bytes // crc-32 4 bytes // compressed size 4 bytes // uncompressed size 4 bytes // file name length 2 bytes // extra field length 2 bytes // type ZipfileLFH = ZipfileLFH1 /* zipfile.c:223:27 */ type ZipfileEntry1 = struct { Fcds ZipfileCDS FmUnixTime u32 _ [4]byte FaExtra uintptr FiDataOff i64 FaData uintptr FpNext uintptr } /* zipfile.c:237:9 */ type ZipfileEntry = ZipfileEntry1 /* zipfile.c:237:29 */ // Cursor type for zipfile tables. type ZipfileCsr1 = struct { Fbase sqlite3_vtab_cursor FiId i64 FbEof u8 FbNoop u8 _ [6]byte FpFile uintptr FiNextOff i64 Feocd ZipfileEOCD FpFreeEntry uintptr FpCurrent uintptr FpCsrNext uintptr } /* zipfile.c:250:9 */ // Cursor type for zipfile tables. type ZipfileCsr = ZipfileCsr1 /* zipfile.c:250:27 */ type ZipfileTab1 = struct { Fbase sqlite3_vtab FzFile uintptr Fdb uintptr FaBuffer uintptr FpCsrList uintptr FiNextCsrid i64 FpFirstEntry uintptr FpLastEntry uintptr FpWriteFd uintptr FszCurrent i64 FszOrig i64 } /* zipfile.c:267:9 */ type ZipfileTab = ZipfileTab1 /* zipfile.c:267:27 */ // Set the error message contained in context ctx to the results of // vprintf(zFmt, ...). func zipfileCtxErrorMsg(tls *libc.TLS, ctx uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:289:13: */ var zMsg uintptr = uintptr(0) var ap va_list _ = ap ap = va zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) sqlite3.Xsqlite3_result_error(tls, ctx, zMsg, -1) sqlite3.Xsqlite3_free(tls, zMsg) _ = ap } // If string zIn is quoted, dequote it in place. Otherwise, if the string // is not quoted, do nothing. func zipfileDequote(tls *libc.TLS, zIn uintptr) { /* zipfile.c:303:13: */ var q int8 = *(*int8)(unsafe.Pointer(zIn)) if (((int32(q) == '"') || (int32(q) == '\'')) || (int32(q) == '`')) || (int32(q) == '[') { var iIn int32 = 1 var iOut int32 = 0 if int32(q) == '[' { q = int8(']') } for *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) != 0 { var c int8 = *(*int8)(unsafe.Pointer(zIn + uintptr(libc.PostIncInt32(&iIn, 1)))) if (int32(c) == int32(q)) && (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(libc.PostIncInt32(&iIn, 1))))) != int32(q)) { break } *(*int8)(unsafe.Pointer(zIn + uintptr(libc.PostIncInt32(&iOut, 1)))) = c } *(*int8)(unsafe.Pointer(zIn + uintptr(iOut))) = int8(0) } } // Construct a new ZipfileTab virtual table object. // // argv[0] -> module name ("zipfile") // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. func zipfileConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* zipfile.c:326:12: */ var nByte int32 = (int32(uint64(unsafe.Sizeof(ZipfileTab{})) + (uint64(64 * 1024)))) var nFile int32 = 0 var zFile uintptr = uintptr(0) var pNew uintptr = uintptr(0) var rc int32 // If the table name is not "zipfile", require that the argument be // specified. This stops zipfile tables from being created as: // // CREATE VIRTUAL TABLE zzz USING zipfile(); // // It does not prevent: // // CREATE VIRTUAL TABLE zipfile USING zipfile(); if ((0 != sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ts+9014 /* "zipfile" */)) && (argc < 4)) || (argc > 4) { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9022 /* "zipfile construc..." */, 0) return SQLITE_ERROR } if argc > 3 { zFile = *(*uintptr)(unsafe.Pointer(argv + 3*8)) nFile = (int32(libc.Xstrlen(tls, zFile)) + 1) } rc = sqlite3.Xsqlite3_declare_vtab(tls, db, uintptr(unsafe.Pointer(&ZIPFILE_SCHEMA))) if rc == SQLITE_OK { pNew = sqlite3.Xsqlite3_malloc64(tls, (uint64(sqlite3_int64(nByte) + sqlite3_int64(nFile)))) if pNew == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pNew, 0, (uint64(nByte + nFile))) (*ZipfileTab)(unsafe.Pointer(pNew)).Fdb = db (*ZipfileTab)(unsafe.Pointer(pNew)).FaBuffer = (pNew + 1*104) if zFile != 0 { (*ZipfileTab)(unsafe.Pointer(pNew)).FzFile = ((*ZipfileTab)(unsafe.Pointer(pNew)).FaBuffer + 65536) libc.Xmemcpy(tls, (*ZipfileTab)(unsafe.Pointer(pNew)).FzFile, zFile, uint64(nFile)) zipfileDequote(tls, (*ZipfileTab)(unsafe.Pointer(pNew)).FzFile) } } sqlite3.Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_DIRECTONLY, 0) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew return rc } // Free the ZipfileEntry structure indicated by the only argument. func zipfileEntryFree(tls *libc.TLS, p uintptr) { /* zipfile.c:380:13: */ if p != 0 { sqlite3.Xsqlite3_free(tls, (*ZipfileEntry)(unsafe.Pointer(p)).Fcds.FzFile) sqlite3.Xsqlite3_free(tls, p) } } // Release resources that should be freed at the end of a write // transaction. func zipfileCleanupTransaction(tls *libc.TLS, pTab uintptr) { /* zipfile.c:391:13: */ var pEntry uintptr var pNext uintptr if (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd != 0 { libc.Xfclose(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd) (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd = uintptr(0) } for pEntry = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry; pEntry != 0; pEntry = pNext { pNext = (*ZipfileEntry)(unsafe.Pointer(pEntry)).FpNext zipfileEntryFree(tls, pEntry) } (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry = uintptr(0) (*ZipfileTab)(unsafe.Pointer(pTab)).FpLastEntry = uintptr(0) (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent = int64(0) (*ZipfileTab)(unsafe.Pointer(pTab)).FszOrig = int64(0) } // This method is the destructor for zipfile vtab objects. func zipfileDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* zipfile.c:412:12: */ zipfileCleanupTransaction(tls, pVtab) sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // Constructor for a new ZipfileCsr object. func zipfileOpen(tls *libc.TLS, p uintptr, ppCsr uintptr) int32 { /* zipfile.c:421:12: */ var pTab uintptr = p var pCsr uintptr pCsr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(ZipfileCsr{}))) *(*uintptr)(unsafe.Pointer(ppCsr)) = pCsr if pCsr == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(ZipfileCsr{}))) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiId = libc.PreIncInt64(&(*ZipfileTab)(unsafe.Pointer(pTab)).FiNextCsrid, 1) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext = (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList = pCsr return SQLITE_OK } // Reset a cursor back to the state it was in when first returned // by zipfileOpen(). func zipfileResetCursor(tls *libc.TLS, pCsr uintptr) { /* zipfile.c:440:13: */ var p uintptr var pNext uintptr (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(0) if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile != 0 { libc.Xfclose(tls, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile = uintptr(0) zipfileEntryFree(tls, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = uintptr(0) } for p = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry; p != 0; p = pNext { pNext = (*ZipfileEntry)(unsafe.Pointer(p)).FpNext zipfileEntryFree(tls, p) } } // Destructor for an ZipfileCsr. func zipfileClose(tls *libc.TLS, cur uintptr) int32 { /* zipfile.c:461:12: */ var pCsr uintptr = cur var pTab uintptr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pp uintptr zipfileResetCursor(tls, pCsr) // Remove this cursor from the ZipfileTab.pCsrList list. for pp = (pTab + 48 /* &.pCsrList */); *(*uintptr)(unsafe.Pointer(pp)) != pCsr; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 72 /* &.pCsrNext */) { } *(*uintptr)(unsafe.Pointer(pp)) = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext sqlite3.Xsqlite3_free(tls, pCsr) return SQLITE_OK } // Set the error message for the virtual table associated with cursor // pCsr to the results of vprintf(zFmt, ...). func zipfileTableErr(tls *libc.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:479:13: */ var ap va_list _ = ap ap = va sqlite3.Xsqlite3_free(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg) (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } func zipfileCursorErr(tls *libc.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ var ap va_list _ = ap ap = va sqlite3.Xsqlite3_free(tls, (*sqlite3_vtab)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg) (*sqlite3_vtab)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) _ = ap } // Read nRead bytes of data from offset iOff of file pFile into buffer // aRead[]. Return SQLITE_OK if successful, or an SQLite error code // otherwise. // // If an error does occur, output variable (*pzErrmsg) may be set to point // to an English language error message. It is the responsibility of the // caller to eventually free this buffer using // sqlite3_free(). func zipfileReadData(tls *libc.TLS, pFile uintptr, aRead uintptr, nRead int32, iOff i64, pzErrmsg uintptr) int32 { /* zipfile.c:504:12: */ var n size_t libc.Xfseek(tls, pFile, int32(iOff), SEEK_SET) n = libc.Xfread(tls, aRead, uint64(1), uint64(nRead), pFile) if int32(n) != nRead { *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts+9064 /* "error in fread()" */, 0) return SQLITE_ERROR } return SQLITE_OK } func zipfileAppendData(tls *libc.TLS, pTab uintptr, aWrite uintptr, nWrite int32) int32 { /* zipfile.c:521:12: */ if nWrite > 0 { var n size_t = size_t(nWrite) libc.Xfseek(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, int32((*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent), SEEK_SET) n = libc.Xfwrite(tls, aWrite, uint64(1), uint64(nWrite), (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd) if int32(n) != nWrite { (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+9081 /* "error in fwrite(..." */, 0) return SQLITE_ERROR } *(*i64)(unsafe.Pointer(pTab + 88 /* &.szCurrent */)) += (i64(nWrite)) } return SQLITE_OK } // Read and return a 16-bit little-endian unsigned integer from buffer aBuf. func zipfileGetU16(tls *libc.TLS, aBuf uintptr) u16 { /* zipfile.c:542:12: */ return (u16((int32(*(*u8)(unsafe.Pointer(aBuf + 1))) << 8) + int32(*(*u8)(unsafe.Pointer(aBuf))))) } // Read and return a 32-bit little-endian unsigned integer from buffer aBuf. func zipfileGetU32(tls *libc.TLS, aBuf uintptr) u32 { /* zipfile.c:549:12: */ return (((((u32(*(*u8)(unsafe.Pointer(aBuf + 3)))) << 24) + ((u32(*(*u8)(unsafe.Pointer(aBuf + 2)))) << 16)) + ((u32(*(*u8)(unsafe.Pointer(aBuf + 1)))) << 8)) + ((u32(*(*u8)(unsafe.Pointer(aBuf)))) << 0)) } // Write a 16-bit little endiate integer into buffer aBuf. func zipfilePutU16(tls *libc.TLS, aBuf uintptr, val u16) { /* zipfile.c:559:13: */ *(*u8)(unsafe.Pointer(aBuf)) = (u8(int32(val) & 0xFF)) *(*u8)(unsafe.Pointer(aBuf + 1)) = (u8((int32(val) >> 8) & 0xFF)) } // Write a 32-bit little endiate integer into buffer aBuf. func zipfilePutU32(tls *libc.TLS, aBuf uintptr, val u32) { /* zipfile.c:567:13: */ *(*u8)(unsafe.Pointer(aBuf)) = (u8(val & u32(0xFF))) *(*u8)(unsafe.Pointer(aBuf + 1)) = (u8((val >> 8) & u32(0xFF))) *(*u8)(unsafe.Pointer(aBuf + 2)) = (u8((val >> 16) & u32(0xFF))) *(*u8)(unsafe.Pointer(aBuf + 3)) = (u8((val >> 24) & u32(0xFF))) } // Magic numbers used to read CDS records. // Decode the CDS record in buffer aBuf into (*pCDS). Return SQLITE_ERROR // if the record is not well-formed, or SQLITE_OK otherwise. func zipfileReadCDS(tls *libc.TLS, aBuf uintptr, pCDS uintptr) int32 { /* zipfile.c:590:12: */ var aRead uintptr = aBuf var sig u32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() var rc int32 = SQLITE_OK if sig != u32(ZIPFILE_SIGNATURE_CDS) { rc = SQLITE_ERROR } else { (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionMadeBy = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionExtract = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fflags = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fcrc32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszCompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnComment = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiDiskStart = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiInternalAttr = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiOffset = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() } return rc } // Decode the LFH record in buffer aBuf into (*pLFH). Return SQLITE_ERROR // if the record is not well-formed, or SQLITE_OK otherwise. func zipfileReadLFH(tls *libc.TLS, aBuffer uintptr, pLFH uintptr) int32 { /* zipfile.c:624:12: */ var aRead uintptr = aBuffer var rc int32 = SQLITE_OK var sig u32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() if sig != u32(ZIPFILE_SIGNATURE_LFH) { rc = SQLITE_ERROR } else { (*ZipfileLFH)(unsafe.Pointer(pLFH)).FiVersionExtract = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).Fflags = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FiCompression = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FmTime = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FmDate = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).Fcrc32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FszCompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FszUncompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FnFile = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileLFH)(unsafe.Pointer(pLFH)).FnExtra = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() } return rc } // Buffer aExtra (size nExtra bytes) contains zip archive "extra" fields. // Scan through this buffer to find an "extra-timestamp" field. If one // exists, extract the 32-bit modification-timestamp from it and store // the value in output parameter *pmTime. // // Zero is returned if no extra-timestamp record could be found (and so // *pmTime is left unchanged), or non-zero otherwise. // // The general format of an extra field is: // // Header ID 2 bytes // Data Size 2 bytes // Data N bytes func zipfileScanExtra(tls *libc.TLS, aExtra uintptr, nExtra int32, pmTime uintptr) int32 { /* zipfile.c:665:12: */ var ret int32 = 0 var p uintptr = aExtra var pEnd uintptr = (aExtra + uintptr(nExtra)) for p < pEnd { var id u16 = func() u16 { p += uintptr(2); return zipfileGetU16(tls, (p - uintptr(2))) }() var nByte u16 = func() u16 { p += uintptr(2); return zipfileGetU16(tls, (p - uintptr(2))) }() switch int32(id) { case ZIPFILE_EXTRA_TIMESTAMP: { var b u8 = *(*u8)(unsafe.Pointer(p)) if (int32(b) & 0x01) != 0 { // 0x01 -> modtime is present *(*u32)(unsafe.Pointer(pmTime)) = zipfileGetU32(tls, (p + 1)) ret = 1 } break } } p += uintptr(nByte) } return ret } // Convert the standard MS-DOS timestamp stored in the mTime and mDate // fields of the CDS structure passed as the only argument to a 32-bit // UNIX seconds-since-the-epoch timestamp. Return the result. // // "Standard" MS-DOS time format: // // File modification time: // Bits 00-04: seconds divided by 2 // Bits 05-10: minute // Bits 11-15: hour // File modification date: // Bits 00-04: day // Bits 05-08: month (1-12) // Bits 09-15: years from 1980 // // https://msdn.microsoft.com/en-us/library/9kkf9tah.aspx func zipfileMtime(tls *libc.TLS, pCDS uintptr) u32 { /* zipfile.c:708:12: */ var Y int32 = (1980 + ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) >> 9) & 0x7F)) var M int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) >> 5) & 0x0F) var D int32 = (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) & 0x1F) var B int32 = -13 var sec int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) & 0x1F) * 2) var min int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) >> 5) & 0x3F) var hr int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) >> 11) & 0x1F) var JD i64 // JD = INT(365.25 * (Y+4716)) + INT(30.6001 * (M+1)) + D + B - 1524.5 // Calculate the JD in seconds for noon on the day in question if M < 3 { Y = (Y - 1) M = (M + 12) } JD = ((int64((24 * 60) * 60)) * (i64(((((int32(365.25 * (float64(Y + 4716)))) + (int32(30.6001 * (float64(M + 1))))) + D) + B) - 1524))) // Correct the JD for the time within the day JD = JD + (i64((((hr - 12) * 3600) + (min * 60)) + sec)) // Convert JD to unix timestamp (the JD epoch is 2440587.5) return (u32(JD - ((((int64(24405875)) * int64(24)) * int64(60)) * int64(6)))) } // The opposite of zipfileMtime(). This function populates the mTime and // mDate fields of the CDS structure passed as the first argument according // to the UNIX timestamp value passed as the second. func zipfileMtimeToDos(tls *libc.TLS, pCds uintptr, mUnixTime u32) { /* zipfile.c:744:13: */ // Convert unix timestamp to JD (2440588 is noon on 1/1/1970) var JD i64 = (int64(2440588) + (i64(mUnixTime / (u32((24 * 60) * 60))))) var A int32 var B int32 var C int32 var D int32 var E int32 var yr int32 var mon int32 var day int32 var hr int32 var min int32 var sec int32 A = (int32((float64(JD) - 1867216.25) / 36524.25)) A = (int32(((JD + int64(1)) + i64(A)) - (i64(A / 4)))) B = (A + 1524) C = (int32((float64(B) - 122.1) / 365.25)) D = ((36525 * (C & 32767)) / 100) E = (int32((float64(B - D)) / 30.6001)) day = ((B - D) - (int32(30.6001 * float64(E)))) mon = func() int32 { if E < 14 { return (E - 1) } return (E - 13) }() if mon > 2 { yr = (C - 4716) } else { yr = (C - 4715) } hr = (int32((mUnixTime % (u32((24 * 60) * 60))) / (u32(60 * 60)))) min = (int32((mUnixTime % (u32(60 * 60))) / u32(60))) sec = (int32(mUnixTime % u32(60))) if yr >= 1980 { (*ZipfileCDS)(unsafe.Pointer(pCds)).FmDate = (u16((day + (mon << 5)) + ((yr - 1980) << 9))) (*ZipfileCDS)(unsafe.Pointer(pCds)).FmTime = (u16(((sec / 2) + (min << 5)) + (hr << 11))) } else { (*ZipfileCDS)(unsafe.Pointer(pCds)).FmDate = libc.AssignPtrUint16(pCds+8 /* &.mTime */, u16(0)) } } // If aBlob is not NULL, then it is a pointer to a buffer (nBlob bytes in // size) containing an entire zip archive image. Or, if aBlob is NULL, // then pFile is a file-handle open on a zip file. In either case, this // function creates a ZipfileEntry object based on the zip archive entry // for which the CDS record is at offset iOff. // // If successful, SQLITE_OK is returned and (*ppEntry) set to point to // the new object. Otherwise, an SQLite error code is returned and the // final value of (*ppEntry) undefined. func zipfileGetEntry(tls *libc.TLS, pTab uintptr, aBlob uintptr, nBlob int32, pFile uintptr, iOff i64, ppEntry uintptr) int32 { /* zipfile.c:792:12: */ bp := tls.Alloc(84) defer tls.Free(84) var aRead uintptr var pzErr uintptr = (pTab /* &.base */ + 16 /* &.zErrMsg */) var rc int32 = SQLITE_OK if aBlob == uintptr(0) { aRead = (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer rc = zipfileReadData(tls, pFile, aRead, ZIPFILE_CDS_FIXED_SZ, iOff, pzErr) } else { aRead = (aBlob + uintptr(iOff)) } if rc == SQLITE_OK { var nAlloc sqlite3_int64 var pNew uintptr var nFile int32 = int32(zipfileGetU16(tls, (aRead + 28))) var nExtra int32 = int32(zipfileGetU16(tls, (aRead + 30))) nExtra = nExtra + (int32(zipfileGetU16(tls, (aRead + 32)))) nAlloc = (sqlite3_int64(uint64(unsafe.Sizeof(ZipfileEntry{})) + uint64(nExtra))) if aBlob != 0 { nAlloc = nAlloc + (sqlite3_int64(zipfileGetU32(tls, (aRead + 20)))) } pNew = sqlite3.Xsqlite3_malloc64(tls, uint64(nAlloc)) if pNew == uintptr(0) { rc = SQLITE_NOMEM } else { libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(ZipfileEntry{}))) rc = zipfileReadCDS(tls, aRead, (pNew /* &.cds */)) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9099 /* "failed to read C..." */, libc.VaList(bp, iOff)) } else if aBlob == uintptr(0) { rc = zipfileReadData(tls, pFile, aRead, (nExtra + nFile), (iOff + int64(ZIPFILE_CDS_FIXED_SZ)), pzErr) } else { aRead = (aBlob + uintptr((iOff + int64(ZIPFILE_CDS_FIXED_SZ)))) } } if rc == SQLITE_OK { var pt uintptr = (pNew + 56 /* &.mUnixTime */) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile = sqlite3.Xsqlite3_mprintf(tls, ts+9133 /* "%.*s" */, libc.VaList(bp+16, nFile, aRead)) (*ZipfileEntry)(unsafe.Pointer(pNew)).FaExtra = (pNew + 1*96) libc.Xmemcpy(tls, (*ZipfileEntry)(unsafe.Pointer(pNew)).FaExtra, (aRead + uintptr(nFile)), uint64(nExtra)) if (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile == uintptr(0) { rc = SQLITE_NOMEM } else if 0 == zipfileScanExtra(tls, (aRead+uintptr(nFile)), int32((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FnExtra), pt) { (*ZipfileEntry)(unsafe.Pointer(pNew)).FmUnixTime = zipfileMtime(tls, (pNew /* &.cds */)) } } if rc == SQLITE_OK { // var lfh ZipfileLFH at bp+56, 28 if pFile != 0 { rc = zipfileReadData(tls, pFile, aRead, szFix, int64((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset), pzErr) } else { aRead = (aBlob + uintptr((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset)) } rc = zipfileReadLFH(tls, aRead, bp+56 /* &lfh */) if rc == SQLITE_OK { (*ZipfileEntry)(unsafe.Pointer(pNew)).FiDataOff = (i64((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset + u32(ZIPFILE_LFH_FIXED_SZ))) *(*i64)(unsafe.Pointer(pNew + 72 /* &.iDataOff */)) += (i64(int32((*ZipfileLFH)(unsafe.Pointer(bp+56 /* &lfh */)).FnFile) + int32((*ZipfileLFH)(unsafe.Pointer(bp+56 /* &lfh */)).FnExtra))) if (aBlob != 0) && ((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszCompressed != 0) { (*ZipfileEntry)(unsafe.Pointer(pNew)).FaData = ((*ZipfileEntry)(unsafe.Pointer(pNew)).FaExtra + uintptr(nExtra)) libc.Xmemcpy(tls, (*ZipfileEntry)(unsafe.Pointer(pNew)).FaData, (aBlob + uintptr((*ZipfileEntry)(unsafe.Pointer(pNew)).FiDataOff)), uint64((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszCompressed)) } } else { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9138, /* "failed to read L..." */ libc.VaList(bp+40, int32((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset))) } } if rc != SQLITE_OK { zipfileEntryFree(tls, pNew) } else { *(*uintptr)(unsafe.Pointer(ppEntry)) = pNew } } return rc } var szFix int32 = ZIPFILE_LFH_FIXED_SZ /* zipfile.c:854:24 */ // Advance an ZipfileCsr to its next row of output. func zipfileNext(tls *libc.TLS, cur uintptr) int32 { /* zipfile.c:890:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pCsr uintptr = cur var rc int32 = SQLITE_OK if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile != 0 { var iEof i64 = (i64((*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FiOffset + (*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FnSize)) zipfileEntryFree(tls, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = uintptr(0) if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiNextOff >= iEof { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(1) } else { *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab rc = zipfileGetEntry(tls, pTab, uintptr(0), 0, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiNextOff, bp /* &p */) if rc == SQLITE_OK { *(*i64)(unsafe.Pointer(pCsr + 32 /* &.iNextOff */)) += (int64(ZIPFILE_CDS_FIXED_SZ)) *(*i64)(unsafe.Pointer(pCsr + 32 /* &.iNextOff */)) += (i64((int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fcds.FnExtra) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fcds.FnFile)) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fcds.FnComment))) } (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = *(*uintptr)(unsafe.Pointer(bp /* p */)) } } else { if !(int32((*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop) != 0) { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FpNext } if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent == uintptr(0) { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(1) } } (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop = u8(0) return rc } func zipfileFree(tls *libc.TLS, p uintptr) { /* zipfile.c:923:13: */ sqlite3.Xsqlite3_free(tls, p) } // Buffer aIn (size nIn bytes) contains compressed data. Uncompressed, the // size is nOut bytes. This function uncompresses the data and sets the // return value in context pCtx to the result (a blob). // // If an error occurs, an error code is left in pCtx instead. func zipfileInflate(tls *libc.TLS, pCtx uintptr, aIn uintptr, nIn int32, nOut int32) { /* zipfile.c:934:13: */ bp := tls.Alloc(120) defer tls.Free(120) var aRes uintptr = sqlite3.Xsqlite3_malloc(tls, nOut) if aRes == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) } else { var err int32 // var str z_stream at bp+32, 88 libc.Xmemset(tls, bp+32 /* &str */, 0, uint64(unsafe.Sizeof(z_stream{}))) (*z_stream)(unsafe.Pointer(bp + 32 /* &str */)).Fnext_in = aIn (*z_stream)(unsafe.Pointer(bp + 32 /* &str */)).Favail_in = uInt(nIn) (*z_stream)(unsafe.Pointer(bp + 32 /* &str */)).Fnext_out = aRes (*z_stream)(unsafe.Pointer(bp + 32 /* &str */)).Favail_out = uInt(nOut) err = tcl.XinflateInit2_(tls, bp+32 /* &str */, -15, ts+9170 /* "1.2.11" */, int32(unsafe.Sizeof(z_stream{}))) if err != Z_OK { zipfileCtxErrorMsg(tls, pCtx, ts+9177 /* "inflateInit2() f..." */, libc.VaList(bp, err)) } else { err = tcl.Xinflate(tls, bp+32 /* &str */, Z_NO_FLUSH) if err != Z_STREAM_END { zipfileCtxErrorMsg(tls, pCtx, ts+9204 /* "inflate() failed..." */, libc.VaList(bp+16, err)) } else { sqlite3.Xsqlite3_result_blob(tls, pCtx, aRes, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{zipfileFree}))) aRes = uintptr(0) } } sqlite3.Xsqlite3_free(tls, aRes) tcl.XinflateEnd(tls, bp+32 /* &str */) } } // Buffer aIn (size nIn bytes) contains uncompressed data. This function // compresses it and sets (*ppOut) to point to a buffer containing the // compressed data. The caller is responsible for eventually calling // sqlite3_free() to release buffer (*ppOut). Before returning, (*pnOut) // is set to the size of buffer (*ppOut) in bytes. // // If no error occurs, SQLITE_OK is returned. Otherwise, an SQLite error // code is returned and an error message left in virtual-table handle // pTab. The values of (*ppOut) and (*pnOut) are left unchanged in this // case. func zipfileDeflate(tls *libc.TLS, aIn uintptr, nIn int32, ppOut uintptr, pnOut uintptr, pzErr uintptr) int32 { /* zipfile.c:982:12: */ bp := tls.Alloc(88) defer tls.Free(88) var rc int32 = SQLITE_OK var nAlloc sqlite3_int64 // var str z_stream at bp, 88 var aOut uintptr libc.Xmemset(tls, bp /* &str */, 0, uint64(unsafe.Sizeof(z_stream{}))) (*z_stream)(unsafe.Pointer(bp /* &str */)).Fnext_in = aIn (*z_stream)(unsafe.Pointer(bp /* &str */)).Favail_in = uInt(nIn) tcl.XdeflateInit2_(tls, bp /* &str */, 9, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY, ts+9170 /* "1.2.11" */, int32(unsafe.Sizeof(z_stream{}))) nAlloc = sqlite3_int64(tcl.XdeflateBound(tls, bp /* &str */, uint32(nIn))) aOut = sqlite3.Xsqlite3_malloc64(tls, uint64(nAlloc)) if aOut == uintptr(0) { rc = SQLITE_NOMEM } else { var res int32 (*z_stream)(unsafe.Pointer(bp /* &str */)).Fnext_out = aOut (*z_stream)(unsafe.Pointer(bp /* &str */)).Favail_out = uInt(nAlloc) res = tcl.Xdeflate(tls, bp /* &str */, Z_FINISH) if res == Z_STREAM_END { *(*uintptr)(unsafe.Pointer(ppOut)) = aOut *(*int32)(unsafe.Pointer(pnOut)) = int32((*z_stream)(unsafe.Pointer(bp /* &str */)).Ftotal_out) } else { sqlite3.Xsqlite3_free(tls, aOut) *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9226 /* "zipfile: deflate..." */, 0) rc = SQLITE_ERROR } tcl.XdeflateEnd(tls, bp /* &str */) } return rc } // Return values of columns for the row at which the series_cursor // is currently pointing. func zipfileColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* zipfile.c:1025:12: */ var pCsr uintptr = cur var pCDS uintptr = ((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent /* &.cds */) var rc int32 = SQLITE_OK switch i { case 0: // name sqlite3.Xsqlite3_result_text(tls, ctx, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FzFile, -1, libc.UintptrFromInt32(-1)) break case 1: // mode // TODO: Whether or not the following is correct surely depends on // the platform on which the archive was created. sqlite3.Xsqlite3_result_int(tls, ctx, (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr >> 16))) break case 2: { // mtime sqlite3.Xsqlite3_result_int64(tls, ctx, int64((*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FmUnixTime)) break } case 3: { // sz if sqlite3.Xsqlite3_vtab_nochange(tls, ctx) == 0 { sqlite3.Xsqlite3_result_int64(tls, ctx, int64((*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed)) } break } case 4: // rawdata if sqlite3.Xsqlite3_vtab_nochange(tls, ctx) != 0 { break } fallthrough case 5: { // data if ((i == 4) || (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression) == 0)) || (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression) == 8) { var sz int32 = int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FszCompressed) var szFinal int32 = int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed) if szFinal > 0 { var aBuf uintptr var aFree uintptr = uintptr(0) if (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FaData != 0 { aBuf = (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FaData } else { aBuf = libc.AssignUintptr(&aFree, sqlite3.Xsqlite3_malloc64(tls, uint64(sz))) if aBuf == uintptr(0) { rc = SQLITE_NOMEM } else { var pFile uintptr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile if pFile == uintptr(0) { pFile = (*ZipfileTab)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpWriteFd } rc = zipfileReadData(tls, pFile, aBuf, sz, (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FiDataOff, ((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab + 16 /* &.zErrMsg */)) } } if rc == SQLITE_OK { if (i == 5) && ((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression != 0) { zipfileInflate(tls, ctx, aBuf, sz, szFinal) } else { sqlite3.Xsqlite3_result_blob(tls, ctx, aBuf, sz, libc.UintptrFromInt32(-1)) } } sqlite3.Xsqlite3_free(tls, aFree) } else { // Figure out if this is a directory or a zero-sized file. Consider // it to be a directory either if the mode suggests so, or if // the final character in the name is '/'. var mode u32 = ((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr >> 16) if !((mode & u32(S_IFDIR)) != 0) && (int32(*(*int8)(unsafe.Pointer((*ZipfileCDS)(unsafe.Pointer(pCDS)).FzFile + uintptr((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile) - 1))))) != '/') { sqlite3.Xsqlite3_result_blob(tls, ctx, ts+489 /* "" */, 0, uintptr(0)) } } } break } case 6: // method sqlite3.Xsqlite3_result_int(tls, ctx, int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression)) break default: // z sqlite3.Xsqlite3_result_int64(tls, ctx, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiId) break } return rc } // Return TRUE if the cursor is at EOF. func zipfileEof(tls *libc.TLS, cur uintptr) int32 { /* zipfile.c:1112:12: */ var pCsr uintptr = cur return int32((*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof) } // If aBlob is not NULL, then it points to a buffer nBlob bytes in size // containing an entire zip archive image. Or, if aBlob is NULL, then pFile // is guaranteed to be a file-handle open on a zip file. // // This function attempts to locate the EOCD record within the zip archive // and populate *pEOCD with the results of decoding it. SQLITE_OK is // returned if successful. Otherwise, an SQLite error code is returned and // an English language error message may be left in virtual-table pTab. func zipfileReadEOCD(tls *libc.TLS, pTab uintptr, aBlob uintptr, nBlob int32, pFile uintptr, pEOCD uintptr) int32 { /* zipfile.c:1127:12: */ var aRead uintptr = (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer // Temporary buffer var nRead int32 // Bytes to read from file var rc int32 = SQLITE_OK if aBlob == uintptr(0) { var iOff i64 // Offset to read from var szFile i64 // Total size of file in bytes libc.Xfseek(tls, pFile, 0, SEEK_END) szFile = i64(libc.Xftell(tls, pFile)) if szFile == int64(0) { libc.Xmemset(tls, pEOCD, 0, uint64(unsafe.Sizeof(ZipfileEOCD{}))) return SQLITE_OK } nRead = func() int32 { if (szFile) < (int64(64 * 1024)) { return int32(szFile) } return (64 * 1024) }() iOff = (szFile - i64(nRead)) rc = zipfileReadData(tls, pFile, aRead, nRead, iOff, (pTab /* &.base */ + 16 /* &.zErrMsg */)) } else { nRead = func() int32 { if (nBlob) < (64 * 1024) { return nBlob } return (64 * 1024) }() aRead = (aBlob + uintptr((nBlob - nRead))) } if rc == SQLITE_OK { var i int32 // Scan backwards looking for the signature bytes for i = (nRead - 20); i >= 0; i-- { if (((int32(*(*u8)(unsafe.Pointer(aRead + uintptr(i)))) == 0x50) && (int32(*(*u8)(unsafe.Pointer(aRead + uintptr((i + 1))))) == 0x4b)) && (int32(*(*u8)(unsafe.Pointer(aRead + uintptr((i + 2))))) == 0x05)) && (int32(*(*u8)(unsafe.Pointer(aRead + uintptr((i + 3))))) == 0x06) { break } } if i < 0 { (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+9251 /* "cannot find end ..." */, 0) return SQLITE_ERROR } aRead += (uintptr(i + 4)) (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FiDisk = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FiFirstDisk = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FnEntry = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FnEntryTotal = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FnSize = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FiOffset = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() } return rc } // Add object pNew to the linked list that begins at ZipfileTab.pFirstEntry // and ends with pLastEntry. If argument pBefore is NULL, then pNew is added // to the end of the list. Otherwise, it is added to the list immediately // before pBefore (which is guaranteed to be a part of said list). func zipfileAddEntry(tls *libc.TLS, pTab uintptr, pBefore uintptr, pNew uintptr) { /* zipfile.c:1191:13: */ if pBefore == uintptr(0) { if (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry == uintptr(0) { (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry = libc.AssignPtrUintptr(pTab+72 /* &.pLastEntry */, pNew) } else { (*ZipfileEntry)(unsafe.Pointer((*ZipfileTab)(unsafe.Pointer(pTab)).FpLastEntry)).FpNext = pNew (*ZipfileTab)(unsafe.Pointer(pTab)).FpLastEntry = pNew } } else { var pp uintptr for pp = (pTab + 64 /* &.pFirstEntry */); *(*uintptr)(unsafe.Pointer(pp)) != pBefore; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 88 /* &.pNext */) { } (*ZipfileEntry)(unsafe.Pointer(pNew)).FpNext = pBefore *(*uintptr)(unsafe.Pointer(pp)) = pNew } } func zipfileLoadDirectory(tls *libc.TLS, pTab uintptr, aBlob uintptr, nBlob int32) int32 { /* zipfile.c:1214:12: */ bp := tls.Alloc(24) defer tls.Free(24) // var eocd ZipfileEOCD at bp, 16 var rc int32 var i int32 var iOff i64 rc = zipfileReadEOCD(tls, pTab, aBlob, nBlob, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, bp /* &eocd */) iOff = i64((*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiOffset) for i = 0; (rc == SQLITE_OK) && (i < int32((*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntry)); i++ { *(*uintptr)(unsafe.Pointer(bp + 16 /* pNew */)) = uintptr(0) rc = zipfileGetEntry(tls, pTab, aBlob, nBlob, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, iOff, bp+16 /* &pNew */) if rc == SQLITE_OK { zipfileAddEntry(tls, pTab, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 16 /* pNew */))) iOff = iOff + (int64(ZIPFILE_CDS_FIXED_SZ)) iOff = iOff + (i64((int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pNew */)))).Fcds.FnExtra) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pNew */)))).Fcds.FnFile)) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pNew */)))).Fcds.FnComment))) } } return rc } // xFilter callback. func zipfileFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* zipfile.c:1238:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur var zFile uintptr = uintptr(0) // Zip file to scan var rc int32 = SQLITE_OK // Return Code var bInMemory int32 = 0 // True for an in-memory zipfile zipfileResetCursor(tls, pCsr) if (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile != 0 { zFile = (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile } else if idxNum == 0 { zipfileCursorErr(tls, pCsr, ts+9295 /* "zipfile() functi..." */, 0) return SQLITE_ERROR } else if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_BLOB { var aBlob uintptr = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) var nBlob int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) rc = zipfileLoadDirectory(tls, pTab, aBlob, nBlob) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry = libc.AssignPtrUintptr(pTab+72 /* &.pLastEntry */, uintptr(0)) if rc != SQLITE_OK { return rc } bInMemory = 1 } else { zFile = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) } if (uintptr(0) == (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd) && (0 == bInMemory) { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile = libc.Xfopen(tls, zFile, ts+4273 /* "rb" */) if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile == uintptr(0) { zipfileCursorErr(tls, pCsr, ts+9335 /* "cannot open file..." */, libc.VaList(bp, zFile)) rc = SQLITE_ERROR } else { rc = zipfileReadEOCD(tls, pTab, uintptr(0), 0, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile, (pCsr + 40 /* &.eocd */)) if rc == SQLITE_OK { if int32((*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FnEntry) == 0 { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(1) } else { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiNextOff = i64((*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FiOffset) rc = zipfileNext(tls, cur) } } } } else { (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop = u8(1) (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = func() uintptr { if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry != 0 { return (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry } return (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry }() rc = zipfileNext(tls, cur) } return rc } // xBestIndex callback. func zipfileBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* zipfile.c:1297:12: */ var i int32 var idx int32 = -1 var unusable int32 = 0 for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; i++ { var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(i)*12) if (*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn != ZIPFILE_F_COLUMN_IDX { continue } if int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable) == 0 { unusable = 1 } else if int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { idx = i } } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1000.0 if idx >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idx)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idx)*8)).Fomit = uint8(1) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 } else if unusable != 0 { return SQLITE_CONSTRAINT } return SQLITE_OK } func zipfileNewEntry(tls *libc.TLS, zPath uintptr) uintptr { /* zipfile.c:1325:21: */ bp := tls.Alloc(16) defer tls.Free(16) var pNew uintptr pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(ZipfileEntry{}))) if pNew != 0 { libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(ZipfileEntry{}))) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zPath)) if (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile == uintptr(0) { sqlite3.Xsqlite3_free(tls, pNew) pNew = uintptr(0) } } return pNew } func zipfileSerializeLFH(tls *libc.TLS, pEntry uintptr, aBuf uintptr) int32 { /* zipfile.c:1339:12: */ var pCds uintptr = (pEntry /* &.cds */) var a uintptr = aBuf (*ZipfileCDS)(unsafe.Pointer(pCds)).FnExtra = u16(9) /* Write the LFH itself */ { zipfilePutU32(tls, a, uint32(ZIPFILE_SIGNATURE_LFH)) a += uintptr(4) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FiVersionExtract) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).Fflags) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FiCompression) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FmTime) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FmDate) a += uintptr(2) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).Fcrc32) a += uintptr(4) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FszCompressed) a += uintptr(4) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FszUncompressed) a += uintptr(4) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FnFile) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FnExtra) a += uintptr(2) } // Add the file name libc.Xmemcpy(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FzFile, uint64(int32((*ZipfileCDS)(unsafe.Pointer(pCds)).FnFile))) a += uintptr(int32((*ZipfileCDS)(unsafe.Pointer(pCds)).FnFile)) /* The "extra" data */ { zipfilePutU16(tls, a, uint16(ZIPFILE_EXTRA_TIMESTAMP)) a += uintptr(2) } { zipfilePutU16(tls, a, uint16(5)) a += uintptr(2) } *(*u8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1))) = u8(0x01) { zipfilePutU32(tls, a, (*ZipfileEntry)(unsafe.Pointer(pEntry)).FmUnixTime) a += uintptr(4) } return (int32((int64(a) - int64(aBuf)) / 1)) } func zipfileAppendEntry(tls *libc.TLS, pTab uintptr, pEntry uintptr, pData uintptr, nData int32) int32 { /* zipfile.c:1372:12: */ var aBuf uintptr = (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer var nBuf int32 var rc int32 nBuf = zipfileSerializeLFH(tls, pEntry, aBuf) rc = zipfileAppendData(tls, pTab, aBuf, nBuf) if rc == SQLITE_OK { (*ZipfileEntry)(unsafe.Pointer(pEntry)).FiDataOff = (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent rc = zipfileAppendData(tls, pTab, pData, nData) } return rc } func zipfileGetMode(tls *libc.TLS, pVal uintptr, bIsDir int32, pMode uintptr, pzErr uintptr) int32 { /* zipfile.c:1392:12: */ bp := tls.Alloc(27) defer tls.Free(27) var z uintptr var mode u32 // var zTemplate [11]int8 at bp+16, 11 var i int32 z = sqlite3.Xsqlite3_value_text(tls, pVal) mode = u32(0) if !(z == uintptr(0)) { goto __1 } mode = func() uint32 { if bIsDir != 0 { return (uint32(S_IFDIR + 0755)) } return (uint32(S_IFREG + 0644)) }() goto __2 __1: if !((int32(*(*int8)(unsafe.Pointer(z))) >= '0') && (int32(*(*int8)(unsafe.Pointer(z))) <= '9')) { goto __3 } mode = u32(uint32(sqlite3.Xsqlite3_value_int(tls, pVal))) goto __4 __3: *(*[11]int8)(unsafe.Pointer(bp + 16 /* zTemplate */)) = *(*[11]int8)(unsafe.Pointer(ts + 9356 /* "-rwxrwxrwx" */)) if !(libc.Xstrlen(tls, z) != uint64(10)) { goto __5 } goto parse_error __5: ; switch int32(*(*int8)(unsafe.Pointer(z))) { case '-': goto __7 case 'd': goto __8 case 'l': goto __9 default: goto __10 } goto __6 __7: mode = mode | (u32(S_IFREG)) goto __6 __8: mode = mode | (u32(S_IFDIR)) goto __6 __9: mode = mode | (u32(S_IFLNK)) goto __6 __10: goto parse_error __6: ; i = 1 __11: if !(i < 10) { goto __13 } if !(int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp + 16 /* &zTemplate[0] */ + uintptr(i))))) { goto __14 } mode = mode | (u32(int32(1) << (9 - i))) goto __15 __14: if !(int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != '-') { goto __16 } goto parse_error __16: ; __15: ; goto __12 __12: i++ goto __11 goto __13 __13: ; __4: ; __2: ; if !((libc.Bool32((mode & u32(S_IFDIR)) == u32(0))) == bIsDir) { goto __17 } // The "mode" attribute is a directory, but data has been specified. // Or vice-versa - no data but "mode" is a file or symlink. *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9367 /* "zipfile: mode do..." */, 0) return SQLITE_CONSTRAINT __17: ; *(*u32)(unsafe.Pointer(pMode)) = mode return SQLITE_OK parse_error: *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9401 /* "zipfile: parse e..." */, libc.VaList(bp, z)) return SQLITE_ERROR } // // Both (const char*) arguments point to nul-terminated strings. Argument // nB is the value of strlen(zB). This function returns 0 if the strings are // identical, ignoring any trailing '/' character in either path. func zipfileComparePath(tls *libc.TLS, zA uintptr, zB uintptr, nB int32) int32 { /* zipfile.c:1437:12: */ var nA int32 = int32(libc.Xstrlen(tls, zA)) if (nA > 0) && (int32(*(*int8)(unsafe.Pointer(zA + uintptr((nA - 1))))) == '/') { nA-- } if (nB > 0) && (int32(*(*int8)(unsafe.Pointer(zB + uintptr((nB - 1))))) == '/') { nB-- } if (nA == nB) && (libc.Xmemcmp(tls, zA, zB, uint64(nA)) == 0) { return 0 } return 1 } func zipfileBegin(tls *libc.TLS, pVtab uintptr) int32 { /* zipfile.c:1445:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pTab uintptr = pVtab var rc int32 = SQLITE_OK if ((*ZipfileTab)(unsafe.Pointer(pTab)).FzFile == uintptr(0)) || (int32(*(*int8)(unsafe.Pointer((*ZipfileTab)(unsafe.Pointer(pTab)).FzFile))) == 0) { (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+9434 /* "zipfile: missing..." */, 0) return SQLITE_ERROR } // Open a write fd on the file. Also load the entire central directory // structure into memory. During the transaction any new file data is // appended to the archive file, but the central directory is accumulated // in main-memory until the transaction is committed. (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd = libc.Xfopen(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile, ts+9460 /* "ab+" */) if (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd == uintptr(0) { (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+9464 /* "zipfile: failed ..." */, libc.VaList(bp, (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile)) rc = SQLITE_ERROR } else { libc.Xfseek(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, 0, SEEK_END) (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent = libc.AssignPtrInt64(pTab+96 /* &.szOrig */, i64(libc.Xftell(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd))) rc = zipfileLoadDirectory(tls, pTab, uintptr(0), 0) } if rc != SQLITE_OK { zipfileCleanupTransaction(tls, pTab) } return rc } // Return the current time as a 32-bit timestamp in UNIX epoch format (like // time(2)). func zipfileTime(tls *libc.TLS) u32 { /* zipfile.c:1482:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) var ret u32 if ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion >= 2) && ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64 != 0) { // var ms i64 at bp, 8 (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, pVfs, bp /* &ms */) ret = (u32((*(*i64)(unsafe.Pointer(bp /* ms */)) / int64(1000)) - (int64(24405875) * int64(8640)))) } else { // var day float64 at bp+8, 8 (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, bp+8 /* &day */) ret = (u32((*(*float64)(unsafe.Pointer(bp + 8 /* day */)) - 2440587.5) * float64(86400))) } return ret } // Return a 32-bit timestamp in UNIX epoch format. // // If the value passed as the only argument is either NULL or an SQL NULL, // return the current time. Otherwise, return the value stored in (*pVal) // cast to a 32-bit unsigned integer. func zipfileGetTime(tls *libc.TLS, pVal uintptr) u32 { /* zipfile.c:1504:12: */ if (pVal == uintptr(0)) || (sqlite3.Xsqlite3_value_type(tls, pVal) == SQLITE_NULL) { return zipfileTime(tls) } return u32(sqlite3.Xsqlite3_value_int64(tls, pVal)) } // Unless it is NULL, entry pOld is currently part of the pTab->pFirstEntry // linked list. Remove it from the list and free the object. func zipfileRemoveEntryFromList(tls *libc.TLS, pTab uintptr, pOld uintptr) { /* zipfile.c:1515:13: */ if pOld != 0 { var pp uintptr for pp = (pTab + 64 /* &.pFirstEntry */); (*(*uintptr)(unsafe.Pointer(pp))) != pOld; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 88 /* &.pNext */) { } *(*uintptr)(unsafe.Pointer(pp)) = (*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext zipfileEntryFree(tls, pOld) } } // xUpdate method. func zipfileUpdate(tls *libc.TLS, pVtab uintptr, nVal int32, apVal uintptr, pRowid uintptr) int32 { /* zipfile.c:1527:12: */ bp := tls.Alloc(64) defer tls.Free(64) var pTab uintptr var rc int32 // Return Code var pNew uintptr // New in-memory CDS entry // var mode u32 at bp+60, 4 // Mode for new entry var mTime u32 // Modification time for new entry var sz i64 // Uncompressed size var zPath uintptr // Path for new entry var nPath int32 // strlen(zPath) var pData uintptr // Pointer to buffer containing content var nData int32 // Size of pData buffer in bytes var iMethod int32 // Compression method for new entry // var pFree uintptr at bp+48, 8 // Free this var zFree uintptr // Also free this var pOld uintptr var pOld2 uintptr var bUpdate int32 // True for an update that modifies "name" var bIsDir int32 var iCrc32 u32 var zUpdate uintptr var zDelete uintptr var nDelete int32 // var nCmp int32 at bp+56, 4 // Value specified for "data", and possibly "method". This must be // a regular file or a symlink. var aIn uintptr var nIn int32 var bAuto int32 var p uintptr var pCsr uintptr pTab = pVtab rc = SQLITE_OK pNew = uintptr(0) *(*u32)(unsafe.Pointer(bp + 60 /* mode */)) = u32(0) mTime = u32(0) sz = int64(0) zPath = uintptr(0) nPath = 0 pData = uintptr(0) nData = 0 iMethod = 0 *(*uintptr)(unsafe.Pointer(bp + 48 /* pFree */)) = uintptr(0) zFree = uintptr(0) pOld = uintptr(0) pOld2 = uintptr(0) bUpdate = 0 bIsDir = 0 iCrc32 = u32(0) if !((*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd == uintptr(0)) { goto __1 } rc = zipfileBegin(tls, pVtab) if !(rc != SQLITE_OK) { goto __2 } return rc __2: ; __1: ; // If this is a DELETE or UPDATE, find the archive entry to delete. if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal))) != SQLITE_NULL) { goto __3 } zDelete = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))) nDelete = int32(libc.Xstrlen(tls, zDelete)) if !(nVal > 1) { goto __4 } zUpdate = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if !((zUpdate != 0) && (zipfileComparePath(tls, zUpdate, zDelete, nDelete) != 0)) { goto __5 } bUpdate = 1 __5: ; __4: ; pOld = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry __6: if !(1 != 0) { goto __8 } if !(zipfileComparePath(tls, (*ZipfileEntry)(unsafe.Pointer(pOld)).Fcds.FzFile, zDelete, nDelete) == 0) { goto __9 } goto __8 __9: ; goto __7 __7: pOld = (*ZipfileEntry)(unsafe.Pointer(pOld)).FpNext goto __6 goto __8 __8: ; __3: ; if !(nVal > 1) { goto __10 } // Check that "sz" and "rawdata" are both NULL: if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 5*8))) != SQLITE_NULL) { goto __11 } zipfileTableErr(tls, pTab, ts+9508 /* "sz must be NULL" */, 0) rc = SQLITE_CONSTRAINT __11: ; if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 6*8))) != SQLITE_NULL) { goto __12 } zipfileTableErr(tls, pTab, ts+9524 /* "rawdata must be ..." */, 0) rc = SQLITE_CONSTRAINT __12: ; if !(rc == SQLITE_OK) { goto __13 } if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 7*8))) == SQLITE_NULL) { goto __14 } // data=NULL. A directory bIsDir = 1 goto __15 __14: // Value specified for "data", and possibly "method". This must be // a regular file or a symlink. aIn = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apVal + 7*8))) nIn = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + 7*8))) bAuto = (libc.Bool32(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 8*8))) == SQLITE_NULL)) iMethod = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + 8*8))) sz = i64(nIn) pData = aIn nData = nIn if !((iMethod != 0) && (iMethod != 8)) { goto __16 } zipfileTableErr(tls, pTab, ts+9545 /* "unknown compress..." */, libc.VaList(bp, iMethod)) rc = SQLITE_CONSTRAINT goto __17 __16: if !((bAuto != 0) || (iMethod != 0)) { goto __18 } rc = zipfileDeflate(tls, aIn, nIn, bp+48 /* &pFree */, bp+56 /* &nCmp */, (pTab /* &.base */ + 16 /* &.zErrMsg */)) if !(rc == SQLITE_OK) { goto __19 } if !((iMethod != 0) || (*(*int32)(unsafe.Pointer(bp + 56 /* nCmp */)) < nIn)) { goto __20 } iMethod = 8 pData = *(*uintptr)(unsafe.Pointer(bp + 48 /* pFree */)) nData = *(*int32)(unsafe.Pointer(bp + 56 /* nCmp */)) __20: ; __19: ; __18: ; iCrc32 = tcl.Xcrc32(tls, uint32(0), aIn, uint32(nIn)) __17: ; __15: ; __13: ; if !(rc == SQLITE_OK) { goto __21 } rc = zipfileGetMode(tls, *(*uintptr)(unsafe.Pointer(apVal + 3*8)), bIsDir, bp+60 /* &mode */, (pTab /* &.base */ + 16 /* &.zErrMsg */)) __21: ; if !(rc == SQLITE_OK) { goto __22 } zPath = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*8))) if !(zPath == uintptr(0)) { goto __23 } zPath = ts + 489 /* "" */ __23: ; nPath = int32(libc.Xstrlen(tls, zPath)) mTime = zipfileGetTime(tls, *(*uintptr)(unsafe.Pointer(apVal + 4*8))) __22: ; if !((rc == SQLITE_OK) && (bIsDir != 0)) { goto __24 } // For a directory, check that the last character in the path is a // '/'. This appears to be required for compatibility with info-zip // (the unzip command on unix). It does not create directories // otherwise. if !((nPath <= 0) || (int32(*(*int8)(unsafe.Pointer(zPath + uintptr((nPath - 1))))) != '/')) { goto __25 } zFree = sqlite3.Xsqlite3_mprintf(tls, ts+9576 /* "%s/" */, libc.VaList(bp+16, zPath)) zPath = zFree if !(zFree == uintptr(0)) { goto __26 } rc = SQLITE_NOMEM nPath = 0 goto __27 __26: nPath = int32(libc.Xstrlen(tls, zPath)) __27: ; __25: ; __24: ; // Check that we're not inserting a duplicate entry -OR- updating an // entry with a path, thereby making it into a duplicate. if !(((pOld == uintptr(0)) || (bUpdate != 0)) && (rc == SQLITE_OK)) { goto __28 } p = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry __29: if !(p != 0) { goto __31 } if !(zipfileComparePath(tls, (*ZipfileEntry)(unsafe.Pointer(p)).Fcds.FzFile, zPath, nPath) == 0) { goto __32 } switch sqlite3.Xsqlite3_vtab_on_conflict(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).Fdb) { case SQLITE_IGNORE: goto __34 case SQLITE_REPLACE: goto __35 default: goto __36 } goto __33 __34: goto zipfile_update_done __35: pOld2 = p goto __33 __36: zipfileTableErr(tls, pTab, ts+9580 /* "duplicate name: ..." */, libc.VaList(bp+32, zPath)) rc = SQLITE_CONSTRAINT goto __33 __33: ; goto __31 __32: ; goto __30 __30: p = (*ZipfileEntry)(unsafe.Pointer(p)).FpNext goto __29 goto __31 __31: ; __28: ; if !(rc == SQLITE_OK) { goto __37 } // Create the new CDS record. pNew = zipfileNewEntry(tls, zPath) if !(pNew == uintptr(0)) { goto __38 } rc = SQLITE_NOMEM goto __39 __38: (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiVersionMadeBy = (u16((int32(3) << 8) + 30)) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiVersionExtract = u16(ZIPFILE_NEWENTRY_REQUIRED) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.Fflags = u16(ZIPFILE_NEWENTRY_FLAGS) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiCompression = u16(iMethod) zipfileMtimeToDos(tls, (pNew /* &.cds */), mTime) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.Fcrc32 = iCrc32 (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszCompressed = u32(nData) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszUncompressed = u32(sz) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiExternalAttr = (*(*u32)(unsafe.Pointer(bp + 60 /* mode */)) << 16) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset = u32((*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent) (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FnFile = u16(nPath) (*ZipfileEntry)(unsafe.Pointer(pNew)).FmUnixTime = mTime rc = zipfileAppendEntry(tls, pTab, pNew, pData, nData) zipfileAddEntry(tls, pTab, pOld, pNew) __39: ; __37: ; __10: ; if !((rc == SQLITE_OK) && ((pOld != 0) || (pOld2 != 0))) { goto __40 } pCsr = (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList __41: if !(pCsr != 0) { goto __43 } if !(((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent != 0) && (((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent == pOld) || ((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent == pOld2))) { goto __44 } (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FpNext (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop = u8(1) __44: ; goto __42 __42: pCsr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext goto __41 goto __43 __43: ; zipfileRemoveEntryFromList(tls, pTab, pOld) zipfileRemoveEntryFromList(tls, pTab, pOld2) __40: ; zipfile_update_done: sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pFree */))) sqlite3.Xsqlite3_free(tls, zFree) return rc } func zipfileSerializeEOCD(tls *libc.TLS, p uintptr, aBuf uintptr) int32 { /* zipfile.c:1718:12: */ var a uintptr = aBuf { zipfilePutU32(tls, a, uint32(ZIPFILE_SIGNATURE_EOCD)) a += uintptr(4) } { zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FiDisk) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FiFirstDisk) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FnEntry) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FnEntryTotal) a += uintptr(2) } { zipfilePutU32(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FnSize) a += uintptr(4) } { zipfilePutU32(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FiOffset) a += uintptr(4) } { zipfilePutU16(tls, a, uint16(0)) a += uintptr(2) } // Size of trailing comment in bytes return (int32((int64(a) - int64(aBuf)) / 1)) } func zipfileAppendEOCD(tls *libc.TLS, pTab uintptr, p uintptr) int32 { /* zipfile.c:1732:12: */ var nBuf int32 = zipfileSerializeEOCD(tls, p, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer) return zipfileAppendData(tls, pTab, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer, nBuf) } // Serialize the CDS structure into buffer aBuf[]. Return the number // of bytes written. func zipfileSerializeCDS(tls *libc.TLS, pEntry uintptr, aBuf uintptr) int32 { /* zipfile.c:1742:12: */ var a uintptr = aBuf var pCDS uintptr = (pEntry /* &.cds */) if (*ZipfileEntry)(unsafe.Pointer(pEntry)).FaExtra == uintptr(0) { (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra = u16(9) } { zipfilePutU32(tls, a, uint32(ZIPFILE_SIGNATURE_CDS)) a += uintptr(4) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionMadeBy) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionExtract) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fflags) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) a += uintptr(2) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fcrc32) a += uintptr(4) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszCompressed) a += uintptr(4) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed) a += uintptr(4) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnComment) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiDiskStart) a += uintptr(2) } { zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiInternalAttr) a += uintptr(2) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr) a += uintptr(4) } { zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiOffset) a += uintptr(4) } libc.Xmemcpy(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FzFile, uint64((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile)) a += uintptr((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile) if (*ZipfileEntry)(unsafe.Pointer(pEntry)).FaExtra != 0 { var n int32 = (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra) + int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnComment)) libc.Xmemcpy(tls, a, (*ZipfileEntry)(unsafe.Pointer(pEntry)).FaExtra, uint64(n)) a += uintptr(n) } else { { zipfilePutU16(tls, a, uint16(ZIPFILE_EXTRA_TIMESTAMP)) a += uintptr(2) } { zipfilePutU16(tls, a, uint16(5)) a += uintptr(2) } *(*u8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1))) = u8(0x01) { zipfilePutU32(tls, a, (*ZipfileEntry)(unsafe.Pointer(pEntry)).FmUnixTime) a += uintptr(4) } } return (int32((int64(a) - int64(aBuf)) / 1)) } func zipfileCommit(tls *libc.TLS, pVtab uintptr) int32 { /* zipfile.c:1787:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pTab uintptr = pVtab var rc int32 = SQLITE_OK if (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd != 0 { var iOffset i64 = (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent var p uintptr // var eocd ZipfileEOCD at bp, 16 var nEntry int32 = 0 // Write out all entries for p = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry; (rc == SQLITE_OK) && (p != 0); p = (*ZipfileEntry)(unsafe.Pointer(p)).FpNext { var n int32 = zipfileSerializeCDS(tls, p, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer) rc = zipfileAppendData(tls, pTab, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer, n) nEntry++ } // Write out the EOCD record (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiDisk = u16(0) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiFirstDisk = u16(0) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntry = u16(nEntry) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntryTotal = u16(nEntry) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnSize = (u32((*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent - iOffset)) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiOffset = u32(iOffset) rc = zipfileAppendEOCD(tls, pTab, bp /* &eocd */) zipfileCleanupTransaction(tls, pTab) } return rc } func zipfileRollback(tls *libc.TLS, pVtab uintptr) int32 { /* zipfile.c:1817:12: */ return zipfileCommit(tls, pVtab) } func zipfileFindCursor(tls *libc.TLS, pTab uintptr, iId i64) uintptr { /* zipfile.c:1821:19: */ var pCsr uintptr for pCsr = (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList; pCsr != 0; pCsr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext { if iId == (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiId { break } } return pCsr } func zipfileFunctionCds(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* zipfile.c:1829:13: */ bp := tls.Alloc(136) defer tls.Free(136) var pCsr uintptr var pTab uintptr = sqlite3.Xsqlite3_user_data(tls, context) pCsr = zipfileFindCursor(tls, pTab, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) if pCsr != 0 { var p uintptr = ((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent /* &.cds */) var zRes uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+9601, /* "{\"version-made-b..." */ libc.VaList(bp, u32((*ZipfileCDS)(unsafe.Pointer(p)).FiVersionMadeBy), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiVersionExtract), u32((*ZipfileCDS)(unsafe.Pointer(p)).Fflags), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiCompression), u32((*ZipfileCDS)(unsafe.Pointer(p)).FmTime), u32((*ZipfileCDS)(unsafe.Pointer(p)).FmDate), (*ZipfileCDS)(unsafe.Pointer(p)).Fcrc32, (*ZipfileCDS)(unsafe.Pointer(p)).FszCompressed, (*ZipfileCDS)(unsafe.Pointer(p)).FszUncompressed, u32((*ZipfileCDS)(unsafe.Pointer(p)).FnFile), u32((*ZipfileCDS)(unsafe.Pointer(p)).FnExtra), u32((*ZipfileCDS)(unsafe.Pointer(p)).FnComment), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiDiskStart), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiInternalAttr), (*ZipfileCDS)(unsafe.Pointer(p)).FiExternalAttr, (*ZipfileCDS)(unsafe.Pointer(p)).FiOffset)) if zRes == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else { sqlite3.Xsqlite3_result_text(tls, context, zRes, -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_free(tls, zRes) } } } // xFindFunction method. func zipfileFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* zipfile.c:1880:12: */ if sqlite3.Xsqlite3_stricmp(tls, ts+9943 /* "zipfile_cds" */, zName) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{zipfileFunctionCds})) *(*uintptr)(unsafe.Pointer(ppArg)) = pVtab return 1 } return 0 } type ZipfileBuffer1 = struct { Fa uintptr Fn int32 FnAlloc int32 } /* zipfile.c:1895:9 */ type ZipfileBuffer = ZipfileBuffer1 /* zipfile.c:1895:30 */ type ZipfileCtx1 = struct { FnEntry int32 _ [4]byte Fbody ZipfileBuffer Fcds ZipfileBuffer } /* zipfile.c:1902:9 */ type ZipfileCtx = ZipfileCtx1 /* zipfile.c:1902:27 */ func zipfileBufferGrow(tls *libc.TLS, pBuf uintptr, nByte int32) int32 { /* zipfile.c:1909:12: */ if ((*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn + nByte) > (*ZipfileBuffer)(unsafe.Pointer(pBuf)).FnAlloc { var aNew uintptr var nNew sqlite3_int64 if (*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn != 0 { nNew = (int64((*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn * 2)) } else { nNew = int64(512) } var nReq int32 = ((*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn + nByte) for nNew < sqlite3_int64(nReq) { nNew = (nNew * int64(2)) } aNew = sqlite3.Xsqlite3_realloc64(tls, (*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fa, uint64(nNew)) if aNew == uintptr(0) { return SQLITE_NOMEM } (*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fa = aNew (*ZipfileBuffer)(unsafe.Pointer(pBuf)).FnAlloc = int32(nNew) } return SQLITE_OK } // xStep() callback for the zipfile() aggregate. This can be called in // any of the following ways: // // SELECT zipfile(name,data) ... // SELECT zipfile(name,mode,mtime,data) ... // SELECT zipfile(name,mode,mtime,data,method) ... func zipfileStep(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* zipfile.c:1932:6: */ bp := tls.Alloc(156) defer tls.Free(156) var p uintptr // Aggregate function context // var e ZipfileEntry at bp+32, 96 // New entry to add to zip archive var pName uintptr var pMode uintptr var pMtime uintptr var pData uintptr var pMethod uintptr var bIsDir int32 // var mode u32 at bp+152, 4 var rc int32 // var zErr uintptr at bp+144, 8 var iMethod int32 // Compression method to use (0 or 8) var aData uintptr // Possibly compressed data for new entry var nData int32 // Size of aData[] in bytes var szUncompressed int32 // Size of data before compression // var aFree uintptr at bp+128, 8 // Free this before returning var iCrc32 u32 // crc32 of uncompressed data var zName uintptr // Path (name) of new entry var nName int32 // Size of zName in bytes var zFree uintptr // Free this before returning var nByte int32 // var nOut int32 at bp+136, 4 pName = uintptr(0) pMode = uintptr(0) pMtime = uintptr(0) pData = uintptr(0) pMethod = uintptr(0) bIsDir = 0 rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)) = uintptr(0) iMethod = -1 aData = uintptr(0) nData = 0 szUncompressed = 0 *(*uintptr)(unsafe.Pointer(bp + 128 /* aFree */)) = uintptr(0) iCrc32 = u32(0) zName = uintptr(0) nName = 0 zFree = uintptr(0) libc.Xmemset(tls, bp+32 /* &e */, 0, uint64(unsafe.Sizeof(ZipfileEntry{}))) p = sqlite3.Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(ZipfileCtx{}))) if !(p == uintptr(0)) { goto __1 } return __1: ; // Martial the arguments into stack variables if !(((nVal != 2) && (nVal != 4)) && (nVal != 5)) { goto __2 } *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+9955 /* "wrong number of ..." */, 0) rc = SQLITE_ERROR goto zipfile_step_out __2: ; pName = *(*uintptr)(unsafe.Pointer(apVal)) if !(nVal == 2) { goto __3 } pData = *(*uintptr)(unsafe.Pointer(apVal + 1*8)) goto __4 __3: pMode = *(*uintptr)(unsafe.Pointer(apVal + 1*8)) pMtime = *(*uintptr)(unsafe.Pointer(apVal + 2*8)) pData = *(*uintptr)(unsafe.Pointer(apVal + 3*8)) if !(nVal == 5) { goto __5 } pMethod = *(*uintptr)(unsafe.Pointer(apVal + 4*8)) __5: ; __4: ; // Check that the 'name' parameter looks ok. zName = sqlite3.Xsqlite3_value_text(tls, pName) nName = sqlite3.Xsqlite3_value_bytes(tls, pName) if !(zName == uintptr(0)) { goto __6 } *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+10003 /* "first argument t..." */, 0) rc = SQLITE_ERROR goto zipfile_step_out __6: ; // Inspect the 'method' parameter. This must be either 0 (store), 8 (use // deflate compression) or NULL (choose automatically). if !((pMethod != 0) && (SQLITE_NULL != sqlite3.Xsqlite3_value_type(tls, pMethod))) { goto __7 } iMethod = int32(sqlite3.Xsqlite3_value_int64(tls, pMethod)) if !((iMethod != 0) && (iMethod != 8)) { goto __8 } *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+10048 /* "illegal method v..." */, libc.VaList(bp, iMethod)) rc = SQLITE_ERROR goto zipfile_step_out __8: ; __7: ; // Now inspect the data. If this is NULL, then the new entry must be a // directory. Otherwise, figure out whether or not the data should // be deflated or simply stored in the zip archive. if !(sqlite3.Xsqlite3_value_type(tls, pData) == SQLITE_NULL) { goto __9 } bIsDir = 1 iMethod = 0 goto __10 __9: aData = sqlite3.Xsqlite3_value_blob(tls, pData) szUncompressed = libc.AssignInt32(&nData, sqlite3.Xsqlite3_value_bytes(tls, pData)) iCrc32 = tcl.Xcrc32(tls, uint32(0), aData, uint32(nData)) if !((iMethod < 0) || (iMethod == 8)) { goto __11 } *(*int32)(unsafe.Pointer(bp + 136 /* nOut */)) = 0 rc = zipfileDeflate(tls, aData, nData, bp+128 /* &aFree */, bp+136 /* &nOut */, bp+144 /* &zErr */) if !(rc != SQLITE_OK) { goto __12 } goto zipfile_step_out __12: ; if !((iMethod == 8) || (*(*int32)(unsafe.Pointer(bp + 136 /* nOut */)) < nData)) { goto __13 } aData = *(*uintptr)(unsafe.Pointer(bp + 128 /* aFree */)) nData = *(*int32)(unsafe.Pointer(bp + 136 /* nOut */)) iMethod = 8 goto __14 __13: iMethod = 0 __14: ; __11: ; __10: ; // Decode the "mode" argument. rc = zipfileGetMode(tls, pMode, bIsDir, bp+152 /* &mode */, bp+144 /* &zErr */) if !(rc != 0) { goto __15 } goto zipfile_step_out __15: ; // Decode the "mtime" argument. (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).FmUnixTime = zipfileGetTime(tls, pMtime) // If this is a directory entry, ensure that there is exactly one '/' // at the end of the path. Or, if this is not a directory and the path // ends in '/' it is an error. if !(bIsDir == 0) { goto __16 } if !((nName > 0) && (int32(*(*int8)(unsafe.Pointer(zName + uintptr((nName - 1))))) == '/')) { goto __18 } *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+10073 /* "non-directory na..." */, 0) rc = SQLITE_ERROR goto zipfile_step_out __18: ; goto __17 __16: if !((nName == 0) || (int32(*(*int8)(unsafe.Pointer(zName + uintptr((nName - 1))))) != '/')) { goto __19 } zName = libc.AssignUintptr(&zFree, sqlite3.Xsqlite3_mprintf(tls, ts+9576 /* "%s/" */, libc.VaList(bp+16, zName))) if !(zName == uintptr(0)) { goto __21 } rc = SQLITE_NOMEM goto zipfile_step_out __21: ; nName = int32(libc.Xstrlen(tls, zName)) goto __20 __19: __22: if !((nName > 1) && (int32(*(*int8)(unsafe.Pointer(zName + uintptr((nName - 2))))) == '/')) { goto __23 } nName-- goto __22 __23: ; __20: ; __17: ; // Assemble the ZipfileEntry object for the new zip archive entry (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FiVersionMadeBy = (u16((int32(3) << 8) + 30)) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FiVersionExtract = u16(ZIPFILE_NEWENTRY_REQUIRED) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.Fflags = u16(ZIPFILE_NEWENTRY_FLAGS) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FiCompression = u16(iMethod) zipfileMtimeToDos(tls, (bp + 32 /* &e */ /* &.cds */), (*ZipfileEntry)(unsafe.Pointer(bp+32 /* &e */)).FmUnixTime) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.Fcrc32 = iCrc32 (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FszCompressed = u32(nData) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FszUncompressed = u32(szUncompressed) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FiExternalAttr = (*(*u32)(unsafe.Pointer(bp + 152 /* mode */)) << 16) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FiOffset = u32((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FnFile = u16(nName) (*ZipfileEntry)(unsafe.Pointer(bp + 32 /* &e */)).Fcds.FzFile = zName // Append the LFH to the body of the new archive nByte = ((ZIPFILE_LFH_FIXED_SZ + int32((*ZipfileEntry)(unsafe.Pointer(bp+32 /* &e */)).Fcds.FnFile)) + 9) if !(libc.AssignInt32(&rc, zipfileBufferGrow(tls, (p+8 /* &.body */), nByte)) != 0) { goto __24 } goto zipfile_step_out __24: ; *(*int32)(unsafe.Pointer(p + 8 /* &.body */ + 8 /* &.n */)) += (zipfileSerializeLFH(tls, bp+32 /* &e */, ((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)))) // Append the data to the body of the new archive if !(nData > 0) { goto __25 } if !(libc.AssignInt32(&rc, zipfileBufferGrow(tls, (p+8 /* &.body */), nData)) != 0) { goto __26 } goto zipfile_step_out __26: ; libc.Xmemcpy(tls, ((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)), aData, uint64(nData)) *(*int32)(unsafe.Pointer(p + 8 /* &.body */ + 8 /* &.n */)) += (nData) __25: ; // Append the CDS record to the directory of the new archive nByte = ((ZIPFILE_CDS_FIXED_SZ + int32((*ZipfileEntry)(unsafe.Pointer(bp+32 /* &e */)).Fcds.FnFile)) + 9) if !(libc.AssignInt32(&rc, zipfileBufferGrow(tls, (p+24 /* &.cds */), nByte)) != 0) { goto __27 } goto zipfile_step_out __27: ; *(*int32)(unsafe.Pointer(p + 24 /* &.cds */ + 8 /* &.n */)) += (zipfileSerializeCDS(tls, bp+32 /* &e */, ((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fa + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn)))) // Increment the count of entries in the archive (*ZipfileCtx)(unsafe.Pointer(p)).FnEntry++ zipfile_step_out: sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* aFree */))) sqlite3.Xsqlite3_free(tls, zFree) if !(rc != 0) { goto __28 } if !(*(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)) != 0) { goto __29 } sqlite3.Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */)), -1) goto __30 __29: sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) __30: ; __28: ; sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 144 /* zErr */))) } // xFinalize() callback for zipfile aggregate function. func zipfileFinal(tls *libc.TLS, pCtx uintptr) { /* zipfile.c:2107:6: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr // var eocd ZipfileEOCD at bp, 16 var nZip sqlite3_int64 var aZip uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(ZipfileCtx{}))) if p == uintptr(0) { return } if (*ZipfileCtx)(unsafe.Pointer(p)).FnEntry > 0 { libc.Xmemset(tls, bp /* &eocd */, 0, uint64(unsafe.Sizeof(ZipfileEOCD{}))) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntry = u16((*ZipfileCtx)(unsafe.Pointer(p)).FnEntry) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntryTotal = u16((*ZipfileCtx)(unsafe.Pointer(p)).FnEntry) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnSize = u32((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn) (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiOffset = u32((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn) nZip = (sqlite3_int64(((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn + (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn) + ZIPFILE_EOCD_FIXED_SZ)) aZip = sqlite3.Xsqlite3_malloc64(tls, uint64(nZip)) if aZip == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) } else { libc.Xmemcpy(tls, aZip, (*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa, uint64((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)) libc.Xmemcpy(tls, (aZip + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)), (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fa, uint64((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn)) zipfileSerializeEOCD(tls, bp /* &eocd */, (aZip + uintptr(((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn + (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn)))) sqlite3.Xsqlite3_result_blob(tls, pCtx, aZip, int32(nZip), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{zipfileFree}))) } } sqlite3.Xsqlite3_free(tls, (*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa) sqlite3.Xsqlite3_free(tls, (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fa) } // Register the "zipfile" virtual table. func zipfileRegister(tls *libc.TLS, db uintptr) int32 { /* zipfile.c:2142:12: */ var rc int32 = sqlite3.Xsqlite3_create_module(tls, db, ts+9014 /* "zipfile" */, uintptr(unsafe.Pointer(&zipfileModule)), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_overload_function(tls, db, ts+9943 /* "zipfile_cds" */, -1) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, db, ts+9014 /* "zipfile" */, -1, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{zipfileStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{zipfileFinal}))) } return rc } var zipfileModule = sqlite3_module{ FiVersion: 1, // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xRowid - read data FxUpdate: 0, // xUpdate FxBegin: 0, // xSync FxCommit: 0, // xCommit FxRollback: 0, // xRollback FxFindFunction: 0, // xRename } /* zipfile.c:2143:25 */ func sqlite3_zipfile_init(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* zipfile.c:2182:5: */ _ = pApi _ = pzErrMsg // Unused parameter return zipfileRegister(tls, db) } func test_rbu_delta(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* test_rbu.c:34:6: */ var interp uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) var pScript uintptr var i int32 pScript = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, ts+10112 /* "rbu_delta" */, -1)) for i = 0; i < nArg; i++ { var pIn uintptr = *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) var z uintptr = sqlite3.Xsqlite3_value_text(tls, pIn) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, z, -1)) } if TCL_OK == tcl.XTcl_EvalObjEx(tls, interp, pScript, TCL_GLOBAL_ONLY) { var z uintptr = tcl.XTcl_GetStringResult(tls, interp) sqlite3.Xsqlite3_result_text(tls, pCtx, z, -1, libc.UintptrFromInt32(-1)) } else { tcl.XTcl_BackgroundError(tls, interp) } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } func test_sqlite3rbu_cmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:59:26: */ bp := tls.Alloc(504) defer tls.Free(504) var ret int32 = TCL_OK var pRbu uintptr = clientData *(*[14]RbuCmd)(unsafe.Pointer(bp + 32 /* aCmd */)) = [14]RbuCmd{ {FzName: ts + 10122 /* "step" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 0 {FzName: ts + 10127 /* "close" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 1 {FzName: ts + 10133 /* "create_rbu_delta" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 2 {FzName: ts + 10150 /* "savestate" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 3 {FzName: ts + 10160 /* "dbMain_eval" */, FnArg: 3, FzUsage: ts + 10172 /* "SQL" */}, // 4 {FzName: ts + 10176 /* "bp_progress" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 5 {FzName: ts + 10188 /* "db" */, FnArg: 3, FzUsage: ts + 10191 /* "RBU" */}, // 6 {FzName: ts + 10195 /* "state" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 7 {FzName: ts + 10201 /* "progress" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 8 {FzName: ts + 10210 /* "close_no_error" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 9 {FzName: ts + 10225 /* "temp_size_limit" */, FnArg: 3, FzUsage: ts + 10241 /* "LIMIT" */}, // 10 {FzName: ts + 10247 /* "temp_size" */, FnArg: 2, FzUsage: ts + 489 /* "" */}, // 11 {FzName: ts + 10257 /* "dbRbu_eval" */, FnArg: 3, FzUsage: ts + 10172 /* "SQL" */}, // 12 {}, } // var iCmd int32 at bp+368, 4 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10268 /* "METHOD" */) return TCL_ERROR } ret = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+32 /* &aCmd[0] */, int32(unsafe.Sizeof(RbuCmd{})), ts+10275 /* "method" */, 0, bp+368 /* &iCmd */) if ret != 0 { return TCL_ERROR } if objc != (*RbuCmd)(unsafe.Pointer(bp+32 /* &aCmd */ +uintptr(*(*int32)(unsafe.Pointer(bp + 368 /* iCmd */)))*24)).FnArg { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, (*RbuCmd)(unsafe.Pointer(bp+32 /* &aCmd */ +uintptr(*(*int32)(unsafe.Pointer(bp + 368 /* iCmd */)))*24)).FzUsage) return TCL_ERROR } switch *(*int32)(unsafe.Pointer(bp + 368 /* iCmd */)) { case 0: /* step */ { var rc int32 = sqlite3.Xsqlite3rbu_step(tls, pRbu) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) break } case 9: fallthrough /* close_no_error */ case 1: /* close */ { *(*uintptr)(unsafe.Pointer(bp + 376 /* zErrmsg */)) = uintptr(0) var rc int32 tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))) if *(*int32)(unsafe.Pointer(bp + 368 /* iCmd */)) == 1 { rc = sqlite3.Xsqlite3rbu_close(tls, pRbu, bp+376 /* &zErrmsg */) } else { rc = sqlite3.Xsqlite3rbu_close(tls, pRbu, uintptr(0)) } if (rc == SQLITE_OK) || (rc == SQLITE_DONE) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) } else { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) if *(*uintptr)(unsafe.Pointer(bp + 376 /* zErrmsg */)) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+10282 /* " - " */, *(*uintptr)(unsafe.Pointer(bp + 376 /* zErrmsg */)), 0)) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 376 /* zErrmsg */))) } ret = TCL_ERROR } break } case 2: /* create_rbu_delta */ { var db uintptr = sqlite3.Xsqlite3rbu_db(tls, pRbu, 0) var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+10112 /* "rbu_delta" */, -1, SQLITE_UTF8, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{test_rbu_delta})), uintptr(0), uintptr(0)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) ret = func() int32 { if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR }() break } case 3: /* savestate */ { var rc int32 = sqlite3.Xsqlite3rbu_savestate(tls, pRbu) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) ret = func() int32 { if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR }() break } case 12: fallthrough /* dbRbu_eval */ case 4: /* dbMain_eval */ { var db uintptr = sqlite3.Xsqlite3rbu_db(tls, pRbu, (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 368 /* iCmd */)) == 12))) var rc int32 = sqlite3.Xsqlite3_exec(tls, db, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_errmsg(tls, db), -1)) ret = TCL_ERROR } break } case 5: /* bp_progress */ { // var one int32 at bp+384, 4 // var two int32 at bp+388, 4 var pObj uintptr sqlite3.Xsqlite3rbu_bp_progress(tls, pRbu, bp+384 /* &one */, bp+388 /* &two */) pObj = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, interp, pObj, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 384 /* one */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pObj, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 388 /* two */)))) tcl.XTcl_SetObjResult(tls, interp, pObj) break } case 6: /* db */ { // var bArg int32 at bp+392, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+392 /* &bArg */) != 0 { ret = TCL_ERROR } else { // var zBuf [50]int8 at bp+396, 50 var db uintptr = sqlite3.Xsqlite3rbu_db(tls, pRbu, *(*int32)(unsafe.Pointer(bp + 392 /* bArg */))) if sqlite3TestMakePointerStr(tls, interp, bp+396 /* &zBuf[0] */, db) != 0 { ret = TCL_ERROR } else { tcl.XTcl_SetResult(tls, interp, bp+396 /* &zBuf[0] */, uintptr(1)) } } break } case 7: /* state */ { *(*[6]uintptr)(unsafe.Pointer(bp + 448 /* aRes */)) = [6]uintptr{uintptr(0), ts + 10286 /* "oal" */, ts + 10290 /* "move" */, ts + 10295 /* "checkpoint" */, ts + 10306 /* "done" */, ts + 10311 /* "error" */} var eState int32 = sqlite3.Xsqlite3rbu_state(tls, pRbu) tcl.XTcl_SetResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 448 /* &aRes[0] */ + uintptr(eState)*8)), uintptr(0)) break } case 8: /* progress */ { var nStep sqlite3_int64 = sqlite3.Xsqlite3rbu_progress(tls, pRbu) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, nStep)) break } case 10: /* temp_size_limit */ { // var nLimit sqlite3_int64 at bp+496, 8 if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+496 /* &nLimit */) != 0 { ret = TCL_ERROR } else { *(*sqlite3_int64)(unsafe.Pointer(bp + 496 /* nLimit */)) = sqlite3.Xsqlite3rbu_temp_size_limit(tls, pRbu, *(*sqlite3_int64)(unsafe.Pointer(bp + 496 /* nLimit */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, *(*sqlite3_int64)(unsafe.Pointer(bp + 496 /* nLimit */)))) } break } case 11: /* temp_size */ { var sz sqlite3_int64 = sqlite3.Xsqlite3rbu_temp_size(tls, pRbu) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, sz)) break } default: // seems unlikely break } return ret } type RbuCmd = struct { FzName uintptr FnArg int32 _ [4]byte FzUsage uintptr } /* test_rbu.c:67:3 */ // Tclcmd: sqlite3rbu CMD ?? func test_sqlite3rbu(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:228:26: */ var pRbu uintptr = uintptr(0) var zCmd uintptr var zTarget uintptr var zRbu uintptr var zStateDb uintptr = uintptr(0) if (objc != 4) && (objc != 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10317 /* "NAME TARGET-DB R..." */) return TCL_ERROR } zCmd = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zTarget = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zRbu = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if objc == 5 { zStateDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) } pRbu = sqlite3.Xsqlite3rbu_open(tls, zTarget, zRbu, zStateDb) tcl.XTcl_CreateObjCommand(tls, interp, zCmd, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{test_sqlite3rbu_cmd})), pRbu, uintptr(0)) tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) return TCL_OK } // Tclcmd: sqlite3rbu_vacuum CMD func test_sqlite3rbu_vacuum(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:258:26: */ var pRbu uintptr = uintptr(0) var zCmd uintptr var zTarget uintptr var zStateDb uintptr = uintptr(0) if (objc != 3) && (objc != 4) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10350 /* "NAME TARGET-DB ?..." */) return TCL_ERROR } zCmd = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zTarget = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if objc == 4 { zStateDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) } if (zStateDb != 0) && (int32(*(*int8)(unsafe.Pointer(zStateDb))) == 0) { zStateDb = uintptr(0) } pRbu = sqlite3.Xsqlite3rbu_vacuum(tls, zTarget, zStateDb) tcl.XTcl_CreateObjCommand(tls, interp, zCmd, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{test_sqlite3rbu_cmd})), pRbu, uintptr(0)) tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) return TCL_OK } // Tclcmd: sqlite3rbu_create_vfs ?-default? NAME PARENT func test_sqlite3rbu_create_vfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:287:26: */ var zName uintptr var zParent uintptr var rc int32 if (objc != 3) && (objc != 4) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10376 /* "?-default? NAME ..." */) return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8))) zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8))) if int32(*(*int8)(unsafe.Pointer(zParent))) == 0 { zParent = uintptr(0) } rc = sqlite3.Xsqlite3rbu_create_vfs(tls, zName, zParent) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } else if objc == 4 { var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, zName) sqlite3.Xsqlite3_vfs_register(tls, pVfs, 1) } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } // Tclcmd: sqlite3rbu_destroy_vfs NAME func test_sqlite3rbu_destroy_vfs(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:322:26: */ var zName uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10399 /* "NAME" */) return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) sqlite3.Xsqlite3rbu_destroy_vfs(tls, zName) return TCL_OK } // Tclcmd: sqlite3rbu_internal_test func test_sqlite3rbu_internal_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:343:26: */ bp := tls.Alloc(24) defer tls.Free(24) var db uintptr if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } db = sqlite3.Xsqlite3rbu_db(tls, uintptr(0), 0) if db != uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+10404 /* "sqlite3rbu_db(0,..." */, 0)) return TCL_ERROR } return TCL_OK } func SqliteRbu_Init(tls *libc.TLS, interp uintptr) int32 { /* test_rbu.c:365:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd[i].FzName, aObjCmd[i].FxProc, uintptr(0), uintptr(0)) } return TCL_OK } var aObjCmd = [5]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 10427 /* "sqlite3rbu" */, FxProc: 0}, {FzName: ts + 10438 /* "sqlite3rbu_vacuu..." */, FxProc: 0}, {FzName: ts + 10456 /* "sqlite3rbu_creat..." */, FxProc: 0}, {FzName: ts + 10478 /* "sqlite3rbu_destr..." */, FxProc: 0}, {FzName: ts + 10501 /* "sqlite3rbu_inter..." */, FxProc: 0}, } /* test_rbu.c:369:5 */ // 2014-09-08 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // // This file contains the bulk of the implementation of the // user-authentication extension feature. Some parts of the user- // authentication code are contained within the SQLite core (in the // src/ subdirectory of the main source code tree) but those parts // that could reasonable be separated out are moved into this file. // // To compile with the user-authentication feature, append this file to // end of an SQLite amalgamation, then add the SQLITE_USER_AUTHENTICATION // compile-time option. See the user-auth.txt file in the same source // directory as this file for additional information. // Windows needs to know which symbols to export. Unix does not. // BUILD_sqlite should be undefined for Unix. // Forward declaration type SqliteDb = struct { Fdb uintptr Finterp uintptr FzBusy uintptr FzCommit uintptr FzTrace uintptr FzTraceV2 uintptr FzProfile uintptr FzProgress uintptr FzBindFallback uintptr FzAuth uintptr FdisableAuth int32 _ [4]byte FzNull uintptr FpFunc uintptr FpUpdateHook uintptr FpPreUpdateHook uintptr FpRollbackHook uintptr FpWalHook uintptr FpUnlockNotify uintptr FpCollate uintptr Frc int32 _ [4]byte FpCollateNeeded uintptr FstmtList uintptr FstmtLast uintptr FmaxStmt int32 FnStmt int32 FpIncrblob uintptr FnStep int32 FnSort int32 FnIndex int32 FnVMStep int32 FnTransaction int32 FopenFlags int32 FbLegacyPrepare int32 _ [4]byte } /* tclsqlite.c:91:25 */ // New SQL functions can be created as TCL scripts. Each such function // is described by an instance of the following structure. // // Variable eType may be set to SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, // SQLITE_BLOB or SQLITE_NULL. If it is SQLITE_NULL, then the implementation // attempts to determine the type of the result based on the Tcl object. // If it is SQLITE_TEXT or SQLITE_BLOB, then a text (sqlite3_result_text()) // or blob (sqlite3_result_blob()) is returned. If it is SQLITE_INTEGER // or SQLITE_FLOAT, then an attempt is made to return an integer or float // value, falling back to float and then text if this is not possible. type SqlFunc1 = struct { Finterp uintptr FpScript uintptr FpDb uintptr FuseEvalObjv int32 FeType int32 FzName uintptr FpNext uintptr } /* tclsqlite.c:105:9 */ // New SQL functions can be created as TCL scripts. Each such function // is described by an instance of the following structure. // // Variable eType may be set to SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, // SQLITE_BLOB or SQLITE_NULL. If it is SQLITE_NULL, then the implementation // attempts to determine the type of the result based on the Tcl object. // If it is SQLITE_TEXT or SQLITE_BLOB, then a text (sqlite3_result_text()) // or blob (sqlite3_result_blob()) is returned. If it is SQLITE_INTEGER // or SQLITE_FLOAT, then an attempt is made to return an integer or float // value, falling back to float and then text if this is not possible. type SqlFunc = SqlFunc1 /* tclsqlite.c:105:24 */ // New collation sequences function can be created as TCL scripts. Each such // function is described by an instance of the following structure. type SqlCollate1 = struct { Finterp uintptr FzScript uintptr FpNext uintptr } /* tclsqlite.c:120:9 */ // New collation sequences function can be created as TCL scripts. Each such // function is described by an instance of the following structure. type SqlCollate = SqlCollate1 /* tclsqlite.c:120:27 */ // Prepared statements are cached for faster execution. Each prepared // statement is described by an instance of the following structure. type SqlPreparedStmt1 = struct { FpNext uintptr FpPrev uintptr FpStmt uintptr FnSql int32 _ [4]byte FzSql uintptr FnParm int32 _ [4]byte FapParm uintptr } /* tclsqlite.c:131:9 */ // Prepared statements are cached for faster execution. Each prepared // statement is described by an instance of the following structure. type SqlPreparedStmt = SqlPreparedStmt1 /* tclsqlite.c:131:32 */ type IncrblobChannel1 = struct { FpBlob uintptr FpDb uintptr FiSeek int32 _ [4]byte Fchannel Tcl_Channel FpNext uintptr FpPrev uintptr } /* tclsqlite.c:142:9 */ type IncrblobChannel = IncrblobChannel1 /* tclsqlite.c:142:32 */ // Compute a string length that is limited to what can be stored in // lower 30 bits of a 32-bit signed integer. func strlen30(tls *libc.TLS, z uintptr) int32 { /* tclsqlite.c:202:12: */ var z2 uintptr = z for *(*int8)(unsafe.Pointer(z2)) != 0 { z2++ } return (0x3fffffff & (int32((int64(z2) - int64(z)) / 1))) } // Close all incrblob channels opened using database connection pDb. // This is called when shutting down the database connection. func closeIncrblobChannels(tls *libc.TLS, pDb uintptr) { /* tclsqlite.c:214:13: */ var p uintptr var pNext uintptr for p = (*SqliteDb)(unsafe.Pointer(pDb)).FpIncrblob; p != 0; p = pNext { pNext = (*IncrblobChannel)(unsafe.Pointer(p)).FpNext // Note: Calling unregister here call Tcl_Close on the incrblob channel, // which deletes the IncrblobChannel structure at *p. So do not // call Tcl_Free() here. tcl.XTcl_UnregisterChannel(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*IncrblobChannel)(unsafe.Pointer(p)).Fchannel) } } // Close an incremental blob channel. func incrblobClose(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclsqlite.c:232:26: */ var p uintptr = instanceData var rc int32 = sqlite3.Xsqlite3_blob_close(tls, (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob) var db uintptr = (*SqliteDb)(unsafe.Pointer((*IncrblobChannel)(unsafe.Pointer(p)).FpDb)).Fdb // Remove the channel from the SqliteDb.pIncrblob list. if (*IncrblobChannel)(unsafe.Pointer(p)).FpNext != 0 { (*IncrblobChannel)(unsafe.Pointer((*IncrblobChannel)(unsafe.Pointer(p)).FpNext)).FpPrev = (*IncrblobChannel)(unsafe.Pointer(p)).FpPrev } if (*IncrblobChannel)(unsafe.Pointer(p)).FpPrev != 0 { (*IncrblobChannel)(unsafe.Pointer((*IncrblobChannel)(unsafe.Pointer(p)).FpPrev)).FpNext = (*IncrblobChannel)(unsafe.Pointer(p)).FpNext } if (*SqliteDb)(unsafe.Pointer((*IncrblobChannel)(unsafe.Pointer(p)).FpDb)).FpIncrblob == p { (*SqliteDb)(unsafe.Pointer((*IncrblobChannel)(unsafe.Pointer(p)).FpDb)).FpIncrblob = (*IncrblobChannel)(unsafe.Pointer(p)).FpNext } // Free the IncrblobChannel structure tcl.XTcl_Free(tls, p) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, db), uintptr(1)) return TCL_ERROR } return TCL_OK } // Read data from an incremental blob channel. func incrblobInput(tls *libc.TLS, instanceData ClientData, buf uintptr, bufSize int32, errorCodePtr uintptr) int32 { /* tclsqlite.c:264:26: */ var p uintptr = instanceData var nRead int32 = bufSize // Number of bytes to read var nBlob int32 // Total size of the blob var rc int32 // sqlite error code nBlob = sqlite3.Xsqlite3_blob_bytes(tls, (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob) if ((*IncrblobChannel)(unsafe.Pointer(p)).FiSeek + nRead) > nBlob { nRead = (nBlob - (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek) } if nRead <= 0 { return 0 } rc = sqlite3.Xsqlite3_blob_read(tls, (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob, buf, nRead, (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek) if rc != SQLITE_OK { *(*int32)(unsafe.Pointer(errorCodePtr)) = rc return -1 } *(*int32)(unsafe.Pointer(p + 16 /* &.iSeek */)) += (nRead) return nRead } // Write data to an incremental blob channel. func incrblobOutput(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCodePtr uintptr) int32 { /* tclsqlite.c:296:26: */ var p uintptr = instanceData var nWrite int32 = toWrite // Number of bytes to write var nBlob int32 // Total size of the blob var rc int32 // sqlite error code nBlob = sqlite3.Xsqlite3_blob_bytes(tls, (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob) if ((*IncrblobChannel)(unsafe.Pointer(p)).FiSeek + nWrite) > nBlob { *(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL return -1 } if nWrite <= 0 { return 0 } rc = sqlite3.Xsqlite3_blob_write(tls, (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob, buf, nWrite, (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek) if rc != SQLITE_OK { *(*int32)(unsafe.Pointer(errorCodePtr)) = EIO return -1 } *(*int32)(unsafe.Pointer(p + 16 /* &.iSeek */)) += (nWrite) return nWrite } // Seek an incremental blob channel. func incrblobSeek(tls *libc.TLS, instanceData ClientData, offset int32, seekMode int32, errorCodePtr uintptr) int32 { /* tclsqlite.c:329:26: */ var p uintptr = instanceData switch seekMode { case SEEK_SET: (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek = int32(offset) break case SEEK_CUR: *(*int32)(unsafe.Pointer(p + 16 /* &.iSeek */)) += int32((offset)) break case SEEK_END: (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek = (int32(int32(sqlite3.Xsqlite3_blob_bytes(tls, (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob)) + offset)) break default: } return (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek } func incrblobWatch(tls *libc.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } func incrblobHandle(tls *libc.TLS, instanceData ClientData, dir int32, hPtr uintptr) int32 { /* tclsqlite.c:361:26: */ return TCL_ERROR } var IncrblobChannelType = Tcl_ChannelType{ FtypeName: ts + 10526, /* "incrblob" */ // typeName Fversion: uintptr(0x2), // version FcloseProc: 0, // closeProc FinputProc: 0, // inputProc FoutputProc: 0, // outputProc FseekProc: 0, // getOptionProc FwatchProc: 0, // watchProc (this is a no-op) FgetHandleProc: 0, // wideSeekProc } /* tclsqlite.c:369:24 */ // Create a new incrblob channel. func createIncrblobChannel(tls *libc.TLS, interp uintptr, pDb uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow sqlite_int64, isReadonly int32) int32 { /* tclsqlite.c:390:12: */ bp := tls.Alloc(88) defer tls.Free(88) var p uintptr var db uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).Fdb // var pBlob uintptr at bp+16, 8 var rc int32 var flags int32 = ((int32(1) << 1) | (func() int32 { if isReadonly != 0 { return 0 } return (int32(1) << 2) }())) // var zChannel [64]int8 at bp+24, 64 rc = sqlite3.Xsqlite3_blob_open(tls, db, zDb, zTable, zColumn, iRow, libc.BoolInt32(!(isReadonly != 0)), bp+16 /* &pBlob */) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) return TCL_ERROR } p = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(IncrblobChannel{}))) (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek = 0 (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob = *(*uintptr)(unsafe.Pointer(bp + 16 /* pBlob */)) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+24 /* &zChannel[0] */, ts+10535 /* "incrblob_%d" */, libc.VaList(bp, libc.PreIncInt32(&count, 1))) (*IncrblobChannel)(unsafe.Pointer(p)).Fchannel = tcl.XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&IncrblobChannelType)), bp+24 /* &zChannel[0] */, p, flags) tcl.XTcl_RegisterChannel(tls, interp, (*IncrblobChannel)(unsafe.Pointer(p)).Fchannel) // Link the new channel into the SqliteDb.pIncrblob list. (*IncrblobChannel)(unsafe.Pointer(p)).FpNext = (*SqliteDb)(unsafe.Pointer(pDb)).FpIncrblob (*IncrblobChannel)(unsafe.Pointer(p)).FpPrev = uintptr(0) if (*IncrblobChannel)(unsafe.Pointer(p)).FpNext != 0 { (*IncrblobChannel)(unsafe.Pointer((*IncrblobChannel)(unsafe.Pointer(p)).FpNext)).FpPrev = p } (*SqliteDb)(unsafe.Pointer(pDb)).FpIncrblob = p (*IncrblobChannel)(unsafe.Pointer(p)).FpDb = pDb tcl.XTcl_SetResult(tls, interp, tcl.XTcl_GetChannelName(tls, (*IncrblobChannel)(unsafe.Pointer(p)).Fchannel), uintptr(1)) return TCL_OK } var count int32 = 0 /* tclsqlite.c:406:14 */ // Look at the script prefix in pCmd. We will be executing this script // after first appending one or more arguments. This routine analyzes // the script to see if it is safe to use Tcl_EvalObjv() on the script // rather than the more general Tcl_EvalEx(). Tcl_EvalObjv() is much // faster. // // Scripts that are safe to use with Tcl_EvalObjv() consists of a // command name followed by zero or more arguments with no [...] or $ // or {...} or ; to be seen anywhere. Most callback scripts consist // of just a single procedure name and they meet this requirement. func safeToUseEvalObjv(tls *libc.TLS, interp uintptr, pCmd uintptr) int32 { /* tclsqlite.c:451:12: */ bp := tls.Alloc(4) defer tls.Free(4) // We could try to do something with Tcl_Parse(). But we will instead // just do a search for forbidden characters. If any of the forbidden // characters appear in pCmd, we will report the string as unsafe. var z uintptr // var n int32 at bp, 4 z = tcl.XTcl_GetStringFromObj(tls, pCmd, bp /* &n */) for libc.PostDecInt32(&*(*int32)(unsafe.Pointer(bp /* n */)), 1) > 0 { var c int32 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) if ((c == '$') || (c == '[')) || (c == ';') { return 0 } } return 1 } // Find an SqlFunc structure with the given name. Or create a new // one if an existing one cannot be found. Return a pointer to the // structure. func findSqlFunc(tls *libc.TLS, pDb uintptr, zName uintptr) uintptr { /* tclsqlite.c:471:16: */ var p uintptr var pNew uintptr var nName int32 = strlen30(tls, zName) pNew = tcl.XTcl_Alloc(tls, (uint32((uint64(unsafe.Sizeof(SqlFunc{})) + uint64(nName)) + uint64(1)))) (*SqlFunc)(unsafe.Pointer(pNew)).FzName = (pNew + 1*48) libc.Xmemcpy(tls, (*SqlFunc)(unsafe.Pointer(pNew)).FzName, zName, (uint64(nName + 1))) for p = (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc; p != 0; p = (*SqlFunc)(unsafe.Pointer(p)).FpNext { if sqlite3.Xsqlite3_stricmp(tls, (*SqlFunc)(unsafe.Pointer(p)).FzName, (*SqlFunc)(unsafe.Pointer(pNew)).FzName) == 0 { tcl.XTcl_Free(tls, pNew) return p } } (*SqlFunc)(unsafe.Pointer(pNew)).Finterp = (*SqliteDb)(unsafe.Pointer(pDb)).Finterp (*SqlFunc)(unsafe.Pointer(pNew)).FpDb = pDb (*SqlFunc)(unsafe.Pointer(pNew)).FpScript = uintptr(0) (*SqlFunc)(unsafe.Pointer(pNew)).FpNext = (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc = pNew return pNew } // Free a single SqlPreparedStmt object. func dbFreeStmt(tls *libc.TLS, pStmt uintptr) { /* tclsqlite.c:494:13: */ if sqlite3.Xsqlite3_sql(tls, (*SqlPreparedStmt)(unsafe.Pointer(pStmt)).FpStmt) == uintptr(0) { tcl.XTcl_Free(tls, (*SqlPreparedStmt)(unsafe.Pointer(pStmt)).FzSql) } sqlite3.Xsqlite3_finalize(tls, (*SqlPreparedStmt)(unsafe.Pointer(pStmt)).FpStmt) tcl.XTcl_Free(tls, pStmt) } // Finalize and free a list of prepared statements func flushStmtCache(tls *libc.TLS, pDb uintptr) { /* tclsqlite.c:507:13: */ var pPreStmt uintptr var pNext uintptr for pPreStmt = (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList; pPreStmt != 0; pPreStmt = pNext { pNext = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext dbFreeStmt(tls, pPreStmt) } (*SqliteDb)(unsafe.Pointer(pDb)).FnStmt = 0 (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast = uintptr(0) (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList = uintptr(0) } // TCL calls this procedure when an sqlite3 database command is // deleted. func DbDeleteCmd(tls *libc.TLS, db uintptr) { /* tclsqlite.c:524:27: */ var pDb uintptr = db flushStmtCache(tls, pDb) closeIncrblobChannels(tls, pDb) sqlite3.Xsqlite3_close(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) for (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc != 0 { var pFunc uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc = (*SqlFunc)(unsafe.Pointer(pFunc)).FpNext for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_Free(tls, pFunc) } for (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate != 0 { var pCollate uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate = (*SqlCollate)(unsafe.Pointer(pCollate)).FpNext tcl.XTcl_Free(tls, pCollate) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth) } if (*SqliteDb)(unsafe.Pointer(pDb)).FzNull != 0 { tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull) } if (*SqliteDb)(unsafe.Pointer(pDb)).FpUpdateHook != 0 { for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpUpdateHook if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*SqliteDb)(unsafe.Pointer(pDb)).FpPreUpdateHook != 0 { for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpPreUpdateHook if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*SqliteDb)(unsafe.Pointer(pDb)).FpRollbackHook != 0 { for ok3 := true; ok3; ok3 = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpRollbackHook if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*SqliteDb)(unsafe.Pointer(pDb)).FpWalHook != 0 { for ok4 := true; ok4; ok4 = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpWalHook if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded != 0 { for ok5 := true; ok5; ok5 = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } tcl.XTcl_Free(tls, pDb) } // This routine is called when a database file is locked while trying // to execute SQL. func DbBusyHandler(tls *libc.TLS, cd uintptr, nTries int32) int32 { /* tclsqlite.c:584:12: */ bp := tls.Alloc(86) defer tls.Free(86) var pDb uintptr = cd var rc int32 // var zVal [30]int8 at bp+56, 30 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+56 /* &zVal[0] */, ts+1238 /* "%d" */, libc.VaList(bp, nTries)) rc = tcl.XTcl_VarEval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, libc.VaList(bp+16, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, ts+4765 /* " " */, bp+56 /* &zVal[0] */, uintptr(0))) if (rc != TCL_OK) || (libc.Xatoi(tls, tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp)) != 0) { return 0 } return 1 } // This routine is invoked as the 'progress callback' for the database. func DbProgressHandler(tls *libc.TLS, cd uintptr) int32 { /* tclsqlite.c:601:12: */ var pDb uintptr = cd var rc int32 rc = tcl.XTcl_Eval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress) if (rc != TCL_OK) || (libc.Xatoi(tls, tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp)) != 0) { return 1 } return 0 } // This routine is called by the SQLite trace handler whenever a new // block of SQL is executed. The TCL script in pDb->zTrace is executed. func DbTraceHandler(tls *libc.TLS, cd uintptr, zSql uintptr) { /* tclsqlite.c:620:13: */ bp := tls.Alloc(216) defer tls.Free(216) var pDb uintptr = cd // var str Tcl_DString at bp, 216 tcl.XTcl_DStringInit(tls, bp /* &str */) tcl.XTcl_DStringAppend(tls, bp /* &str */, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, -1) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, zSql) tcl.XTcl_Eval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*Tcl_DString)(unsafe.Pointer(bp /* &str */)).Fstring) tcl.XTcl_DStringFree(tls, bp /* &str */) tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } // This routine is called by the SQLite trace_v2 handler whenever a new // supported event is generated. Unsupported event types are ignored. // The TCL script in pDb->zTraceV2 is executed, with the arguments for // the event appended to it (as list elements). func DbTraceV2Handler(tls *libc.TLS, type1 uint32, cd uintptr, pd uintptr, xd uintptr) int32 { /* tclsqlite.c:640:12: */ var pDb uintptr = cd var pCmd uintptr switch type1 { case uint32(SQLITE_TRACE_STMT): { var pStmt uintptr = pd var zSql uintptr = xd pCmd = tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, -1) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, tcl.XTcl_NewWideIntObj(tls, int64(pStmt))) tcl.XTcl_ListObjAppendElement(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, tcl.XTcl_NewStringObj(tls, zSql, -1)) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) break } case uint32(SQLITE_TRACE_PROFILE): { var pStmt uintptr = pd var ns sqlite3_int64 = *(*sqlite3_int64)(unsafe.Pointer(xd)) pCmd = tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, -1) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, tcl.XTcl_NewWideIntObj(tls, int64(pStmt))) tcl.XTcl_ListObjAppendElement(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, tcl.XTcl_NewWideIntObj(tls, ns)) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) break } case uint32(SQLITE_TRACE_ROW): { var pStmt uintptr = pd pCmd = tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, -1) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, tcl.XTcl_NewWideIntObj(tls, int64(pStmt))) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) break } case uint32(SQLITE_TRACE_CLOSE): { var db uintptr = pd pCmd = tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, -1) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, tcl.XTcl_NewWideIntObj(tls, int64(db))) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok3 := true; ok3; ok3 = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) break } } return SQLITE_OK } // This routine is called by the SQLite profile handler after a statement // SQL has executed. The TCL script in pDb->zProfile is evaluated. func DbProfileHandler(tls *libc.TLS, cd uintptr, zSql uintptr, tm1 sqlite_uint64) { /* tclsqlite.c:715:13: */ bp := tls.Alloc(336) defer tls.Free(336) var pDb uintptr = cd // var str Tcl_DString at bp+120, 216 // var zTm [100]int8 at bp+16, 100 sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([100]int8{})) - uint64(1))), bp+16 /* &zTm[0] */, ts+10547 /* "%lld" */, libc.VaList(bp, tm1)) tcl.XTcl_DStringInit(tls, bp+120 /* &str */) tcl.XTcl_DStringAppend(tls, bp+120 /* &str */, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, -1) tcl.XTcl_DStringAppendElement(tls, bp+120 /* &str */, zSql) tcl.XTcl_DStringAppendElement(tls, bp+120 /* &str */, bp+16 /* &zTm[0] */) tcl.XTcl_Eval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*Tcl_DString)(unsafe.Pointer(bp+120 /* &str */)).Fstring) tcl.XTcl_DStringFree(tls, bp+120 /* &str */) tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } // This routine is called when a transaction is committed. The // TCL script in pDb->zCommit is executed. If it returns non-zero or // if it throws an exception, the transaction is rolled back instead // of being committed. func DbCommitHandler(tls *libc.TLS, cd uintptr) int32 { /* tclsqlite.c:737:12: */ var pDb uintptr = cd var rc int32 rc = tcl.XTcl_Eval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit) if (rc != TCL_OK) || (libc.Xatoi(tls, tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp)) != 0) { return 1 } return 0 } func DbRollbackHandler(tls *libc.TLS, clientData uintptr) { /* tclsqlite.c:748:13: */ var pDb uintptr = clientData if TCL_OK != tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FpRollbackHook, 0) { tcl.XTcl_BackgroundError(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } } // This procedure handles wal_hook callbacks. func DbWalHandler(tls *libc.TLS, clientData uintptr, db uintptr, zDb uintptr, nEntry int32) int32 { /* tclsqlite.c:759:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* ret */)) = SQLITE_OK var p uintptr var pDb uintptr = clientData var interp uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).Finterp p = tcl.XTcl_DuplicateObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FpWalHook) (*Tcl_Obj)(unsafe.Pointer(p)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, p, tcl.XTcl_NewStringObj(tls, zDb, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, p, tcl.XTcl_NewIntObj(tls, nEntry)) if (TCL_OK != tcl.XTcl_EvalObjEx(tls, interp, p, 0)) || (TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, tcl.XTcl_GetObjResult(tls, interp), bp /* &ret */)) { tcl.XTcl_BackgroundError(tls, interp) } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = p if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return *(*int32)(unsafe.Pointer(bp /* ret */)) } func setTestUnlockNotifyVars(tls *libc.TLS, interp uintptr, iArg int32, nArg int32) { /* tclsqlite.c:787:13: */ bp := tls.Alloc(96) defer tls.Free(96) // var zBuf [64]int8 at bp+32, 64 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+32 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp, iArg)) tcl.XTcl_SetVar2(tls, interp, ts+10552 /* "sqlite_unlock_no..." */, uintptr(0), bp+32 /* &zBuf[0] */, TCL_GLOBAL_ONLY) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+32 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+16, nArg)) tcl.XTcl_SetVar2(tls, interp, ts+10577 /* "sqlite_unlock_no..." */, uintptr(0), bp+32 /* &zBuf[0] */, TCL_GLOBAL_ONLY) } func DbUnlockNotify(tls *libc.TLS, apArg uintptr, nArg int32) { /* tclsqlite.c:799:13: */ var i int32 for i = 0; i < nArg; i++ { var flags int32 = (TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT) var pDb uintptr = *(*uintptr)(unsafe.Pointer(apArg + uintptr(i)*8)) setTestUnlockNotifyVars(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, i, nArg) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify, flags) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = uintptr(0) } } // Pre-update hook callback. func DbPreUpdateHandler(tls *libc.TLS, p uintptr, db uintptr, op int32, zDb uintptr, zTbl uintptr, iKey1 sqlite_int64, iKey2 sqlite_int64) { /* tclsqlite.c:817:13: */ var pDb uintptr = p var pCmd uintptr pCmd = tcl.XTcl_DuplicateObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FpPreUpdateHook) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, azStr[((op-1)/9)], -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, zDb, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, zTbl, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewWideIntObj(tls, iKey1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewWideIntObj(tls, iKey2)) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } var azStr = [3]uintptr{ts + 10607 /* "DELETE" */, ts + 10614 /* "INSERT" */, ts + 10621 /* "UPDATE" */} /* tclsqlite.c:828:21 */ func DbUpdateHandler(tls *libc.TLS, p uintptr, op int32, zDb uintptr, zTbl uintptr, rowid sqlite_int64) { /* tclsqlite.c:849:13: */ var pDb uintptr = p var pCmd uintptr pCmd = tcl.XTcl_DuplicateObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FpUpdateHook) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, azStr1[((op-1)/9)], -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, zDb, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, zTbl, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewWideIntObj(tls, rowid)) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } var azStr1 = [3]uintptr{ts + 10607 /* "DELETE" */, ts + 10614 /* "INSERT" */, ts + 10621 /* "UPDATE" */} /* tclsqlite.c:858:21 */ func tclCollateNeeded(tls *libc.TLS, pCtx uintptr, db uintptr, enc int32, zName uintptr) { /* tclsqlite.c:877:13: */ var pDb uintptr = pCtx var pScript uintptr = tcl.XTcl_DuplicateObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, zName, -1)) tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, pScript, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } // This routine is called to evaluate an SQL collation function implemented // using TCL script. func tclSqlCollate(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* tclsqlite.c:895:12: */ var p uintptr = pCtx var pCmd uintptr pCmd = tcl.XTcl_NewStringObj(tls, (*SqlCollate)(unsafe.Pointer(p)).FzScript, -1) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*SqlCollate)(unsafe.Pointer(p)).Finterp, pCmd, tcl.XTcl_NewStringObj(tls, zA, nA)) tcl.XTcl_ListObjAppendElement(tls, (*SqlCollate)(unsafe.Pointer(p)).Finterp, pCmd, tcl.XTcl_NewStringObj(tls, zB, nB)) tcl.XTcl_EvalObjEx(tls, (*SqlCollate)(unsafe.Pointer(p)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return libc.Xatoi(tls, tcl.XTcl_GetStringResult(tls, (*SqlCollate)(unsafe.Pointer(p)).Finterp)) } // This routine is called to evaluate an SQL function implemented // using TCL script. func tclSqlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* tclsqlite.c:918:13: */ bp := tls.Alloc(40) defer tls.Free(40) var p uintptr = sqlite3.Xsqlite3_user_data(tls, context) var pCmd uintptr var i int32 var rc int32 if argc == 0 { // If there are no arguments to the function, call Tcl_EvalObjEx on the // script object directly. This allows the TCL compiler to generate // bytecode for the command on the first invocation and thus make // subsequent invocations much faster. pCmd = (*SqlFunc)(unsafe.Pointer(p)).FpScript (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ rc = tcl.XTcl_EvalObjEx(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp, pCmd, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } else { // If there are arguments to the function, make a shallow copy of the // script object, lappend the arguments, then evaluate the copy. // // By "shallow" copy, we mean only the outer list Tcl_Obj is duplicated. // The new Tcl_Obj contains pointers to the original list elements. // That way, when Tcl_EvalObjv() is run and shimmers the first element // of the list to tclCmdNameType, that alternate representation will // be preserved and reused on the next invocation. // var aArg uintptr at bp+8, 8 // var nArg int32 at bp, 4 if tcl.XTcl_ListObjGetElements(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp, (*SqlFunc)(unsafe.Pointer(p)).FpScript, bp /* &nArg */, bp+8 /* &aArg */) != 0 { sqlite3.Xsqlite3_result_error(tls, context, tcl.XTcl_GetStringResult(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp), -1) return } pCmd = tcl.XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp /* nArg */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* aArg */))) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ for i = 0; i < argc; i++ { var pIn uintptr = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) var pVal uintptr // Set pVal to contain the i'th column of this row. switch sqlite3.Xsqlite3_value_type(tls, pIn) { case SQLITE_BLOB: { var bytes int32 = sqlite3.Xsqlite3_value_bytes(tls, pIn) pVal = tcl.XTcl_NewByteArrayObj(tls, sqlite3.Xsqlite3_value_blob(tls, pIn), bytes) break } fallthrough case SQLITE_INTEGER: { var v sqlite_int64 = sqlite3.Xsqlite3_value_int64(tls, pIn) if (v >= int64(-2147483647)) && (v <= int64(2147483647)) { pVal = tcl.XTcl_NewIntObj(tls, int32(v)) } else { pVal = tcl.XTcl_NewWideIntObj(tls, v) } break } fallthrough case SQLITE_FLOAT: { var r float64 = sqlite3.Xsqlite3_value_double(tls, pIn) pVal = tcl.XTcl_NewDoubleObj(tls, r) break } fallthrough case SQLITE_NULL: { pVal = tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer((*SqlFunc)(unsafe.Pointer(p)).FpDb)).FzNull, -1) break } fallthrough default: { var bytes int32 = sqlite3.Xsqlite3_value_bytes(tls, pIn) pVal = tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, pIn), bytes) break } } rc = tcl.XTcl_ListObjAppendElement(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp, pCmd, pVal) if rc != 0 { for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } sqlite3.Xsqlite3_result_error(tls, context, tcl.XTcl_GetStringResult(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp), -1) return } } if !((*SqlFunc)(unsafe.Pointer(p)).FuseEvalObjv != 0) { // Tcl_EvalObjEx() will automatically call Tcl_EvalObjv() if pCmd // is a list without a string representation. To prevent this from // happening, make sure pCmd has a valid string representation tcl.XTcl_GetString(tls, pCmd) } rc = tcl.XTcl_EvalObjEx(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp, pCmd, TCL_EVAL_DIRECT) for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (rc != 0) && (rc != TCL_RETURN) { sqlite3.Xsqlite3_result_error(tls, context, tcl.XTcl_GetStringResult(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp), -1) } else { var pVar uintptr = tcl.XTcl_GetObjResult(tls, (*SqlFunc)(unsafe.Pointer(p)).Finterp) // var n int32 at bp+16, 4 var data uintptr var zType uintptr = func() uintptr { if (*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr != 0 { return (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr)).Fname } return ts + 489 /* "" */ }() var c int8 = *(*int8)(unsafe.Pointer(zType)) var eType int32 = (*SqlFunc)(unsafe.Pointer(p)).FeType if eType == SQLITE_NULL { if ((int32(c) == 'b') && (libc.Xstrcmp(tls, zType, ts+2405 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0)) { // Only return a BLOB type if the Tcl variable is a bytearray and // has no string representation. eType = SQLITE_BLOB } else if (((int32(c) == 'b') && (libc.Xstrcmp(tls, zType, ts+2415 /* "boolean" */) == 0)) || ((int32(c) == 'w') && (libc.Xstrcmp(tls, zType, ts+2430 /* "wideInt" */) == 0))) || ((int32(c) == 'i') && (libc.Xstrcmp(tls, zType, ts+2438 /* "int" */) == 0)) { eType = SQLITE_INTEGER } else if (int32(c) == 'd') && (libc.Xstrcmp(tls, zType, ts+2423 /* "double" */) == 0) { eType = SQLITE_FLOAT } else { eType = SQLITE_TEXT } } switch eType { case SQLITE_BLOB: { data = tcl.XTcl_GetByteArrayFromObj(tls, pVar, bp+16 /* &n */) sqlite3.Xsqlite3_result_blob(tls, context, data, *(*int32)(unsafe.Pointer(bp + 16 /* n */)), libc.UintptrFromInt32(-1)) break } fallthrough case SQLITE_INTEGER: { // var v Tcl_WideInt at bp+24, 8 if TCL_OK == tcl.XTcl_GetWideIntFromObj(tls, uintptr(0), pVar, bp+24 /* &v */) { sqlite3.Xsqlite3_result_int64(tls, context, *(*Tcl_WideInt)(unsafe.Pointer(bp + 24 /* v */))) break } // fall-through } fallthrough case SQLITE_FLOAT: { // var r float64 at bp+32, 8 if TCL_OK == tcl.XTcl_GetDoubleFromObj(tls, uintptr(0), pVar, bp+32 /* &r */) { sqlite3.Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 32 /* r */))) break } // fall-through } fallthrough default: { data = tcl.XTcl_GetStringFromObj(tls, pVar, bp+16 /* &n */) sqlite3.Xsqlite3_result_text(tls, context, data, *(*int32)(unsafe.Pointer(bp + 16 /* n */)), libc.UintptrFromInt32(-1)) break } } } } // This is the authentication function. It appends the authentication // type code and the two arguments to zCmd[] then invokes the result // on the interpreter. The reply is examined to determine if the // authentication fails or succeeds. func auth_callback(tls *libc.TLS, pArg uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr, zArg4 uintptr) int32 { /* tclsqlite.c:1069:12: */ bp := tls.Alloc(216) defer tls.Free(216) var zCode uintptr // var str Tcl_DString at bp, 216 var rc int32 var zReply uintptr // EVIDENCE-OF: R-38590-62769 The first parameter to the authorizer // callback is a copy of the third parameter to the // sqlite3_set_authorizer() interface. var pDb uintptr = pArg if (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth != 0 { return SQLITE_OK } // EVIDENCE-OF: R-56518-44310 The second parameter to the callback is an // integer action code that specifies the particular action to be // authorized. switch code { case SQLITE_COPY: zCode = ts + 10628 /* "SQLITE_COPY" */ break case SQLITE_CREATE_INDEX: zCode = ts + 10640 /* "SQLITE_CREATE_IN..." */ break case SQLITE_CREATE_TABLE: zCode = ts + 10660 /* "SQLITE_CREATE_TA..." */ break case SQLITE_CREATE_TEMP_INDEX: zCode = ts + 10680 /* "SQLITE_CREATE_TE..." */ break case SQLITE_CREATE_TEMP_TABLE: zCode = ts + 10705 /* "SQLITE_CREATE_TE..." */ break case SQLITE_CREATE_TEMP_TRIGGER: zCode = ts + 10730 /* "SQLITE_CREATE_TE..." */ break case SQLITE_CREATE_TEMP_VIEW: zCode = ts + 10757 /* "SQLITE_CREATE_TE..." */ break case SQLITE_CREATE_TRIGGER: zCode = ts + 10781 /* "SQLITE_CREATE_TR..." */ break case SQLITE_CREATE_VIEW: zCode = ts + 10803 /* "SQLITE_CREATE_VI..." */ break case SQLITE_DELETE: zCode = ts + 10822 /* "SQLITE_DELETE" */ break case SQLITE_DROP_INDEX: zCode = ts + 10836 /* "SQLITE_DROP_INDE..." */ break case SQLITE_DROP_TABLE: zCode = ts + 10854 /* "SQLITE_DROP_TABL..." */ break case SQLITE_DROP_TEMP_INDEX: zCode = ts + 10872 /* "SQLITE_DROP_TEMP..." */ break case SQLITE_DROP_TEMP_TABLE: zCode = ts + 10895 /* "SQLITE_DROP_TEMP..." */ break case SQLITE_DROP_TEMP_TRIGGER: zCode = ts + 10918 /* "SQLITE_DROP_TEMP..." */ break case SQLITE_DROP_TEMP_VIEW: zCode = ts + 10943 /* "SQLITE_DROP_TEMP..." */ break case SQLITE_DROP_TRIGGER: zCode = ts + 10965 /* "SQLITE_DROP_TRIG..." */ break case SQLITE_DROP_VIEW: zCode = ts + 10985 /* "SQLITE_DROP_VIEW" */ break case SQLITE_INSERT: zCode = ts + 11002 /* "SQLITE_INSERT" */ break case SQLITE_PRAGMA: zCode = ts + 11016 /* "SQLITE_PRAGMA" */ break case SQLITE_READ: zCode = ts + 11030 /* "SQLITE_READ" */ break case SQLITE_SELECT: zCode = ts + 11042 /* "SQLITE_SELECT" */ break case SQLITE_TRANSACTION: zCode = ts + 11056 /* "SQLITE_TRANSACTI..." */ break case SQLITE_UPDATE: zCode = ts + 11075 /* "SQLITE_UPDATE" */ break case SQLITE_ATTACH: zCode = ts + 11089 /* "SQLITE_ATTACH" */ break case SQLITE_DETACH: zCode = ts + 11103 /* "SQLITE_DETACH" */ break case SQLITE_ALTER_TABLE: zCode = ts + 11117 /* "SQLITE_ALTER_TAB..." */ break case SQLITE_REINDEX: zCode = ts + 11136 /* "SQLITE_REINDEX" */ break case SQLITE_ANALYZE: zCode = ts + 11151 /* "SQLITE_ANALYZE" */ break case SQLITE_CREATE_VTABLE: zCode = ts + 11166 /* "SQLITE_CREATE_VT..." */ break case SQLITE_DROP_VTABLE: zCode = ts + 11187 /* "SQLITE_DROP_VTAB..." */ break case SQLITE_FUNCTION: zCode = ts + 11206 /* "SQLITE_FUNCTION" */ break case SQLITE_SAVEPOINT: zCode = ts + 11222 /* "SQLITE_SAVEPOINT" */ break case SQLITE_RECURSIVE: zCode = ts + 11239 /* "SQLITE_RECURSIVE" */ break default: zCode = ts + 11256 /* "????" */ break } tcl.XTcl_DStringInit(tls, bp /* &str */) tcl.XTcl_DStringAppend(tls, bp /* &str */, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, -1) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, zCode) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg1 != 0 { return zArg1 } return ts + 489 /* "" */ }()) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg2 != 0 { return zArg2 } return ts + 489 /* "" */ }()) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg3 != 0 { return zArg3 } return ts + 489 /* "" */ }()) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg4 != 0 { return zArg4 } return ts + 489 /* "" */ }()) rc = tcl.XTcl_GlobalEval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*Tcl_DString)(unsafe.Pointer(bp /* &str */)).Fstring) tcl.XTcl_DStringFree(tls, bp /* &str */) if rc == TCL_OK { zReply = tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } else { zReply = ts + 11261 /* "SQLITE_DENY" */ } if libc.Xstrcmp(tls, zReply, ts+1988 /* "SQLITE_OK" */) == 0 { rc = SQLITE_OK } else if libc.Xstrcmp(tls, zReply, ts+11261 /* "SQLITE_DENY" */) == 0 { rc = SQLITE_DENY } else if libc.Xstrcmp(tls, zReply, ts+11273 /* "SQLITE_IGNORE" */) == 0 { rc = SQLITE_IGNORE } else { rc = 999 } return rc } // This routine reads a line of text from FILE in, stores // the text in memory obtained from malloc() and returns a pointer // to the text. NULL is returned at end of file, or if malloc() // fails. // // The interface is like "readline" but no command-line editing // is done. // // copied from shell.c from '.import' command func local_getline(tls *libc.TLS, zPrompt uintptr, in uintptr) uintptr { /* tclsqlite.c:1168:13: */ var zLine uintptr var nLine int32 var n int32 nLine = 100 zLine = libc.Xmalloc(tls, uint64(nLine)) if zLine == uintptr(0) { return uintptr(0) } n = 0 for 1 != 0 { if (n + 100) > nLine { nLine = ((nLine * 2) + 100) zLine = libc.Xrealloc(tls, zLine, uint64(nLine)) if zLine == uintptr(0) { return uintptr(0) } } if libc.Xfgets(tls, (zLine+uintptr(n)), (nLine-n), in) == uintptr(0) { if n == 0 { libc.Xfree(tls, zLine) return uintptr(0) } *(*int8)(unsafe.Pointer(zLine + uintptr(n))) = int8(0) break } for *(*int8)(unsafe.Pointer(zLine + uintptr(n))) != 0 { n++ } if (n > 0) && (int32(*(*int8)(unsafe.Pointer(zLine + uintptr((n - 1))))) == '\n') { n-- *(*int8)(unsafe.Pointer(zLine + uintptr(n))) = int8(0) break } } zLine = libc.Xrealloc(tls, zLine, (uint64(n + 1))) return zLine } // This function is part of the implementation of the command: // // $db transaction [-deferred|-immediate|-exclusive] SCRIPT // // It is invoked after evaluating the script SCRIPT to commit or rollback // the transaction or savepoint opened by the [transaction] command. func DbTransPostCmd(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclsqlite.c:1211:26: */ bp := tls.Alloc(24) defer tls.Free(24) var pDb uintptr = *(*ClientData)(unsafe.Pointer(data)) var rc int32 = result var zEnd uintptr (*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction-- zEnd = azEnd[(((libc.Bool32(rc == TCL_ERROR)) * 2) + (libc.Bool32((*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction == 0)))] (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth++ if sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zEnd, uintptr(0), uintptr(0), uintptr(0)) != 0 { // This is a tricky scenario to handle. The most likely cause of an // error is that the exec() above was an attempt to commit the // top-level transaction that returned SQLITE_BUSY. Or, less likely, // that an IO-error has occurred. In either case, throw a Tcl exception // and try to rollback the transaction. // // But it could also be that the user executed one or more BEGIN, // COMMIT, SAVEPOINT, RELEASE or ROLLBACK commands that are confusing // this method's logic. Not clear how this would be best handled. if rc != TCL_ERROR { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) rc = TCL_ERROR } sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, ts+7272 /* "ROLLBACK" */, uintptr(0), uintptr(0), uintptr(0)) } (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth-- return rc } var azEnd = [4]uintptr{ ts + 11287, /* "RELEASE _tcl_tra..." */ // rc==TCL_ERROR, nTransaction!=0 ts + 11312, /* "COMMIT" */ // rc!=TCL_ERROR, nTransaction==0 ts + 11319, /* "ROLLBACK TO _tcl..." */ ts + 7272, /* "ROLLBACK" */ // rc==TCL_ERROR, nTransaction==0 } /* tclsqlite.c:1216:21 */ // Unless SQLITE_TEST is defined, this function is a simple wrapper around // sqlite3_prepare_v2(). If SQLITE_TEST is defined, then it uses either // sqlite3_prepare_v2() or legacy interface sqlite3_prepare(), depending // on whether or not the [db_use_legacy_prepare] command has been used to // configure the connection. func dbPrepare(tls *libc.TLS, pDb uintptr, zSql uintptr, ppStmt uintptr, pzOut uintptr) int32 { /* tclsqlite.c:1259:12: */ var prepFlags uint32 = uint32(0) if (*SqliteDb)(unsafe.Pointer(pDb)).FbLegacyPrepare != 0 { return sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, ppStmt, pzOut) } // If the statement cache is large, use the SQLITE_PREPARE_PERSISTENT // flags, which uses less lookaside memory. But if the cache is small, // omit that flag to make full use of lookaside if (*SqliteDb)(unsafe.Pointer(pDb)).FmaxStmt > 5 { prepFlags = uint32(SQLITE_PREPARE_PERSISTENT) } return sqlite3.Xsqlite3_prepare_v3(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, prepFlags, ppStmt, pzOut) } // Search the cache for a prepared-statement object that implements the // first SQL statement in the buffer pointed to by parameter zIn. If // no such prepared-statement can be found, allocate and prepare a new // one. In either case, bind the current values of the relevant Tcl // variables to any $var, :var or @var variables in the statement. Before // returning, set *ppPreStmt to point to the prepared-statement object. // // Output parameter *pzOut is set to point to the next SQL statement in // buffer zIn, or to the '\0' byte at the end of zIn if there is no // next statement. // // If successful, TCL_OK is returned. Otherwise, TCL_ERROR is returned // and an error message loaded into interpreter pDb->interp. func dbPrepareAndBind(tls *libc.TLS, pDb uintptr, zIn uintptr, pzOut uintptr, ppPreStmt uintptr) int32 { /* tclsqlite.c:1294:12: */ bp := tls.Alloc(32) defer tls.Free(32) var zSql uintptr = zIn // Pointer to first SQL statement in zIn *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) // Prepared statement object var pPreStmt uintptr // Pointer to cached statement var nSql int32 // Length of zSql in bytes var nVar int32 = 0 // Number of variables in statement var iParm int32 = 0 // Next free entry in apParm var c int8 var i int32 var needResultReset int32 = 0 // Need to invoke Tcl_ResetResult() var rc int32 = SQLITE_OK // Value to return var interp uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).Finterp *(*uintptr)(unsafe.Pointer(ppPreStmt)) = uintptr(0) // Trim spaces from the start of zSql and calculate the remaining length. for ((((int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(zSql))))) == ' ') || (int32(c) == '\t')) || (int32(c) == '\r')) || (int32(c) == '\n') { zSql++ } nSql = strlen30(tls, zSql) for pPreStmt = (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList; pPreStmt != 0; pPreStmt = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext { var n int32 = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql if ((nSql >= n) && (libc.Xmemcmp(tls, (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql, zSql, uint64(n)) == 0)) && ((int32(*(*int8)(unsafe.Pointer(zSql + uintptr(n)))) == 0) || (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((n - 1))))) == ';')) { *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpStmt *(*uintptr)(unsafe.Pointer(pzOut)) = (zSql + uintptr((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql)) // When a prepared statement is found, unlink it from the // cache list. It will later be added back to the beginning // of the cache list in order to implement LRU replacement. if (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpPrev != 0 { (*SqlPreparedStmt)(unsafe.Pointer((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpPrev)).FpNext = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext } else { (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext } if (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext != 0 { (*SqlPreparedStmt)(unsafe.Pointer((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext)).FpPrev = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpPrev } else { (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpPrev } (*SqliteDb)(unsafe.Pointer(pDb)).FnStmt-- nVar = sqlite3.Xsqlite3_bind_parameter_count(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) break } } // If no prepared statement was found. Compile the SQL text. Also allocate // a new SqlPreparedStmt structure. if pPreStmt == uintptr(0) { var nByte int32 if SQLITE_OK != dbPrepare(tls, pDb, zSql, bp /* &pStmt */, pzOut) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), -1)) return TCL_ERROR } if *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) == uintptr(0) { if SQLITE_OK != sqlite3.Xsqlite3_errcode(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) { // A compile-time error in the statement. tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), -1)) return TCL_ERROR } else { // The statement was a no-op. Continue to the next statement // in the SQL string. return TCL_OK } } nVar = sqlite3.Xsqlite3_bind_parameter_count(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) nByte = (int32(uint64(unsafe.Sizeof(SqlPreparedStmt{})) + (uint64(nVar) * uint64(unsafe.Sizeof(uintptr(0)))))) pPreStmt = tcl.XTcl_Alloc(tls, uint32(nByte)) libc.Xmemset(tls, pPreStmt, 0, uint64(nByte)) (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpStmt = *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql = (int32((int64(*(*uintptr)(unsafe.Pointer(pzOut))) - int64(zSql)) / 1)) (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql = sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FapParm = (pPreStmt + 1*56) if (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql == uintptr(0) { var zCopy uintptr = tcl.XTcl_Alloc(tls, (uint32((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql + 1))) libc.Xmemcpy(tls, zCopy, zSql, uint64((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql)) *(*int8)(unsafe.Pointer(zCopy + uintptr((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql))) = int8(0) (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql = zCopy } } // Bind values to parameters that begin with $ or : for i = 1; i <= nVar; i++ { var zVar uintptr = sqlite3.Xsqlite3_bind_parameter_name(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i) if (zVar != uintptr(0)) && (((int32(*(*int8)(unsafe.Pointer(zVar))) == '$') || (int32(*(*int8)(unsafe.Pointer(zVar))) == ':')) || (int32(*(*int8)(unsafe.Pointer(zVar))) == '@')) { var pVar uintptr = tcl.XTcl_GetVar2Ex(tls, interp, (zVar + 1), uintptr(0), 0) if (pVar == uintptr(0)) && ((*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != uintptr(0)) { var pCmd uintptr var rx int32 pCmd = tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, -1) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pCmd, tcl.XTcl_NewStringObj(tls, zVar, -1)) if needResultReset != 0 { tcl.XTcl_ResetResult(tls, interp) } needResultReset = 1 rx = tcl.XTcl_EvalObjEx(tls, interp, pCmd, TCL_EVAL_DIRECT) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if rx == TCL_OK { pVar = tcl.XTcl_GetObjResult(tls, interp) } else if rx == TCL_ERROR { rc = TCL_ERROR break } else { pVar = uintptr(0) } } if pVar != 0 { // var n int32 at bp+8, 4 var data uintptr var zType uintptr = func() uintptr { if (*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr != 0 { return (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr)).Fname } return ts + 489 /* "" */ }() c = *(*int8)(unsafe.Pointer(zType)) if (int32(*(*int8)(unsafe.Pointer(zVar))) == '@') || (((int32(c) == 'b') && (libc.Xstrcmp(tls, zType, ts+2405 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0))) { // Load a BLOB type if the Tcl variable is a bytearray and // it has no string representation or the host // parameter name begins with "@". data = tcl.XTcl_GetByteArrayFromObj(tls, pVar, bp+8 /* &n */) sqlite3.Xsqlite3_bind_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, data, *(*int32)(unsafe.Pointer(bp + 8 /* n */)), uintptr(0)) (*Tcl_Obj)(unsafe.Pointer(pVar)).FrefCount++ *(*uintptr)(unsafe.Pointer((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FapParm + uintptr(libc.PostIncInt32(&iParm, 1))*8)) = pVar } else if (int32(c) == 'b') && (libc.Xstrcmp(tls, zType, ts+2415 /* "boolean" */) == 0) { tcl.XTcl_GetIntFromObj(tls, interp, pVar, bp+8 /* &n */) sqlite3.Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, *(*int32)(unsafe.Pointer(bp + 8 /* n */))) } else if (int32(c) == 'd') && (libc.Xstrcmp(tls, zType, ts+2423 /* "double" */) == 0) { // var r float64 at bp+16, 8 tcl.XTcl_GetDoubleFromObj(tls, interp, pVar, bp+16 /* &r */) sqlite3.Xsqlite3_bind_double(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, *(*float64)(unsafe.Pointer(bp + 16 /* r */))) } else if ((int32(c) == 'w') && (libc.Xstrcmp(tls, zType, ts+2430 /* "wideInt" */) == 0)) || ((int32(c) == 'i') && (libc.Xstrcmp(tls, zType, ts+2438 /* "int" */) == 0)) { // var v Tcl_WideInt at bp+24, 8 tcl.XTcl_GetWideIntFromObj(tls, interp, pVar, bp+24 /* &v */) sqlite3.Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, *(*Tcl_WideInt)(unsafe.Pointer(bp + 24 /* v */))) } else { data = tcl.XTcl_GetStringFromObj(tls, pVar, bp+8 /* &n */) sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, data, *(*int32)(unsafe.Pointer(bp + 8 /* n */)), uintptr(0)) (*Tcl_Obj)(unsafe.Pointer(pVar)).FrefCount++ *(*uintptr)(unsafe.Pointer((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FapParm + uintptr(libc.PostIncInt32(&iParm, 1))*8)) = pVar } } else { sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i) } if needResultReset != 0 { tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } } } (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnParm = iParm *(*uintptr)(unsafe.Pointer(ppPreStmt)) = pPreStmt if (needResultReset != 0) && (rc == TCL_OK) { tcl.XTcl_ResetResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } return rc } // Release a statement reference obtained by calling dbPrepareAndBind(). // There should be exactly one call to this function for each call to // dbPrepareAndBind(). // // If the discard parameter is non-zero, then the statement is deleted // immediately. Otherwise it is added to the LRU list and may be returned // by a subsequent call to dbPrepareAndBind(). func dbReleaseStmt(tls *libc.TLS, pDb uintptr, pPreStmt uintptr, discard int32) { /* tclsqlite.c:1470:13: */ var i int32 // Free the bound string and blob parameters for i = 0; i < (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnParm; i++ { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = *(*uintptr)(unsafe.Pointer((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FapParm + uintptr(i)*8)) if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnParm = 0 if ((*SqliteDb)(unsafe.Pointer(pDb)).FmaxStmt <= 0) || (discard != 0) { // If the cache is turned off, deallocated the statement dbFreeStmt(tls, pPreStmt) } else { // Add the prepared statement to the beginning of the cache list. (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpNext = (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpPrev = uintptr(0) if (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList != 0 { (*SqlPreparedStmt)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FstmtList)).FpPrev = pPreStmt } (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList = pPreStmt if (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast == uintptr(0) { (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast = pPreStmt } else { } (*SqliteDb)(unsafe.Pointer(pDb)).FnStmt++ // If we have too many statement in cache, remove the surplus from // the end of the cache list. for (*SqliteDb)(unsafe.Pointer(pDb)).FnStmt > (*SqliteDb)(unsafe.Pointer(pDb)).FmaxStmt { var pLast uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast = (*SqlPreparedStmt)(unsafe.Pointer(pLast)).FpPrev (*SqlPreparedStmt)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast)).FpNext = uintptr(0) (*SqliteDb)(unsafe.Pointer(pDb)).FnStmt-- dbFreeStmt(tls, pLast) } } } // Structure used with dbEvalXXX() functions: // // dbEvalInit() // dbEvalStep() // dbEvalFinalize() // dbEvalRowInfo() // dbEvalColumnValue() type DbEvalContext1 = struct { FpDb uintptr FpSql uintptr FzSql uintptr FpPreStmt uintptr FnCol int32 FevalFlags int32 FpArray uintptr FapColName uintptr } /* tclsqlite.c:1523:9 */ // Structure used with dbEvalXXX() functions: // // dbEvalInit() // dbEvalStep() // dbEvalFinalize() // dbEvalRowInfo() // dbEvalColumnValue() type DbEvalContext = DbEvalContext1 /* tclsqlite.c:1523:30 */ // Release any cache of column names currently held as part of // the DbEvalContext structure passed as the first argument. func dbReleaseColumnNames(tls *libc.TLS, p uintptr) { /* tclsqlite.c:1541:13: */ if (*DbEvalContext)(unsafe.Pointer(p)).FapColName != 0 { var i int32 for i = 0; i < (*DbEvalContext)(unsafe.Pointer(p)).FnCol; i++ { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = *(*uintptr)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FapColName + uintptr(i)*8)) if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } tcl.XTcl_Free(tls, (*DbEvalContext)(unsafe.Pointer(p)).FapColName) (*DbEvalContext)(unsafe.Pointer(p)).FapColName = uintptr(0) } (*DbEvalContext)(unsafe.Pointer(p)).FnCol = 0 } // Initialize a DbEvalContext structure. // // If pArray is not NULL, then it contains the name of a Tcl array // variable. The "*" member of this array is set to a list containing // the names of the columns returned by the statement as part of each // call to dbEvalStep(), in order from left to right. e.g. if the names // of the returned columns are a, b and c, it does the equivalent of the // tcl command: // // set ${pArray}(*) {a b c} func dbEvalInit(tls *libc.TLS, p uintptr, pDb uintptr, pSql uintptr, pArray uintptr, evalFlags int32) { /* tclsqlite.c:1565:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DbEvalContext{}))) (*DbEvalContext)(unsafe.Pointer(p)).FpDb = pDb (*DbEvalContext)(unsafe.Pointer(p)).FzSql = tcl.XTcl_GetString(tls, pSql) (*DbEvalContext)(unsafe.Pointer(p)).FpSql = pSql (*Tcl_Obj)(unsafe.Pointer(pSql)).FrefCount++ if pArray != 0 { (*DbEvalContext)(unsafe.Pointer(p)).FpArray = pArray (*Tcl_Obj)(unsafe.Pointer(pArray)).FrefCount++ } (*DbEvalContext)(unsafe.Pointer(p)).FevalFlags = evalFlags } // Obtain information about the row that the DbEvalContext passed as the // first argument currently points to. func dbEvalRowInfo(tls *libc.TLS, p uintptr, pnCol uintptr, papColName uintptr) { /* tclsqlite.c:1588:13: */ // Compute column names if uintptr(0) == (*DbEvalContext)(unsafe.Pointer(p)).FapColName { var pStmt uintptr = (*SqlPreparedStmt)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt)).FpStmt var i int32 // Iterator variable var nCol int32 // Number of columns returned by pStmt var apColName uintptr = uintptr(0) // Array of column names (*DbEvalContext)(unsafe.Pointer(p)).FnCol = libc.AssignInt32(&nCol, sqlite3.Xsqlite3_column_count(tls, pStmt)) if (nCol > 0) && ((papColName != 0) || ((*DbEvalContext)(unsafe.Pointer(p)).FpArray != 0)) { apColName = tcl.XTcl_Alloc(tls, (uint32(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nCol)))) for i = 0; i < nCol; i++ { *(*uintptr)(unsafe.Pointer(apColName + uintptr(i)*8)) = tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_column_name(tls, pStmt, i), -1) (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apColName + uintptr(i)*8)))).FrefCount++ } (*DbEvalContext)(unsafe.Pointer(p)).FapColName = apColName } // If results are being stored in an array variable, then create // the array(*) entry for that array if (*DbEvalContext)(unsafe.Pointer(p)).FpArray != 0 { var interp uintptr = (*SqliteDb)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpDb)).Finterp var pColList uintptr = tcl.XTcl_NewObj(tls) var pStar uintptr = tcl.XTcl_NewStringObj(tls, ts+3711 /* "*" */, -1) for i = 0; i < nCol; i++ { tcl.XTcl_ListObjAppendElement(tls, interp, pColList, *(*uintptr)(unsafe.Pointer(apColName + uintptr(i)*8))) } (*Tcl_Obj)(unsafe.Pointer(pStar)).FrefCount++ tcl.XTcl_ObjSetVar2(tls, interp, (*DbEvalContext)(unsafe.Pointer(p)).FpArray, pStar, pColList, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pStar if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } } if papColName != 0 { *(*uintptr)(unsafe.Pointer(papColName)) = (*DbEvalContext)(unsafe.Pointer(p)).FapColName } if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*DbEvalContext)(unsafe.Pointer(p)).FnCol } } // Return one of TCL_OK, TCL_BREAK or TCL_ERROR. If TCL_ERROR is // returned, then an error message is stored in the interpreter before // returning. // // A return value of TCL_OK means there is a row of data available. The // data may be accessed using dbEvalRowInfo() and dbEvalColumnValue(). This // is analogous to a return of SQLITE_ROW from sqlite3_step(). If TCL_BREAK // is returned, then the SQL script has finished executing and there are // no further rows available. This is similar to SQLITE_DONE. func dbEvalStep(tls *libc.TLS, p uintptr) int32 { /* tclsqlite.c:1646:12: */ var zPrevSql uintptr = uintptr(0) // Previous value of p->zSql for (*(*int8)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FzSql)) != 0) || ((*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt != 0) { var rc int32 if (*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt == uintptr(0) { zPrevSql = func() uintptr { if (*DbEvalContext)(unsafe.Pointer(p)).FzSql == zPrevSql { return uintptr(0) } return (*DbEvalContext)(unsafe.Pointer(p)).FzSql }() rc = dbPrepareAndBind(tls, (*DbEvalContext)(unsafe.Pointer(p)).FpDb, (*DbEvalContext)(unsafe.Pointer(p)).FzSql, (p + 16 /* &.zSql */), (p + 24 /* &.pPreStmt */)) if rc != TCL_OK { return rc } } else { var rcs int32 var pDb uintptr = (*DbEvalContext)(unsafe.Pointer(p)).FpDb var pPreStmt uintptr = (*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt var pStmt uintptr = (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FpStmt rcs = sqlite3.Xsqlite3_step(tls, pStmt) if rcs == SQLITE_ROW { return TCL_OK } if (*DbEvalContext)(unsafe.Pointer(p)).FpArray != 0 { dbEvalRowInfo(tls, p, uintptr(0), uintptr(0)) } rcs = sqlite3.Xsqlite3_reset(tls, pStmt) (*SqliteDb)(unsafe.Pointer(pDb)).FnStep = sqlite3.Xsqlite3_stmt_status(tls, pStmt, SQLITE_STMTSTATUS_FULLSCAN_STEP, 1) (*SqliteDb)(unsafe.Pointer(pDb)).FnSort = sqlite3.Xsqlite3_stmt_status(tls, pStmt, SQLITE_STMTSTATUS_SORT, 1) (*SqliteDb)(unsafe.Pointer(pDb)).FnIndex = sqlite3.Xsqlite3_stmt_status(tls, pStmt, SQLITE_STMTSTATUS_AUTOINDEX, 1) (*SqliteDb)(unsafe.Pointer(pDb)).FnVMStep = sqlite3.Xsqlite3_stmt_status(tls, pStmt, SQLITE_STMTSTATUS_VM_STEP, 1) dbReleaseColumnNames(tls, p) (*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt = uintptr(0) if rcs != SQLITE_OK { // If a run-time error occurs, report the error and stop reading // the SQL. dbReleaseStmt(tls, pDb, pPreStmt, 1) if (((*SqliteDb)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpDb)).FbLegacyPrepare != 0) && (rcs == SQLITE_SCHEMA)) && (zPrevSql != 0) { // If the runtime error was an SQLITE_SCHEMA, and the database // handle is configured to use the legacy sqlite3_prepare() // interface, retry prepare()/step() on the same SQL statement. // This only happens once. If there is a second SQLITE_SCHEMA // error, the error will be returned to the caller. (*DbEvalContext)(unsafe.Pointer(p)).FzSql = zPrevSql continue } tcl.XTcl_SetObjResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), -1)) return TCL_ERROR } else { dbReleaseStmt(tls, pDb, pPreStmt, 0) } } } // Finished return TCL_BREAK } // Free all resources currently held by the DbEvalContext structure passed // as the first argument. There should be exactly one call to this function // for each call to dbEvalInit(). func dbEvalFinalize(tls *libc.TLS, p uintptr) { /* tclsqlite.c:1710:13: */ if (*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt != 0 { sqlite3.Xsqlite3_reset(tls, (*SqlPreparedStmt)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt)).FpStmt) dbReleaseStmt(tls, (*DbEvalContext)(unsafe.Pointer(p)).FpDb, (*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt, 0) (*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt = uintptr(0) } if (*DbEvalContext)(unsafe.Pointer(p)).FpArray != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*DbEvalContext)(unsafe.Pointer(p)).FpArray if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*DbEvalContext)(unsafe.Pointer(p)).FpArray = uintptr(0) } for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*DbEvalContext)(unsafe.Pointer(p)).FpSql if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } dbReleaseColumnNames(tls, p) } // Return a pointer to a Tcl_Obj structure with ref-count 0 that contains // the value for the iCol'th column of the row currently pointed to by // the DbEvalContext structure passed as the first argument. func dbEvalColumnValue(tls *libc.TLS, p uintptr, iCol int32) uintptr { /* tclsqlite.c:1729:16: */ var pStmt uintptr = (*SqlPreparedStmt)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt)).FpStmt switch sqlite3.Xsqlite3_column_type(tls, pStmt, iCol) { case SQLITE_BLOB: { var bytes int32 = sqlite3.Xsqlite3_column_bytes(tls, pStmt, iCol) var zBlob uintptr = sqlite3.Xsqlite3_column_blob(tls, pStmt, iCol) if !(zBlob != 0) { bytes = 0 } return tcl.XTcl_NewByteArrayObj(tls, zBlob, bytes) } case SQLITE_INTEGER: { var v sqlite_int64 = sqlite3.Xsqlite3_column_int64(tls, pStmt, iCol) if (v >= int64(-2147483647)) && (v <= int64(2147483647)) { return tcl.XTcl_NewIntObj(tls, int32(v)) } else { return tcl.XTcl_NewWideIntObj(tls, v) } } fallthrough case SQLITE_FLOAT: { return tcl.XTcl_NewDoubleObj(tls, sqlite3.Xsqlite3_column_double(tls, pStmt, iCol)) } case SQLITE_NULL: { return tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpDb)).FzNull, -1) } } return tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_column_text(tls, pStmt, iCol), -1) } // If using Tcl version 8.6 or greater, use the NR functions to avoid // recursive evalution of scripts by the [db eval] and [db trans] // commands. Even if the headers used while compiling the extension // are 8.6 or newer, the code still tests the Tcl version at runtime. // This allows stubs-enabled builds to be used with older Tcl libraries. func DbUseNre(tls *libc.TLS) int32 { /* tclsqlite.c:1766:12: */ bp := tls.Alloc(8) defer tls.Free(8) // var major int32 at bp, 4 // var minor int32 at bp+4, 4 tcl.XTcl_GetVersion(tls, bp /* &major */, bp+4 /* &minor */, uintptr(0), uintptr(0)) return (libc.Bool32(((*(*int32)(unsafe.Pointer(bp /* major */)) == 8) && (*(*int32)(unsafe.Pointer(bp + 4 /* minor */)) >= 6)) || (*(*int32)(unsafe.Pointer(bp /* major */)) > 8))) } // This function is part of the implementation of the command: // // $db eval SQL ?ARRAYNAME? SCRIPT func DbEvalNextCmd(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclsqlite.c:1793:26: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = result // Return code // The first element of the data[] array is a pointer to a DbEvalContext // structure allocated using Tcl_Alloc(). The second element of data[] // is a pointer to a Tcl_Obj containing the script to run for each row // returned by the queries encapsulated in data[0]. var p uintptr = *(*ClientData)(unsafe.Pointer(data)) var pScript uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8)) var pArray uintptr = (*DbEvalContext)(unsafe.Pointer(p)).FpArray for ((rc == TCL_OK) || (rc == TCL_CONTINUE)) && (TCL_OK == (libc.AssignInt32(&rc, dbEvalStep(tls, p)))) { var i int32 // var nCol int32 at bp, 4 // var apColName uintptr at bp+8, 8 dbEvalRowInfo(tls, p, bp /* &nCol */, bp+8 /* &apColName */) for i = 0; i < *(*int32)(unsafe.Pointer(bp /* nCol */)); i++ { if pArray == uintptr(0) { tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* apColName */)) + uintptr(i)*8)), uintptr(0), dbEvalColumnValue(tls, p, i), 0) } else if (((*DbEvalContext)(unsafe.Pointer(p)).FevalFlags & SQLITE_EVAL_WITHOUTNULLS) != 0) && (sqlite3.Xsqlite3_column_type(tls, (*SqlPreparedStmt)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpPreStmt)).FpStmt, i) == SQLITE_NULL) { tcl.XTcl_UnsetVar2(tls, interp, tcl.XTcl_GetString(tls, pArray), tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* apColName */)) + uintptr(i)*8))), 0) } else { tcl.XTcl_ObjSetVar2(tls, interp, pArray, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* apColName */)) + uintptr(i)*8)), dbEvalColumnValue(tls, p, i), 0) } } // The required interpreter variables are now populated with the data // from the current row. If using NRE, schedule callbacks to evaluate // script pScript, then to invoke this function again to fetch the next // row (or clean up if there is no next row or the script throws an // exception). After scheduling the callbacks, return control to the // caller. // // If not using NRE, evaluate pScript directly and continue with the // next iteration of this while(...) loop. if DbUseNre(tls) != 0 { tcl.XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 }{DbEvalNextCmd})), p, pScript, uintptr(0), uintptr(0)) return tcl.XTcl_NREvalObj(tls, interp, pScript, 0) } else { rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, 0) } } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } dbEvalFinalize(tls, p) tcl.XTcl_Free(tls, p) if (rc == TCL_OK) || (rc == TCL_BREAK) { tcl.XTcl_ResetResult(tls, interp) rc = TCL_OK } return rc } // This function is used by the implementations of the following database // handle sub-commands: // // $db update_hook ?SCRIPT? // $db wal_hook ?SCRIPT? // $db commit_hook ?SCRIPT? // $db preupdate hook ?SCRIPT? func DbHookCmd(tls *libc.TLS, interp uintptr, pDb uintptr, pArg uintptr, ppHook uintptr) { /* tclsqlite.c:1863:13: */ var db uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).Fdb if *(*uintptr)(unsafe.Pointer(ppHook)) != 0 { tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(ppHook))) if pArg != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(ppHook)) if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } *(*uintptr)(unsafe.Pointer(ppHook)) = uintptr(0) } } if pArg != 0 { if tcl.XTcl_GetCharLength(tls, pArg) > 0 { *(*uintptr)(unsafe.Pointer(ppHook)) = pArg (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppHook)))).FrefCount++ } } sqlite3.Xsqlite3_preupdate_hook(tls, db, func() uintptr { if (*SqliteDb)(unsafe.Pointer(pDb)).FpPreUpdateHook != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, sqlite_int64, sqlite_int64) }{DbPreUpdateHandler})) } return uintptr(0) }(), pDb) sqlite3.Xsqlite3_update_hook(tls, db, func() uintptr { if (*SqliteDb)(unsafe.Pointer(pDb)).FpUpdateHook != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, sqlite_int64) }{DbUpdateHandler})) } return uintptr(0) }(), pDb) sqlite3.Xsqlite3_rollback_hook(tls, db, func() uintptr { if (*SqliteDb)(unsafe.Pointer(pDb)).FpRollbackHook != 0 { return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{DbRollbackHandler})) } return uintptr(0) }(), pDb) sqlite3.Xsqlite3_wal_hook(tls, db, func() uintptr { if (*SqliteDb)(unsafe.Pointer(pDb)).FpWalHook != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 }{DbWalHandler})) } return uintptr(0) }(), pDb) } // The "sqlite" command below creates a new Tcl command for each // connection it opens to an SQLite database. This routine is invoked // whenever one of those connection-specific commands is executed // in Tcl. For example, if you run Tcl code like this: // // sqlite3 db1 "my_database" // db1 close // // The first command opens a connection to the "my_database" database // and calls that connection "db1". The second command causes this // subroutine to be invoked. func DbObjCmd(tls *libc.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclsqlite.c:1907:26: */ bp := tls.Alloc(1980) defer tls.Free(1980) *(*uintptr)(unsafe.Pointer(bp + 1856)) = cd var pDb uintptr // var choice int32 at bp+1416, 4 var rc int32 var zAuth uintptr // var len int32 at bp+1420, 4 var zDestFile uintptr var zSrcDb uintptr // var pDest uintptr at bp+1424, 8 var pBackup uintptr var zCallback uintptr // var len1 int32 at bp+1432, 4 var zBusy uintptr // var len2 int32 at bp+1436, 4 var subCmd uintptr // var n int32 at bp+1440, 4 var pResult uintptr var pCollate uintptr var zName uintptr var zScript uintptr // var nScript int32 at bp+1444, 4 var _objPtr uintptr var zCommit uintptr // var len3 int32 at bp+1448, 4 var pResult1 uintptr var isComplete int32 // var v int32 at bp+1452, 4 var zOpt uintptr // var onoff int32 at bp+1456, 4 // var v1 int32 at bp+1460, 4 var pResult2 uintptr var ii int32 var zErr uintptr var nErr int32 var z uintptr var zTable uintptr // Insert data into this table var zFile uintptr // The file from which to extract data var zConflict uintptr // The conflict algorithm to use // var pStmt uintptr at bp+1464, 8 // A statement var nCol int32 // Number of columns in the table var nByte int32 // Number of bytes in an SQL string var i int32 var j int32 // Loop counters var nSep int32 // Number of bytes in zSep[] var nNull int32 // Number of bytes in zNull[] var zSql uintptr // An SQL statement var zLine uintptr // A single line of input from the file var azCol uintptr // zLine[] broken up into columns var zCommit1 uintptr // How to commit changes var in uintptr // The input file var lineno int32 // Line number of input file // var zLineNum [80]int8 at bp+1472, 80 // Line number print buffer var pResult3 uintptr // interp result var zSep uintptr var zNull uintptr var z1 uintptr var flags int32 var zSchema uintptr var pValue uintptr var pBA uintptr var pData uintptr // var len4 int32 at bp+1564, 4 var xrc int32 // var mxSize sqlite3_int64 at bp+1552, 8 var i1 int32 // var isReadonly int32 at bp+1560, 4 var pResult4 uintptr // var sEval DbEvalContext at bp+1568, 56 var i2 int32 // var nCol1 int32 at bp+1680, 4 var _objPtr1 uintptr // var sEval1 DbEvalContext at bp+1624, 56 var pRet uintptr // var cd2 [2]ClientData at bp+1688, 16 var p uintptr var pArray uintptr var pScript uintptr var evalFlags int32 var zOpt1 uintptr // var azType [6]uintptr at bp+1712, 48 var z2 uintptr var n1 int32 var _objPtr2 uintptr var flags1 int32 var pFunc uintptr var pScript1 uintptr var zName1 uintptr // var nArg int32 at bp+1704, 4 var i3 int32 // var eType int32 at bp+1760, 4 var isReadonly1 int32 var zDb uintptr var zTable1 uintptr var zColumn uintptr // var iRow Tcl_WideInt at bp+1768, 8 // var len5 int32 at bp+1776, 4 var zNull1 uintptr var pResult5 uintptr var rowid Tcl_WideInt var zProgress uintptr // var len6 int32 at bp+1784, 4 // var N int32 at bp+1780, 4 var zProfile uintptr // var len7 int32 at bp+1788, 4 var zSrcFile uintptr var zDestDb uintptr // var pSrc uintptr at bp+1792, 8 var pBackup1 uintptr var nTimeout int32 var needFree int32 var zSchema1 uintptr // var sz sqlite3_int64 at bp+1800, 8 var pData1 uintptr var v2 int32 var zOp uintptr // var ms int32 at bp+1808, 4 var pResult6 uintptr var zTrace uintptr // var len8 int32 at bp+1812, 4 var _objPtr3 uintptr var _objPtr4 uintptr // var wType Tcl_WideInt at bp+1840, 8 var pError uintptr // var pObj uintptr at bp+1824, 8 // var ttype int32 at bp+1832, 4 var i4 int32 var zTraceV2 uintptr // var len9 int32 at bp+1816, 4 var wMask Tcl_WideInt // var ttype1 int32 at bp+1848, 4 var pScript2 uintptr var zBegin uintptr var _objPtr5 uintptr var xNotify uintptr var pNotifyArg uintptr var nCol2 int32 var pRet1 uintptr var pObj1 uintptr // var iIdx int32 at bp+1868, 4 // var pValue1 uintptr at bp+1872, 8 // var iSub int32 at bp+1864, 4 // set ppHook to point at pUpdateHook or pRollbackHook, depending on // whether [$db update_hook] or [$db rollback_hook] was invoked. var ppHook uintptr // var zBuf [100]int8 at bp+1880, 100 var zArg uintptr var i5 int32 pDb = *(*uintptr)(unsafe.Pointer(bp + 1856 /* cd */)) rc = TCL_OK // don't leave trailing commas on DB_enum, it confuses the AIX xlc compiler if !(objc < 2) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1860 /* "SUBCOMMAND ..." */) return TCL_ERROR __1: ; if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&DB_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+11375 /* "option" */, 0, bp+1416 /* &choice */) != 0) { goto __2 } return TCL_ERROR __2: ; switch uint32(*(*int32)(unsafe.Pointer(bp + 1416 /* choice */))) { // $db authorizer ?CALLBACK? // // Invoke the given callback to authorize each SQL operation as it is // compiled. 5 arguments are appended to the callback before it is // invoked: // // (1) The authorization type (ex: SQLITE_CREATE_TABLE, SQLITE_INSERT, ...) // (2) First descriptive name (depends on authorization type) // (3) Second descriptive name // (4) Name of the database (ex: "main", "temp") // (5) Name of trigger that is doing the access // // The callback should return on of the following strings: SQLITE_OK, // SQLITE_IGNORE, or SQLITE_DENY. Any other return value is an error. // // If this method is invoked with no arguments, the current authorization // callback string is returned. case uint32(0) /* DB_AUTHORIZER */ : goto __4 // $db backup ?DATABASE? FILENAME // // Open or create a database file named FILENAME. Transfer the // content of local database DATABASE (default: "main") into the // FILENAME database. case uint32(1) /* DB_BACKUP */ : goto __5 // $db bind_fallback ?CALLBACK? // // When resolving bind parameters in an SQL statement, if the parameter // cannot be associated with a TCL variable then invoke CALLBACK with a // single argument that is the name of the parameter and use the return // value of the CALLBACK as the binding. If CALLBACK returns something // other than TCL_OK or TCL_ERROR then bind a NULL. // // If CALLBACK is an empty string, then revert to the default behavior // which is to set the binding to NULL. // // If CALLBACK returns an error, that causes the statement execution to // abort. Hence, to configure a connection so that it throws an error // on an attempt to bind an unknown variable, do something like this: // // proc bind_error {name} {error "no such variable: $name"} // db bind_fallback bind_error case uint32(2) /* DB_BIND_FALLBACK */ : goto __6 // $db busy ?CALLBACK? // // Invoke the given callback if an SQL statement attempts to open // a locked database file. case uint32(3) /* DB_BUSY */ : goto __7 // $db cache flush // $db cache size n // // Flush the prepared statement cache, or set the maximum number of // cached statements. case uint32(4) /* DB_CACHE */ : goto __8 // $db changes // // Return the number of rows that were modified, inserted, or deleted by // the most recent INSERT, UPDATE or DELETE statement, not including // any changes made by trigger programs. case uint32(5) /* DB_CHANGES */ : goto __9 // $db close // // Shutdown the database case uint32(6) /* DB_CLOSE */ : goto __10 // $db collate NAME SCRIPT // // Create a new SQL collation function called NAME. Whenever // that function is called, invoke SCRIPT to evaluate the function. case uint32(7) /* DB_COLLATE */ : goto __11 // $db collation_needed SCRIPT // // Create a new SQL collation function called NAME. Whenever // that function is called, invoke SCRIPT to evaluate the function. case uint32(8) /* DB_COLLATION_NEEDED */ : goto __12 // $db commit_hook ?CALLBACK? // // Invoke the given callback just before committing every SQL transaction. // If the callback throws an exception or returns non-zero, then the // transaction is aborted. If CALLBACK is an empty string, the callback // is disabled. case uint32(9) /* DB_COMMIT_HOOK */ : goto __13 // $db complete SQL // // Return TRUE if SQL is a complete SQL statement. Return FALSE if // additional lines of input are needed. This is similar to the // built-in "info complete" command of Tcl. case uint32(10) /* DB_COMPLETE */ : goto __14 // $db config ?OPTION? ?BOOLEAN? // // Configure the database connection using the sqlite3_db_config() // interface. case uint32(11) /* DB_CONFIG */ : goto __15 // $db copy conflict-algorithm table filename ?SEPARATOR? ?NULLINDICATOR? // // Copy data into table from filename, optionally using SEPARATOR // as column separators. If a column contains a null string, or the // value of NULLINDICATOR, a NULL is inserted for the column. // conflict-algorithm is one of the sqlite conflict algorithms: // rollback, abort, fail, ignore, replace // On success, return the number of lines processed, not necessarily same // as 'db changes' due to conflict-algorithm selected. // // This code is basically an implementation/enhancement of // the sqlite3 shell.c ".import" command. // // This command usage is equivalent to the sqlite2.x COPY statement, // which imports file data into a table using the PostgreSQL COPY file format: // $db copy $conflit_algo $table_name $filename \t \\N case uint32(12) /* DB_COPY */ : goto __16 // $db deserialize ?-maxsize N? ?-readonly BOOL? ?DATABASE? VALUE // // Reopen DATABASE (default "main") using the content in $VALUE case uint32(13) /* DB_DESERIALIZE */ : goto __17 // $db enable_load_extension BOOLEAN // // Turn the extension loading feature on or off. It if off by // default. case uint32(14) /* DB_ENABLE_LOAD_EXTENSION */ : goto __18 // $db errorcode // // Return the numeric error code that was returned by the most recent // call to sqlite3_exec(). case uint32(15) /* DB_ERRORCODE */ : goto __19 // $db exists $sql // $db onecolumn $sql // // The onecolumn method is the equivalent of: // lindex [$db eval $sql] 0 case uint32(17) /* DB_EXISTS */ : goto __20 case uint32(23) /* DB_ONECOLUMN */ : goto __21 // $db eval ?options? $sql ?array? ?{ ...code... }? // // The SQL statement in $sql is evaluated. For each row, the values are // placed in elements of the array named "array" and ...code... is executed. // If "array" and "code" are omitted, then no callback is every invoked. // If "array" is an empty string, then the values are placed in variables // that have the same name as the fields extracted by the query. case uint32(16) /* DB_EVAL */ : goto __22 // $db function NAME [OPTIONS] SCRIPT // // Create a new SQL function called NAME. Whenever that function is // called, invoke SCRIPT to evaluate the function. // // Options: // --argcount N Function has exactly N arguments // --deterministic The function is pure // --directonly Prohibit use inside triggers and views // --innocuous Has no side effects or information leaks // --returntype TYPE Specify the return type of the function case uint32(18) /* DB_FUNCTION */ : goto __23 // $db incrblob ?-readonly? ?DB? TABLE COLUMN ROWID case uint32(19) /* DB_INCRBLOB */ : goto __24 // $db interrupt // // Interrupt the execution of the inner-most SQL interpreter. This // causes the SQL statement to return an error of SQLITE_INTERRUPT. case uint32(20) /* DB_INTERRUPT */ : goto __25 // $db nullvalue ?STRING? // // Change text used when a NULL comes back from the database. If ?STRING? // is not present, then the current string used for NULL is returned. // If STRING is present, then STRING is returned. // case uint32(22) /* DB_NULLVALUE */ : goto __26 // $db last_insert_rowid // // Return an integer which is the ROWID for the most recent insert. case uint32(21) /* DB_LAST_INSERT_ROWID */ : goto __27 // The DB_ONECOLUMN method is implemented together with DB_EXISTS. // $db progress ?N CALLBACK? // // Invoke the given callback every N virtual machine opcodes while executing // queries. case uint32(26) /* DB_PROGRESS */ : goto __28 // $db profile ?CALLBACK? // // Make arrangements to invoke the CALLBACK routine after each SQL statement // that has run. The text of the SQL and the amount of elapse time are // appended to CALLBACK before the script is run. case uint32(25) /* DB_PROFILE */ : goto __29 // $db rekey KEY // // Change the encryption key on the currently open database. case uint32(27) /* DB_REKEY */ : goto __30 // $db restore ?DATABASE? FILENAME // // Open a database file named FILENAME. Transfer the content // of FILENAME into the local database DATABASE (default: "main"). case uint32(28) /* DB_RESTORE */ : goto __31 // $db serialize ?DATABASE? // // Return a serialization of a database. case uint32(30) /* DB_SERIALIZE */ : goto __32 // $db status (step|sort|autoindex|vmstep) // // Display SQLITE_STMTSTATUS_FULLSCAN_STEP or // SQLITE_STMTSTATUS_SORT for the most recent eval. case uint32(31) /* DB_STATUS */ : goto __33 // $db timeout MILLESECONDS // // Delay for the number of milliseconds specified when a file is locked. case uint32(32) /* DB_TIMEOUT */ : goto __34 // $db total_changes // // Return the number of rows that were modified, inserted, or deleted // since the database handle was created. case uint32(33) /* DB_TOTAL_CHANGES */ : goto __35 // $db trace ?CALLBACK? // // Make arrangements to invoke the CALLBACK routine for each SQL statement // that is executed. The text of the SQL is appended to CALLBACK before // it is executed. case uint32(34) /* DB_TRACE */ : goto __36 // $db trace_v2 ?CALLBACK? ?MASK? // // Make arrangements to invoke the CALLBACK routine for each trace event // matching the mask that is generated. The parameters are appended to // CALLBACK before it is executed. case uint32(35) /* DB_TRACE_V2 */ : goto __37 // $db transaction [-deferred|-immediate|-exclusive] SCRIPT // // Start a new transaction (if we are not already in the midst of a // transaction) and execute the TCL script SCRIPT. After SCRIPT // completes, either commit the transaction or roll it back if SCRIPT // throws an exception. Or if no new transation was started, do nothing. // pass the exception on up the stack. // // This command was inspired by Dave Thomas's talk on Ruby at the // 2005 O'Reilly Open Source Convention (OSCON). case uint32(36) /* DB_TRANSACTION */ : goto __38 // $db unlock_notify ?script? case uint32(37) /* DB_UNLOCK_NOTIFY */ : goto __39 // $db preupdate_hook count // $db preupdate_hook hook ?SCRIPT? // $db preupdate_hook new INDEX // $db preupdate_hook old INDEX case uint32(24) /* DB_PREUPDATE */ : goto __40 // $db wal_hook ?script? // $db update_hook ?script? // $db rollback_hook ?script? case uint32(40) /* DB_WAL_HOOK */ : goto __41 case uint32(38) /* DB_UPDATE_HOOK */ : goto __42 case uint32(29) /* DB_ROLLBACK_HOOK */ : goto __43 // $db version // // Return the version string for this database. case uint32(39) /* DB_VERSION */ : goto __44 } goto __3 // $db authorizer ?CALLBACK? // // Invoke the given callback to authorize each SQL operation as it is // compiled. 5 arguments are appended to the callback before it is // invoked: // // (1) The authorization type (ex: SQLITE_CREATE_TABLE, SQLITE_INSERT, ...) // (2) First descriptive name (depends on authorization type) // (3) Second descriptive name // (4) Name of the database (ex: "main", "temp") // (5) Name of trigger that is doing the access // // The callback should return on of the following strings: SQLITE_OK, // SQLITE_IGNORE, or SQLITE_DENY. Any other return value is an error. // // If this method is invoked with no arguments, the current authorization // callback string is returned. __4: if !(objc > 3) { goto __45 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11382 /* "?CALLBACK?" */) return TCL_ERROR goto __46 __45: if !(objc == 2) { goto __47 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0) { goto __49 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, uintptr(0))) __49: ; goto __48 __47: if !((*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0) { goto __50 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth) __50: ; zAuth = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1420 /* &len */) if !((zAuth != 0) && (*(*int32)(unsafe.Pointer(bp + 1420 /* len */)) > 0)) { goto __51 } (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1420 /* len */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, zAuth, (uint64(*(*int32)(unsafe.Pointer(bp + 1420 /* len */)) + 1))) goto __52 __51: (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth = uintptr(0) __52: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0) { goto __53 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_set_authorizer(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 }{auth_callback})), pDb) goto __54 __53: sqlite3.Xsqlite3_set_authorizer(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) __54: ; __48: ; __46: ; goto __3 // $db backup ?DATABASE? FILENAME // // Open or create a database file named FILENAME. Transfer the // content of local database DATABASE (default: "main") into the // FILENAME database. __5: if !(objc == 3) { goto __55 } zSrcDb = ts + 85 /* "main" */ zDestFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) goto __56 __55: if !(objc == 4) { goto __57 } zSrcDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zDestFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) goto __58 __57: tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11393 /* "?DATABASE? FILEN..." */) return TCL_ERROR __58: ; __56: ; rc = sqlite3.Xsqlite3_open_v2(tls, zDestFile, bp+1424, /* &pDest */ ((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | (*SqliteDb)(unsafe.Pointer(pDb)).FopenFlags), uintptr(0)) if !(rc != SQLITE_OK) { goto __59 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+11413, /* "cannot open targ..." */ sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */))), uintptr(0))) sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */))) return TCL_ERROR __59: ; pBackup = sqlite3.Xsqlite3_backup_init(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */)), ts+85 /* "main" */, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSrcDb) if !(pBackup == uintptr(0)) { goto __60 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, ts+11443, /* "backup failed: " */ sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */))), uintptr(0))) sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */))) return TCL_ERROR __60: ; __61: if !((libc.AssignInt32(&rc, sqlite3.Xsqlite3_backup_step(tls, pBackup, 100))) == SQLITE_OK) { goto __62 } goto __61 __62: ; sqlite3.Xsqlite3_backup_finish(tls, pBackup) if !(rc == SQLITE_DONE) { goto __63 } rc = TCL_OK goto __64 __63: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+88, ts+11443, /* "backup failed: " */ sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */))), uintptr(0))) rc = TCL_ERROR __64: ; sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pDest */))) goto __3 // $db bind_fallback ?CALLBACK? // // When resolving bind parameters in an SQL statement, if the parameter // cannot be associated with a TCL variable then invoke CALLBACK with a // single argument that is the name of the parameter and use the return // value of the CALLBACK as the binding. If CALLBACK returns something // other than TCL_OK or TCL_ERROR then bind a NULL. // // If CALLBACK is an empty string, then revert to the default behavior // which is to set the binding to NULL. // // If CALLBACK returns an error, that causes the statement execution to // abort. Hence, to configure a connection so that it throws an error // on an attempt to bind an unknown variable, do something like this: // // proc bind_error {name} {error "no such variable: $name"} // db bind_fallback bind_error __6: if !(objc > 3) { goto __65 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11382 /* "?CALLBACK?" */) return TCL_ERROR goto __66 __65: if !(objc == 2) { goto __67 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0) { goto __69 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+120, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, uintptr(0))) __69: ; goto __68 __67: if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0) { goto __70 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback) __70: ; zCallback = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1432 /* &len1 */) if !((zCallback != 0) && (*(*int32)(unsafe.Pointer(bp + 1432 /* len1 */)) > 0)) { goto __71 } (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1432 /* len1 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, zCallback, (uint64(*(*int32)(unsafe.Pointer(bp + 1432 /* len1 */)) + 1))) goto __72 __71: (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback = uintptr(0) __72: ; __68: ; __66: ; goto __3 // $db busy ?CALLBACK? // // Invoke the given callback if an SQL statement attempts to open // a locked database file. __7: if !(objc > 3) { goto __73 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11459 /* "CALLBACK" */) return TCL_ERROR goto __74 __73: if !(objc == 2) { goto __75 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0) { goto __77 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+144, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, uintptr(0))) __77: ; goto __76 __75: if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0) { goto __78 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy) __78: ; zBusy = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1436 /* &len2 */) if !((zBusy != 0) && (*(*int32)(unsafe.Pointer(bp + 1436 /* len2 */)) > 0)) { goto __79 } (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1436 /* len2 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, zBusy, (uint64(*(*int32)(unsafe.Pointer(bp + 1436 /* len2 */)) + 1))) goto __80 __79: (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy = uintptr(0) __80: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0) { goto __81 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_busy_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{DbBusyHandler})), pDb) goto __82 __81: sqlite3.Xsqlite3_busy_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) __82: ; __76: ; __74: ; goto __3 // $db cache flush // $db cache size n // // Flush the prepared statement cache, or set the maximum number of // cached statements. __8: if !(objc <= 2) { goto __83 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11468 /* "cache option ?ar..." */) return TCL_ERROR __83: ; subCmd = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0)) if !((int32(*(*int8)(unsafe.Pointer(subCmd))) == 'f') && (libc.Xstrcmp(tls, subCmd, ts+11487 /* "flush" */) == 0)) { goto __84 } if !(objc != 3) { goto __86 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11487 /* "flush" */) return TCL_ERROR goto __87 __86: flushStmtCache(tls, pDb) __87: ; goto __85 __84: if !((int32(*(*int8)(unsafe.Pointer(subCmd))) == 's') && (libc.Xstrcmp(tls, subCmd, ts+11493 /* "size" */) == 0)) { goto __88 } if !(objc != 4) { goto __90 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11498 /* "size n" */) return TCL_ERROR goto __91 __90: if !(TCL_ERROR == tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+1440 /* &n */)) { goto __92 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+168, ts+11505, /* "cannot convert \"" */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0)), ts+11522 /* "\" to integer" */, uintptr(0))) return TCL_ERROR goto __93 __92: if !(*(*int32)(unsafe.Pointer(bp + 1440 /* n */)) < 0) { goto __94 } flushStmtCache(tls, pDb) *(*int32)(unsafe.Pointer(bp + 1440 /* n */)) = 0 goto __95 __94: if !(*(*int32)(unsafe.Pointer(bp + 1440 /* n */)) > MAX_PREPARED_STMTS) { goto __96 } *(*int32)(unsafe.Pointer(bp + 1440 /* n */)) = MAX_PREPARED_STMTS __96: ; __95: ; (*SqliteDb)(unsafe.Pointer(pDb)).FmaxStmt = *(*int32)(unsafe.Pointer(bp + 1440 /* n */)) __93: ; __91: ; goto __89 __88: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+208, ts+11535, /* "bad option \"" */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0)), ts+11548, /* "\": must be flush..." */ uintptr(0))) return TCL_ERROR __89: ; __85: ; goto __3 // $db changes // // Return the number of rows that were modified, inserted, or deleted by // the most recent INSERT, UPDATE or DELETE statement, not including // any changes made by trigger programs. __9: if !(objc != 2) { goto __97 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+489 /* "" */) return TCL_ERROR __97: ; pResult = tcl.XTcl_GetObjResult(tls, interp) tcl.XTcl_SetIntObj(tls, pResult, sqlite3.Xsqlite3_changes(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) goto __3 // $db close // // Shutdown the database __10: tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0))) goto __3 // $db collate NAME SCRIPT // // Create a new SQL collation function called NAME. Whenever // that function is called, invoke SCRIPT to evaluate the function. __11: if !(objc != 4) { goto __98 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11573 /* "NAME SCRIPT" */) return TCL_ERROR __98: ; zName = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0)) zScript = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+1444 /* &nScript */) pCollate = tcl.XTcl_Alloc(tls, (uint32((uint64(unsafe.Sizeof(SqlCollate{})) + uint64(*(*int32)(unsafe.Pointer(bp + 1444 /* nScript */)))) + uint64(1)))) if !(pCollate == uintptr(0)) { goto __99 } return TCL_ERROR __99: ; (*SqlCollate)(unsafe.Pointer(pCollate)).Finterp = interp (*SqlCollate)(unsafe.Pointer(pCollate)).FpNext = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate (*SqlCollate)(unsafe.Pointer(pCollate)).FzScript = (pCollate + 1*24) (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate = pCollate libc.Xmemcpy(tls, (*SqlCollate)(unsafe.Pointer(pCollate)).FzScript, zScript, (uint64(*(*int32)(unsafe.Pointer(bp + 1444 /* nScript */)) + 1))) if !(sqlite3.Xsqlite3_create_collation(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zName, SQLITE_UTF8, pCollate, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{tclSqlCollate}))) != 0) { goto __100 } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) return TCL_ERROR __100: ; goto __3 // $db collation_needed SCRIPT // // Create a new SQL collation function called NAME. Whenever // that function is called, invoke SCRIPT to evaluate the function. __12: if !(objc != 3) { goto __101 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11585 /* "SCRIPT" */) return TCL_ERROR __101: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded != 0) { goto __102 } __103: _objPtr = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1) { goto __106 } tcl.XTclFreeObj(tls, _objPtr) __106: ; goto __104 __104: if 0 != 0 { goto __103 } goto __105 __105: ; __102: ; (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) (*Tcl_Obj)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded)).FrefCount++ sqlite3.Xsqlite3_collation_needed(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, pDb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{tclCollateNeeded}))) goto __3 // $db commit_hook ?CALLBACK? // // Invoke the given callback just before committing every SQL transaction. // If the callback throws an exception or returns non-zero, then the // transaction is aborted. If CALLBACK is an empty string, the callback // is disabled. __13: if !(objc > 3) { goto __107 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11382 /* "?CALLBACK?" */) return TCL_ERROR goto __108 __107: if !(objc == 2) { goto __109 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0) { goto __111 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+248, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit, uintptr(0))) __111: ; goto __110 __109: if !((*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0) { goto __112 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit) __112: ; zCommit = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1448 /* &len3 */) if !((zCommit != 0) && (*(*int32)(unsafe.Pointer(bp + 1448 /* len3 */)) > 0)) { goto __113 } (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1448 /* len3 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit, zCommit, (uint64(*(*int32)(unsafe.Pointer(bp + 1448 /* len3 */)) + 1))) goto __114 __113: (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit = uintptr(0) __114: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0) { goto __115 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_commit_hook(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{DbCommitHandler})), pDb) goto __116 __115: sqlite3.Xsqlite3_commit_hook(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) __116: ; __110: ; __108: ; goto __3 // $db complete SQL // // Return TRUE if SQL is a complete SQL statement. Return FALSE if // additional lines of input are needed. This is similar to the // built-in "info complete" command of Tcl. __14: if !(objc != 3) { goto __117 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10172 /* "SQL" */) return TCL_ERROR __117: ; isComplete = sqlite3.Xsqlite3_complete(tls, tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0))) pResult1 = tcl.XTcl_GetObjResult(tls, interp) tcl.XTcl_SetIntObj(tls, pResult1, (libc.Bool32((isComplete) != 0))) goto __3 // $db config ?OPTION? ?BOOLEAN? // // Configure the database connection using the sqlite3_db_config() // interface. __15: if !(objc > 4) { goto __118 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11592 /* "?OPTION? ?BOOLEA..." */) return TCL_ERROR __118: ; if !(objc == 2) { goto __119 } // With no arguments, list all configuration options and with the // current value pResult2 = tcl.XTcl_NewListObj(tls, 0, uintptr(0)) ii = 0 __121: if !(uint64(ii) < (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{})))) { goto __123 } *(*int32)(unsafe.Pointer(bp + 1452 /* v */)) = 0 sqlite3.Xsqlite3_db_config(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, aDbConfig[ii].Fop, libc.VaList(bp+272, -1, bp+1452 /* &v */)) tcl.XTcl_ListObjAppendElement(tls, interp, pResult2, tcl.XTcl_NewStringObj(tls, aDbConfig[ii].FzName, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pResult2, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 1452 /* v */)))) goto __122 __122: ii++ goto __121 goto __123 __123: ; goto __120 __119: zOpt = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) *(*int32)(unsafe.Pointer(bp + 1456 /* onoff */)) = -1 *(*int32)(unsafe.Pointer(bp + 1460 /* v1 */)) = 0 if !(int32(*(*int8)(unsafe.Pointer(zOpt))) == '-') { goto __124 } zOpt++ __124: ; ii = 0 __125: if !(uint64(ii) < (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{})))) { goto __127 } if !(libc.Xstrcmp(tls, aDbConfig[ii].FzName, zOpt) == 0) { goto __128 } goto __127 __128: ; goto __126 __126: ii++ goto __125 goto __127 __127: ; if !(uint64(ii) >= (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{})))) { goto __129 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+296, ts+11611 /* "unknown config o..." */, zOpt, ts+11636 /* "\"" */, uintptr(0))) return TCL_ERROR __129: ; if !(objc == 4) { goto __130 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+1456 /* &onoff */) != 0) { goto __131 } return TCL_ERROR __131: ; __130: ; sqlite3.Xsqlite3_db_config(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, aDbConfig[ii].Fop, libc.VaList(bp+336, *(*int32)(unsafe.Pointer(bp + 1456 /* onoff */)), bp+1460 /* &v1 */)) pResult2 = tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 1460 /* v1 */))) __120: ; tcl.XTcl_SetObjResult(tls, interp, pResult2) goto __3 // $db copy conflict-algorithm table filename ?SEPARATOR? ?NULLINDICATOR? // // Copy data into table from filename, optionally using SEPARATOR // as column separators. If a column contains a null string, or the // value of NULLINDICATOR, a NULL is inserted for the column. // conflict-algorithm is one of the sqlite conflict algorithms: // rollback, abort, fail, ignore, replace // On success, return the number of lines processed, not necessarily same // as 'db changes' due to conflict-algorithm selected. // // This code is basically an implementation/enhancement of // the sqlite3 shell.c ".import" command. // // This command usage is equivalent to the sqlite2.x COPY statement, // which imports file data into a table using the PostgreSQL COPY file format: // $db copy $conflit_algo $table_name $filename \t \\N __16: // The input file lineno = 0 if !((objc < 5) || (objc > 7)) { goto __132 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11638 /* "CONFLICT-ALGORIT..." */) return TCL_ERROR __132: ; if !(objc >= 6) { goto __133 } zSep = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 5*8)), uintptr(0)) goto __134 __133: zSep = ts + 11700 /* "\t" */ __134: ; if !(objc >= 7) { goto __135 } zNull = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 6*8)), uintptr(0)) goto __136 __135: zNull = ts + 489 /* "" */ __136: ; zConflict = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0)) zTable = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0)) zFile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8)), uintptr(0)) nSep = strlen30(tls, zSep) nNull = strlen30(tls, zNull) if !(nSep == 0) { goto __137 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+360, ts+11702, /* "Error: non-null ..." */ uintptr(0))) return TCL_ERROR __137: ; if !(((((libc.Xstrcmp(tls, zConflict, ts+11746 /* "rollback" */) != 0) && (libc.Xstrcmp(tls, zConflict, ts+11755 /* "abort" */) != 0)) && (libc.Xstrcmp(tls, zConflict, ts+11761 /* "fail" */) != 0)) && (libc.Xstrcmp(tls, zConflict, ts+11766 /* "ignore" */) != 0)) && (libc.Xstrcmp(tls, zConflict, ts+11773 /* "replace" */) != 0)) { goto __138 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+384, ts+11781 /* "Error: \"" */, zConflict, ts+11790 /* "\", conflict-algo..." */, uintptr(0))) return TCL_ERROR __138: ; zSql = sqlite3.Xsqlite3_mprintf(tls, ts+11870 /* "SELECT * FROM '%..." */, libc.VaList(bp+424, zTable)) if !(zSql == uintptr(0)) { goto __139 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+440, ts+11889 /* "Error: no such t..." */, zTable, uintptr(0))) return TCL_ERROR __139: ; nByte = strlen30(tls, zSql) rc = sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, bp+1464 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if !(rc != 0) { goto __140 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+472, ts+11912 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) nCol = 0 goto __141 __140: nCol = sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) __141: ; sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) if !(nCol == 0) { goto __142 } return TCL_ERROR __142: ; zSql = libc.Xmalloc(tls, (uint64((nByte + 50) + (nCol * 2)))) if !(zSql == uintptr(0)) { goto __143 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+504, ts+11920 /* "Error: can't mal..." */, uintptr(0))) return TCL_ERROR __143: ; sqlite3.Xsqlite3_snprintf(tls, (nByte + 50), zSql, ts+11942, /* "INSERT OR %q INT..." */ libc.VaList(bp+528, zConflict, zTable)) j = strlen30(tls, zSql) i = 1 __144: if !(i < nCol) { goto __146 } *(*int8)(unsafe.Pointer(zSql + uintptr(libc.PostIncInt32(&j, 1)))) = int8(',') *(*int8)(unsafe.Pointer(zSql + uintptr(libc.PostIncInt32(&j, 1)))) = int8('?') goto __145 __145: i++ goto __144 goto __146 __146: ; *(*int8)(unsafe.Pointer(zSql + uintptr(libc.PostIncInt32(&j, 1)))) = int8(')') *(*int8)(unsafe.Pointer(zSql + uintptr(j))) = int8(0) rc = sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, bp+1464 /* &pStmt */, uintptr(0)) libc.Xfree(tls, zSql) if !(rc != 0) { goto __147 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+552, ts+11912 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) return TCL_ERROR __147: ; in = libc.Xfopen(tls, zFile, ts+4273 /* "rb" */) if !(in == uintptr(0)) { goto __148 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+584, ts+11974 /* "Error: cannot op..." */, zFile, uintptr(0))) sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) return TCL_ERROR __148: ; azCol = libc.Xmalloc(tls, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64(nCol + 1)))) if !(azCol == uintptr(0)) { goto __149 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+616, ts+11920 /* "Error: can't mal..." */, uintptr(0))) libc.Xfclose(tls, in) return TCL_ERROR __149: ; sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, ts+12000 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0)) zCommit1 = ts + 11312 /* "COMMIT" */ __150: if !((libc.AssignUintptr(&zLine, local_getline(tls, uintptr(0), in))) != uintptr(0)) { goto __151 } lineno++ *(*uintptr)(unsafe.Pointer(azCol)) = zLine i = 0 z = zLine __152: if !(*(*int8)(unsafe.Pointer(z)) != 0) { goto __154 } if !((int32(*(*int8)(unsafe.Pointer(z))) == int32(*(*int8)(unsafe.Pointer(zSep)))) && (libc.Xstrncmp(tls, z, zSep, uint64(nSep)) == 0)) { goto __155 } *(*int8)(unsafe.Pointer(z)) = int8(0) i++ if !(i < nCol) { goto __156 } *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = (z + uintptr(nSep)) z += (uintptr(nSep - 1)) __156: ; __155: ; goto __153 __153: z++ goto __152 goto __154 __154: ; if !((i + 1) != nCol) { goto __157 } nErr = (strlen30(tls, zFile) + 200) zErr = libc.Xmalloc(tls, uint64(nErr)) if !(zErr != 0) { goto __158 } sqlite3.Xsqlite3_snprintf(tls, nErr, zErr, ts+12006, /* "Error: %s line %..." */ libc.VaList(bp+640, zFile, lineno, nCol, (i+1))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+680, zErr, uintptr(0))) libc.Xfree(tls, zErr) __158: ; zCommit1 = ts + 7272 /* "ROLLBACK" */ goto __151 __157: ; i = 0 __159: if !(i < nCol) { goto __161 } // check for null data, if so, bind as null if !(((nNull > 0) && (libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zNull) == 0)) || (strlen30(tls, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8))) == 0)) { goto __162 } sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */)), (i + 1)) goto __163 __162: sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */)), (i + 1), *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), -1, uintptr(0)) __163: ; goto __160 __160: i++ goto __159 goto __161 __161: ; sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) rc = sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) libc.Xfree(tls, zLine) if !(rc != SQLITE_OK) { goto __164 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+704, ts+11912 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) zCommit1 = ts + 7272 /* "ROLLBACK" */ goto __151 __164: ; goto __150 __151: ; libc.Xfree(tls, azCol) libc.Xfclose(tls, in) sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1464 /* pStmt */))) sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zCommit1, uintptr(0), uintptr(0), uintptr(0)) if !(int32(*(*int8)(unsafe.Pointer(zCommit1))) == 'C') { goto __165 } // success, set result as number of lines processed pResult3 = tcl.XTcl_GetObjResult(tls, interp) tcl.XTcl_SetIntObj(tls, pResult3, lineno) rc = TCL_OK goto __166 __165: // failure, append lineno where failed sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([80]int8{})), bp+1472 /* &zLineNum[0] */, ts+1238 /* "%d" */, libc.VaList(bp+736, lineno)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+752, ts+12066 /* ", failed while p..." */, bp+1472, /* &zLineNum[0] */ uintptr(0))) rc = TCL_ERROR __166: ; goto __3 // $db deserialize ?-maxsize N? ?-readonly BOOL? ?DATABASE? VALUE // // Reopen DATABASE (default "main") using the content in $VALUE __17: zSchema = uintptr(0) pValue = uintptr(0) *(*sqlite3_int64)(unsafe.Pointer(bp + 1552 /* mxSize */)) = int64(0) *(*int32)(unsafe.Pointer(bp + 1560 /* isReadonly */)) = 0 if !(objc < 3) { goto __167 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12099 /* "?DATABASE? VALUE" */) rc = TCL_ERROR goto __3 __167: ; i1 = 2 __168: if !(i1 < (objc - 1)) { goto __170 } z1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8))) if !((libc.Xstrcmp(tls, z1, ts+12116 /* "-maxsize" */) == 0) && (i1 < (objc - 2))) { goto __171 } rc = tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i1, 1))*8)), bp+1552 /* &mxSize */) if !(rc != 0) { goto __172 } goto deserialize_error __172: ; goto __169 __171: ; if !((libc.Xstrcmp(tls, z1, ts+12125 /* "-readonly" */) == 0) && (i1 < (objc - 2))) { goto __173 } rc = tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i1, 1))*8)), bp+1560 /* &isReadonly */) if !(rc != 0) { goto __174 } goto deserialize_error __174: ; goto __169 __173: ; if !(((zSchema == uintptr(0)) && (i1 == (objc - 2))) && (int32(*(*int8)(unsafe.Pointer(z1))) != '-')) { goto __175 } zSchema = z1 goto __169 __175: ; tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+784, ts+12135 /* "unknown option: " */, z1, uintptr(0))) rc = TCL_ERROR goto deserialize_error goto __169 __169: i1++ goto __168 goto __170 __170: ; pValue = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) pBA = tcl.XTcl_GetByteArrayFromObj(tls, pValue, bp+1564 /* &len4 */) pData = sqlite3.Xsqlite3_malloc64(tls, uint64(*(*int32)(unsafe.Pointer(bp + 1564 /* len4 */)))) if !((pData == uintptr(0)) && (*(*int32)(unsafe.Pointer(bp + 1564 /* len4 */)) > 0)) { goto __176 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+816, ts+1930 /* "out of memory" */, uintptr(0))) rc = TCL_ERROR goto __177 __176: if !(*(*int32)(unsafe.Pointer(bp + 1564 /* len4 */)) > 0) { goto __178 } libc.Xmemcpy(tls, pData, pBA, uint64(*(*int32)(unsafe.Pointer(bp + 1564 /* len4 */)))) __178: ; if !(*(*int32)(unsafe.Pointer(bp + 1560 /* isReadonly */)) != 0) { goto __179 } flags = (SQLITE_DESERIALIZE_FREEONCLOSE | SQLITE_DESERIALIZE_READONLY) goto __180 __179: flags = (SQLITE_DESERIALIZE_FREEONCLOSE | SQLITE_DESERIALIZE_RESIZEABLE) __180: ; xrc = sqlite3.Xsqlite3_deserialize(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema, pData, int64(*(*int32)(unsafe.Pointer(bp + 1564 /* len4 */))), int64(*(*int32)(unsafe.Pointer(bp + 1564 /* len4 */))), uint32(flags)) if !(xrc != 0) { goto __181 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+840, ts+12152 /* "unable to set ME..." */, uintptr(0))) rc = TCL_ERROR __181: ; if !(*(*sqlite3_int64)(unsafe.Pointer(bp + 1552 /* mxSize */)) > int64(0)) { goto __182 } sqlite3.Xsqlite3_file_control(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema, SQLITE_FCNTL_SIZE_LIMIT, bp+1552 /* &mxSize */) __182: ; __177: ; deserialize_error: goto __3 // $db enable_load_extension BOOLEAN // // Turn the extension loading feature on or off. It if off by // default. __18: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+864, ts+12180, /* "extension loadin..." */ uintptr(0))) return TCL_ERROR // $db errorcode // // Return the numeric error code that was returned by the most recent // call to sqlite3_exec(). __19: tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_errcode(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb))) goto __3 // $db exists $sql // $db onecolumn $sql // // The onecolumn method is the equivalent of: // lindex [$db eval $sql] 0 __20: __21: pResult4 = uintptr(0) if !(objc != 3) { goto __183 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10172 /* "SQL" */) return TCL_ERROR __183: ; dbEvalInit(tls, bp+1568 /* &sEval */, pDb, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0), 0) rc = dbEvalStep(tls, bp+1568 /* &sEval */) if !(*(*int32)(unsafe.Pointer(bp + 1416 /* choice */)) == 23 /* DB_ONECOLUMN */) { goto __184 } if !(rc == TCL_OK) { goto __186 } pResult4 = dbEvalColumnValue(tls, bp+1568 /* &sEval */, 0) goto __187 __186: if !(rc == TCL_BREAK) { goto __188 } tcl.XTcl_ResetResult(tls, interp) __188: ; __187: ; goto __185 __184: if !((rc == TCL_BREAK) || (rc == TCL_OK)) { goto __189 } pResult4 = tcl.XTcl_NewIntObj(tls, (libc.Bool32((libc.Bool32(rc == TCL_OK)) != 0))) __189: ; __185: ; dbEvalFinalize(tls, bp+1568 /* &sEval */) if !(pResult4 != 0) { goto __190 } tcl.XTcl_SetObjResult(tls, interp, pResult4) __190: ; if !(rc == TCL_BREAK) { goto __191 } rc = TCL_OK __191: ; goto __3 // $db eval ?options? $sql ?array? ?{ ...code... }? // // The SQL statement in $sql is evaluated. For each row, the values are // placed in elements of the array named "array" and ...code... is executed. // If "array" and "code" are omitted, then no callback is every invoked. // If "array" is an empty string, then the values are placed in variables // that have the same name as the fields extracted by the query. __22: evalFlags = 0 __192: if !(((objc > 3) && ((libc.AssignUintptr(&zOpt1, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))))) != uintptr(0))) && (int32(*(*int8)(unsafe.Pointer(zOpt1))) == '-')) { goto __193 } if !(libc.Xstrcmp(tls, zOpt1, ts+12228 /* "-withoutnulls" */) == 0) { goto __194 } evalFlags = evalFlags | (SQLITE_EVAL_WITHOUTNULLS) goto __195 __194: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+888, ts+12242 /* "unknown option: ..." */, zOpt1, ts+11636 /* "\"" */, uintptr(0))) return TCL_ERROR __195: ; objc-- objv += 8 goto __192 __193: ; if !((objc < 3) || (objc > 5)) { goto __196 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12260 /* "?OPTIONS? SQL ?A..." */) return TCL_ERROR __196: ; if !(objc == 3) { goto __197 } pRet = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pRet)).FrefCount++ dbEvalInit(tls, bp+1624 /* &sEval1 */, pDb, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0), 0) __199: if !(TCL_OK == (libc.AssignInt32(&rc, dbEvalStep(tls, bp+1624 /* &sEval1 */)))) { goto __200 } dbEvalRowInfo(tls, bp+1624 /* &sEval1 */, bp+1680 /* &nCol1 */, uintptr(0)) i2 = 0 __201: if !(i2 < *(*int32)(unsafe.Pointer(bp + 1680 /* nCol1 */))) { goto __203 } tcl.XTcl_ListObjAppendElement(tls, interp, pRet, dbEvalColumnValue(tls, bp+1624 /* &sEval1 */, i2)) goto __202 __202: i2++ goto __201 goto __203 __203: ; goto __199 __200: ; dbEvalFinalize(tls, bp+1624 /* &sEval1 */) if !(rc == TCL_BREAK) { goto __204 } tcl.XTcl_SetObjResult(tls, interp, pRet) rc = TCL_OK __204: ; __205: _objPtr1 = pRet if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr1))).FrefCount, 1) <= 1) { goto __208 } tcl.XTclFreeObj(tls, _objPtr1) __208: ; goto __206 __206: if 0 != 0 { goto __205 } goto __207 __207: ; goto __198 __197: pArray = uintptr(0) if !((objc >= 5) && (*(*int8)(unsafe.Pointer(tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))))) != 0)) { goto __209 } pArray = *(*uintptr)(unsafe.Pointer(objv + 3*8)) __209: ; pScript = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ p = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(DbEvalContext{}))) dbEvalInit(tls, p, pDb, *(*uintptr)(unsafe.Pointer(objv + 2*8)), pArray, evalFlags) *(*ClientData)(unsafe.Pointer(bp + 1688 /* &cd2[0] */)) = p *(*ClientData)(unsafe.Pointer(bp + 1688 /* &cd2[0] */ + 1*8)) = pScript rc = DbEvalNextCmd(tls, bp+1688 /* &cd2[0] */, interp, TCL_OK) __198: ; goto __3 // $db function NAME [OPTIONS] SCRIPT // // Create a new SQL function called NAME. Whenever that function is // called, invoke SCRIPT to evaluate the function. // // Options: // --argcount N Function has exactly N arguments // --deterministic The function is pure // --directonly Prohibit use inside triggers and views // --innocuous Has no side effects or information leaks // --returntype TYPE Specify the return type of the function __23: flags1 = SQLITE_UTF8 *(*int32)(unsafe.Pointer(bp + 1704 /* nArg */)) = -1 *(*int32)(unsafe.Pointer(bp + 1760 /* eType */)) = SQLITE_NULL if !(objc < 4) { goto __210 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12296 /* "NAME ?SWITCHES? ..." */) return TCL_ERROR __210: ; i3 = 3 __211: if !(i3 < (objc - 1)) { goto __213 } z2 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8))) n1 = strlen30(tls, z2) if !((n1 > 1) && (libc.Xstrncmp(tls, z2, ts+12319 /* "-argcount" */, uint64(n1)) == 0)) { goto __214 } if !(i3 == (objc - 2)) { goto __216 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+928, ts+12329 /* "option requires ..." */, z2, uintptr(0))) return TCL_ERROR __216: ; if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i3+1))*8)), bp+1704 /* &nArg */) != 0) { goto __217 } return TCL_ERROR __217: ; if !(*(*int32)(unsafe.Pointer(bp + 1704 /* nArg */)) < 0) { goto __218 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+960, ts+12359, /* "number of argume..." */ uintptr(0))) return TCL_ERROR __218: ; i3++ goto __215 __214: if !((n1 > 1) && (libc.Xstrncmp(tls, z2, ts+12400 /* "-deterministic" */, uint64(n1)) == 0)) { goto __219 } flags1 = flags1 | (SQLITE_DETERMINISTIC) goto __220 __219: if !((n1 > 1) && (libc.Xstrncmp(tls, z2, ts+12415 /* "-directonly" */, uint64(n1)) == 0)) { goto __221 } flags1 = flags1 | (SQLITE_DIRECTONLY) goto __222 __221: if !((n1 > 1) && (libc.Xstrncmp(tls, z2, ts+12427 /* "-innocuous" */, uint64(n1)) == 0)) { goto __223 } flags1 = flags1 | (SQLITE_INNOCUOUS) goto __224 __223: if !((n1 > 1) && (libc.Xstrncmp(tls, z2, ts+12438 /* "-returntype" */, uint64(n1)) == 0)) { goto __225 } *(*[6]uintptr)(unsafe.Pointer(bp + 1712 /* azType */)) = [6]uintptr{ts + 7918 /* "integer" */, ts + 12450 /* "real" */, ts + 12455 /* "text" */, ts + 12460 /* "blob" */, ts + 12465 /* "any" */, uintptr(0)} if !(i3 == (objc - 2)) { goto __227 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+984, ts+12329 /* "option requires ..." */, z2, uintptr(0))) return TCL_ERROR __227: ; i3++ if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)), bp+1712 /* &azType[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+12469 /* "type" */, 0, bp+1760 /* &eType */) != 0) { goto __228 } return TCL_ERROR __228: ; *(*int32)(unsafe.Pointer(bp + 1760 /* eType */))++ goto __226 __225: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1016, ts+11535 /* "bad option \"" */, z2, ts+12474 /* "\": must be -argc..." */, uintptr(0))) return TCL_ERROR __226: ; __224: ; __222: ; __220: ; __215: ; goto __212 __212: i3++ goto __211 goto __213 __213: ; pScript1 = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) zName1 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0)) pFunc = findSqlFunc(tls, pDb, zName1) if !(pFunc == uintptr(0)) { goto __229 } return TCL_ERROR __229: ; if !((*SqlFunc)(unsafe.Pointer(pFunc)).FpScript != 0) { goto __230 } __231: _objPtr2 = (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr2))).FrefCount, 1) <= 1) { goto __234 } tcl.XTclFreeObj(tls, _objPtr2) __234: ; goto __232 __232: if 0 != 0 { goto __231 } goto __233 __233: ; __230: ; (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript = pScript1 (*Tcl_Obj)(unsafe.Pointer(pScript1)).FrefCount++ (*SqlFunc)(unsafe.Pointer(pFunc)).FuseEvalObjv = safeToUseEvalObjv(tls, interp, pScript1) (*SqlFunc)(unsafe.Pointer(pFunc)).FeType = *(*int32)(unsafe.Pointer(bp + 1760 /* eType */)) rc = sqlite3.Xsqlite3_create_function(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zName1, *(*int32)(unsafe.Pointer(bp + 1704 /* nArg */)), flags1, pFunc, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tclSqlFunc})), uintptr(0), uintptr(0)) if !(rc != SQLITE_OK) { goto __235 } rc = TCL_ERROR tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) __235: ; goto __3 // $db incrblob ?-readonly? ?DB? TABLE COLUMN ROWID __24: isReadonly1 = 0 zDb = ts + 85 /* "main" */ // Check for the -readonly option if !((objc > 3) && (libc.Xstrcmp(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), ts+12125 /* "-readonly" */) == 0)) { goto __236 } isReadonly1 = 1 __236: ; if !((objc != (5 + isReadonly1)) && (objc != (6 + isReadonly1))) { goto __237 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12552 /* "?-readonly? ?DB?..." */) return TCL_ERROR __237: ; if !(objc == (6 + isReadonly1)) { goto __238 } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) __238: ; zTable1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8))) zColumn = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8))) rc = tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)), bp+1768 /* &iRow */) if !(rc == TCL_OK) { goto __239 } rc = createIncrblobChannel(tls, interp, pDb, zDb, zTable1, zColumn, *(*Tcl_WideInt)(unsafe.Pointer(bp + 1768 /* iRow */)), isReadonly1) __239: ; goto __3 // $db interrupt // // Interrupt the execution of the inner-most SQL interpreter. This // causes the SQL statement to return an error of SQLITE_INTERRUPT. __25: sqlite3.Xsqlite3_interrupt(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) goto __3 // $db nullvalue ?STRING? // // Change text used when a NULL comes back from the database. If ?STRING? // is not present, then the current string used for NULL is returned. // If STRING is present, then STRING is returned. // __26: if !((objc != 2) && (objc != 3)) { goto __240 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12588 /* "NULLVALUE" */) return TCL_ERROR __240: ; if !(objc == 3) { goto __241 } zNull1 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1776 /* &len5 */) if !((*SqliteDb)(unsafe.Pointer(pDb)).FzNull != 0) { goto __242 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull) __242: ; if !((zNull1 != 0) && (*(*int32)(unsafe.Pointer(bp + 1776 /* len5 */)) > 0)) { goto __243 } (*SqliteDb)(unsafe.Pointer(pDb)).FzNull = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1776 /* len5 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull, zNull1, uint64(*(*int32)(unsafe.Pointer(bp + 1776 /* len5 */)))) *(*int8)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FzNull + uintptr(*(*int32)(unsafe.Pointer(bp + 1776 /* len5 */))))) = int8(0) goto __244 __243: (*SqliteDb)(unsafe.Pointer(pDb)).FzNull = uintptr(0) __244: ; __241: ; tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull, -1)) goto __3 // $db last_insert_rowid // // Return an integer which is the ROWID for the most recent insert. __27: if !(objc != 2) { goto __245 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+489 /* "" */) return TCL_ERROR __245: ; rowid = sqlite3.Xsqlite3_last_insert_rowid(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) pResult5 = tcl.XTcl_GetObjResult(tls, interp) tcl.XTcl_SetWideIntObj(tls, pResult5, rowid) goto __3 // The DB_ONECOLUMN method is implemented together with DB_EXISTS. // $db progress ?N CALLBACK? // // Invoke the given callback every N virtual machine opcodes while executing // queries. __28: if !(objc == 2) { goto __246 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0) { goto __248 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1056, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress, uintptr(0))) __248: ; goto __247 __246: if !(objc == 4) { goto __249 } if !(TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1780 /* &N */)) { goto __251 } return TCL_ERROR __251: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0) { goto __252 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress) __252: ; zProgress = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+1784 /* &len6 */) if !((zProgress != 0) && (*(*int32)(unsafe.Pointer(bp + 1784 /* len6 */)) > 0)) { goto __253 } (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1784 /* len6 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress, zProgress, (uint64(*(*int32)(unsafe.Pointer(bp + 1784 /* len6 */)) + 1))) goto __254 __253: (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress = uintptr(0) __254: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0) { goto __255 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_progress_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1780 /* N */)), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{DbProgressHandler})), pDb) goto __256 __255: sqlite3.Xsqlite3_progress_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, 0, uintptr(0), uintptr(0)) __256: ; goto __250 __249: tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12598 /* "N CALLBACK" */) return TCL_ERROR __250: ; __247: ; goto __3 // $db profile ?CALLBACK? // // Make arrangements to invoke the CALLBACK routine after each SQL statement // that has run. The text of the SQL and the amount of elapse time are // appended to CALLBACK before the script is run. __29: if !(objc > 3) { goto __257 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11382 /* "?CALLBACK?" */) return TCL_ERROR goto __258 __257: if !(objc == 2) { goto __259 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0) { goto __261 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1080, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, uintptr(0))) __261: ; goto __260 __259: if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0) { goto __262 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile) __262: ; zProfile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1788 /* &len7 */) if !((zProfile != 0) && (*(*int32)(unsafe.Pointer(bp + 1788 /* len7 */)) > 0)) { goto __263 } (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1788 /* len7 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, zProfile, (uint64(*(*int32)(unsafe.Pointer(bp + 1788 /* len7 */)) + 1))) goto __264 __263: (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile = uintptr(0) __264: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0) { goto __265 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_profile(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, sqlite_uint64) }{DbProfileHandler})), pDb) goto __266 __265: sqlite3.Xsqlite3_profile(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) __266: ; __260: ; __258: ; goto __3 // $db rekey KEY // // Change the encryption key on the currently open database. __30: if !(objc != 3) { goto __267 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12609 /* "KEY" */) return TCL_ERROR __267: ; goto __3 // $db restore ?DATABASE? FILENAME // // Open a database file named FILENAME. Transfer the content // of FILENAME into the local database DATABASE (default: "main"). __31: nTimeout = 0 if !(objc == 3) { goto __268 } zDestDb = ts + 85 /* "main" */ zSrcFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) goto __269 __268: if !(objc == 4) { goto __270 } zDestDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zSrcFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) goto __271 __270: tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11393 /* "?DATABASE? FILEN..." */) return TCL_ERROR __271: ; __269: ; rc = sqlite3.Xsqlite3_open_v2(tls, zSrcFile, bp+1792, /* &pSrc */ (SQLITE_OPEN_READONLY | (*SqliteDb)(unsafe.Pointer(pDb)).FopenFlags), uintptr(0)) if !(rc != SQLITE_OK) { goto __272 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1104, ts+12613, /* "cannot open sour..." */ sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1792 /* pSrc */))), uintptr(0))) sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1792 /* pSrc */))) return TCL_ERROR __272: ; pBackup1 = sqlite3.Xsqlite3_backup_init(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zDestDb, *(*uintptr)(unsafe.Pointer(bp + 1792 /* pSrc */)), ts+85 /* "main" */) if !(pBackup1 == uintptr(0)) { goto __273 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1136, ts+12643, /* "restore failed: " */ sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1792 /* pSrc */))) return TCL_ERROR __273: ; __274: if !(((libc.AssignInt32(&rc, sqlite3.Xsqlite3_backup_step(tls, pBackup1, 100))) == SQLITE_OK) || (rc == SQLITE_BUSY)) { goto __275 } if !(rc == SQLITE_BUSY) { goto __276 } if !(libc.PostIncInt32(&nTimeout, 1) >= 3) { goto __277 } goto __275 __277: ; sqlite3.Xsqlite3_sleep(tls, 100) __276: ; goto __274 __275: ; sqlite3.Xsqlite3_backup_finish(tls, pBackup1) if !(rc == SQLITE_DONE) { goto __278 } rc = TCL_OK goto __279 __278: if !((rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED)) { goto __280 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1168, ts+12660, /* "restore failed: ..." */ uintptr(0))) rc = TCL_ERROR goto __281 __280: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1192, ts+12643, /* "restore failed: " */ sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) rc = TCL_ERROR __281: ; __279: ; sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1792 /* pSrc */))) goto __3 // $db serialize ?DATABASE? // // Return a serialization of a database. __32: if objc >= 3 { zSchema1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } else { zSchema1 = ts + 85 /* "main" */ } *(*sqlite3_int64)(unsafe.Pointer(bp + 1800 /* sz */)) = int64(0) if !((objc != 2) && (objc != 3)) { goto __282 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12697 /* "?DATABASE?" */) rc = TCL_ERROR goto __283 __282: pData1 = sqlite3.Xsqlite3_serialize(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema1, bp+1800 /* &sz */, uint32(SQLITE_SERIALIZE_NOCOPY)) if !(pData1 != 0) { goto __284 } needFree = 0 goto __285 __284: pData1 = sqlite3.Xsqlite3_serialize(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema1, bp+1800 /* &sz */, uint32(0)) needFree = 1 __285: ; tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, pData1, int32(*(*sqlite3_int64)(unsafe.Pointer(bp + 1800 /* sz */))))) if !(needFree != 0) { goto __286 } sqlite3.Xsqlite3_free(tls, pData1) __286: ; __283: ; goto __3 // $db status (step|sort|autoindex|vmstep) // // Display SQLITE_STMTSTATUS_FULLSCAN_STEP or // SQLITE_STMTSTATUS_SORT for the most recent eval. __33: if !(objc != 3) { goto __287 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12708 /* "(step|sort|autoi..." */) return TCL_ERROR __287: ; zOp = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if !(libc.Xstrcmp(tls, zOp, ts+10122 /* "step" */) == 0) { goto __288 } v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnStep goto __289 __288: if !(libc.Xstrcmp(tls, zOp, ts+12730 /* "sort" */) == 0) { goto __290 } v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnSort goto __291 __290: if !(libc.Xstrcmp(tls, zOp, ts+12735 /* "autoindex" */) == 0) { goto __292 } v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnIndex goto __293 __292: if !(libc.Xstrcmp(tls, zOp, ts+12745 /* "vmstep" */) == 0) { goto __294 } v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnVMStep goto __295 __294: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1224, ts+12752, /* "bad argument: sh..." */ uintptr(0))) return TCL_ERROR __295: ; __293: ; __291: ; __289: ; tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, v2)) goto __3 // $db timeout MILLESECONDS // // Delay for the number of milliseconds specified when a file is locked. __34: if !(objc != 3) { goto __296 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12808 /* "MILLISECONDS" */) return TCL_ERROR __296: ; if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1808 /* &ms */) != 0) { goto __297 } return TCL_ERROR __297: ; sqlite3.Xsqlite3_busy_timeout(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1808 /* ms */))) goto __3 // $db total_changes // // Return the number of rows that were modified, inserted, or deleted // since the database handle was created. __35: if !(objc != 2) { goto __298 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+489 /* "" */) return TCL_ERROR __298: ; pResult6 = tcl.XTcl_GetObjResult(tls, interp) tcl.XTcl_SetIntObj(tls, pResult6, sqlite3.Xsqlite3_total_changes(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) goto __3 // $db trace ?CALLBACK? // // Make arrangements to invoke the CALLBACK routine for each SQL statement // that is executed. The text of the SQL is appended to CALLBACK before // it is executed. __36: if !(objc > 3) { goto __299 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11382 /* "?CALLBACK?" */) return TCL_ERROR goto __300 __299: if !(objc == 2) { goto __301 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0) { goto __303 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1248, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, uintptr(0))) __303: ; goto __302 __301: if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0) { goto __304 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace) __304: ; zTrace = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1812 /* &len8 */) if !((zTrace != 0) && (*(*int32)(unsafe.Pointer(bp + 1812 /* len8 */)) > 0)) { goto __305 } (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1812 /* len8 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, zTrace, (uint64(*(*int32)(unsafe.Pointer(bp + 1812 /* len8 */)) + 1))) goto __306 __305: (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace = uintptr(0) __306: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0) { goto __307 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_trace(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{DbTraceHandler})), pDb) goto __308 __307: sqlite3.Xsqlite3_trace(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) __308: ; __302: ; __300: ; goto __3 // $db trace_v2 ?CALLBACK? ?MASK? // // Make arrangements to invoke the CALLBACK routine for each trace event // matching the mask that is generated. The parameters are appended to // CALLBACK before it is executed. __37: if !(objc > 4) { goto __309 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12821 /* "?CALLBACK? ?MASK..." */) return TCL_ERROR goto __310 __309: if !(objc == 2) { goto __311 } if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0) { goto __313 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1272, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, uintptr(0))) __313: ; goto __312 __311: wMask = int64(0) if !(objc == 4) { goto __314 } if !(TCL_OK != tcl.XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+1816 /* &len9 */)) { goto __316 } return TCL_ERROR __316: ; i4 = 0 __317: if !(i4 < *(*int32)(unsafe.Pointer(bp + 1816 /* len9 */))) { goto __319 } if !(TCL_OK != tcl.XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), i4, bp+1824 /* &pObj */)) { goto __320 } return TCL_ERROR __320: ; if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1824 /* pObj */)), uintptr(unsafe.Pointer(&TTYPE_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+12839 /* "trace type" */, 0, bp+1832 /* &ttype */) != TCL_OK) { goto __321 } pError = tcl.XTcl_DuplicateObj(tls, tcl.XTcl_GetObjResult(tls, interp)) (*Tcl_Obj)(unsafe.Pointer(pError)).FrefCount++ if !(TCL_OK == tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1824 /* pObj */)), bp+1840 /* &wType */)) { goto __323 } __325: _objPtr3 = pError if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr3))).FrefCount, 1) <= 1) { goto __328 } tcl.XTclFreeObj(tls, _objPtr3) __328: ; goto __326 __326: if 0 != 0 { goto __325 } goto __327 __327: ; wMask = wMask | (*(*Tcl_WideInt)(unsafe.Pointer(bp + 1840 /* wType */))) goto __324 __323: tcl.XTcl_SetObjResult(tls, interp, pError) __329: _objPtr4 = pError if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr4))).FrefCount, 1) <= 1) { goto __332 } tcl.XTclFreeObj(tls, _objPtr4) __332: ; goto __330 __330: if 0 != 0 { goto __329 } goto __331 __331: ; return TCL_ERROR __324: ; goto __322 __321: switch uint32(*(*int32)(unsafe.Pointer(bp + 1832 /* ttype */))) { case uint32(0) /* TTYPE_STMT */ : goto __334 case uint32(1) /* TTYPE_PROFILE */ : goto __335 case uint32(2) /* TTYPE_ROW */ : goto __336 case uint32(3) /* TTYPE_CLOSE */ : goto __337 } goto __333 __334: wMask = wMask | (int64(SQLITE_TRACE_STMT)) goto __333 __335: wMask = wMask | (int64(SQLITE_TRACE_PROFILE)) goto __333 __336: wMask = wMask | (int64(SQLITE_TRACE_ROW)) goto __333 __337: wMask = wMask | (int64(SQLITE_TRACE_CLOSE)) goto __333 __333: ; __322: ; goto __318 __318: i4++ goto __317 goto __319 __319: ; goto __315 __314: wMask = int64(SQLITE_TRACE_STMT) // use the "legacy" default __315: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0) { goto __338 } tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2) __338: ; zTraceV2 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+1816 /* &len9 */) if !((zTraceV2 != 0) && (*(*int32)(unsafe.Pointer(bp + 1816 /* len9 */)) > 0)) { goto __339 } (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1816 /* len9 */)) + 1))) libc.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, zTraceV2, (uint64(*(*int32)(unsafe.Pointer(bp + 1816 /* len9 */)) + 1))) goto __340 __339: (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 = uintptr(0) __340: ; if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0) { goto __341 } (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp sqlite3.Xsqlite3_trace_v2(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uint32(wMask), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uint32, uintptr, uintptr, uintptr) int32 }{DbTraceV2Handler})), pDb) goto __342 __341: sqlite3.Xsqlite3_trace_v2(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uint32(0), uintptr(0), uintptr(0)) __342: ; __312: ; __310: ; goto __3 // $db transaction [-deferred|-immediate|-exclusive] SCRIPT // // Start a new transaction (if we are not already in the midst of a // transaction) and execute the TCL script SCRIPT. After SCRIPT // completes, either commit the transaction or roll it back if SCRIPT // throws an exception. Or if no new transation was started, do nothing. // pass the exception on up the stack. // // This command was inspired by Dave Thomas's talk on Ruby at the // 2005 O'Reilly Open Source Convention (OSCON). __38: zBegin = ts + 12850 /* "SAVEPOINT _tcl_t..." */ if !((objc != 3) && (objc != 4)) { goto __343 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12877 /* "[TYPE] SCRIPT" */) return TCL_ERROR __343: ; if !(((*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction == 0) && (objc == 4)) { goto __344 } if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&TTYPE_strs1)), int32(unsafe.Sizeof(uintptr(0))), ts+12891 /* "transaction type" */, 0, bp+1848 /* &ttype1 */) != 0) { goto __345 } return TCL_ERROR __345: ; switch uint32(*(*int32)(unsafe.Pointer(bp + 1848 /* ttype1 */))) { case uint32(0) /* TTYPE_DEFERRED */ : goto __347 case uint32(1) /* TTYPE_EXCLUSIVE */ : goto __348 case uint32(2) /* TTYPE_IMMEDIATE */ : goto __349 } goto __346 __347: /* no-op */ ; goto __346 __348: zBegin = ts + 12908 /* "BEGIN EXCLUSIVE" */ goto __346 __349: zBegin = ts + 12924 /* "BEGIN IMMEDIATE" */ goto __346 __346: ; __344: ; pScript2 = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) // Run the SQLite BEGIN command to open a transaction or savepoint. (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth++ rc = sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zBegin, uintptr(0), uintptr(0), uintptr(0)) (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth-- if !(rc != SQLITE_OK) { goto __350 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1296, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) return TCL_ERROR __350: ; (*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction++ // If using NRE, schedule a callback to invoke the script pScript, then // a second callback to commit (or rollback) the transaction or savepoint // opened above. If not using NRE, evaluate the script directly, then // call function DbTransPostCmd() to commit (or rollback) the transaction // or savepoint. if !(DbUseNre(tls) != 0) { goto __351 } tcl.XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 }{DbTransPostCmd})), *(*uintptr)(unsafe.Pointer(bp + 1856 /* cd */)), uintptr(0), uintptr(0), uintptr(0)) tcl.XTcl_NREvalObj(tls, interp, pScript2, 0) goto __352 __351: rc = DbTransPostCmd(tls, bp+1856 /* &cd */, interp, tcl.XTcl_EvalObjEx(tls, interp, pScript2, 0)) __352: ; goto __3 // $db unlock_notify ?script? __39: if !((objc != 2) && (objc != 3)) { goto __353 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12940 /* "?SCRIPT?" */) rc = TCL_ERROR goto __354 __353: xNotify = uintptr(0) pNotifyArg = uintptr(0) if !((*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify != 0) { goto __355 } __356: _objPtr5 = (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr5))).FrefCount, 1) <= 1) { goto __359 } tcl.XTclFreeObj(tls, _objPtr5) __359: ; goto __357 __357: if 0 != 0 { goto __356 } goto __358 __358: ; (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = uintptr(0) __355: ; if !(objc == 3) { goto __360 } xNotify = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) }{DbUnlockNotify})) pNotifyArg = pDb (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = *(*uintptr)(unsafe.Pointer(objv + 2*8)) (*Tcl_Obj)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify)).FrefCount++ __360: ; if !(sqlite3.Xsqlite3_unlock_notify(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, xNotify, pNotifyArg) != 0) { goto __361 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1320, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) rc = TCL_ERROR __361: ; __354: ; goto __3 // $db preupdate_hook count // $db preupdate_hook hook ?SCRIPT? // $db preupdate_hook new INDEX // $db preupdate_hook old INDEX __40: if !(objc < 3) { goto __362 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12949 /* "SUB-COMMAND ?ARG..." */) __362: ; if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&azSub)), int32(unsafe.Sizeof(uintptr(0))), ts+1875 /* "sub-command" */, 0, bp+1864 /* &iSub */) != 0) { goto __363 } return TCL_ERROR __363: ; switch uint32(*(*int32)(unsafe.Pointer(bp + 1864 /* iSub */))) { case uint32(0) /* PRE_COUNT */ : goto __365 case uint32(2) /* PRE_HOOK */ : goto __366 case uint32(1) /* PRE_DEPTH */ : goto __367 case uint32(3) /* PRE_NEW */ : goto __368 case uint32(4) /* PRE_OLD */ : goto __369 } goto __364 __365: nCol2 = sqlite3.Xsqlite3_preupdate_count(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nCol2)) goto __364 __366: if !(objc > 4) { goto __370 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12968 /* "hook ?SCRIPT?" */) return TCL_ERROR __370: ; DbHookCmd(tls, interp, pDb, func() uintptr { if objc == 4 { return *(*uintptr)(unsafe.Pointer(objv + 3*8)) } return uintptr(0) }(), (pDb + 112 /* &.pPreUpdateHook */)) goto __364 __367: if !(objc != 3) { goto __371 } tcl.XTcl_WrongNumArgs(tls, interp, 3, objv, ts+489 /* "" */) return TCL_ERROR __371: ; pRet1 = tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_preupdate_depth(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) tcl.XTcl_SetObjResult(tls, interp, pRet1) goto __364 __368: __369: if !(objc != 4) { goto __372 } tcl.XTcl_WrongNumArgs(tls, interp, 3, objv, ts+12982 /* "INDEX" */) return TCL_ERROR __372: ; if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+1868 /* &iIdx */) != 0) { goto __373 } return TCL_ERROR __373: ; if !(*(*int32)(unsafe.Pointer(bp + 1864 /* iSub */)) == 4 /* PRE_OLD */) { goto __374 } rc = sqlite3.Xsqlite3_preupdate_old(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1868 /* iIdx */)), bp+1872 /* &pValue1 */) goto __375 __374: ; rc = sqlite3.Xsqlite3_preupdate_new(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1868 /* iIdx */)), bp+1872 /* &pValue1 */) __375: ; if !(rc == SQLITE_OK) { goto __376 } pObj1 = tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(bp + 1872 /* pValue1 */))), -1) tcl.XTcl_SetObjResult(tls, interp, pObj1) goto __377 __376: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1344, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) return TCL_ERROR __377: ; __364: ; goto __3 // $db wal_hook ?script? // $db update_hook ?script? // $db rollback_hook ?script? __41: __42: __43: // set ppHook to point at pUpdateHook or pRollbackHook, depending on // whether [$db update_hook] or [$db rollback_hook] was invoked. ppHook = uintptr(0) if !(*(*int32)(unsafe.Pointer(bp + 1416 /* choice */)) == 40 /* DB_WAL_HOOK */) { goto __378 } ppHook = (pDb + 128 /* &.pWalHook */) __378: ; if !(*(*int32)(unsafe.Pointer(bp + 1416 /* choice */)) == 38 /* DB_UPDATE_HOOK */) { goto __379 } ppHook = (pDb + 104 /* &.pUpdateHook */) __379: ; if !(*(*int32)(unsafe.Pointer(bp + 1416 /* choice */)) == 29 /* DB_ROLLBACK_HOOK */) { goto __380 } ppHook = (pDb + 120 /* &.pRollbackHook */) __380: ; if !(objc > 3) { goto __381 } tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12940 /* "?SCRIPT?" */) return TCL_ERROR __381: ; DbHookCmd(tls, interp, pDb, func() uintptr { if objc == 3 { return *(*uintptr)(unsafe.Pointer(objv + 2*8)) } return uintptr(0) }(), ppHook) goto __3 // $db version // // Return the version string for this database. __44: i5 = 2 __382: if !(i5 < objc) { goto __384 } zArg = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i5)*8))) // Optional arguments to $db version are used for testing purpose // $db version -use-legacy-prepare BOOLEAN // // Turn the use of legacy sqlite3_prepare() on or off. if !((libc.Xstrcmp(tls, zArg, ts+12988 /* "-use-legacy-prep..." */) == 0) && ((i5 + 1) < objc)) { goto __385 } i5++ if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i5)*8)), (pDb+224 /* &.bLegacyPrepare */)) != 0) { goto __387 } return TCL_ERROR __387: ; goto __386 __385: // $db version -last-stmt-ptr // // Return a string which is a hex encoding of the pointer to the // most recent sqlite3_stmt in the statement cache. if !(libc.Xstrcmp(tls, zArg, ts+13008 /* "-last-stmt-ptr" */) == 0) { goto __388 } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+1880 /* &zBuf[0] */, ts+13023, /* "%p" */ libc.VaList(bp+1368, func() uintptr { if (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList != 0 { return (*SqlPreparedStmt)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FstmtList)).FpStmt } return uintptr(0) }())) tcl.XTcl_SetResult(tls, interp, bp+1880 /* &zBuf[0] */, uintptr(1)) goto __389 __388: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+1384, ts+13026 /* "unknown argument..." */, zArg, uintptr(0))) return TCL_ERROR __389: ; __386: ; goto __383 __383: i5++ goto __382 goto __384 __384: ; if !(i5 == 2) { goto __390 } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_libversion(tls), uintptr(0)) __390: ; goto __3 __3: ; // End of the SWITCH statement return rc } type DbConfigChoices = struct { FzName uintptr Fop int32 _ [4]byte } /* tclsqlite.c:2340:18 */ var DB_strs = [42]uintptr{ ts + 13045 /* "authorizer" */, ts + 13056 /* "backup" */, ts + 13063, /* "bind_fallback" */ ts + 13077 /* "busy" */, ts + 13082 /* "cache" */, ts + 13088, /* "changes" */ ts + 10127 /* "close" */, ts + 13096 /* "collate" */, ts + 13104, /* "collation_needed" */ ts + 13121 /* "commit_hook" */, ts + 13133 /* "complete" */, ts + 13142, /* "config" */ ts + 13149 /* "copy" */, ts + 13154 /* "deserialize" */, ts + 13166, /* "enable_load_exte..." */ ts + 13188 /* "errorcode" */, ts + 4767 /* "eval" */, ts + 13198, /* "exists" */ ts + 13205 /* "function" */, ts + 10526 /* "incrblob" */, ts + 13214, /* "interrupt" */ ts + 13224 /* "last_insert_rowi..." */, ts + 13242 /* "nullvalue" */, ts + 13252, /* "onecolumn" */ ts + 13262 /* "preupdate" */, ts + 13272 /* "profile" */, ts + 10201, /* "progress" */ ts + 13280 /* "rekey" */, ts + 13286 /* "restore" */, ts + 13294, /* "rollback_hook" */ ts + 13308 /* "serialize" */, ts + 13318 /* "status" */, ts + 13325, /* "timeout" */ ts + 13333 /* "total_changes" */, ts + 13347 /* "trace" */, ts + 13353, /* "trace_v2" */ ts + 13362 /* "transaction" */, ts + 13374 /* "unlock_notify" */, ts + 13388, /* "update_hook" */ ts + 13400 /* "version" */, ts + 13408 /* "wal_hook" */, uintptr(0), } /* tclsqlite.c:1916:21 */ var aDbConfig = [16]DbConfigChoices{ {FzName: ts + 13417 /* "defensive" */, Fop: SQLITE_DBCONFIG_DEFENSIVE}, {FzName: ts + 13427 /* "dqs_ddl" */, Fop: SQLITE_DBCONFIG_DQS_DDL}, {FzName: ts + 13435 /* "dqs_dml" */, Fop: SQLITE_DBCONFIG_DQS_DML}, {FzName: ts + 13443 /* "enable_fkey" */, Fop: SQLITE_DBCONFIG_ENABLE_FKEY}, {FzName: ts + 13455 /* "enable_qpsg" */, Fop: SQLITE_DBCONFIG_ENABLE_QPSG}, {FzName: ts + 13467 /* "enable_trigger" */, Fop: SQLITE_DBCONFIG_ENABLE_TRIGGER}, {FzName: ts + 13482 /* "enable_view" */, Fop: SQLITE_DBCONFIG_ENABLE_VIEW}, {FzName: ts + 13494 /* "fts3_tokenizer" */, Fop: SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER}, {FzName: ts + 13509 /* "legacy_alter_tab..." */, Fop: SQLITE_DBCONFIG_LEGACY_ALTER_TABLE}, {FzName: ts + 13528 /* "legacy_file_form..." */, Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT}, {FzName: ts + 13547 /* "load_extension" */, Fop: SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION}, {FzName: ts + 13562 /* "no_ckpt_on_close" */, Fop: SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE}, {FzName: ts + 13579 /* "reset_database" */, Fop: SQLITE_DBCONFIG_RESET_DATABASE}, {FzName: ts + 13594 /* "trigger_eqp" */, Fop: SQLITE_DBCONFIG_TRIGGER_EQP}, {FzName: ts + 13606 /* "trusted_schema" */, Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA}, {FzName: ts + 13621 /* "writable_schema" */, Fop: SQLITE_DBCONFIG_WRITABLE_SCHEMA}, } /* tclsqlite.c:2343:7 */ var TTYPE_strs = [5]uintptr{ ts + 13637 /* "statement" */, ts + 13272 /* "profile" */, ts + 13647 /* "row" */, ts + 10127 /* "close" */, uintptr(0), } /* tclsqlite.c:3321:27 */ var TTYPE_strs1 = [4]uintptr{ ts + 13651 /* "deferred" */, ts + 13660 /* "exclusive" */, ts + 13670 /* "immediate" */, uintptr(0), } /* tclsqlite.c:3404:25 */ var azSub = [6]uintptr{ts + 1826 /* "count" */, ts + 13680 /* "depth" */, ts + 13686 /* "hook" */, ts + 13691 /* "new" */, ts + 13695 /* "old" */, uintptr(0)} /* tclsqlite.c:3496:23 */ // Adaptor that provides an objCmd interface to the NRE-enabled // interface implementation. func DbObjCmdAdaptor(tls *libc.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclsqlite.c:3647:26: */ return tcl.XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbObjCmd})), cd, objc, objv) } // Issue the usage message when the "sqlite3" command arguments are // incorrect. func sqliteCmdUsage(tls *libc.TLS, interp uintptr, objv uintptr) int32 { /* tclsqlite.c:3661:12: */ tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13699 /* "HANDLE ?FILENAME..." */) return TCL_ERROR } // sqlite3 DBNAME FILENAME ?-vfs VFSNAME? ?-key KEY? ?-readonly BOOLEAN? // ?-create BOOLEAN? ?-nomutex BOOLEAN? // ?-nofollow BOOLEAN? // // This is the main Tcl command. When the "sqlite" Tcl command is // invoked, this routine runs to process that command. // // The first argument, DBNAME, is an arbitrary name for a new // database connection. This command creates a new command named // DBNAME that is used to control that connection. The database // connection is deleted when the DBNAME command is deleted. // // The second argument is the name of the database file. // func DbMain(tls *libc.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclsqlite.c:3689:26: */ bp := tls.Alloc(384) defer tls.Free(384) var p uintptr var zArg uintptr var zErrMsg uintptr var i int32 var zFile uintptr = uintptr(0) var zVfs uintptr = uintptr(0) var flags int32 *(*int32)(unsafe.Pointer(bp + 160 /* bTranslateFileName */)) = 1 // var translatedFilename Tcl_DString at bp+168, 216 var rc int32 // In normal use, each TCL interpreter runs in a single thread. So // by default, we can turn off mutexing on SQLite database connections. // However, for testing purposes it is useful to have mutexes turned // on. So, by default, mutexes default off. But if compiled with // SQLITE_TCL_DEFAULT_FULLMUTEX then mutexes default on. flags = ((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_NOMUTEX) if objc == 1 { return sqliteCmdUsage(tls, interp, objv) } if objc == 2 { zArg = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0)) if libc.Xstrcmp(tls, zArg, ts+13845 /* "-version" */) == 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3_libversion(tls), uintptr(0))) return TCL_OK } if libc.Xstrcmp(tls, zArg, ts+13854 /* "-sourceid" */) == 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, sqlite3.Xsqlite3_sourceid(tls), uintptr(0))) return TCL_OK } if libc.Xstrcmp(tls, zArg, ts+13864 /* "-has-codec" */) == 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+48, ts+13875 /* "0" */, uintptr(0))) return TCL_OK } if int32(*(*int8)(unsafe.Pointer(zArg))) == '-' { return sqliteCmdUsage(tls, interp, objv) } } for i = 2; i < objc; i++ { zArg = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) if int32(*(*int8)(unsafe.Pointer(zArg))) != '-' { if zFile != uintptr(0) { return sqliteCmdUsage(tls, interp, objv) } zFile = zArg continue } if i == (objc - 1) { return sqliteCmdUsage(tls, interp, objv) } i++ if libc.Xstrcmp(tls, zArg, ts+13877 /* "-key" */) == 0 { // no-op } else if libc.Xstrcmp(tls, zArg, ts+13882 /* "-vfs" */) == 0 { zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) } else if libc.Xstrcmp(tls, zArg, ts+12125 /* "-readonly" */) == 0 { // var b int32 at bp+136, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+136 /* &b */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 136 /* b */)) != 0 { flags = flags & (libc.CplInt32((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE))) flags = flags | (SQLITE_OPEN_READONLY) } else { flags = flags & (libc.CplInt32(SQLITE_OPEN_READONLY)) flags = flags | (SQLITE_OPEN_READWRITE) } } else if libc.Xstrcmp(tls, zArg, ts+13887 /* "-create" */) == 0 { // var b int32 at bp+140, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+140 /* &b */) != 0 { return TCL_ERROR } if (*(*int32)(unsafe.Pointer(bp + 140 /* b */)) != 0) && ((flags & SQLITE_OPEN_READONLY) == 0) { flags = flags | (SQLITE_OPEN_CREATE) } else { flags = flags & (libc.CplInt32(SQLITE_OPEN_CREATE)) } } else if libc.Xstrcmp(tls, zArg, ts+13895 /* "-nofollow" */) == 0 { // var b int32 at bp+144, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+144 /* &b */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 144 /* b */)) != 0 { flags = flags | (SQLITE_OPEN_NOFOLLOW) } else { flags = flags & (libc.CplInt32(SQLITE_OPEN_NOFOLLOW)) } } else if libc.Xstrcmp(tls, zArg, ts+13905 /* "-nomutex" */) == 0 { // var b int32 at bp+148, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+148 /* &b */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 148 /* b */)) != 0 { flags = flags | (SQLITE_OPEN_NOMUTEX) flags = flags & (libc.CplInt32(SQLITE_OPEN_FULLMUTEX)) } else { flags = flags & (libc.CplInt32(SQLITE_OPEN_NOMUTEX)) } } else if libc.Xstrcmp(tls, zArg, ts+13914 /* "-fullmutex" */) == 0 { // var b int32 at bp+152, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+152 /* &b */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 152 /* b */)) != 0 { flags = flags | (SQLITE_OPEN_FULLMUTEX) flags = flags & (libc.CplInt32(SQLITE_OPEN_NOMUTEX)) } else { flags = flags & (libc.CplInt32(SQLITE_OPEN_FULLMUTEX)) } } else if libc.Xstrcmp(tls, zArg, ts+13925 /* "-uri" */) == 0 { // var b int32 at bp+156, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+156 /* &b */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 156 /* b */)) != 0 { flags = flags | (SQLITE_OPEN_URI) } else { flags = flags & (libc.CplInt32(SQLITE_OPEN_URI)) } } else if libc.Xstrcmp(tls, zArg, ts+13930 /* "-translatefilena..." */) == 0 { if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+160 /* &bTranslateFileName */) != 0 { return TCL_ERROR } } else { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, ts+12135 /* "unknown option: " */, zArg, uintptr(0))) return TCL_ERROR } } zErrMsg = uintptr(0) p = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(SqliteDb{}))) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(SqliteDb{}))) if zFile == uintptr(0) { zFile = ts + 489 /* "" */ } if *(*int32)(unsafe.Pointer(bp + 160 /* bTranslateFileName */)) != 0 { zFile = tcl.XTcl_TranslateFileName(tls, interp, zFile, bp+168 /* &translatedFilename */) } rc = sqlite3.Xsqlite3_open_v2(tls, zFile, (p /* &.db */), flags, zVfs) if *(*int32)(unsafe.Pointer(bp + 160 /* bTranslateFileName */)) != 0 { tcl.XTcl_DStringFree(tls, bp+168 /* &translatedFilename */) } if (*SqliteDb)(unsafe.Pointer(p)).Fdb != 0 { if SQLITE_OK != sqlite3.Xsqlite3_errcode(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb) { zErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+104, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb))) sqlite3.Xsqlite3_close(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb) (*SqliteDb)(unsafe.Pointer(p)).Fdb = uintptr(0) } } else { zErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+120, sqlite3.Xsqlite3_errstr(tls, rc))) } if (*SqliteDb)(unsafe.Pointer(p)).Fdb == uintptr(0) { tcl.XTcl_SetResult(tls, interp, zErrMsg, uintptr(1)) tcl.XTcl_Free(tls, p) sqlite3.Xsqlite3_free(tls, zErrMsg) return TCL_ERROR } (*SqliteDb)(unsafe.Pointer(p)).FmaxStmt = NUM_PREPARED_STMTS (*SqliteDb)(unsafe.Pointer(p)).FopenFlags = (flags & SQLITE_OPEN_URI) (*SqliteDb)(unsafe.Pointer(p)).Finterp = interp zArg = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0)) if DbUseNre(tls) != 0 { tcl.XTcl_NRCreateCommand(tls, interp, zArg, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbObjCmdAdaptor})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbObjCmd})), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{DbDeleteCmd}))) } else { tcl.XTcl_CreateObjCommand(tls, interp, zArg, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbObjCmd})), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{DbDeleteCmd}))) } return TCL_OK } // Provide a dummy Tcl_InitStubs if we are using this as a static // library. // Make sure we have a PACKAGE_VERSION macro defined. This will be // defined automatically by the TEA makefile. But other makefiles // do not define it. // Initialize this module. // // This Tcl module contains only a single new Tcl command named "sqlite". // (Hence there is no namespace. There is no point in using a namespace // if the extension only supplies one new name!) The "sqlite" command is // used to open a new SQLite database. See the DbMain() routine above // for additional information. // // The EXTERN macros are required by TCL in order to work on windows. func Sqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: */ var rc int32 if 1 != 0 { rc = TCL_OK } else { rc = TCL_ERROR } if rc == TCL_OK { tcl.XTcl_CreateObjCommand(tls, interp, ts+13949 /* "sqlite3" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbMain})), uintptr(0), uintptr(0)) // The "sqlite" alias is undocumented. It is here only to support // legacy scripts. All new scripts should use only the "sqlite3" // command. tcl.XTcl_CreateObjCommand(tls, interp, ts+13957 /* "sqlite" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbMain})), uintptr(0), uintptr(0)) rc = tcl.XTcl_PkgProvideEx(tls, interp, ts+13949 /* "sqlite3" */, ts+13964 /* "3.35.5" */, uintptr(0)) } return rc } func Tclsqlite3_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3891:12: */ return Sqlite3_Init(tls, interp) } func Sqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3892:12: */ return TCL_OK } func Tclsqlite3_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3893:12: */ return TCL_OK } // Because it accesses the file-system and uses persistent state, SQLite // is not considered appropriate for safe interpreters. Hence, we cause // the _SafeInit() interfaces return TCL_ERROR. func Sqlite3_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3899:12: */ return TCL_ERROR } func Sqlite3_SafeUnload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3900:12: */ return TCL_ERROR } func Sqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3905:5: */ return Sqlite3_Init(tls, interp) } func Tclsqlite_Init(tls *libc.TLS, interp uintptr) int32 { /* tclsqlite.c:3906:5: */ return Sqlite3_Init(tls, interp) } func Sqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3907:5: */ return TCL_OK } func Tclsqlite_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclsqlite.c:3908:5: */ return TCL_OK } // If the TCLSH macro is defined, add code to make a stand-alone program. // This is the main routine for an ordinary TCL shell. If there are // are arguments, run the first argument as a script. Otherwise, // read TCL commands from standard input func tclsh_main_loop(tls *libc.TLS) uintptr { /* tclsqlite.c:3920:19: */ return uintptr(unsafe.Pointer(&zMainloop)) } var zMainloop = *(*[431]int8)(unsafe.Pointer(ts + 13971 /* "if {[llength $ar..." */)) /* tclsqlite.c:3921:21 */ func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* tclsqlite.c:3953:18: */ bp := tls.Alloc(88) defer tls.Free(88) var interp uintptr var i int32 var zScript uintptr = uintptr(0) // var zArgc [32]int8 at bp+56, 32 if libc.Xgetenv(tls, ts+14402 /* "SQLITE_DEBUG_BRE..." */) != 0 { if (libc.X_isatty(tls, 0) != 0) && (libc.X_isatty(tls, 2) != 0) { libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)), ts+14421, /* "attach debugger ..." */ libc.VaList(bp, int32(libc.XGetCurrentProcessId(tls)))) libc.Xfgetc(tls, libc.X__acrt_iob_func(tls, uint32(0))) } else { libc.XDebugBreak(tls) } } // Call sqlite3_shutdown() once before doing anything else. This is to // test that sqlite3_shutdown() can be safely called by a process before // sqlite3_initialize() is. sqlite3.Xsqlite3_shutdown(tls) tcl.XTcl_FindExecutable(tls, *(*uintptr)(unsafe.Pointer(argv))) tcl.XTcl_SetSystemEncoding(tls, uintptr(0), ts+14483 /* "utf-8" */) interp = tcl.XTcl_CreateInterp(tls) Sqlite3_Init(tls, interp) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), bp+56 /* &zArgc[0] */, ts+1238 /* "%d" */, libc.VaList(bp+16, (argc-1))) tcl.XTcl_SetVar2(tls, interp, ts+14489 /* "argc" */, uintptr(0), bp+56 /* &zArgc[0] */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+14494 /* "argv0" */, uintptr(0), *(*uintptr)(unsafe.Pointer(argv)), TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+14500 /* "argv" */, uintptr(0), ts+489 /* "" */, TCL_GLOBAL_ONLY) for i = 1; i < argc; i++ { tcl.XTcl_SetVar2(tls, interp, ts+14500 /* "argv" */, uintptr(0), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ((TCL_GLOBAL_ONLY | TCL_LIST_ELEMENT) | TCL_APPEND_VALUE)) } zScript = sqlite3TestInit(tls, interp) if zScript == uintptr(0) { zScript = tclsh_main_loop(tls) } if tcl.XTcl_GlobalEval(tls, interp, zScript) != TCL_OK { var zInfo uintptr = tcl.XTcl_GetVar2(tls, interp, ts+14505 /* "errorInfo" */, uintptr(0), TCL_GLOBAL_ONLY) if zInfo == uintptr(0) { zInfo = tcl.XTcl_GetStringResult(tls, interp) } libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)), ts+14515 /* "%s: %s\n" */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv)), zInfo)) return 1 } return 0 } // CAPI3REF: Database Connection Handle // KEYWORDS: {database connection} {database connections} // // Each open SQLite database is represented by a pointer to an instance of // the opaque structure named "sqlite3". It is useful to think of an sqlite3 // pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and // [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] // and [sqlite3_close_v2()] are its destructors. There are many other // interfaces (such as // [sqlite3_prepare_v2()], [sqlite3_create_function()], and // [sqlite3_busy_timeout()] to name but three) that are methods on an // sqlite3 object. type sqlite31 = sqlite32 /* sqlite3.h:249:24 */ // CAPI3REF: Dynamically Typed Value Object // KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} // // SQLite uses the sqlite3_value object to represent all values // that can be stored in a database table. SQLite uses dynamic typing // for the values it stores. ^Values stored in sqlite3_value objects // can be integers, floating point values, strings, BLOBs, or NULL. // // An sqlite3_value object may be either "protected" or "unprotected". // Some interfaces require a protected sqlite3_value. Other interfaces // will accept either a protected or an unprotected sqlite3_value. // Every interface that accepts sqlite3_value arguments specifies // whether or not it requires a protected sqlite3_value. The // [sqlite3_value_dup()] interface can be used to construct a new // protected sqlite3_value from an unprotected sqlite3_value. // // The terms "protected" and "unprotected" refer to whether or not // a mutex is held. An internal mutex is held for a protected // sqlite3_value object but no mutex is held for an unprotected // sqlite3_value object. If SQLite is compiled to be single-threaded // (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) // or if SQLite is run in one of reduced mutex modes // [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] // then there is no distinction between protected and unprotected // sqlite3_value objects and they can be used interchangeably. However, // for maximum code portability it is recommended that applications // still make the distinction between protected and unprotected // sqlite3_value objects even when not strictly required. // // ^The sqlite3_value objects that are passed as parameters into the // implementation of [application-defined SQL functions] are protected. // ^The sqlite3_value object returned by // [sqlite3_column_value()] is unprotected. // Unprotected sqlite3_value objects may only be used as arguments // to [sqlite3_result_value()], [sqlite3_bind_value()], and // [sqlite3_value_dup()]. // The [sqlite3_value_blob | sqlite3_value_type()] family of // interfaces require protected sqlite3_value objects. type sqlite3_value = sqlite3_value1 /* sqlite3.h:4258:30 */ // CAPI3REF: SQL Function Context Object // // The context in which an SQL function executes is stored in an // sqlite3_context object. ^A pointer to an sqlite3_context object // is always first parameter to [application-defined SQL functions]. // The application-defined SQL function implementation will pass this // pointer through into calls to [sqlite3_result_int | sqlite3_result()], // [sqlite3_aggregate_context()], [sqlite3_user_data()], // [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], // and/or [sqlite3_set_auxdata()]. type sqlite3_context = sqlite3_context1 /* sqlite3.h:4272:32 */ // CAPI3REF: Dynamic String Object // KEYWORDS: {dynamic string} // // An instance of the sqlite3_str object contains a dynamically-sized // string under construction. // // The lifecycle of an sqlite3_str object is as follows: //
    //
  1. ^The sqlite3_str object is created using [sqlite3_str_new()]. //
  2. ^Text is appended to the sqlite3_str object using various // methods, such as [sqlite3_str_appendf()]. //
  3. ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. //
type sqlite3_str = sqlite3_str1 /* sqlite3.h:7851:28 */ // 7.18.1.1 Exact-width integer types type int8_t = int8 /* stdint.h:35:21 */ type uint8_t = uint8 /* stdint.h:36:25 */ type int16_t = int16 /* stdint.h:37:16 */ type uint16_t = uint16 /* stdint.h:38:25 */ type int32_t = int32 /* stdint.h:39:14 */ type uint32_t = uint32 /* stdint.h:40:20 */ type int64_t = int64 /* stdint.h:41:38 */ type uint64_t = uint64 /* stdint.h:42:48 */ // 7.18.1.2 Minimum-width integer types type int_least8_t = int8 /* stdint.h:45:21 */ type uint_least8_t = uint8 /* stdint.h:46:25 */ type int_least16_t = int16 /* stdint.h:47:16 */ type uint_least16_t = uint16 /* stdint.h:48:25 */ type int_least32_t = int32 /* stdint.h:49:14 */ type uint_least32_t = uint32 /* stdint.h:50:20 */ type int_least64_t = int64 /* stdint.h:51:38 */ type uint_least64_t = uint64 /* stdint.h:52:48 */ // 7.18.1.3 Fastest minimum-width integer types // Not actually guaranteed to be fastest for all purposes // Here we use the exact-width types for 8 and 16-bit ints. type int_fast8_t = int8 /* stdint.h:58:21 */ type uint_fast8_t = uint8 /* stdint.h:59:23 */ type int_fast16_t = int16 /* stdint.h:60:16 */ type uint_fast16_t = uint16 /* stdint.h:61:25 */ type int_fast32_t = int32 /* stdint.h:62:14 */ type uint_fast32_t = uint32 /* stdint.h:63:24 */ type int_fast64_t = int64 /* stdint.h:64:38 */ type uint_fast64_t = uint64 /* stdint.h:65:48 */ // 7.18.1.5 Greatest-width integer types type intmax_t = int64 /* stdint.h:68:38 */ type uintmax_t = uint64 /* stdint.h:69:48 */ // 7.18.2 Limits of specified-width integer types // 7.18.2.1 Limits of exact-width integer types // 7.18.2.2 Limits of minimum-width integer types // 7.18.2.3 Limits of fastest minimum-width integer types // 7.18.2.4 Limits of integer types capable of holding // object pointers // 7.18.2.5 Limits of greatest-width integer types // 7.18.3 Limits of other integer types // wint_t is unsigned short for compatibility with MS runtime // 7.18.4 Macros for integer constants // 7.18.4.1 Macros for minimum-width integer constants // // Accoding to Douglas Gwyn : // "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC // 9899:1999 as initially published, the expansion was required // to be an integer constant of precisely matching type, which // is impossible to accomplish for the shorter types on most // platforms, because C99 provides no standard way to designate // an integer constant with width less than that of type int. // TC1 changed this to require just an integer constant // *expression* with *promoted* type." // // The trick used here is from Clive D W Feather. // The 'trick' doesn't work in C89 for long long because, without // suffix, (val) will be evaluated as int, not intmax_t // 7.18.4.2 Macros for greatest-width integer constants // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // 7.8 Format conversion of integer types // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // ISO C Standard: 7.17 Common definitions // Any one of these symbols __need_* means that GNU libc // wants us just to define one data type. So don't define // the symbols that indicate this file's entire job has been done. // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are // defined if the corresponding type is *not* defined. // FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ // Sequent's header files use _PTRDIFF_T_ in some conflicting way. // Just ignore it. // On VxWorks, may have defined macros like // _TYPE_size_t which will typedef size_t. fixincludes patched the // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is // not defined, and so that defining this macro defines _GCC_SIZE_T. // If we find that the macros are still defined at this point, we must // invoke them so that the type is defined as expected. // In case nobody has defined these types, but we aren't running under // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and // __WCHAR_TYPE__ have reasonable values. This can happen if the // parts of GCC is compiled by an older compiler, that actually // include gstddef.h, such as collect2. // Signed type of difference of two pointers. // Define this type if we are doing the whole job, // or if we want this type in particular. // If this symbol has done its job, get rid of it. // Unsigned type of `sizeof' something. // Define this type if we are doing the whole job, // or if we want this type in particular. // Wide character type. // Locale-writers should change this as necessary to // be big enough to hold unique values not between 0 and 127, // and not (wchar_t) -1, for each defined multibyte character. // Define this type if we are doing the whole job, // or if we want this type in particular. // In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. // are already defined. // BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. // A null pointer constant. // Offset of member MEMBER in a struct of type TYPE. // Copyright (C) 1989-2018 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . // ISO C Standard: 7.17 Common definitions type imaxdiv_t = struct { Fquot intmax_t Frem intmax_t } /* inttypes.h:23:4 */ // Set PRI... and SCN... according to __USE_MINGW_ANSI_STDIO. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. // The following macros are used to cast pointers to integers and // integers to pointers. The way you do this varies from one compiler // to the next, so we have developed the following set of #if statements // to generate appropriate macros for a wide range of compilers. // // The correct "ANSI" way to do this is to use the intptr_t type. // Unfortunately, that typedef is not available on all compilers, or // if it is available, it requires an #include of specific headers // that vary from one machine to the next. // // Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on // the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). // So we have to define the macros in different ways depending on the // compiler. // A macro to hint to the compiler that a function should not be // inlined. // Make sure that the compiler intrinsics we desire are enabled when // compiling with an appropriate version of MSVC unless prevented by // the SQLITE_DISABLE_INTRINSIC define. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // The purpose of this file is to provide support for MSVC's intrinsics (what gcc calls // Builtins) in gcc. In MSVC, there are several features for intrinsics: // // - Intrinsics can either be implemented inline (via the compiler), or implemented as functions. // - You can specify which approach you prefer either globally (via compile switch /Oi) or // on a function by function basis via pragmas. // - Before you can use any of the intrinsics, they must be declared via a prototype. For // whatever reason, MS has decided to put all the intrinsics in one file (intrin.h) AND // to put duplicate copies of some of these prototypes in various platform sdk headers. // // In gcc, this is implemented as follows: // // - The inline implementations for the intrinsics are located in intrin-impl.h. This file // is included by intrin.h, as well as various platform sdk headers. // - Including intrin.h will create definitions/implementations for all available MSVC intrinsics. // - Including various platforms sdk headers will only include the intrinsics defined in that // header. As of this writing, only winnt.h and winbase.h use this approach. // - If an application defines its own prototypes for intrinsics (ie without including any // platform header or intrin.h), the symbols will be resolved from the library. Since this // will likely result in the code being invoked via 'call', performance may be degraded. // // If you wish to implement intrinsic functions that are defined in intrin.h but are not // yet implemented in mingw-w64, see the comments at the top of intrin-impl.h. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type _SETJMP_FLOAT128 = struct{ FPart [2]uint64 } /* setjmp.h:112:26 */ // Set PRI... and SCN... according to __USE_MINGW_ANSI_STDIO. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Define __mingw_ macros. // The following macros are used to cast pointers to integers and // integers to pointers. The way you do this varies from one compiler // to the next, so we have developed the following set of #if statements // to generate appropriate macros for a wide range of compilers. // // The correct "ANSI" way to do this is to use the intptr_t type. // Unfortunately, that typedef is not available on all compilers, or // if it is available, it requires an #include of specific headers // that vary from one machine to the next. // // Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on // the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). // So we have to define the macros in different ways depending on the // compiler. // A macro to hint to the compiler that a function should not be // inlined. // Make sure that the compiler intrinsics we desire are enabled when // compiling with an appropriate version of MSVC unless prevented by // the SQLITE_DISABLE_INTRINSIC define. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // The purpose of this file is to provide support for MSVC's intrinsics (what gcc calls // Builtins) in gcc. In MSVC, there are several features for intrinsics: // // - Intrinsics can either be implemented inline (via the compiler), or implemented as functions. // - You can specify which approach you prefer either globally (via compile switch /Oi) or // on a function by function basis via pragmas. // - Before you can use any of the intrinsics, they must be declared via a prototype. For // whatever reason, MS has decided to put all the intrinsics in one file (intrin.h) AND // to put duplicate copies of some of these prototypes in various platform sdk headers. // // In gcc, this is implemented as follows: // // - The inline implementations for the intrinsics are located in intrin-impl.h. This file // is included by intrin.h, as well as various platform sdk headers. // - Including intrin.h will create definitions/implementations for all available MSVC intrinsics. // - Including various platforms sdk headers will only include the intrinsics defined in that // header. As of this writing, only winnt.h and winbase.h use this approach. // - If an application defines its own prototypes for intrinsics (ie without including any // platform header or intrin.h), the symbols will be resolved from the library. Since this // will likely result in the code being invoked via 'call', performance may be degraded. // // If you wish to implement intrinsic functions that are defined in intrin.h but are not // yet implemented in mingw-w64, see the comments at the top of intrin-impl.h. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type SETJMP_FLOAT128 = _SETJMP_FLOAT128 /* setjmp.h:114:5 */ type _JBTYPE = SETJMP_FLOAT128 /* setjmp.h:117:27 */ type _JUMP_BUFFER1 = struct { FFrame uint64 FRbx uint64 FRsp uint64 FRbp uint64 FRsi uint64 FRdi uint64 FR12 uint64 FR13 uint64 FR14 uint64 FR15 uint64 FRip uint64 FSpare uint64 FXmm6 SETJMP_FLOAT128 FXmm7 SETJMP_FLOAT128 FXmm8 SETJMP_FLOAT128 FXmm9 SETJMP_FLOAT128 FXmm10 SETJMP_FLOAT128 FXmm11 SETJMP_FLOAT128 FXmm12 SETJMP_FLOAT128 FXmm13 SETJMP_FLOAT128 FXmm14 SETJMP_FLOAT128 FXmm15 SETJMP_FLOAT128 } /* setjmp.h:119:11 */ type _JUMP_BUFFER = _JUMP_BUFFER1 /* setjmp.h:142:5 */ type jmp_buf = [16]_JBTYPE /* setjmp.h:199:19 */ // Is the sqlite3ErrName() function needed in the build? Currently, // it is needed by "mutex_w32.c" (when debugging), "os_win.c" (when // OSTRACE is enabled), and by several "test*.c" files (which are // compiled using SQLITE_TEST). // SQLITE_ENABLE_EXPLAIN_COMMENTS is incompatible with SQLITE_OMIT_EXPLAIN // Return true (non-zero) if the input is an integer that is too large // to fit in 32-bits. This macro is used inside of various testcase() // macros to verify that we have tested SQLite for large-file support. // The macro unlikely() is a hint that surrounds a boolean // expression that is usually false. Macro likely() surrounds // a boolean expression that is usually true. These hints could, // in theory, be used by the compiler to generate better code, but // currently they are just comments for human readers. // 2001 September 22 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This is the header file for the generic hash-table implementation // used in SQLite. // Forward declarations of structures. type Hash1 = struct { Fhtsize uint32 Fcount uint32 Ffirst uintptr Fht uintptr } /* sqlite3.h:249:9 */ // Is the sqlite3ErrName() function needed in the build? Currently, // it is needed by "mutex_w32.c" (when debugging), "os_win.c" (when // OSTRACE is enabled), and by several "test*.c" files (which are // compiled using SQLITE_TEST). // SQLITE_ENABLE_EXPLAIN_COMMENTS is incompatible with SQLITE_OMIT_EXPLAIN // Return true (non-zero) if the input is an integer that is too large // to fit in 32-bits. This macro is used inside of various testcase() // macros to verify that we have tested SQLite for large-file support. // The macro unlikely() is a hint that surrounds a boolean // expression that is usually false. Macro likely() surrounds // a boolean expression that is usually true. These hints could, // in theory, be used by the compiler to generate better code, but // currently they are just comments for human readers. // 2001 September 22 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This is the header file for the generic hash-table implementation // used in SQLite. // Forward declarations of structures. type Hash = Hash1 /* hash.h:19:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr Fdata uintptr FpKey uintptr } /* sqlite3.h:249:9 */ type HashElem = HashElem1 /* hash.h:20:25 */ // A complete hash table is an instance of the following structure. // The internals of this structure are intended to be opaque -- client // code should not attempt to access or modify the fields of this structure // directly. Change this structure only by using the routines below. // However, some of the "procedures" and "functions" for modifying and // accessing this structure are really macros, so we can't really make // this structure opaque. // // All elements of the hash table are on a single doubly-linked list. // Hash.first points to the head of this list. // // There are Hash.htsize buckets. Each bucket points to a spot in // the global doubly-linked list. The contents of the bucket are the // element pointed to plus the next _ht.count-1 elements in the list. // // Hash.htsize and Hash.ht may be zero. In that case lookup is done // by a linear search of the global list. For small tables, the // Hash.ht table is never allocated because if there are few elements // in the table, it is faster to do a linear search than to manage // the hash table. type _ht = struct { Fcount uint32 _ [4]byte Fchain uintptr } /* sqlite3.h:249:9 */ // 2-byte unsigned integer type i16 = int16_t /* sqliteInt.h:795:20 */ // 1-byte unsigned integer type i8 = int8_t /* sqliteInt.h:797:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value // is 0x00000000ffffffff. But because of quirks of some compilers, we // have to specify the value in the less intuitive manner shown: // The datatype used to store estimates of the number of rows in a // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. type tRowcnt = u32 /* sqliteInt.h:816:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This // gives a possible range of values of approximately 1.0e986 to 1e-986. // But the allowed values are "grainy". Not every value is representable. // For example, quantities 16 and 17 are both represented by a LogEst // of 40. However, since LogEst quantities are suppose to be estimates, // not exact values, this imprecision is not a problem. // // "LogEst" is short for "Logarithmic Estimate". // // Examples: // 1 -> 0 20 -> 43 10000 -> 132 // 2 -> 10 25 -> 46 25000 -> 146 // 3 -> 16 100 -> 66 1000000 -> 199 // 4 -> 20 1000 -> 99 1048576 -> 200 // 10 -> 33 1024 -> 100 4294967296 -> 320 // // The LogEst can be negative to indicate fractional values. // Examples: // // 0.5 -> -10 0.1 -> -33 0.0625 -> -40 type LogEst = int16_t /* sqliteInt.h:842:20 */ // Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer // The uptr type is an unsigned integer large enough to hold a pointer type uptr = uintptr_t /* sqliteInt.h:862:21 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. // // The sqlite.busyHandler member of the sqlite struct contains the busy // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. type BusyHandler1 = struct { FxBusyHandler uintptr FpBusyArg uintptr FnBusy int32 _ [4]byte } /* sqlite3.h:249:9 */ // An instance of the following structure is used to store the busy-handler // callback for a given sqlite handle. // // The sqlite.busyHandler member of the sqlite struct contains the busy // callback for the database handle. Each pager opened via the sqlite // handle is passed a pointer to sqlite.busyHandler. The busy-handler // callback is currently invoked only from within pager.c. type BusyHandler = BusyHandler1 /* sqliteInt.h:1037:28 */ // Name of table that holds the database schema. // The root-page of the schema table. // The name of the schema table. The name is different for TEMP. // A convenience macro that returns the number of elements in // an array. // Determine if the argument is a power of two // The following value as a destructor means to use sqlite3DbFree(). // The sqlite3DbFree() routine requires two parameters instead of the // one parameter that destructors normally want. So we have to introduce // this magic value that the code knows to handle differently. Any // pointer will work here as long as it is distinct from SQLITE_STATIC // and SQLITE_TRANSIENT. // When SQLITE_OMIT_WSD is defined, it means that the target platform does // not support Writable Static Data (WSD) such as global and static variables. // All variables must either be on the stack or dynamically allocated from // the heap. When WSD is unsupported, the variable declarations scattered // throughout the SQLite code must become constants instead. The SQLITE_WSD // macro is used for this purpose. And instead of referencing the variable // directly, we use its constant as a key to lookup the run-time allocated // buffer that holds real variable. The constant is also the initializer // for the run-time allocated buffer. // // In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL // macros become no-ops and have zero performance impact. // The following macros are used to suppress compiler warnings and to // make it clear to human readers when a function parameter is deliberately // left unused within the body of a function. This usually happens when // a function is called via a function pointer. For example the // implementation of an SQL aggregate step callback may not use the // parameter indicating the number of arguments passed to the aggregate, // if it knows that this is enforced elsewhere. // // When a function parameter is not used at all within the body of a function, // it is generally named "NotUsed" or "NotUsed2" to make things even clearer. // However, these macros may also be used to suppress warnings related to // parameters that may or may not be used depending on compilation options. // For example those parameters only used in assert() statements. In these // cases the parameters are named as per the usual conventions. // Forward references to structures type AggInfo1 = struct { FdirectMode u8 FuseSortingIdx u8 _ [2]byte FsortingIdx int32 FsortingIdxPTab int32 FnSortingColumn int32 FmnReg int32 FmxReg int32 FpGroupBy uintptr FaCol uintptr FnColumn int32 FnAccumulator int32 FaFunc uintptr FnFunc int32 FselId u32 } /* sqlite3.h:249:9 */ // Name of table that holds the database schema. // The root-page of the schema table. // The name of the schema table. The name is different for TEMP. // A convenience macro that returns the number of elements in // an array. // Determine if the argument is a power of two // The following value as a destructor means to use sqlite3DbFree(). // The sqlite3DbFree() routine requires two parameters instead of the // one parameter that destructors normally want. So we have to introduce // this magic value that the code knows to handle differently. Any // pointer will work here as long as it is distinct from SQLITE_STATIC // and SQLITE_TRANSIENT. // When SQLITE_OMIT_WSD is defined, it means that the target platform does // not support Writable Static Data (WSD) such as global and static variables. // All variables must either be on the stack or dynamically allocated from // the heap. When WSD is unsupported, the variable declarations scattered // throughout the SQLite code must become constants instead. The SQLITE_WSD // macro is used for this purpose. And instead of referencing the variable // directly, we use its constant as a key to lookup the run-time allocated // buffer that holds real variable. The constant is also the initializer // for the run-time allocated buffer. // // In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL // macros become no-ops and have zero performance impact. // The following macros are used to suppress compiler warnings and to // make it clear to human readers when a function parameter is deliberately // left unused within the body of a function. This usually happens when // a function is called via a function pointer. For example the // implementation of an SQL aggregate step callback may not use the // parameter indicating the number of arguments passed to the aggregate, // if it knows that this is enforced elsewhere. // // When a function parameter is not used at all within the body of a function, // it is generally named "NotUsed" or "NotUsed2" to make things even clearer. // However, these macros may also be used to suppress warnings related to // parameters that may or may not be used depending on compilation options. // For example those parameters only used in assert() statements. In these // cases the parameters are named as per the usual conventions. // Forward references to structures type AggInfo = AggInfo1 /* sqliteInt.h:1133:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr } /* sqliteInt.h:1134:9 */ type AuthContext = AuthContext1 /* sqliteInt.h:1134:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr FiDb int32 FregCtr int32 } /* sqlite3.h:249:9 */ type AutoincInfo = AutoincInfo1 /* sqliteInt.h:1135:28 */ type CollSeq1 = struct { FzName uintptr Fenc u8 _ [7]byte FpUser uintptr FxCmp uintptr FxDel uintptr } /* sqlite3.h:249:9 */ type CollSeq = CollSeq1 /* sqliteInt.h:1137:24 */ type Column1 = struct { FzName uintptr FpDflt uintptr FzColl uintptr FnotNull u8 Faffinity int8 FszEst u8 FhName u8 FcolFlags u16 _ [2]byte } /* sqlite3.h:249:9 */ type Column = Column1 /* sqliteInt.h:1138:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr FpSelect uintptr FzCteErr uintptr FpUse uintptr FeM10d u8 _ [7]byte } /* sqlite3.h:249:9 */ type Cte = Cte1 /* sqliteInt.h:1139:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 FregRtn int32 FiCur int32 FnRowEst LogEst FeM10d u8 _ [1]byte } /* sqlite3.h:249:9 */ type CteUse = CteUse1 /* sqliteInt.h:1140:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr Fsafety_level u8 FbSyncSet u8 _ [6]byte FpSchema uintptr } /* sqlite3.h:249:9 */ type Db = Db1 /* sqliteInt.h:1141:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker FpSchema uintptr FbTemp u8 _ [7]byte FzDb uintptr FzType uintptr FpName uintptr } /* sqliteInt.h:1142:9 */ type DbFixer = DbFixer1 /* sqliteInt.h:1142:24 */ type Schema1 = struct { Fschema_cookie int32 FiGeneration int32 FtblHash Hash FidxHash Hash FtrigHash Hash FfkeyHash Hash FpSeqTab uintptr Ffile_format u8 Fenc u8 FschemaFlags u16 Fcache_size int32 } /* sqlite3.h:249:9 */ type Schema = Schema1 /* sqliteInt.h:1143:23 */ type Expr1 = struct { Fop u8 FaffExpr int8 Fop2 u8 _ [1]byte Fflags u32 Fu struct{ FzToken uintptr } FpLeft uintptr FpRight uintptr Fx struct{ FpList uintptr } FnHeight int32 FiTable int32 FiColumn ynVar FiAgg i16 FiRightJoinTable int32 FpAggInfo uintptr Fy struct{ FpTab uintptr } } /* sqlite3.h:249:9 */ type Expr = Expr1 /* sqliteInt.h:1144:21 */ type ExprList1 = struct { FnExpr int32 _ [4]byte Fa [1]struct { FpExpr uintptr FzEName uintptr FsortFlags u8 _ [3]byte FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */ _ [3]byte Fu struct { _ [0]uint32 Fx struct { FiOrderByCol u16 FiAlias u16 } } _ [4]byte } } /* sqlite3.h:249:9 */ type ExprList = ExprList1 /* sqliteInt.h:1145:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr FzTo uintptr FpNextTo uintptr FpPrevTo uintptr FnCol int32 FisDeferred u8 FaAction [2]u8 _ [1]byte FapTrigger [2]uintptr FaCol [1]struct { FiFrom int32 _ [4]byte FzCol uintptr } } /* sqlite3.h:249:9 */ type FKey = FKey1 /* sqliteInt.h:1146:21 */ type FuncDestructor1 = struct { FnRef int32 _ [4]byte FxDestroy uintptr FpUserData uintptr } /* sqliteInt.h:1147:9 */ type FuncDestructor = FuncDestructor1 /* sqliteInt.h:1147:31 */ type FuncDef1 = struct { FnArg i8 _ [3]byte FfuncFlags u32 FpUserData uintptr FpNext uintptr FxSFunc uintptr FxFinalize uintptr FxValue uintptr FxInverse uintptr FzName uintptr Fu struct{ FpHash uintptr } } /* sqlite3.h:249:9 */ type FuncDef = FuncDef1 /* sqliteInt.h:1148:24 */ type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqliteInt.h:1149:9 */ type FuncDefHash = FuncDefHash1 /* sqliteInt.h:1149:28 */ type IdList1 = struct { Fa uintptr FnId int32 _ [4]byte } /* sqlite3.h:249:9 */ type IdList = IdList1 /* sqliteInt.h:1150:23 */ type Index1 = struct { FzName uintptr FaiColumn uintptr FaiRowLogEst uintptr FpTable uintptr FzColAff uintptr FpNext uintptr FpSchema uintptr FaSortOrder uintptr FazColl uintptr FpPartIdxWhere uintptr FaColExpr uintptr Ftnum Pgno FszIdxRow LogEst FnKeyCol u16 FnColumn u16 FonError u8 _ [1]byte FidxType uint16 /* unsigned idxType: 2, unsigned bUnordered: 1, unsigned uniqNotNull: 1, unsigned isResized: 1, unsigned isCovering: 1, unsigned noSkipScan: 1, unsigned hasStat1: 1, unsigned bNoQuery: 1, unsigned bAscKeyBug: 1, unsigned bHasVCol: 1 */ _ [2]byte FnSample int32 FnSampleCol int32 FaAvgEq uintptr FaSample uintptr FaiRowEst uintptr FnRowEst0 tRowcnt _ [4]byte FcolNotIdxed Bitmask } /* sqlite3.h:249:9 */ type Index = Index1 /* sqliteInt.h:1151:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 _ [4]byte FanEq uintptr FanLt uintptr FanDLt uintptr } /* sqlite3.h:249:9 */ type IndexSample = IndexSample1 /* sqliteInt.h:1152:28 */ type KeyInfo1 = struct { FnRef u32 Fenc u8 _ [1]byte FnKeyField u16 FnAllField u16 _ [6]byte Fdb uintptr FaSortFlags uintptr FaColl [1]uintptr } /* sqlite3.h:249:9 */ type KeyInfo = KeyInfo1 /* sqliteInt.h:1154:24 */ type Lookaside1 = struct { FbDisable u32 Fsz u16 FszTrue u16 FbMalloced u8 _ [3]byte FnSlot u32 FanStat [3]u32 _ [4]byte FpInit uintptr FpFree uintptr FpSmallInit uintptr FpSmallFree uintptr FpMiddle uintptr FpStart uintptr FpEnd uintptr } /* sqlite3.h:249:9 */ type Lookaside = Lookaside1 /* sqliteInt.h:1155:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.h:249:9 */ type LookasideSlot = LookasideSlot1 /* sqliteInt.h:1156:30 */ type Module1 = struct { FpModule uintptr FzName uintptr FnRefModule int32 _ [4]byte FpAux uintptr FxDestroy uintptr FpEpoTab uintptr } /* sqlite3.h:249:9 */ type Module = Module1 /* sqliteInt.h:1157:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr FuNC struct{ FpEList uintptr } FpNext uintptr FnRef int32 FnErr int32 FncFlags int32 _ [4]byte FpWinSelect uintptr } /* sqliteInt.h:1158:9 */ type NameContext = NameContext1 /* sqliteInt.h:1158:28 */ type Parse1 = struct { Fdb uintptr FzErrMsg uintptr FpVdbe uintptr Frc int32 FcolNamesSet u8 FcheckSchema u8 Fnested u8 FnTempReg u8 FisMultiWrite u8 FmayAbort u8 FhasCompound u8 FokConstFactor u8 FdisableLookaside u8 FdisableVtab u8 _ [2]byte FnRangeReg int32 FiRangeReg int32 FnErr int32 FnTab int32 FnMem int32 FszOpAlloc int32 FiSelfTab int32 FnLabel int32 FnLabelAlloc int32 _ [4]byte FaLabel uintptr FpConstExpr uintptr FconstraintName Token FwriteMask yDbMask FcookieMask yDbMask FregRowid int32 FregRoot int32 FnMaxArg int32 FnSelect int32 FnTableLock int32 _ [4]byte FaTableLock uintptr FpAinc uintptr FpToplevel uintptr FpTriggerTab uintptr FpParentParse uintptr Fu1 struct { _ [0]uint64 FaddrCrTab int32 _ [4]byte } FnQueryLoop u32 Foldmask u32 Fnewmask u32 FeTriggerOp u8 FbReturning u8 FeOrconf u8 FdisableTriggers u8 FaTempReg [8]int32 FsNameToken Token FsLastToken Token FnVar ynVar FiPkSortOrder u8 Fexplain u8 FeParseMode u8 _ [3]byte FnVtabLock int32 FnHeight int32 FaddrExplain int32 _ [4]byte FpVList uintptr FpReprepare uintptr FzTail uintptr FpNewTable uintptr FpNewIndex uintptr FpNewTrigger uintptr FzAuthContext uintptr FsArg Token FapVtabLock uintptr FpTriggerPrg uintptr FpWith uintptr FpCleanup uintptr FpRename uintptr } /* sqlite3.h:249:9 */ type Parse = Parse1 /* sqliteInt.h:1159:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* sqlite3.h:249:9 */ type ParseCleanup = ParseCleanup1 /* sqliteInt.h:1160:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr Fop int32 _ [4]byte FaRecord uintptr Fkeyinfo KeyInfo FpUnpacked uintptr FpNewUnpacked uintptr FiNewReg int32 _ [4]byte FiKey1 i64 FiKey2 i64 FaNew uintptr FpTab uintptr FpPk uintptr } /* sqlite3.h:249:9 */ type PreUpdate = PreUpdate1 /* sqliteInt.h:1161:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr } /* sqliteInt.h:1162:9 */ type PrintfArguments = PrintfArguments1 /* sqliteInt.h:1162:32 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr FretTrig Trigger FretTStep TriggerStep FiRetCur int32 FnRetCol int32 FiRetReg int32 _ [4]byte } /* sqliteInt.h:1164:9 */ type Returning = Returning1 /* sqliteInt.h:1164:26 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons i64 FnDeferredImmCons i64 FpNext uintptr } /* sqlite3.h:249:9 */ type Savepoint = Savepoint1 /* sqliteInt.h:1166:26 */ type Select1 = struct { Fop u8 _ [1]byte FnSelectRow LogEst FselFlags u32 FiLimit int32 FiOffset int32 FselId u32 FaddrOpenEphm [2]int32 _ [4]byte FpEList uintptr FpSrc uintptr FpWhere uintptr FpGroupBy uintptr FpHaving uintptr FpOrderBy uintptr FpPrior uintptr FpNext uintptr FpLimit uintptr FpWith uintptr FpWin uintptr FpWinDefn uintptr } /* sqlite3.h:249:9 */ type Select = Select1 /* sqliteInt.h:1167:23 */ type SelectDest1 = struct { FeDest u8 _ [3]byte FiSDParm int32 FiSDParm2 int32 FiSdst int32 FnSdst int32 _ [4]byte FzAffSdst uintptr FpOrderBy uintptr } /* sqliteInt.h:1169:9 */ type SelectDest = SelectDest1 /* sqliteInt.h:1169:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr FzName uintptr FzAlias uintptr FpTab uintptr FpSelect uintptr FaddrFillSub int32 FregReturn int32 FregResult int32 Ffg struct { _ [0]uint32 Fjointype u8 _ [3]byte FnotIndexed uint8 /* unsigned notIndexed: 1, unsigned isIndexedBy: 1, unsigned isTabFunc: 1, unsigned isCorrelated: 1, unsigned viaCoroutine: 1, unsigned isRecursive: 1, unsigned fromDDL: 1, unsigned isCte: 1 */ _ [3]byte } FiCursor int32 FpOn uintptr FpUsing uintptr FcolUsed Bitmask Fu1 struct{ FzIndexedBy uintptr } Fu2 struct{ FpIBIndex uintptr } } /* sqlite3.h:249:9 */ type SrcItem = SrcItem1 /* sqliteInt.h:1170:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc u32 Fa [1]SrcItem } /* sqlite3.h:249:9 */ type SrcList = SrcList1 /* sqliteInt.h:1171:24 */ type StrAccum = sqlite3_str1 /* sqliteInt.h:1172:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr FpIndex uintptr FpSelect uintptr FpFKey uintptr FzColAff uintptr FpCheck uintptr Ftnum Pgno FnTabRef u32 FtabFlags u32 FiPKey i16 FnCol i16 FnNVCol i16 FnRowLogEst LogEst FszTabRow LogEst FkeyConf u8 _ [1]byte FaddColOffset int32 FnModuleArg int32 FazModuleArg uintptr FpVTable uintptr FpTrigger uintptr FpSchema uintptr } /* sqlite3.h:249:9 */ // Internal alias for sqlite3_str type Table = Table1 /* sqliteInt.h:1173:22 */ type Token1 = struct { Fz uintptr Fn uint32 _ [4]byte } /* sqlite3.h:249:9 */ type Token = Token1 /* sqliteInt.h:1175:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr Fop u8 Ftr_tm u8 FbReturning u8 _ [5]byte FpWhen uintptr FpColumns uintptr FpSchema uintptr FpTabSchema uintptr Fstep_list uintptr FpNext uintptr } /* sqlite3.h:249:9 */ type Trigger = Trigger1 /* sqliteInt.h:1177:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr FpProgram uintptr Forconf int32 FaColmask [2]u32 _ [4]byte } /* sqlite3.h:249:9 */ type TriggerPrg = TriggerPrg1 /* sqliteInt.h:1178:27 */ type TriggerStep1 = struct { Fop u8 Forconf u8 _ [6]byte FpTrig uintptr FpSelect uintptr FzTarget uintptr FpFrom uintptr FpWhere uintptr FpExprList uintptr FpIdList uintptr FpUpsert uintptr FzSpan uintptr FpNext uintptr FpLast uintptr } /* sqlite3.h:249:9 */ type TriggerStep = TriggerStep1 /* sqliteInt.h:1179:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr FnField u16 Fdefault_rc i8 FerrCode u8 Fr1 i8 Fr2 i8 FeqSeen u8 _ [1]byte } /* sqlite3.h:249:9 */ type UnpackedRecord = UnpackedRecord1 /* sqliteInt.h:1180:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr FpUpsertSet uintptr FpUpsertWhere uintptr FpNextUpsert uintptr FisDoUpdate u8 _ [7]byte FpToFree uintptr FpUpsertIdx uintptr FpUpsertSrc uintptr FregData int32 FiDataCur int32 FiIdxCur int32 _ [4]byte } /* sqlite3.h:249:9 */ type Upsert = Upsert1 /* sqliteInt.h:1181:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr FpVtab uintptr FnRef int32 FbConstraint u8 FeVtabRisk u8 _ [2]byte FiSavepoint int32 _ [4]byte FpNext uintptr } /* sqlite3.h:249:9 */ type VTable = VTable1 /* sqliteInt.h:1182:23 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr FxSelectCallback uintptr FxSelectCallback2 uintptr FwalkerDepth int32 FeCode u16 _ [2]byte Fu struct{ FpNC uintptr } } /* sqliteInt.h:1142:9 */ type Walker = Walker1 /* sqliteInt.h:1184:23 */ type Window1 = struct { FzName uintptr FzBase uintptr FpPartition uintptr FpOrderBy uintptr FeFrmType u8 FeStart u8 FeEnd u8 FbImplicitFrame u8 FeExclude u8 _ [3]byte FpStart uintptr FpEnd uintptr FppThis uintptr FpNextWin uintptr FpFilter uintptr FpFunc uintptr FiEphCsr int32 FregAccum int32 FregResult int32 FcsrApp int32 FregApp int32 FregPart int32 FpOwner uintptr FnBufferCol int32 FiArgCol int32 FregOne int32 FregStartRowid int32 FregEndRowid int32 FbExprArgs u8 _ [3]byte } /* sqlite3.h:249:9 */ type Window = Window1 /* sqliteInt.h:1186:23 */ type With1 = struct { FnCte int32 _ [4]byte FpOuter uintptr Fa [1]Cte } /* sqlite3.h:249:9 */ type With = With1 /* sqliteInt.h:1187:21 */ // The bitmask datatype defined below is used for various optimizations. // // Changing this from a 64-bit to a 32-bit type limits the number of // tables in a join to 32 instead of 64. But it also reduces the size // of the library by 738 bytes on ix86. type Bitmask = u64 /* sqliteInt.h:1200:15 */ // The number of bits in a Bitmask. "BMS" means "BitMask Size". // A bit in a Bitmask // A VList object records a mapping between parameters/variables/wildcards // in the SQL statement (such as $abc, @pqr, or :xyz) and the integer // variable number associated with that parameter. See the format description // on the sqlite3VListAdd() routine for more information. A VList is really // just an array of integers. type VList = int32 /* sqliteInt.h:1222:13 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and // "BusyHandler" typedefs. vdbe.h also requires a few of the opaque // pointer types (i.e. FuncDef) defined above. // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This header file defines the interface that the sqlite page cache // subsystem. The page cache subsystem reads and writes a file a page // at a time and provides a journal for rollback. // Default maximum size for persistent journal files. A negative // value means no limit. This value may be overridden using the // sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit". // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". type Pgno = u32 /* pager.h:33:13 */ // Handle type for pages. type PgHdr1 = struct { FpPage uintptr FpData uintptr FpExtra uintptr FpCache uintptr FpDirty uintptr FpPager uintptr Fpgno Pgno Fflags u16 FnRef i16 FpDirtyNext uintptr FpDirtyPrev uintptr } /* pager.h:43:9 */ // Handle type for pages. type DbPage = PgHdr1 /* pager.h:43:22 */ // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This header file defines the interface that the sqlite B-Tree file // subsystem. See comments in the source code for a detailed description // of what each interface routine does. // TODO: This definition is just included so other modules compile. It // needs to be revisited. // If defined as non-zero, auto-vacuum is enabled by default. Otherwise // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure type Btree1 = struct { Fdb uintptr FpBt uintptr FinTrans u8 Fsharable u8 Flocked u8 FhasIncrblobCur u8 FwantToLock int32 FnBackup int32 FiBDataVersion u32 FpNext uintptr FpPrev uintptr Flock BtLock } /* btree.h:39:9 */ type BtCursor1 = struct { FeState u8 FcurFlags u8 FcurPagerFlags u8 Fhints u8 FskipNext int32 FpBtree uintptr FaOverflow uintptr FpKey uintptr FpBt uintptr FpNext uintptr Finfo CellInfo FnKey i64 FpgnoRoot Pgno FiPage i8 FcurIntKey u8 Fix u16 FaiIdx [19]u16 _ [2]byte FpKeyInfo uintptr FpPage uintptr FapPage [19]uintptr } /* btree.h:39:9 */ type BtShared1 = struct { FpPager uintptr Fdb uintptr FpCursor uintptr FpPage1 uintptr FopenFlags u8 FautoVacuum u8 FincrVacuum u8 FbDoTruncate u8 FinTransaction u8 Fmax1bytePayload u8 FnReserveWanted u8 _ [1]byte FbtsFlags u16 FmaxLocal u16 FminLocal u16 FmaxLeaf u16 FminLeaf u16 _ [2]byte FpageSize u32 FusableSize u32 FnTransaction int32 FnPage u32 _ [4]byte FpSchema uintptr FxFreeSchema uintptr Fmutex uintptr FpHasContent uintptr FnRef int32 _ [4]byte FpNext uintptr FpLock uintptr FpWriter uintptr FpTmpSpace uintptr FnPreformatSize int32 _ [4]byte } /* btree.h:39:9 */ type BtreePayload1 = struct { FpKey uintptr FnKey sqlite3_int64 FpData uintptr FaMem uintptr FnMem u16 _ [2]byte FnData int32 FnZero int32 _ [4]byte } /* btree.h:42:9 */ type BtreePayload = BtreePayload1 /* btree.h:42:29 */ // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // Header file for the Virtual DataBase Engine (VDBE) // // This header defines the interface to the virtual database engine // or VDBE. The VDBE implements an abstract machine that runs a // simple program to access and modify the underlying database. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. type Vdbe1 = struct { Fdb uintptr FpPrev uintptr FpNext uintptr FpParse uintptr FnVar ynVar _ [2]byte FiVdbeMagic u32 FnMem int32 FnCursor int32 FcacheCtr u32 Fpc int32 Frc int32 FnChange int32 FiStatement int32 _ [4]byte FiCurrentTime i64 FnFkConstraint i64 FnStmtDefCons i64 FnStmtDefImmCons i64 FaMem uintptr FapArg uintptr FapCsr uintptr FaVar uintptr FaOp uintptr FnOp int32 FnOpAlloc int32 FaColName uintptr FpResultSet uintptr FzErrMsg uintptr FpVList uintptr FstartTime i64 FnResColumn u16 FerrorAction u8 FminWriteFileFormat u8 FprepFlags u8 FdoingRerun u8 _ [2]byte Fexpired uint16 /* bft expired: 2, bft explain: 2, bft changeCntOn: 1, bft runOnlyOnce: 1, bft usesStmtJournal: 1, bft readOnly: 1, bft bIsReader: 1 */ _ [2]byte FbtreeMask yDbMask FlockMask yDbMask FaCounter [7]u32 FzSql uintptr FpFree uintptr FpFrame uintptr FpDelFrame uintptr FnFrame int32 Fexpmask u32 FpProgram uintptr FpAuxData uintptr } /* sqlite3.h:249:9 */ // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // Header file for the Virtual DataBase Engine (VDBE) // // This header defines the interface to the virtual database engine // or VDBE. The VDBE implements an abstract machine that runs a // simple program to access and modify the underlying database. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // A single VDBE is an opaque structure named "Vdbe". Only routines // in the source file sqliteVdbe.c are allowed to see the insides // of this structure. type Vdbe = Vdbe1 /* vdbe.h:27:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. type Mem = sqlite3_value1 /* vdbe.h:33:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 FnMem int32 FnCsr int32 _ [4]byte FaOnce uintptr Ftoken uintptr FpNext uintptr } /* sqlite3.h:249:9 */ type SubProgram = SubProgram1 /* vdbe.h:34:27 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded // as an instance of the following structure: type VdbeOp1 = struct { Fopcode u8 Fp4type int8 Fp5 u16 Fp1 int32 Fp2 int32 Fp3 int32 Fp4 struct { _ [0]uint64 Fi int32 _ [4]byte } FzComment uintptr } /* sqlite3.h:249:9 */ // A single instruction of the virtual machine has an opcode // and as many as three operands. The instruction is recorded // as an instance of the following structure: type p4union = struct { _ [0]uint64 Fi int32 _ [4]byte } /* sqlite3.h:249:9 */ type VdbeOp = VdbeOp1 /* vdbe.h:80:23 */ // A smaller version of VdbeOp used for the VdbeAddOpList() function because // it takes up less space. type VdbeOpList1 = struct { Fopcode u8 Fp1 int8 Fp2 int8 Fp3 int8 } /* vdbe.h:100:1 */ type VdbeOpList = VdbeOpList1 /* vdbe.h:106:27 */ type RecordCompare = uintptr /* vdbe.h:286:13 */ // The VdbeCoverage macros are used to set a coverage testing point // for VDBE branch instructions. The coverage testing points are line // numbers in the sqlite3.c source file. VDBE branch coverage testing // only works with an amalagmation build. That's ok since a VDBE branch // coverage build designed for testing the test suite only. No application // should ever ship with VDBE branch coverage measuring turned on. // // VdbeCoverage(v) // Mark the previously coded instruction // // as a branch // // VdbeCoverageIf(v, conditional) // Mark previous if conditional true // // VdbeCoverageAlwaysTaken(v) // Previous branch is always taken // // VdbeCoverageNeverTaken(v) // Previous branch is never taken // // VdbeCoverageNeverNull(v) // Previous three-way branch is only // // taken on the first two ways. The // // NULL option is not possible // // VdbeCoverageEqNe(v) // Previous OP_Jump is only interested // // in distingishing equal and not-equal. // // Every VDBE branch operation must be tagged with one of the macros above. // If not, then when "make test" is run with -DSQLITE_VDBE_COVERAGE and // -DSQLITE_DEBUG then an ALWAYS() will fail in the vdbeTakeBranch() // routine in vdbe.c, alerting the developer to the missed tag. // // During testing, the test application will invoke // sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE,...) to set a callback // routine that is invoked as each bytecode branch is taken. The callback // contains the sqlite3.c source line number ov the VdbeCoverage macro and // flags to indicate whether or not the branch was taken. The test application // is responsible for keeping track of this and reporting byte-code branches // that are never taken. // // See the VdbeBranchTaken() macro and vdbeTakeBranch() function in the // vdbe.c source file for additional information. // 2008 August 05 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This header file defines the interface that the sqlite page cache // subsystem. type PgHdr = PgHdr1 /* pcache.h:18:22 */ // typedef for the authorization callback function. type sqlite3_xauth = uintptr /* sqliteInt.h:1468:15 */ // This is an extra SQLITE_TRACE macro that indicates "legacy" tracing // in the style of sqlite3_trace() // Maximum number of sqlite3.aDb[] entries. This is the number of attached // databases plus 2 for "main" and "temp". // Each database connection is an instance of the following structure. type sqlite3InitInfo = struct { FnewTnum Pgno FiDb u8 Fbusy u8 _ [2]byte ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1, unsigned bDropColumn: 1 */ _ [7]byte FazInit uintptr } /* sqlite3.h:249:9 */ // Allowed values for Table.tabFlags. // // TF_OOOHidden applies to tables or view that have hidden columns that are // followed by non-hidden columns. Example: "CREATE VIRTUAL TABLE x USING // vtab1(a HIDDEN, b);". Since "b" is a non-hidden column but "a" is hidden, // the TF_OOOHidden attribute would apply in this case. Such tables require // special handling during INSERT processing. The "OOO" means "Out Of Order". // // Constraints: // // TF_HasVirtual == COLFLAG_VIRTUAL // TF_HasStored == COLFLAG_STORED // TF_HasHidden == COLFLAG_HIDDEN // Test to see whether or not a table is a virtual table. This is // done as a macro so that it will be optimized out when virtual // table support is omitted from the build. // Macros to determine if a column is hidden. IsOrdinaryHiddenColumn() // only works for non-virtual tables (ordinary tables and views) and is // always false unless SQLITE_ENABLE_HIDDEN_COLUMNS is defined. The // IsHiddenColumn() macro is general purpose. // Does the table have a rowid // Each foreign key constraint is an instance of the following structure. // // A foreign key is associated with two tables. The "from" table is // the table that contains the REFERENCES clause that creates the foreign // key. The "to" table is the table that is named in the REFERENCES clause. // Consider this example: // // CREATE TABLE ex1( // a INTEGER PRIMARY KEY, // b INTEGER CONSTRAINT fk1 REFERENCES ex2(x) // ); // // For foreign key "fk1", the from-table is "ex1" and the to-table is "ex2". // Equivalent names: // // from-table == child-table // to-table == parent-table // // Each REFERENCES clause generates an instance of the following structure // which is attached to the from-table. The to-table need not exist when // the from-table is created. The existence of the to-table is not checked. // // The list of all parents for child Table X is held at X.pFKey. // // A list of all children for a table named Z (which might not even exist) // is held in Schema.fkeyHash with a hash key of Z. type sColMap = struct { FiFrom int32 _ [4]byte FzCol uintptr } /* sqlite3.h:249:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. // // If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a // pointer to this structure. The Expr.iAgg field is the index in // AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate // code for that node. // // AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the // original Select structure that describes the SELECT statement. These // fields do not need to be freed when deallocating the AggInfo structure. type AggInfo_col = struct { FpTab uintptr FpCExpr uintptr FiTable int32 FiMem int32 FiColumn i16 FiSorterColumn i16 _ [4]byte } /* sqlite3.h:249:9 */ // An instance of this structure contains information needed to generate // code for a SELECT that contains aggregate functions. // // If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a // pointer to this structure. The Expr.iAgg field is the index in // AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate // code for that node. // // AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the // original Select structure that describes the SELECT statement. These // fields do not need to be freed when deallocating the AggInfo structure. type AggInfo_func = struct { FpFExpr uintptr FpFunc uintptr FiMem int32 FiDistinct int32 } /* sqlite3.h:249:9 */ // The datatype ynVar is a signed integer, either 16-bit or 32-bit. // Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater // than 32767 we have to make it 32-bit. 16-bit is preferred because // it uses less memory in the Expr object, which is a big memory user // in systems with lots of prepared statements. And few applications // need more than about 10 or 20 variables. But some extreme users want // to have prepared statements with over 32766 variables, and for them // the option is available (at compile-time). type ynVar = i16 /* sqliteInt.h:2625:13 */ // The following are the meanings of bits in the Expr.flags field. // Value restrictions: // // EP_Agg == NC_HasAgg == SF_HasAgg // EP_Win == NC_HasWin // 0x400000 // Available // 0x80000000 // Available // The EP_Propagate mask is a set of properties that automatically propagate // upwards into parent nodes. // These macros can be used to test, set, or clear bits in the // Expr.flags field. // Flags for use with Expr.vvaFlags // The ExprSetVVAProperty() macro is used for Verification, Validation, // and Accreditation only. It works like ExprSetProperty() during VVA // processes but is a no-op for delivery. // Macros to determine the number of bytes required by a normal Expr // struct, an Expr struct with the EP_Reduced flag set in Expr.flags // and an Expr struct with the EP_TokenOnly flag set. // Flags passed to the sqlite3ExprDup() function. See the header comment // above sqlite3ExprDup() for details. // True if the expression passed as an argument was a function with // an OVER() clause (a window function). // A list of expressions. Each expression may optionally have a // name. An expr/name combination can be used in several ways, such // as the list of "expr AS ID" fields following a "SELECT" or in the // list of "ID = expr" items in an UPDATE. A list of expressions can // also be used as the argument to a function, in which case the a.zName // field is not used. // // In order to try to keep memory usage down, the Expr.a.zEName field // is used for multiple purposes: // // eEName Usage // ---------- ------------------------- // ENAME_NAME (1) the AS of result set column // (2) COLUMN= of an UPDATE // // ENAME_TAB DB.TABLE.NAME used to resolve names // of subqueries // // ENAME_SPAN Text of the original result set // expression. type ExprList_item = struct { FpExpr uintptr FzEName uintptr FsortFlags u8 _ [3]byte FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */ _ [3]byte Fu struct { _ [0]uint32 Fx struct { FiOrderByCol u16 FiAlias u16 } } _ [4]byte } /* sqlite3.h:249:9 */ // Allowed values for Expr.a.eEName // An instance of this structure can hold a simple list of identifiers, // such as the list "a,b,c" in the following statements: // // INSERT INTO t(a,b,c) VALUES ...; // CREATE INDEX idx ON t(a,b,c); // CREATE TRIGGER trig BEFORE UPDATE ON t(a,b,c) ...; // // The IdList.a.idx field is used when the IdList represents the list of // column names after a table name in an INSERT statement. In the statement // // INSERT INTO t(a,b,c) ... // // If "a" is the k-th column of table "t", then IdList.a[0].idx==k. type IdList_item = struct { FzName uintptr Fidx int32 _ [4]byte } /* sqlite3.h:249:9 */ // The yDbMask datatype for the bitmask of all attached databases. type yDbMask = uint32 /* sqliteInt.h:3378:24 */ // A pointer to this structure is used to communicate information // from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback. type InitData = struct { Fdb uintptr FpzErrMsg uintptr FiDb int32 Frc int32 FmInitFlags u32 FnInitRow u32 FmxPage Pgno _ [4]byte } /* sqliteInt.h:3736:3 */ // Allowed values for mInitFlags // Structure containing global configuration data for the SQLite library. // // This structure also contains some state information. type Sqlite3Config = struct { FbMemstat int32 FbCoreMutex u8 FbFullMutex u8 FbOpenUri u8 FbUseCis u8 FbSmallMalloc u8 FbExtraSchemaChecks u8 _ [2]byte FmxStrlen int32 FneverCorrupt int32 FszLookaside int32 FnLookaside int32 FnStmtSpill int32 Fm sqlite3_mem_methods Fmutex sqlite3_mutex_methods Fpcache2 sqlite3_pcache_methods2 FpHeap uintptr FnHeap int32 FmnReq int32 FmxReq int32 _ [4]byte FszMmap sqlite3_int64 FmxMmap sqlite3_int64 FpPage uintptr FszPage int32 FnPage int32 FmxParserStack int32 FsharedCacheEnabled int32 FszPma u32 FisInit int32 FinProgress int32 FisMutexInit int32 FisMallocInit int32 FisPCacheInit int32 FnRefInitMutex int32 _ [4]byte FpInitMutex uintptr FxLog uintptr FpLogArg uintptr FmxMemdbSize sqlite3_int64 FxTestCallback uintptr FbLocaltimeFault int32 FiOnceResetThreshold int32 FszSorterRef u32 FiPrngSeed uint32 } /* sqliteInt.h:3749:1 */ // Restore old value of interface for Obj-C. See above. // Determine if we are dealing with Windows NT. // // We ought to be able to determine if we are compiling for Windows 9x or // Windows NT using the _WIN32_WINNT macro as follows: // // #if defined(_WIN32_WINNT) // # define SQLITE_OS_WINNT 1 // #else // # define SQLITE_OS_WINNT 0 // #endif // // However, Visual Studio 2005 does not set _WIN32_WINNT by default, as // it ought to, so the above test does not work. We'll just assume that // everything is Windows NT unless the programmer explicitly says otherwise // by setting SQLITE_OS_WINNT to 0. // Determine if we are dealing with Windows CE - which has a much reduced // API. // Determine if we are dealing with WinRT, which provides only a subset of // the full Win32 API. // For WinCE, some API function parameters do not appear to be declared as // volatile. // For some Windows sub-platforms, the _beginthreadex() / _endthreadex() // functions are not available (e.g. those not using MSVC, Cygwin, etc). // 2003 September 6 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This is the header file for information that is private to the // VDBE. This information used to all be at the top of the single // source code file "vdbe.c". When that file became too big (over // 6000 lines long) it was split up into several smaller files and // this header information was factored out. // The maximum number of times that a statement will try to reparse // itself before giving up and returning SQLITE_SCHEMA. // VDBE_DISPLAY_P4 is true or false depending on whether or not the // "explain" P4 display logic is enabled. // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. type Op = VdbeOp1 /* vdbeInt.h:46:23 */ // Boolean values type Bool = uint32 /* vdbeInt.h:51:18 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { FiAuxOp int32 FiAuxArg int32 FpAux uintptr FxDeleteAux uintptr FpNextAux uintptr } /* sqlite3.h:249:9 */ // Elements of the linked list at Vdbe.pAuxData type AuxData = AuxData1 /* vdbeInt.h:57:24 */ // Types of VDBE cursors // A VdbeCursor is an superclass (a wrapper) for various cursor objects: // // * A b-tree cursor // - In the main database or in an ephemeral database // - On either an index or a table // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register type VdbeCursor1 = struct { FeCurType u8 FiDb i8 FnullRow u8 FdeferredMoveto u8 FisTable u8 _ [3]byte FisEphemeral uint8 /* Bool isEphemeral: 1, Bool useRandomRowid: 1, Bool isOrdered: 1, Bool hasBeenDuped: 1 */ _ [1]byte FseekHit u16 _ [4]byte FpBtx uintptr FseqCount i64 FaAltMap uintptr FcacheStatus u32 FseekResult int32 FpAltCursor uintptr Fuc struct{ FpCursor uintptr } FpKeyInfo uintptr FiHdrOffset u32 FpgnoRoot Pgno FnField i16 FnHdrParsed u16 _ [4]byte FmovetoTarget i64 FaOffset uintptr FaRow uintptr FpayloadSize u32 FszRow u32 FaType [1]u32 _ [4]byte } /* sqlite3.h:249:9 */ // Types of VDBE cursors // A VdbeCursor is an superclass (a wrapper) for various cursor objects: // // * A b-tree cursor // - In the main database or in an ephemeral database // - On either an index or a table // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register type VdbeCursor = VdbeCursor1 /* vdbeInt.h:75:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. // When a sub-program is executed (OP_Program), a structure of this type // is allocated to store the current value of the program counter, as // well as the current memory cell array and various other frame specific // values stored in the Vdbe struct. When the sub-program is finished, // these values are copied back to the Vdbe from the VdbeFrame structure, // restoring the state of the VM to as it was before the sub-program // began executing. // // The memory for a VdbeFrame object is allocated and managed by a memory // cell in the parent (calling) frame. When the memory cell is deleted or // overwritten, the VdbeFrame object is not freed immediately. Instead, it // is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame // list is deleted when the VM is reset in VdbeHalt(). The reason for doing // this instead of deleting the VdbeFrame immediately is to avoid recursive // calls to sqlite3VdbeMemRelease() when the memory cells belonging to the // child frame are released. // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. type VdbeFrame1 = struct { Fv uintptr FpParent uintptr FaOp uintptr FanExec uintptr FaMem uintptr FapCsr uintptr FaOnce uintptr Ftoken uintptr FlastRowid i64 FpAuxData uintptr FnCursor int32 Fpc int32 FnOp int32 FnMem int32 FnChildMem int32 FnChildCsr int32 FnChange int32 FnDbChange int32 } /* sqlite3.h:249:9 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. // When a sub-program is executed (OP_Program), a structure of this type // is allocated to store the current value of the program counter, as // well as the current memory cell array and various other frame specific // values stored in the Vdbe struct. When the sub-program is finished, // these values are copied back to the Vdbe from the VdbeFrame structure, // restoring the state of the VM to as it was before the sub-program // began executing. // // The memory for a VdbeFrame object is allocated and managed by a memory // cell in the parent (calling) frame. When the memory cell is deleted or // overwritten, the VdbeFrame object is not freed immediately. Instead, it // is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame // list is deleted when the VM is reset in VdbeHalt(). The reason for doing // this instead of deleting the VdbeFrame immediately is to avoid recursive // calls to sqlite3VdbeMemRelease() when the memory cells belonging to the // child frame are released. // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. type VdbeFrame = VdbeFrame1 /* vdbeInt.h:162:26 */ // Magic number for sanity checking on VdbeFrame objects // Return a pointer to the array of registers allocated for use // by a VdbeFrame. // Internally, the vdbe manipulates nearly all SQL values as Mem // structures. Each Mem struct may cache multiple representations (string, // integer etc.) of the same value. type MemValue = struct{ Fr float64 } /* sqlite3.h:249:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. type bft = uint32 /* vdbeInt.h:345:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. type ScanStatus1 = struct { FaddrExplain int32 FaddrLoop int32 FaddrVisit int32 FiSelectID int32 FnEst LogEst _ [6]byte FzName uintptr } /* vdbeInt.h:350:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. type ScanStatus = ScanStatus1 /* vdbeInt.h:350:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects // is constructed during statement parsing and is held on Vdbe.pDblStr. // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 } /* vdbeInt.h:367:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects // is constructed during statement parsing and is held on Vdbe.pDblStr. // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. type DblquoteStr = DblquoteStr1 /* vdbeInt.h:367:28 */ // Convert text generated by the "%p" conversion format back into // a pointer. func testHexToInt(tls *libc.TLS, h int32) int32 { /* test1.c:44:12: */ if (h >= '0') && (h <= '9') { return (h - '0') } else if (h >= 'a') && (h <= 'f') { return ((h - 'a') + 10) } else { return ((h - 'A') + 10) } return int32(0) } func sqlite3TestTextToPtr(tls *libc.TLS, z uintptr) uintptr { /* test1.c:54:6: */ bp := tls.Alloc(20) defer tls.Free(20) // var p uintptr at bp, 8 // var v u64 at bp+8, 8 // var v2 u32 at bp+16, 4 if (int32(*(*int8)(unsafe.Pointer(z))) == '0') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == 'x') { z += uintptr(2) } *(*u64)(unsafe.Pointer(bp + 8 /* v */)) = uint64(0) for *(*int8)(unsafe.Pointer(z)) != 0 { *(*u64)(unsafe.Pointer(bp + 8 /* v */)) = ((*(*u64)(unsafe.Pointer(bp + 8 /* v */)) << 4) + u64(testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))) z++ } if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(u64(0))) { libc.Xmemcpy(tls, bp /* &p */, bp+8 /* &v */, uint64(unsafe.Sizeof(uintptr(0)))) } else { *(*u32)(unsafe.Pointer(bp + 16 /* v2 */)) = u32(*(*u64)(unsafe.Pointer(bp + 8 /* v */))) libc.Xmemcpy(tls, bp /* &p */, bp+16 /* &v2 */, uint64(unsafe.Sizeof(uintptr(0)))) } return *(*uintptr)(unsafe.Pointer(bp /* p */)) } // A TCL command that returns the address of the sqlite* pointer // for an sqlite connection instance. Bad things happen if the // input is not an sqlite connection. func get_sqlite_pointer(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:82:26: */ bp := tls.Alloc(236) defer tls.Free(236) var p uintptr // var cmdInfo Tcl_CmdInfo at bp+72, 64 // var zBuf [100]int8 at bp+136, 100 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14523 /* "SQLITE-CONNECTIO..." */) return TCL_ERROR } if !(tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+72 /* &cmdInfo */) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14541, /* "command not foun..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } p = (*Tcl_CmdInfo)(unsafe.Pointer(bp + 72 /* &cmdInfo */)).FobjClientData sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+136 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+32, (*struct{ Fdb uintptr })(unsafe.Pointer(p)).Fdb)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+48, bp+136 /* &zBuf[0] */, 0)) return TCL_OK } // Decode a pointer to an sqlite3 object. func getDbPointer(tls *libc.TLS, interp uintptr, zA uintptr, ppDb uintptr) int32 { /* test1.c:109:5: */ bp := tls.Alloc(64) defer tls.Free(64) var p uintptr // var cmdInfo Tcl_CmdInfo at bp, 64 if tcl.XTcl_GetCommandInfo(tls, interp, zA, bp /* &cmdInfo */) != 0 { p = (*Tcl_CmdInfo)(unsafe.Pointer(bp /* &cmdInfo */)).FobjClientData *(*uintptr)(unsafe.Pointer(ppDb)) = (*struct{ Fdb uintptr })(unsafe.Pointer(p)).Fdb } else { *(*uintptr)(unsafe.Pointer(ppDb)) = sqlite3TestTextToPtr(tls, zA) } return TCL_OK } // Decode a Win32 HANDLE object. func getWin32Handle(tls *libc.TLS, interp uintptr, zA uintptr, phFile LPHANDLE) int32 { /* test1.c:125:5: */ *(*HANDLE)(unsafe.Pointer(phFile)) = sqlite3TestTextToPtr(tls, zA) return TCL_OK } // Convert an sqlite3_stmt* into an sqlite3*. This depends on the // fact that the sqlite3* is the first field in the Vdbe structure. // Check a return value to make sure it agrees with the results // from sqlite3_errcode. func sqlite3TestErrCode(tls *libc.TLS, interp uintptr, db uintptr, rc int32) int32 { /* test1.c:144:5: */ bp := tls.Alloc(264) defer tls.Free(264) if (((sqlite3.Xsqlite3_threadsafe(tls) == 0) && (rc != SQLITE_MISUSE)) && (rc != SQLITE_OK)) && (sqlite3.Xsqlite3_errcode(tls, db) != rc) { // var zBuf [200]int8 at bp+64, 200 var r2 int32 = sqlite3.Xsqlite3_errcode(tls, db) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+64, /* &zBuf[0] */ ts+14561, /* "error code %s (%..." */ libc.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), rc, sqlite3.Xsqlite3ErrName(tls, r2), r2)) tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+64 /* &zBuf[0] */, 0)) return 1 } return 0 } // Decode a pointer to an sqlite3_stmt object. func getStmtPointer(tls *libc.TLS, interp uintptr, zArg uintptr, ppStmt uintptr) int32 { /* test1.c:162:12: */ *(*uintptr)(unsafe.Pointer(ppStmt)) = sqlite3TestTextToPtr(tls, zArg) return TCL_OK } // Generate a text representation of a pointer that can be understood // by the getDbPointer and getVmPointer routines above. // // The problem is, on some machines (Solaris) if you do a printf with // "%p" you cannot turn around and do a scanf with the same "%p" and // get your pointer back. You have to prepend a "0x" before it will // work. Or at least that is what is reported to me (drh). But this // behavior varies from machine to machine. The solution used her is // to test the string right after it is generated to see if it can be // understood by scanf, and if not, try prepending an "0x" to see if // that helps. If nothing works, a fatal error is generated. func sqlite3TestMakePointerStr(tls *libc.TLS, interp uintptr, zPtr uintptr, p uintptr) int32 { /* test1.c:184:5: */ bp := tls.Alloc(16) defer tls.Free(16) sqlite3.Xsqlite3_snprintf(tls, 100, zPtr, ts+13023 /* "%p" */, libc.VaList(bp, p)) return TCL_OK } // The callback routine for sqlite3_exec_printf(). func exec_printf_cb(tls *libc.TLS, pArg uintptr, argc int32, argv uintptr, name uintptr) int32 { /* test1.c:192:12: */ var str uintptr = pArg var i int32 if ((*Tcl_DString)(unsafe.Pointer(str)).Flength) == 0 { for i = 0; i < argc; i++ { tcl.XTcl_DStringAppendElement(tls, str, func() uintptr { if *(*uintptr)(unsafe.Pointer(name + uintptr(i)*8)) != 0 { return *(*uintptr)(unsafe.Pointer(name + uintptr(i)*8)) } return ts + 5717 /* "NULL" */ }()) } } for i = 0; i < argc; i++ { tcl.XTcl_DStringAppendElement(tls, str, func() uintptr { if *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0 { return *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) } return ts + 5717 /* "NULL" */ }()) } return 0 } // The I/O tracing callback. // Usage: io_trace FILENAME // // Turn I/O tracing on or off. If FILENAME is not an empty string, // I/O tracing begins going into FILENAME. If FILENAME is an empty // string, I/O tracing is turned off. func test_io_trace(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:228:26: */ return TCL_OK } // Usage: clang_sanitize_address // // Returns true if the program was compiled using clang with the // -fsanitize=address switch on the command line. False otherwise. // // Also return true if the OMIT_MISUSE environment variable exists. func clang_sanitize_address(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:269:26: */ var res int32 = 0 if (res == 0) && (libc.Xgetenv(tls, ts+14619 /* "OMIT_MISUSE" */) != uintptr(0)) { res = 1 } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return TCL_OK } // Usage: sqlite3_exec_printf DB FORMAT STRING // // Invoke the sqlite3_exec_printf() interface using the open database // DB. The SQL is the string FORMAT. The format string should contain // one %s or %q. STRING is the value inserted into %s or %q. func test_exec_printf(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:296:26: */ bp := tls.Alloc(334) defer tls.Free(334) // var db uintptr at bp+72, 8 // var str Tcl_DString at bp+80, 216 var rc int32 *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */)) = uintptr(0) var zSql uintptr // var zBuf [30]int8 at bp+304, 30 if argc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14657 /* " DB FORMAT STRIN..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+72 /* &db */) != 0 { return TCL_ERROR } tcl.XTcl_DStringInit(tls, bp+80 /* &str */) zSql = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) rc = sqlite3.Xsqlite3_exec(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* db */)), zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{exec_printf_cb})), bp+80 /* &str */, bp+296 /* &zErr */) sqlite3.Xsqlite3_free(tls, zSql) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+304 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+56, rc)) tcl.XTcl_AppendElement(tls, interp, bp+304 /* &zBuf[0] */) tcl.XTcl_AppendElement(tls, interp, func() uintptr { if rc == SQLITE_OK { return (*Tcl_DString)(unsafe.Pointer(bp + 80 /* &str */)).Fstring } return *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */)) }()) tcl.XTcl_DStringFree(tls, bp+80 /* &str */) if *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */)) != 0 { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */))) } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72 /* db */)), rc) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_exec_hex DB HEX // // Invoke the sqlite3_exec() on a string that is obtained by translating // HEX into ASCII. Most characters are translated as is. %HH becomes // a hex character. func test_exec_hex(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:334:26: */ bp := tls.Alloc(822) defer tls.Free(822) // var db uintptr at bp+56, 8 // var str Tcl_DString at bp+568, 216 var rc int32 var i int32 var j int32 *(*uintptr)(unsafe.Pointer(bp + 784 /* zErr */)) = uintptr(0) var zHex uintptr // var zSql [501]int8 at bp+64, 501 // var zBuf [30]int8 at bp+792, 30 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14675 /* " DB HEX" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+56 /* &db */) != 0 { return TCL_ERROR } zHex = *(*uintptr)(unsafe.Pointer(argv + 2*8)) i = libc.AssignInt32(&j, 0) __1: if !((uint64(i) < (uint64(unsafe.Sizeof([501]int8{})) - uint64(1))) && (*(*int8)(unsafe.Pointer(zHex + uintptr(j))) != 0)) { goto __3 } { if ((int32(*(*int8)(unsafe.Pointer(zHex + uintptr(j)))) == '%') && (*(*int8)(unsafe.Pointer(zHex + uintptr((j + 2)))) != 0)) && (*(*int8)(unsafe.Pointer(zHex + uintptr((j + 2)))) != 0) { *(*int8)(unsafe.Pointer(bp + 64 /* &zSql[0] */ + uintptr(i))) = (int8((testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(zHex + uintptr((j + 1)))))) << 4) + testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(zHex + uintptr((j + 2)))))))) j = j + (2) } else { *(*int8)(unsafe.Pointer(bp + 64 /* &zSql[0] */ + uintptr(i))) = *(*int8)(unsafe.Pointer(zHex + uintptr(j))) } } goto __2 __2: i++ j++ goto __1 goto __3 __3: ; *(*int8)(unsafe.Pointer(bp + 64 /* &zSql[0] */ + uintptr(i))) = int8(0) tcl.XTcl_DStringInit(tls, bp+568 /* &str */) rc = sqlite3.Xsqlite3_exec(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */)), bp+64 /* &zSql[0] */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{exec_printf_cb})), bp+568 /* &str */, bp+784 /* &zErr */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+792 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, rc)) tcl.XTcl_AppendElement(tls, interp, bp+792 /* &zBuf[0] */) tcl.XTcl_AppendElement(tls, interp, func() uintptr { if rc == SQLITE_OK { return (*Tcl_DString)(unsafe.Pointer(bp + 568 /* &str */)).Fstring } return *(*uintptr)(unsafe.Pointer(bp + 784 /* zErr */)) }()) tcl.XTcl_DStringFree(tls, bp+568 /* &str */) if *(*uintptr)(unsafe.Pointer(bp + 784 /* zErr */)) != 0 { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 784 /* zErr */))) } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */)), rc) != 0 { return TCL_ERROR } return TCL_OK } // Usage: db_enter DB // db_leave DB // // Enter or leave the mutex on a database connection. func db_enter(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:380:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) return TCL_OK } func db_leave(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:396:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) return TCL_OK } // Usage: sqlite3_exec DB SQL // // Invoke the sqlite3_exec interface using the open database DB func test_exec(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:418:26: */ bp := tls.Alloc(334) defer tls.Free(334) // var db uintptr at bp+72, 8 // var str Tcl_DString at bp+80, 216 var rc int32 *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */)) = uintptr(0) var zSql uintptr var i int32 var j int32 // var zBuf [30]int8 at bp+304, 30 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14687 /* " DB SQL" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+72 /* &db */) != 0 { return TCL_ERROR } tcl.XTcl_DStringInit(tls, bp+80 /* &str */) zSql = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) for i = libc.AssignInt32(&j, 0); *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0; { if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == '%' { *(*int8)(unsafe.Pointer(zSql + uintptr(libc.PostIncInt32(&j, 1)))) = (int8((testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1)))))) << 4) + testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 2)))))))) i = i + (3) } else { *(*int8)(unsafe.Pointer(zSql + uintptr(libc.PostIncInt32(&j, 1)))) = *(*int8)(unsafe.Pointer(zSql + uintptr(libc.PostIncInt32(&i, 1)))) } } *(*int8)(unsafe.Pointer(zSql + uintptr(j))) = int8(0) rc = sqlite3.Xsqlite3_exec(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* db */)), zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{exec_printf_cb})), bp+80 /* &str */, bp+296 /* &zErr */) sqlite3.Xsqlite3_free(tls, zSql) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+304 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+56, rc)) tcl.XTcl_AppendElement(tls, interp, bp+304 /* &zBuf[0] */) tcl.XTcl_AppendElement(tls, interp, func() uintptr { if rc == SQLITE_OK { return (*Tcl_DString)(unsafe.Pointer(bp + 80 /* &str */)).Fstring } return *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */)) }()) tcl.XTcl_DStringFree(tls, bp+80 /* &str */) if *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */)) != 0 { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 296 /* zErr */))) } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72 /* db */)), rc) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_exec_nr DB SQL // // Invoke the sqlite3_exec interface using the open database DB. Discard // all results func test_exec_nr(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:465:26: */ bp := tls.Alloc(56) defer tls.Free(56) // var db uintptr at bp+40, 8 var rc int32 *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)) = uintptr(0) if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14687 /* " DB SQL" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_exec(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), uintptr(0), uintptr(0), bp+48 /* &zErr */) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), rc) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_mprintf_z_test SEPARATOR ARG0 ARG1 ... // // Test the %z format of sqlite_mprintf(). Use multiple mprintf() calls to // concatenate arg0 through argn using separator as the separator. // Return the result. func test_mprintf_z(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:492:26: */ bp := tls.Alloc(56) defer tls.Free(56) var zResult uintptr = uintptr(0) var i int32 for i = 2; (i < argc) && ((i == 2) || (zResult != 0)); i++ { zResult = sqlite3.Xsqlite3_mprintf(tls, ts+14695 /* "%z%s%s" */, libc.VaList(bp, zResult, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, zResult, 0)) sqlite3.Xsqlite3_free(tls, zResult) return TCL_OK } // Usage: sqlite3_mprintf_n_test STRING // // Test the %n format of sqlite_mprintf(). Return the length of the // input string. func test_mprintf_n(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:515:26: */ bp := tls.Alloc(28) defer tls.Free(28) var zStr uintptr *(*int32)(unsafe.Pointer(bp + 24 /* n */)) = 0 zStr = sqlite3.Xsqlite3_mprintf(tls, ts+14702 /* "%s%n" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+24 /* &n */)) sqlite3.Xsqlite3_free(tls, zStr) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 24 /* n */)))) return TCL_OK } // Usage: sqlite3_snprintf_int SIZE FORMAT INT // // Test the of sqlite3_snprintf() routine. SIZE is the size of the // output buffer in bytes. The maximum size is 100. FORMAT is the // format string. INT is a single integer argument. The FORMAT // string must require no more than this one integer argument. If // You pass in a format string that requires more than one argument, // bad things will happen. func test_snprintf_int(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:539:26: */ bp := tls.Alloc(140) defer tls.Free(140) // var zStr [100]int8 at bp+40, 100 var n int32 = libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var zFormat uintptr = *(*uintptr)(unsafe.Pointer(argv + 2*8)) var a1 int32 = libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) if uint64(n) > uint64(unsafe.Sizeof([100]int8{})) { n = int32(unsafe.Sizeof([100]int8{})) } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+40 /* &zStr[0] */, ts+14707 /* "abcdefghijklmnop..." */, 0) sqlite3.Xsqlite3_snprintf(tls, n, bp+40 /* &zStr[0] */, zFormat, libc.VaList(bp, a1)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+16, bp+40 /* &zStr[0] */, 0)) return TCL_OK } // Usage: sqlite3_get_table_printf DB FORMAT STRING ?--no-counts? // // Invoke the sqlite3_get_table_printf() interface using the open database // DB. The SQL is the string FORMAT. The format string should contain // one %s or %q. STRING is the value inserted into %s or %q. func test_get_table_printf(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:565:26: */ bp := tls.Alloc(390) defer tls.Free(390) // var db uintptr at bp+112, 8 // var str Tcl_DString at bp+120, 216 var rc int32 *(*uintptr)(unsafe.Pointer(bp + 344 /* zErr */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 352 /* nRow */)) = 0 *(*int32)(unsafe.Pointer(bp + 356 /* nCol */)) = 0 // var aResult uintptr at bp+336, 8 var i int32 // var zBuf [30]int8 at bp+360, 30 var zSql uintptr *(*int32)(unsafe.Pointer(bp + 104 /* resCount */)) = -1 if argc == 5 { if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 4*8)), bp+104 /* &resCount */) != 0 { return TCL_ERROR } } if (argc != 4) && (argc != 5) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14734 /* " DB FORMAT STRIN..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+112 /* &db */) != 0 { return TCL_ERROR } tcl.XTcl_DStringInit(tls, bp+120 /* &str */) zSql = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) if argc == 5 { rc = sqlite3.Xsqlite3_get_table(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), zSql, bp+336 /* &aResult */, uintptr(0), uintptr(0), bp+344 /* &zErr */) } else { rc = sqlite3.Xsqlite3_get_table(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), zSql, bp+336 /* &aResult */, bp+352 /* &nRow */, bp+356 /* &nCol */, bp+344 /* &zErr */) *(*int32)(unsafe.Pointer(bp + 104 /* resCount */)) = ((*(*int32)(unsafe.Pointer(bp + 352 /* nRow */)) + 1) * *(*int32)(unsafe.Pointer(bp + 356 /* nCol */))) } sqlite3.Xsqlite3_free(tls, zSql) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+360 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+56, rc)) tcl.XTcl_AppendElement(tls, interp, bp+360 /* &zBuf[0] */) if rc == SQLITE_OK { if argc == 4 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+360 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+72, *(*int32)(unsafe.Pointer(bp + 352 /* nRow */)))) tcl.XTcl_AppendElement(tls, interp, bp+360 /* &zBuf[0] */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+360 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(bp + 356 /* nCol */)))) tcl.XTcl_AppendElement(tls, interp, bp+360 /* &zBuf[0] */) } for i = 0; i < *(*int32)(unsafe.Pointer(bp + 104 /* resCount */)); i++ { tcl.XTcl_AppendElement(tls, interp, func() uintptr { if *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336 /* aResult */)) + uintptr(i)*8)) != 0 { return *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336 /* aResult */)) + uintptr(i)*8)) } return ts + 5717 /* "NULL" */ }()) } } else { tcl.XTcl_AppendElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 344 /* zErr */))) } sqlite3.Xsqlite3_free_table(tls, *(*uintptr)(unsafe.Pointer(bp + 336 /* aResult */))) if *(*uintptr)(unsafe.Pointer(bp + 344 /* zErr */)) != 0 { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 344 /* zErr */))) } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), rc) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_last_insert_rowid DB // // Returns the integer ROWID of the most recent insert. func test_last_rowid(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:628:26: */ bp := tls.Alloc(118) defer tls.Free(118) // var db uintptr at bp+80, 8 // var zBuf [30]int8 at bp+88, 30 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14760 /* " DB\"" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+80 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+88 /* &zBuf[0] */, ts+10547 /* "%lld" */, libc.VaList(bp+40, sqlite3.Xsqlite3_last_insert_rowid(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+88 /* &zBuf[0] */, 0)) return SQLITE_OK } // Usage: sqlite3_key DB KEY // // Set the codec key. func test_key(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:652:26: */ return TCL_OK } // Usage: sqlite3_rekey DB KEY // // Change the codec key. func test_rekey(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:666:26: */ return TCL_OK } // Usage: sqlite3_close DB // // Closes the database opened by sqlite3_open. func sqlite_test_close(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:680:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14765 /* " FILENAME\"" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Usage: sqlite3_close_v2 DB // // Closes the database opened by sqlite3_open. func sqlite_test_close_v2(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:704:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14765 /* " FILENAME\"" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_close_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Implementation of the x_coalesce() function. // Return the first argument non-NULL argument. func t1_ifnullFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:727:13: */ var i int32 for i = 0; i < argc; i++ { if SQLITE_NULL != sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) { var n int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) sqlite3.Xsqlite3_result_text(tls, context, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))), n, libc.UintptrFromInt32(-1)) break } } } // These are test functions. hex8() interprets its argument as // UTF8 and returns a hex encoding. hex16le() interprets its argument // as UTF16le and returns a hex encoding. func hex8Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:748:13: */ bp := tls.Alloc(216) defer tls.Free(216) var z uintptr var i int32 // var zBuf [200]int8 at bp+16, 200 z = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) for i = 0; (uint64(i) < ((uint64(unsafe.Sizeof([200]int8{})) / uint64(2)) - uint64(2))) && (*(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0); i++ { sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([200]int8{})) - (uint64(i * 2)))), (bp + 16 /* &zBuf */ + uintptr((i * 2))), ts+14776 /* "%02x" */, libc.VaList(bp, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) } *(*int8)(unsafe.Pointer(bp + 16 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+16 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } func hex16Func(tls *libc.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ bp := tls.Alloc(416) defer tls.Free(416) var z uintptr var i int32 // var zBuf [400]int8 at bp+16, 400 z = sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv))) for i = 0; (uint64(i) < ((uint64(unsafe.Sizeof([400]int8{})) / uint64(4)) - uint64(4))) && (*(*uint16)(unsafe.Pointer(z + uintptr(i)*2)) != 0); i++ { sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([400]int8{})) - (uint64(i * 4)))), (bp + 16 /* &zBuf */ + uintptr((i * 4))), ts+14781 /* "%04x" */, libc.VaList(bp, (int32(*(*uint16)(unsafe.Pointer(z + uintptr(i)*2)))&0xff))) } *(*int8)(unsafe.Pointer(bp + 16 /* &zBuf[0] */ + uintptr((i * 4)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+16 /* zBuf */, -1, libc.UintptrFromInt32(-1)) } // A structure into which to accumulate text. type dstr = struct { FnAlloc int32 FnUsed int32 Fz uintptr } /* test1.c:776:1 */ // Append text to a dstr func dstrAppend(tls *libc.TLS, p uintptr, z uintptr, divider int32) { /* test1.c:785:13: */ var n int32 = int32(libc.Xstrlen(tls, z)) if (((*dstr)(unsafe.Pointer(p)).FnUsed + n) + 2) > (*dstr)(unsafe.Pointer(p)).FnAlloc { var zNew uintptr (*dstr)(unsafe.Pointer(p)).FnAlloc = ((((*dstr)(unsafe.Pointer(p)).FnAlloc * 2) + n) + 200) zNew = sqlite3.Xsqlite3_realloc(tls, (*dstr)(unsafe.Pointer(p)).Fz, (*dstr)(unsafe.Pointer(p)).FnAlloc) if zNew == uintptr(0) { sqlite3.Xsqlite3_free(tls, (*dstr)(unsafe.Pointer(p)).Fz) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(dstr{}))) return } (*dstr)(unsafe.Pointer(p)).Fz = zNew } if (divider != 0) && ((*dstr)(unsafe.Pointer(p)).FnUsed > 0) { *(*int8)(unsafe.Pointer((*dstr)(unsafe.Pointer(p)).Fz + uintptr(libc.PostIncInt32(&(*dstr)(unsafe.Pointer(p)).FnUsed, 1)))) = int8(divider) } libc.Xmemcpy(tls, ((*dstr)(unsafe.Pointer(p)).Fz + uintptr((*dstr)(unsafe.Pointer(p)).FnUsed)), z, (uint64(n + 1))) *(*int32)(unsafe.Pointer(p + 4 /* &.nUsed */)) += (n) } // Invoked for each callback from sqlite3ExecFunc func execFuncCallback(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* test1.c:808:12: */ var p uintptr = pData var i int32 for i = 0; i < argc; i++ { if *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) == uintptr(0) { dstrAppend(tls, p, ts+5717 /* "NULL" */, ' ') } else { dstrAppend(tls, p, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ' ') } } return 0 } // Implementation of the x_sqlite_exec() function. This function takes // a single argument and attempts to execute that argument as SQL code. // This is illegal and should set the SQLITE_MISUSE flag on the database. // // 2004-Jan-07: We have changed this to make it legal to call sqlite3_exec() // from within a function call. // // This routine simulates the effect of having two threads attempt to // use the same database at the same time. func sqlite3ExecFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:832:13: */ bp := tls.Alloc(16) defer tls.Free(16) // var x dstr at bp, 16 libc.Xmemset(tls, bp /* &x */, 0, uint64(unsafe.Sizeof(dstr{}))) sqlite3.Xsqlite3_exec(tls, sqlite3.Xsqlite3_user_data(tls, context), sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{execFuncCallback})), bp /* &x */, uintptr(0)) sqlite3.Xsqlite3_result_text(tls, context, (*dstr)(unsafe.Pointer(bp /* &x */)).Fz, (*dstr)(unsafe.Pointer(bp /* &x */)).FnUsed, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_free(tls, (*dstr)(unsafe.Pointer(bp /* &x */)).Fz) } // Implementation of tkt2213func(), a scalar function that takes exactly // one argument. It has two interesting features: // // * It calls sqlite3_value_text() 3 times on the argument sqlite3_value*. // If the three pointers returned are not the same an SQL error is raised. // // * Otherwise it returns a copy of the text representation of its // argument in such a way as the VDBE representation is a Mem* cell // with the MEM_Term flag clear. // // Ticket #2213 can therefore be tested by evaluating the following // SQL expression: // // tkt2213func(tkt2213func('a string')); func tkt2213Function(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:862:13: */ var nText int32 var zText1 uintptr var zText2 uintptr var zText3 uintptr nText = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) zText1 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zText2 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zText3 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if (zText1 != zText2) || (zText2 != zText3) { sqlite3.Xsqlite3_result_error(tls, context, ts+14786 /* "tkt2213 is not f..." */, -1) } else { var zCopy uintptr = sqlite3.Xsqlite3_malloc(tls, nText) libc.Xmemcpy(tls, zCopy, zText1, uint64(nText)) sqlite3.Xsqlite3_result_text(tls, context, zCopy, nText, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } // The following SQL function takes 4 arguments. The 2nd and // 4th argument must be one of these strings: 'text', 'text16', // or 'blob' corresponding to API functions // // sqlite3_value_text() // sqlite3_value_text16() // sqlite3_value_blob() // // The third argument is a string, either 'bytes' or 'bytes16' or 'noop', // corresponding to APIs: // // sqlite3_value_bytes() // sqlite3_value_bytes16() // noop // // The APIs designated by the 2nd through 4th arguments are applied // to the first argument in order. If the pointers returned by the // second and fourth are different, this routine returns 1. Otherwise, // this routine returns 0. // // This function is used to test to see when returned pointers from // the _text(), _text16() and _blob() APIs become invalidated. func ptrChngFunction(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:910:13: */ var p1 uintptr var p2 uintptr var zCmd uintptr if argc != 4 { return } zCmd = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if zCmd == uintptr(0) { return } if libc.Xstrcmp(tls, zCmd, ts+12455 /* "text" */) == 0 { p1 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) } else if libc.Xstrcmp(tls, zCmd, ts+14807 /* "text16" */) == 0 { p1 = sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv))) } else if libc.Xstrcmp(tls, zCmd, ts+12460 /* "blob" */) == 0 { p1 = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) } else { return } zCmd = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) if zCmd == uintptr(0) { return } if libc.Xstrcmp(tls, zCmd, ts+14814 /* "bytes" */) == 0 { sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) } else if libc.Xstrcmp(tls, zCmd, ts+14820 /* "bytes16" */) == 0 { sqlite3.Xsqlite3_value_bytes16(tls, *(*uintptr)(unsafe.Pointer(argv))) } else if libc.Xstrcmp(tls, zCmd, ts+14828 /* "noop" */) == 0 { // do nothing } else { return } zCmd = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) if zCmd == uintptr(0) { return } if libc.Xstrcmp(tls, zCmd, ts+12455 /* "text" */) == 0 { p2 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) } else if libc.Xstrcmp(tls, zCmd, ts+14807 /* "text16" */) == 0 { p2 = sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv))) } else if libc.Xstrcmp(tls, zCmd, ts+12460 /* "blob" */) == 0 { p2 = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) } else { return } sqlite3.Xsqlite3_result_int(tls, context, (libc.Bool32(p1 != p2))) } // This SQL function returns a different answer each time it is called, even if // the arguments are the same. func nondeterministicFunction(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:964:13: */ sqlite3.Xsqlite3_result_int(tls, context, libc.PostIncInt32(&cnt, 1)) } var cnt int32 = 0 /* test1.c:969:14 */ // This SQL function returns the integer value of its argument as a MEM_IntReal // value. func intrealFunction(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:977:13: */ bp := tls.Alloc(16) defer tls.Free(16) var v sqlite3_int64 = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_result_int64(tls, context, v) sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_RESULT_INTREAL, libc.VaList(bp, context)) } // Usage: sqlite3_create_function DB // // Call the sqlite3_create_function API on the given database in order // to create a function named "x_coalesce". This function does the same thing // as the "coalesce" function. This function also registers an SQL function // named "x_sqlite_exec" that invokes sqlite3_exec(). Invoking sqlite3_exec() // in this way is illegal recursion and should raise an SQLITE_MISUSE error. // The effect is similar to trying to use the same database connection from // two threads at the same time. // // The original motivation for this routine was to be able to call the // sqlite3_create_function function while a query is in progress in order // to test the SQLITE_MISUSE detection logic. func test_create_function(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1002:26: */ bp := tls.Alloc(48) defer tls.Free(48) var rc int32 // var db uintptr at bp+40, 8 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14760 /* " DB\"" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14833 /* "x_coalesce" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{t1_ifnullFunc})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14844 /* "hex8" */, 1, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{hex8Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14849 /* "hex16" */, 1, (SQLITE_UTF16 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{hex16Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14855 /* "tkt2213func" */, 1, SQLITE_ANY, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tkt2213Function})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14867 /* "pointer_change" */, 4, SQLITE_ANY, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{ptrChngFunction})), uintptr(0), uintptr(0)) } // Functions counter1() and counter2() have the same implementation - they // both return an ascending integer with each call. But counter1() is marked // as non-deterministic and counter2() is marked as deterministic. if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14882 /* "counter1" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{nondeterministicFunction})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14891 /* "counter2" */, -1, (SQLITE_UTF8 | SQLITE_DETERMINISTIC), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{nondeterministicFunction})), uintptr(0), uintptr(0)) } // The intreal() function converts its argument to an integer and returns // it as a MEM_IntReal. if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14900 /* "intreal" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{intrealFunction})), uintptr(0), uintptr(0)) } // Use the sqlite3_create_function16() API here. Mainly for fun, but also // because it is not tested anywhere else. if rc == SQLITE_OK { var zUtf16 uintptr var pVal uintptr sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) pVal = sqlite3.Xsqlite3ValueNew(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))) sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, ts+14908 /* "x_sqlite_exec" */, uint8(SQLITE_UTF8), uintptr(0)) zUtf16 = sqlite3.Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) if (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).FmallocFailed != 0 { rc = SQLITE_NOMEM } else { rc = sqlite3.Xsqlite3_create_function16(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), zUtf16, 1, SQLITE_UTF16, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{sqlite3ExecFunc})), uintptr(0), uintptr(0)) } sqlite3.Xsqlite3ValueFree(tls, pVal) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), rc) != 0 { return TCL_ERROR } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Usage: sqlite3_drop_modules DB ?NAME ...? // // Invoke the sqlite3_drop_modules(D,L) interface on database // connection DB, in order to drop all modules except those named in // the argument. func test_drop_modules(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1092:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14760 /* " DB\"" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_drop_modules(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), func() uintptr { if argc > 2 { return (argv + uintptr(2)*8) } return uintptr(0) }()) return TCL_OK } // Routines to implement the x_count() aggregate function. // // x_count() counts the number of non-null arguments. But there are // some twists for testing purposes. // // If the argument to x_count() is 40 then a UTF-8 error is reported // on the step function. If x_count(41) is seen, then a UTF-16 error // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx1 = struct{ Fn int32 } /* test1.c:1123:9 */ // Routines to implement the x_count() aggregate function. // // x_count() counts the number of non-null arguments. But there are // some twists for testing purposes. // // If the argument to x_count() is 40 then a UTF-8 error is reported // on the step function. If x_count(41) is seen, then a UTF-16 error // is reported on the step function. If the total count is 42, then // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ func t1CountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ bp := tls.Alloc(9) defer tls.Free(9) var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) if ((argc == 0) || (SQLITE_NULL != sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))))) && (p != 0) { (*t1CountCtx)(unsafe.Pointer(p)).Fn++ } if argc > 0 { var v int32 = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) if v == 40 { sqlite3.Xsqlite3_result_error(tls, context, ts+14922 /* "value of 40 hand..." */, -1) } else if v == 41 { *(*[9]int8)(unsafe.Pointer(bp /* zUtf16ErrMsg */)) = [9]int8{int8(0), int8(0x61), int8(0), int8(0x62), int8(0), int8(0x63), int8(0), int8(0), int8(0)} sqlite3.Xsqlite3_result_error16(tls, context, (bp /* &zUtf16ErrMsg */ + 1), -1) } } } func t1CountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1149:13: */ var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) if p != 0 { if (*t1CountCtx)(unsafe.Pointer(p)).Fn == 42 { sqlite3.Xsqlite3_result_error(tls, context, ts+14952 /* "x_count totals t..." */, -1) } else { sqlite3.Xsqlite3_result_int(tls, context, func() int32 { if p != 0 { return (*t1CountCtx)(unsafe.Pointer(p)).Fn } return 0 }()) } } } func legacyCountStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1162:13: */ // no-op } func legacyCountFinalize(tls *libc.TLS, context uintptr) { /* test1.c:1170:13: */ sqlite3.Xsqlite3_result_int(tls, context, sqlite3.Xsqlite3_aggregate_count(tls, context)) } // Usage: sqlite3_create_aggregate DB // // Call the sqlite3_create_function API on the given database in order // to create a function named "x_count". This function is similar // to the built-in count() function, with a few special quirks // for testing the sqlite3_result_error() APIs. // // The original motivation for this routine was to be able to call the // sqlite3_create_aggregate function while a query is in progress in order // to test the SQLITE_MISUSE detection logic. See misuse.test. // // This routine was later extended to test the use of sqlite3_result_error() // within aggregate functions. // // Later: It is now also extended to register the aggregate function // "legacy_count()" with the supplied database handle. This is used // to test the deprecated sqlite3_aggregate_count() API. func test_create_aggregate(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1194:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14765 /* " FILENAME\"" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14973 /* "x_count" */, 0, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{t1CountStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{t1CountFinalize}))) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14973 /* "x_count" */, 1, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{t1CountStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{t1CountFinalize}))) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+14981 /* "legacy_count" */, 0, SQLITE_ANY, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{legacyCountStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{legacyCountFinalize}))) } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), rc) != 0 { return TCL_ERROR } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Usage: printf TEXT // // Send output to printf. Use this rather than puts to merge the output // in the correct sequence with debugging printfs inserted into C code. // Puts uses a separate buffer and debugging statements will be out of // sequence if it is used. func test_printf(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1235:26: */ bp := tls.Alloc(56) defer tls.Free(56) if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14994 /* " TEXT\"" */, 0)) return TCL_ERROR } libc.Xprintf(tls, ts+294 /* "%s\n" */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) return TCL_OK } // Usage: sqlite3_mprintf_int FORMAT INTEGER INTEGER INTEGER // // Call mprintf with three integer arguments func sqlite3_mprintf_int(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1257:26: */ bp := tls.Alloc(108) defer tls.Free(108) // var a [3]int32 at bp+96, 12 var i int32 var z uintptr if argc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15001 /* " FORMAT INT INT ..." */, 0)) return TCL_ERROR } for i = 2; i < 5; i++ { if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+96 /* &a */ +uintptr((i-2))*4)) != 0 { return TCL_ERROR } } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */)), *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */ + 1*4)), *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */ + 2*4)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_int64 FORMAT INTEGER INTEGER INTEGER // // Call mprintf with three 64-bit integer arguments func sqlite3_mprintf_int64(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1284:26: */ bp := tls.Alloc(144) defer tls.Free(144) var i int32 // var a [3]sqlite_int64 at bp+120, 24 var z uintptr if argc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15001 /* " FORMAT INT INT ..." */, 0)) return TCL_ERROR } for i = 2; i < 5; i++ { if sqlite3.Xsqlite3Atoi64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+120 /* &a */ +uintptr((i-2))*8), sqlite3.Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))), uint8(SQLITE_UTF8)) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+15022 /* "argument is not ..." */, 0)) return TCL_ERROR } } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+64, *(*sqlite_int64)(unsafe.Pointer(bp + 120 /* &a[0] */)), *(*sqlite_int64)(unsafe.Pointer(bp + 120 /* &a[0] */ + 1*8)), *(*sqlite_int64)(unsafe.Pointer(bp + 120 /* &a[0] */ + 2*8)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+96, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_long FORMAT INTEGER INTEGER INTEGER // // Call mprintf with three long integer arguments. This might be the // same as sqlite3_mprintf_int or sqlite3_mprintf_int64, depending on // platform. func sqlite3_mprintf_long(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1317:26: */ bp := tls.Alloc(120) defer tls.Free(120) var i int32 // var a [3]int32 at bp+108, 12 // var b [3]int32 at bp+96, 12 var z uintptr if argc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15001 /* " FORMAT INT INT ..." */, 0)) return TCL_ERROR } for i = 2; i < 5; i++ { if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+96 /* &b */ +uintptr((i-2))*4)) != 0 { return TCL_ERROR } *(*int32)(unsafe.Pointer(bp + 108 /* &a[0] */ + uintptr((i-2))*4)) = int32(*(*int32)(unsafe.Pointer(bp + 96 /* &b[0] */ + uintptr((i-2))*4))) *(*int32)(unsafe.Pointer(bp + 108 /* &a */ + uintptr((i-2))*4)) &= libc.Int32FromUint64(((u64((uint64(1))) << (uint64(unsafe.Sizeof(int32(0))) * uint64(8))) - uint64(1))) } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 108 /* &a[0] */)), *(*int32)(unsafe.Pointer(bp + 108 /* &a[0] */ + 1*4)), *(*int32)(unsafe.Pointer(bp + 108 /* &a[0] */ + 2*4)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_str FORMAT INTEGER INTEGER STRING // // Call mprintf with two integer arguments and one string argument func sqlite3_mprintf_str(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1348:26: */ bp := tls.Alloc(108) defer tls.Free(108) // var a [3]int32 at bp+96, 12 var i int32 var z uintptr if (argc < 4) || (argc > 5) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15061 /* " FORMAT INT INT ..." */, 0)) return TCL_ERROR } for i = 2; i < 4; i++ { if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+96 /* &a */ +uintptr((i-2))*4)) != 0 { return TCL_ERROR } } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */)), *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */ + 1*4)), func() uintptr { if argc > 4 { return *(*uintptr)(unsafe.Pointer(argv + 4*8)) } return uintptr(0) }())) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_snprintf_str INTEGER FORMAT INTEGER INTEGER STRING // // Call mprintf with two integer arguments and one string argument func sqlite3_snprintf_str(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1375:26: */ bp := tls.Alloc(136) defer tls.Free(136) // var a [3]int32 at bp+124, 12 var i int32 // var n int32 at bp+120, 4 var z uintptr if (argc < 5) || (argc > 6) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15087 /* " INT FORMAT INT ..." */, 0)) return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+120 /* &n */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 120 /* n */)) < 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+15117 /* "N must be non-ne..." */, 0)) return TCL_ERROR } for i = 3; i < 5; i++ { if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+124 /* &a */ +uintptr((i-3))*4)) != 0 { return TCL_ERROR } } z = sqlite3.Xsqlite3_malloc(tls, (*(*int32)(unsafe.Pointer(bp + 120 /* n */)) + 1)) sqlite3.Xsqlite3_snprintf(tls, *(*int32)(unsafe.Pointer(bp + 120 /* n */)), z, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.VaList(bp+64, *(*int32)(unsafe.Pointer(bp + 124 /* &a[0] */)), *(*int32)(unsafe.Pointer(bp + 124 /* &a[0] */ + 1*4)), func() uintptr { if argc > 4 { return *(*uintptr)(unsafe.Pointer(argv + 5*8)) } return uintptr(0) }())) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+96, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_double FORMAT INTEGER INTEGER DOUBLE // // Call mprintf with two integer arguments and one double argument func sqlite3_mprintf_double(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1409:26: */ bp := tls.Alloc(120) defer tls.Free(120) // var a [3]int32 at bp+96, 12 var i int32 // var r float64 at bp+112, 8 var z uintptr if argc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15140 /* " FORMAT INT INT ..." */, 0)) return TCL_ERROR } for i = 2; i < 4; i++ { if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+96 /* &a */ +uintptr((i-2))*4)) != 0 { return TCL_ERROR } } if tcl.XTcl_GetDouble(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 4*8)), bp+112 /* &r */) != 0 { return TCL_ERROR } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */)), *(*int32)(unsafe.Pointer(bp + 96 /* &a[0] */ + 1*4)), *(*float64)(unsafe.Pointer(bp + 112 /* r */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_scaled FORMAT DOUBLE DOUBLE // // Call mprintf with a single double argument which is the product of the // two arguments given above. This is used to generate overflow and underflow // doubles to test that they are converted properly. func sqlite3_mprintf_scaled(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1440:26: */ bp := tls.Alloc(96) defer tls.Free(96) var i int32 // var r [2]float64 at bp+80, 16 var z uintptr if argc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15164 /* " FORMAT DOUBLE D..." */, 0)) return TCL_ERROR } for i = 2; i < 4; i++ { if tcl.XTcl_GetDouble(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+80 /* &r */ +uintptr((i-2))*8)) != 0 { return TCL_ERROR } } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+40, (*(*float64)(unsafe.Pointer(bp + 80 /* &r[0] */))**(*float64)(unsafe.Pointer(bp + 80 /* &r[0] */ + 1*8))))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_stronly FORMAT STRING // // Call mprintf with a single double argument which is the product of the // two arguments given above. This is used to generate overflow and underflow // doubles to test that they are converted properly. func sqlite3_mprintf_stronly(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1470:26: */ bp := tls.Alloc(80) defer tls.Free(80) var z uintptr if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15187 /* " FORMAT STRING\"" */, 0)) return TCL_ERROR } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_mprintf_hexdouble FORMAT HEX // // Call mprintf with a single double argument which is derived from the // hexadecimal encoding of an IEEE double. func sqlite3_mprintf_hexdouble(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:1494:26: */ bp := tls.Alloc(152) defer tls.Free(152) var z uintptr // var r float64 at bp+136, 8 // var x1 uint32 at bp+132, 4 // var x2 uint32 at bp+128, 4 // var d sqlite_uint64 at bp+144, 8 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15187 /* " FORMAT STRING\"" */, 0)) return TCL_ERROR } if libc.Xsscanf(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ts+15203 /* "%08x%08x" */, libc.VaList(bp+40, bp+128 /* &x2 */, bp+132 /* &x1 */)) != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, ts+15212 /* "2nd argument sho..." */, 0)) return TCL_ERROR } *(*sqlite_uint64)(unsafe.Pointer(bp + 144 /* d */)) = sqlite_uint64(*(*uint32)(unsafe.Pointer(bp + 128 /* x2 */))) *(*sqlite_uint64)(unsafe.Pointer(bp + 144 /* d */)) = ((*(*sqlite_uint64)(unsafe.Pointer(bp + 144 /* d */)) << 32) + sqlite_uint64(*(*uint32)(unsafe.Pointer(bp + 132 /* x1 */)))) libc.Xmemcpy(tls, bp+136 /* &r */, bp+144 /* &d */, uint64(unsafe.Sizeof(float64(0)))) z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.VaList(bp+88, *(*float64)(unsafe.Pointer(bp + 136 /* r */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+104, z, 0)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_enable_shared_cache ?BOOLEAN? // func test_enable_shared(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1527:26: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 // var enable int32 at bp, 4 var ret int32 = 0 if (objc != 2) && (objc != 1) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2761 /* "?BOOLEAN?" */) return TCL_ERROR } ret = sqlite3.Xsqlite3Config.FsharedCacheEnabled if objc == 2 { if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &enable */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_enable_shared_cache(tls, *(*int32)(unsafe.Pointer(bp /* enable */))) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrStr(tls, rc), uintptr(0)) return TCL_ERROR } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((ret) != 0)))) return TCL_OK } // Usage: sqlite3_extended_result_codes DB BOOLEAN // func test_extended_result_codes(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1564:26: */ bp := tls.Alloc(12) defer tls.Free(12) // var enable int32 at bp+8, 4 // var db uintptr at bp, 8 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15256 /* "DB BOOLEAN" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &enable */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_extended_result_codes(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), *(*int32)(unsafe.Pointer(bp + 8 /* enable */))) return TCL_OK } // Usage: sqlite3_libversion_number // func test_libversion_number(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1587:26: */ tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_libversion_number(tls))) return TCL_OK } // Usage: sqlite3_table_column_metadata DB dbname tblname colname // func test_table_column_metadata(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1601:26: */ bp := tls.Alloc(60) defer tls.Free(60) // var db uintptr at bp+24, 8 var zDb uintptr var zTbl uintptr var zCol uintptr var rc int32 var pRet uintptr // var zDatatype uintptr at bp+32, 8 // var zCollseq uintptr at bp+40, 8 // var notnull int32 at bp+48, 4 // var primarykey int32 at bp+52, 4 // var autoincrement int32 at bp+56, 4 if (objc != 5) && (objc != 4) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15267 /* "DB dbname tblnam..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0 { return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zTbl = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if objc == 5 { zCol = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) } else { zCol = uintptr(0) } if libc.Xstrlen(tls, zDb) == uint64(0) { zDb = uintptr(0) } rc = sqlite3.Xsqlite3_table_column_metadata(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), zDb, zTbl, zCol, bp+32 /* &zDatatype */, bp+40 /* &zCollseq */, bp+48 /* ¬null */, bp+52 /* &primarykey */, bp+56 /* &autoincrement */) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */))), 0)) return TCL_ERROR } pRet = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRet, tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* zDatatype */)), -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRet, tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zCollseq */)), -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 48 /* notnull */)))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 52 /* primarykey */)))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 56 /* autoincrement */)))) tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } func blobHandleFromObj(tls *libc.TLS, interp uintptr, pObj uintptr, ppBlob uintptr) int32 { /* test1.c:1652:26: */ bp := tls.Alloc(8) defer tls.Free(8) var z uintptr // var n int32 at bp, 4 z = tcl.XTcl_GetStringFromObj(tls, pObj, bp /* &n */) if *(*int32)(unsafe.Pointer(bp /* n */)) == 0 { *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) } else { // var notUsed int32 at bp+4, 4 var channel Tcl_Channel var instanceData ClientData channel = tcl.XTcl_GetChannel(tls, interp, z, bp+4 /* ¬Used */) if !(channel != 0) { return TCL_ERROR } tcl.XTcl_Flush(tls, channel) tcl.XTcl_Seek(tls, channel, int64(0), SEEK_SET) instanceData = tcl.XTcl_GetChannelInstanceData(tls, channel) *(*uintptr)(unsafe.Pointer(ppBlob)) = *(*uintptr)(unsafe.Pointer(instanceData)) } return TCL_OK } func test_blob_reopen(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1681:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var iRowid Tcl_WideInt at bp+8, 8 // var pBlob uintptr at bp, 8 var rc int32 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15293 /* "CHANNEL ROWID" */) return TCL_ERROR } if blobHandleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &pBlob */) != 0 { return TCL_ERROR } if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &iRowid */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_blob_reopen(tls, *(*uintptr)(unsafe.Pointer(bp /* pBlob */)), *(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* iRowid */))) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) } return func() int32 { if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR }() } // Usage: sqlite3_create_collation_v2 DB-HANDLE NAME CMP-PROC DEL-PROC // // This Tcl proc is used for testing the experimental // sqlite3_create_collation_v2() interface. type TestCollationX1 = struct { Finterp uintptr FpCmp uintptr FpDel uintptr } /* test1.c:1715:1 */ type TestCollationX = TestCollationX1 /* test1.c:1720:31 */ func testCreateCollationDel(tls *libc.TLS, pCtx uintptr) { /* test1.c:1721:13: */ var p uintptr = pCtx var rc int32 = tcl.XTcl_EvalObjEx(tls, (*TestCollationX)(unsafe.Pointer(p)).Finterp, (*TestCollationX)(unsafe.Pointer(p)).FpDel, (TCL_EVAL_DIRECT | TCL_EVAL_GLOBAL)) if rc != TCL_OK { tcl.XTcl_BackgroundError(tls, (*TestCollationX)(unsafe.Pointer(p)).Finterp) } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*TestCollationX)(unsafe.Pointer(p)).FpCmp if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*TestCollationX)(unsafe.Pointer(p)).FpDel if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } sqlite3.Xsqlite3_free(tls, p) } func testCreateCollationCmp(tls *libc.TLS, pCtx uintptr, nLeft int32, zLeft uintptr, nRight int32, zRight uintptr) int32 { /* test1.c:1733:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pCtx var pScript uintptr = tcl.XTcl_DuplicateObj(tls, (*TestCollationX)(unsafe.Pointer(p)).FpCmp) *(*int32)(unsafe.Pointer(bp /* iRes */)) = 0 (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, zLeft, nLeft)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, zRight, nRight)) if (TCL_OK != tcl.XTcl_EvalObjEx(tls, (*TestCollationX)(unsafe.Pointer(p)).Finterp, pScript, (TCL_EVAL_DIRECT|TCL_EVAL_GLOBAL))) || (TCL_OK != tcl.XTcl_GetIntFromObj(tls, (*TestCollationX)(unsafe.Pointer(p)).Finterp, tcl.XTcl_GetObjResult(tls, (*TestCollationX)(unsafe.Pointer(p)).Finterp), bp /* &iRes */)) { tcl.XTcl_BackgroundError(tls, (*TestCollationX)(unsafe.Pointer(p)).Finterp) } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return *(*int32)(unsafe.Pointer(bp /* iRes */)) } func test_create_collation_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1757:26: */ bp := tls.Alloc(32) defer tls.Free(32) var p uintptr // var db uintptr at bp+24, 8 var rc int32 if objc != 5 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15307 /* "DB-HANDLE NAME C..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0 { return TCL_ERROR } p = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TestCollationX{}))) (*TestCollationX)(unsafe.Pointer(p)).FpCmp = *(*uintptr)(unsafe.Pointer(objv + 3*8)) (*TestCollationX)(unsafe.Pointer(p)).FpDel = *(*uintptr)(unsafe.Pointer(objv + 4*8)) (*TestCollationX)(unsafe.Pointer(p)).Finterp = interp (*Tcl_Obj)(unsafe.Pointer((*TestCollationX)(unsafe.Pointer(p)).FpCmp)).FrefCount++ (*Tcl_Obj)(unsafe.Pointer((*TestCollationX)(unsafe.Pointer(p)).FpDel)).FrefCount++ rc = sqlite3.Xsqlite3_create_collation_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), 16, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{testCreateCollationCmp})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testCreateCollationDel}))) if rc != SQLITE_MISUSE { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+15340 /* "sqlite3_create_c..." */, uintptr(0))) return TCL_ERROR } rc = sqlite3.Xsqlite3_create_collation_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{testCreateCollationCmp})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testCreateCollationDel}))) return TCL_OK } // USAGE: sqlite3_create_function_v2 DB NAME NARG ENC ?SWITCHES? // // Available switches are: // // -func SCRIPT // -step SCRIPT // -final SCRIPT // -destroy SCRIPT type CreateFunctionV21 = struct { Finterp uintptr FpFunc uintptr FpStep uintptr FpFinal uintptr FpDestroy uintptr } /* test1.c:1804:9 */ // USAGE: sqlite3_create_function_v2 DB NAME NARG ENC ?SWITCHES? // // Available switches are: // // -func SCRIPT // -step SCRIPT // -final SCRIPT // -destroy SCRIPT type CreateFunctionV2 = CreateFunctionV21 /* test1.c:1804:33 */ func cf2Func(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1812:13: */ } func cf2Step(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* test1.c:1814:13: */ } func cf2Final(tls *libc.TLS, ctx uintptr) { /* test1.c:1816:13: */ } func cf2Destroy(tls *libc.TLS, pUser uintptr) { /* test1.c:1818:13: */ var p uintptr = pUser if ((*CreateFunctionV2)(unsafe.Pointer(p)).Finterp != 0) && ((*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy != 0) { var rc int32 = tcl.XTcl_EvalObjEx(tls, (*CreateFunctionV2)(unsafe.Pointer(p)).Finterp, (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy, 0) if rc != TCL_OK { tcl.XTcl_BackgroundError(tls, (*CreateFunctionV2)(unsafe.Pointer(p)).Finterp) } } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep != 0 { for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal != 0 { for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy != 0 { for ok3 := true; ok3; ok3 = 0 != 0 { var _objPtr uintptr = (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } sqlite3.Xsqlite3_free(tls, p) } func test_create_function_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1832:26: */ bp := tls.Alloc(188) defer tls.Free(188) // var db uintptr at bp+24, 8 var zFunc uintptr // var nArg int32 at bp+32, 4 // var enc int32 at bp+136, 4 var p uintptr var i int32 var rc int32 *(*[6]EncTable)(unsafe.Pointer(bp + 40 /* aEnc */)) = [6]EncTable{ {FzEnc: ts + 15405 /* "utf8" */, Fenc: SQLITE_UTF8}, {FzEnc: ts + 15410 /* "utf16" */, Fenc: SQLITE_UTF16}, {FzEnc: ts + 15416 /* "utf16le" */, Fenc: SQLITE_UTF16LE}, {FzEnc: ts + 15424 /* "utf16be" */, Fenc: SQLITE_UTF16BE}, {FzEnc: ts + 12465 /* "any" */, Fenc: SQLITE_ANY}, {FzEnc: ts + 13875 /* "0" */}, } if (objc < 5) || ((objc % 2) == 0) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15432 /* "DB NAME NARG ENC..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0 { return TCL_ERROR } zFunc = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+32 /* &nArg */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+40 /* &aEnc[0] */, int32(unsafe.Sizeof(EncTable{})), ts+15461 /* "encoding" */, 0, bp+136 /* &enc */) != 0 { return TCL_ERROR } *(*int32)(unsafe.Pointer(bp + 136 /* enc */)) = (*EncTable)(unsafe.Pointer(bp + 40 /* &aEnc */ + uintptr(*(*int32)(unsafe.Pointer(bp + 136 /* enc */)))*16)).Fenc p = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(CreateFunctionV2{}))) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(CreateFunctionV2{}))) (*CreateFunctionV2)(unsafe.Pointer(p)).Finterp = interp for i = 5; i < objc; i = i + (2) { // var iSwitch int32 at bp+184, 4 *(*[5]uintptr)(unsafe.Pointer(bp + 144 /* azSwitch */)) = [5]uintptr{ts + 15470 /* "-func" */, ts + 15476 /* "-step" */, ts + 15482 /* "-final" */, ts + 15489 /* "-destroy" */, uintptr(0)} if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+144 /* &azSwitch[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+15498 /* "switch" */, 0, bp+184 /* &iSwitch */) != 0 { sqlite3.Xsqlite3_free(tls, p) return TCL_ERROR } switch *(*int32)(unsafe.Pointer(bp + 184 /* iSwitch */)) { case 0: (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc = *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)) break case 1: (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep = *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)) break case 2: (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal = *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)) break case 3: (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy = *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)) break } } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc != 0 { (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc = tcl.XTcl_DuplicateObj(tls, (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc) } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep != 0 { (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep = tcl.XTcl_DuplicateObj(tls, (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep) } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal != 0 { (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal = tcl.XTcl_DuplicateObj(tls, (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal) } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy != 0 { (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy = tcl.XTcl_DuplicateObj(tls, (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy) } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc != 0 { (*Tcl_Obj)(unsafe.Pointer((*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc)).FrefCount++ } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep != 0 { (*Tcl_Obj)(unsafe.Pointer((*CreateFunctionV2)(unsafe.Pointer(p)).FpStep)).FrefCount++ } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal != 0 { (*Tcl_Obj)(unsafe.Pointer((*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal)).FrefCount++ } if (*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy != 0 { (*Tcl_Obj)(unsafe.Pointer((*CreateFunctionV2)(unsafe.Pointer(p)).FpDestroy)).FrefCount++ } rc = sqlite3.Xsqlite3_create_function_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), zFunc, *(*int32)(unsafe.Pointer(bp + 32 /* nArg */)), *(*int32)(unsafe.Pointer(bp + 136 /* enc */)), p, func() uintptr { if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFunc != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{cf2Func})) } return uintptr(0) }(), func() uintptr { if (*CreateFunctionV2)(unsafe.Pointer(p)).FpStep != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{cf2Step})) } return uintptr(0) }(), func() uintptr { if (*CreateFunctionV2)(unsafe.Pointer(p)).FpFinal != 0 { return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{cf2Final})) } return uintptr(0) }(), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{cf2Destroy}))) if rc != SQLITE_OK { tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } type EncTable = struct { FzEnc uintptr Fenc int32 _ [4]byte } /* test1.c:1846:3 */ // Usage: sqlite3_load_extension DB-HANDLE FILE ?PROC? func test_load_extension(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1920:26: */ bp := tls.Alloc(96) defer tls.Free(96) // var cmdInfo Tcl_CmdInfo at bp+32, 64 var db uintptr _ = db var rc int32 var zDb uintptr var zFile uintptr _ = zFile var zProc uintptr = uintptr(0) _ = zProc var zErr uintptr = uintptr(0) if (objc != 4) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15505 /* "DB-HANDLE FILE ?..." */) return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if objc == 4 { zProc = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) } // Extract the C database handle from the Tcl command name if !(tcl.XTcl_GetCommandInfo(tls, interp, zDb, bp+32 /* &cmdInfo */) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14541 /* "command not foun..." */, zDb, uintptr(0))) return TCL_ERROR } db = (*struct{ Fdb uintptr })(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 32 /* &cmdInfo */)).FobjClientData)).Fdb // Call the underlying C function. If an error occurs, set rc to // TCL_ERROR and load any error string into the interpreter. If no // error occurs, set rc to TCL_OK. rc = SQLITE_ERROR zErr = sqlite3.Xsqlite3_mprintf(tls, ts+15527 /* "this build omits..." */, 0) _ = zProc _ = zFile if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, func() uintptr { if zErr != 0 { return zErr } return ts + 489 /* "" */ }(), uintptr(1)) rc = TCL_ERROR } else { rc = TCL_OK } sqlite3.Xsqlite3_free(tls, zErr) return rc } // Usage: sqlite3_enable_load_extension DB-HANDLE ONOFF func test_enable_load(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:1978:26: */ bp := tls.Alloc(116) defer tls.Free(116) // var cmdInfo Tcl_CmdInfo at bp+48, 64 var db uintptr _ = db var zDb uintptr // var onoff int32 at bp+112, 4 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15569 /* "DB-HANDLE ONOFF" */) return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) // Extract the C database handle from the Tcl command name if !(tcl.XTcl_GetCommandInfo(tls, interp, zDb, bp+48 /* &cmdInfo */) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14541 /* "command not foun..." */, zDb, uintptr(0))) return TCL_ERROR } db = (*struct{ Fdb uintptr })(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 48 /* &cmdInfo */)).FobjClientData)).Fdb // Get the onoff parameter if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+112 /* &onoff */) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+15527 /* "this build omits..." */)) return TCL_ERROR } // Usage: sqlite_abort // // Shutdown the process immediately. This is not a clean shutdown. // This command is used to test the recoverability of a database in // the event of a program crash. func sqlite_abort(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:2024:26: */ // We do this, otherwise the test will halt with a popup message // that we have to click away before the test will continue. libc.X_set_abort_behavior(tls, uint32(0), uint32(X_CALL_REPORTFAULT)) libc.Xexit(tls, 255) // This will always fail return TCL_OK } // The following routine is a user-defined SQL function whose purpose // is to test the sqlite_set_result() API. func testFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:2045:13: */ var zArg0 uintptr __1: if !(argc >= 2) { goto __2 } zArg0 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if !(zArg0 != 0) { goto __3 } if !(0 == sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+2438 /* "int" */)) { goto __5 } sqlite3.Xsqlite3_result_int(tls, context, sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) goto __6 __5: if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+3844 /* "int64" */) == 0) { goto __7 } sqlite3.Xsqlite3_result_int64(tls, context, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) goto __8 __7: if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+15585 /* "string" */) == 0) { goto __9 } sqlite3.Xsqlite3_result_text(tls, context, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))), -1, libc.UintptrFromInt32(-1)) goto __10 __9: if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+2423 /* "double" */) == 0) { goto __11 } sqlite3.Xsqlite3_result_double(tls, context, sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) goto __12 __11: if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+7387 /* "null" */) == 0) { goto __13 } sqlite3.Xsqlite3_result_null(tls, context) goto __14 __13: if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+15592 /* "value" */) == 0) { goto __15 } sqlite3.Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))*8))) goto __16 __15: goto error_out __16: ; __14: ; __12: ; __10: ; __8: ; __6: ; goto __4 __3: goto error_out __4: ; argc = argc - (2) argv += 8 * (uintptr(2)) goto __1 __2: ; return error_out: sqlite3.Xsqlite3_result_error(tls, context, ts+15598 /* "first argument s..." */, -1) } // Usage: sqlite_register_test_function DB NAME // // Register the test SQL function on the database DB under the name NAME. func test_register_func(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:2083:26: */ bp := tls.Alloc(72) defer tls.Free(72) // var db uintptr at bp+64, 8 var rc int32 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+15666 /* " DB FUNCTION-NAM..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+64 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testFunc})), uintptr(0), uintptr(0)) if rc != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrStr(tls, rc), 0)) return TCL_ERROR } if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), rc) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_finalize STMT // // Finalize a statement handle. func test_finalize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2112:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 var rc int32 var db uintptr = uintptr(0) if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15684 /* " " */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) != 0 { db = sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) } rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) if (db != 0) && (sqlite3TestErrCode(tls, interp, db, rc) != 0) { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_stmt_status STMT CODE RESETFLAG // // Get the value of a status counter from a statement. func test_stmt_status(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2144:26: */ bp := tls.Alloc(16) defer tls.Free(16) var iValue int32 var i int32 *(*int32)(unsafe.Pointer(bp + 8 /* op */)) = 0 // var resetFlag int32 at bp+12, 4 var zOpName uintptr // var pStmt uintptr at bp, 8 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15692 /* "STMT PARAMETER R..." */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } zOpName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) for i = 0; i < (int32(uint64(unsafe.Sizeof(aOp)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fop int32 _ [4]byte }{})))); i++ { if libc.Xstrcmp(tls, aOp[i].FzName, zOpName) == 0 { *(*int32)(unsafe.Pointer(bp + 8 /* op */)) = aOp[i].Fop break } } if i >= (int32(uint64(unsafe.Sizeof(aOp)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fop int32 _ [4]byte }{})))) { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &op */) != 0 { return TCL_ERROR } } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+12 /* &resetFlag */) != 0 { return TCL_ERROR } iValue = sqlite3.Xsqlite3_stmt_status(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 8 /* op */)), *(*int32)(unsafe.Pointer(bp + 12 /* resetFlag */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, iValue)) return TCL_OK } var aOp = [7]struct { FzName uintptr Fop int32 _ [4]byte }{ {FzName: ts + 15717 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_FULLSCAN_STEP}, {FzName: ts + 15749 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_SORT}, {FzName: ts + 15772 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_AUTOINDEX}, {FzName: ts + 15800 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_VM_STEP}, {FzName: ts + 15826 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_REPREPARE}, {FzName: ts + 15854 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_RUN}, {FzName: ts + 15876 /* "SQLITE_STMTSTATU..." */, Fop: SQLITE_STMTSTATUS_MEMUSED}, } /* test1.c:2158:5 */ // Usage: sqlite3_config_sorterref // // Set the SQLITE_CONFIG_SORTERREF_SIZE configuration option func test_config_sorterref(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2285:26: */ bp := tls.Alloc(20) defer tls.Free(20) // var iVal int32 at bp+16, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15902 /* "NBYTE" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16 /* &iVal */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_SORTERREF_SIZE, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* iVal */)))) return TCL_OK } // Usage: vfs_current_time_int64 // // Return the value returned by the default VFS's xCurrentTimeInt64 method. func vfsCurrentTimeInt64(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2306:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var t i64 at bp, 8 var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, pVfs, bp /* &t */) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, *(*i64)(unsafe.Pointer(bp /* t */)))) return TCL_OK } // Usage: sqlite3_snapshot_get DB DBNAME func test_snapshot_get(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2327:26: */ bp := tls.Alloc(116) defer tls.Free(116) var rc int32 // var db uintptr at bp, 8 var zName uintptr *(*uintptr)(unsafe.Pointer(bp + 8 /* pSnapshot */)) = uintptr(0) if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15908 /* "DB DBNAME" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = sqlite3.Xsqlite3_snapshot_get(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zName, bp+8 /* &pSnapshot */) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } else { // var zBuf [100]int8 at bp+16, 100 if sqlite3TestMakePointerStr(tls, interp, bp+16 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSnapshot */))) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, bp+16 /* &zBuf[0] */, -1)) } return TCL_OK } // Usage: sqlite3_snapshot_recover DB DBNAME func test_snapshot_recover(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2362:26: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var db uintptr at bp, 8 var zName uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15908 /* "DB DBNAME" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = sqlite3.Xsqlite3_snapshot_recover(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zName) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } else { tcl.XTcl_ResetResult(tls, interp) } return TCL_OK } // Usage: sqlite3_snapshot_open DB DBNAME SNAPSHOT func test_snapshot_open(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2394:26: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var db uintptr at bp, 8 var zName uintptr var pSnapshot uintptr if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15918 /* "DB DBNAME SNAPSH..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) pSnapshot = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))) rc = sqlite3.Xsqlite3_snapshot_open(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zName, pSnapshot) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } else { tcl.XTcl_ResetResult(tls, interp) } return TCL_OK } // Usage: sqlite3_snapshot_free SNAPSHOT func test_snapshot_free(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2428:26: */ var pSnapshot uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15937 /* "SNAPSHOT" */) return TCL_ERROR } pSnapshot = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) sqlite3.Xsqlite3_snapshot_free(tls, pSnapshot) return TCL_OK } // Usage: sqlite3_snapshot_cmp SNAPSHOT1 SNAPSHOT2 func test_snapshot_cmp(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2449:26: */ var res int32 var p1 uintptr var p2 uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15946 /* "SNAPSHOT1 SNAPSH..." */) return TCL_ERROR } p1 = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) p2 = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))) res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return TCL_OK } // Usage: sqlite3_snapshot_get_blob DB DBNAME func test_snapshot_get_blob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2474:26: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // var db uintptr at bp, 8 var zName uintptr *(*uintptr)(unsafe.Pointer(bp + 8 /* pSnapshot */)) = uintptr(0) if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15908 /* "DB DBNAME" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = sqlite3.Xsqlite3_snapshot_get(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zName, bp+8 /* &pSnapshot */) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } else { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSnapshot */)), int32(unsafe.Sizeof(sqlite3_snapshot{})))) sqlite3.Xsqlite3_snapshot_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSnapshot */))) } return TCL_OK } // Usage: sqlite3_snapshot_open_blob DB DBNAME SNAPSHOT func test_snapshot_open_blob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2510:26: */ bp := tls.Alloc(36) defer tls.Free(36) var rc int32 // var db uintptr at bp+24, 8 var zName uintptr var pBlob uintptr // var nBlob int32 at bp+32, 4 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15918 /* "DB DBNAME SNAPSH..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) pBlob = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+32 /* &nBlob */) if (uint64(*(*int32)(unsafe.Pointer(bp + 32 /* nBlob */))) != uint64(unsafe.Sizeof(sqlite3_snapshot{}))) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+15966 /* "bad SNAPSHOT" */, 0)) return TCL_ERROR } rc = sqlite3.Xsqlite3_snapshot_open(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), zName, pBlob) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } return TCL_OK } // Usage: sqlite3_snapshot_cmp_blob SNAPSHOT1 SNAPSHOT2 func test_snapshot_cmp_blob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2546:26: */ bp := tls.Alloc(32) defer tls.Free(32) var res int32 var p1 uintptr var p2 uintptr // var n1 int32 at bp+24, 4 // var n2 int32 at bp+28, 4 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15946 /* "SNAPSHOT1 SNAPSH..." */) return TCL_ERROR } p1 = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &n1 */) p2 = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+28 /* &n2 */) if (uint64(*(*int32)(unsafe.Pointer(bp + 24 /* n1 */))) != uint64(unsafe.Sizeof(sqlite3_snapshot{}))) || (*(*int32)(unsafe.Pointer(bp + 24 /* n1 */)) != *(*int32)(unsafe.Pointer(bp + 28 /* n2 */))) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+15966 /* "bad SNAPSHOT" */, 0)) return TCL_ERROR } res = sqlite3.Xsqlite3_snapshot_cmp(tls, p1, p2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) return TCL_OK } // in test_delete.c func test_delete_database(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2581:26: */ var rc int32 var zFile uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15979 /* "FILE" */) return TCL_ERROR } zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) rc = sqlite3_delete_database(tls, zFile) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_OK } // Usage: atomic_batch_write PATH func test_atomic_batch_write(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2603:26: */ bp := tls.Alloc(40) defer tls.Free(40) var zFile uintptr = uintptr(0) // Path to file to test *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)) = uintptr(0) // Database handle *(*uintptr)(unsafe.Pointer(bp + 32 /* pFd */)) = uintptr(0) // SQLite fd open on zFile var bRes int32 = 0 // Integer result of this command var dc int32 = 0 // Device-characteristics mask var rc int32 // sqlite3_open() return code if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15984 /* "PATH" */) return TCL_ERROR } zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) rc = sqlite3.Xsqlite3_open(tls, zFile, bp+24 /* &db */) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */))), 0)) sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */))) return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+85 /* "main" */, SQLITE_FCNTL_FILE_POINTER, bp+32 /* &pFd */) dc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* pFd */)))).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pFd */))) if (dc & SQLITE_IOCAP_BATCH_ATOMIC) != 0 { bRes = 1 } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, bRes)) sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */))) return TCL_OK } // Usage: sqlite3_next_stmt DB STMT // // Return the next statment in sequence after STMT. func test_next_stmt(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2645:26: */ bp := tls.Alloc(130) defer tls.Free(130) // var pStmt uintptr at bp+72, 8 *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)) = uintptr(0) // var zBuf [50]int8 at bp+80, 50 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15989 /* " DB STMT" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+72 /* &pStmt */) != 0 { return TCL_ERROR } *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = sqlite3.Xsqlite3_next_stmt(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) if *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+80 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+80 /* &zBuf[0] */, 0)) } return TCL_OK } // Usage: sqlite3_stmt_readonly STMT // // Return true if STMT is a NULL pointer or a pointer to a statement // that is guaranteed to leave the database unmodified. func test_stmt_readonly(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2677:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15998 /* " STMT" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_stmt_readonly(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((rc) != 0)))) return TCL_OK } // Usage: sqlite3_stmt_isexplain STMT // // Return 1, 2, or 0 respectively if STMT is an EXPLAIN statement, an // EXPLAIN QUERY PLAN statement or an ordinary statement or NULL pointer. func test_stmt_isexplain(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2704:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15998 /* " STMT" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_stmt_isexplain(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // Usage: sqlite3_stmt_busy STMT // // Return true if STMT is a non-NULL pointer to a statement // that has been stepped but not to completion. func test_stmt_busy(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2731:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15998 /* " STMT" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_stmt_busy(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((rc) != 0)))) return TCL_OK } // Usage: uses_stmt_journal STMT // // Return true if STMT uses a statement journal. func uses_stmt_journal(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2757:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15998 /* " STMT" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_stmt_readonly(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) + 200 /* &.usesStmtJournal */))&0x40>>6)) != 0)))) return TCL_OK } // Usage: sqlite3_reset STMT // // Reset a statement handle. func test_reset(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2783:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15684 /* " " */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) if (*(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) != 0) && (sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))), rc) != 0) { return TCL_ERROR } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) // // if( rc ){ // return TCL_ERROR; // } return TCL_OK } // Usage: sqlite3_expired STMT // // Return TRUE if a recompilation of the statement is recommended. func test_expired(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2818:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+15684 /* " " */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((sqlite3.Xsqlite3_expired(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)))) != 0)))) return TCL_OK } // Usage: sqlite3_transfer_bindings FROMSTMT TOSTMT // // Transfer all bindings from FROMSTMT over to TOSTMT func test_transfer_bind(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2842:26: */ bp := tls.Alloc(56) defer tls.Free(56) // var pStmt1 uintptr at bp+40, 8 // var pStmt2 uintptr at bp+48, 8 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16004 /* " FROM-STMT TO-ST..." */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt1 */) != 0 { return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+48 /* &pStmt2 */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_transfer_bindings(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt1 */)), *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt2 */))))) return TCL_OK } // Usage: sqlite3_changes DB // // Return the number of changes made to the database by the last SQL // execution. func test_changes(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:2869:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_changes(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))))) return TCL_OK } // This is the "static_bind_value" that variables are bound to when // the FLAG option of sqlite3_bind is "static" var sqlite_static_bind_value uintptr = uintptr(0) /* test1.c:2890:13 */ var sqlite_static_bind_nbyte int32 = 0 /* test1.c:2891:12 */ // Usage: sqlite3_bind VM IDX VALUE FLAGS // // Sets the value of the IDX-th occurrence of "?" in the original SQL // string. VALUE is the new value. If FLAGS=="null" then VALUE is // ignored and the value is set to NULL. If FLAGS=="static" then // the value is set to the value of a static variable named // "sqlite_static_bind_value". If FLAGS=="normal" then a copy // of the VALUE is made. If FLAGS=="blob10" then a VALUE is ignored // an a 10-byte blob "abc\000xyz\000pq" is inserted. func test_bind(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:2904:26: */ bp := tls.Alloc(174) defer tls.Free(174) // var pStmt uintptr at bp+112, 8 var rc int32 // var idx int32 at bp+120, 4 if argc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+16023 /* " VM IDX VALUE (n..." */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+112 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+120 /* &idx */) != 0 { return TCL_ERROR } if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8)), ts+7387 /* "null" */) == 0 { rc = sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 120 /* idx */))) } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8)), ts+16059 /* "static" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 120 /* idx */)), sqlite_static_bind_value, -1, uintptr(0)) } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8)), ts+16066 /* "static-nbytes" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 120 /* idx */)), sqlite_static_bind_value, sqlite_static_bind_nbyte, uintptr(0)) } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8)), ts+16080 /* "normal" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 120 /* idx */)), *(*uintptr)(unsafe.Pointer(argv + 3*8)), -1, libc.UintptrFromInt32(-1)) } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8)), ts+16087 /* "blob10" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 120 /* idx */)), ts+16094 /* "abc\x00xyz\x00pq" */, 10, uintptr(0)) } else { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+16105 /* "4th argument sho..." */, 0)) return TCL_ERROR } if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != 0 { // var zBuf [50]int8 at bp+124, 50 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+124 /* &zBuf[0] */, ts+16159 /* "(%d) " */, libc.VaList(bp+64, rc)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+124 /* &zBuf[0] */, sqlite3.Xsqlite3ErrStr(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: add_test_collate // // This function is used to test that SQLite selects the correct collation // sequence callback when multiple versions (for different text encodings) // are available. // // Calling this routine registers the collation sequence "test_collate" // with database handle . The second argument must be a list of three // boolean values. If the first is true, then a version of test_collate is // registered for UTF-8, if the second is true, a version is registered for // UTF-16le, if the third is true, a UTF-16be version is available. // Previous versions of test_collate are deleted. // // The collation sequence test_collate is implemented by calling the // following TCL script: // // "test_collate " // // The and are the two values being compared, encoded in UTF-8. // The parameter is the encoding of the collation function that // SQLite selected to call. The TCL test script implements the // "test_collate" proc. // // Note that this will only work with one interpreter at a time, as the // interp pointer to use when evaluating the TCL script is stored in // pTestCollateInterp. var pTestCollateInterp uintptr /* test1.c:2975:18: */ func test_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ bp := tls.Alloc(4) defer tls.Free(4) var i uintptr = pTestCollateInterp var encin int32 = int32(pCtx) // var res int32 at bp, 4 var n int32 var pVal uintptr var pX uintptr pX = tcl.XTcl_NewStringObj(tls, ts+16165 /* "test_collate" */, -1) (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ switch encin { case SQLITE_UTF8: tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, ts+16178 /* "UTF-8" */, -1)) break case SQLITE_UTF16LE: tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, ts+16184 /* "UTF-16LE" */, -1)) break case SQLITE_UTF16BE: tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, ts+16193 /* "UTF-16BE" */, -1)) break default: } sqlite3.Xsqlite3BeginBenignMalloc(tls) pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) if pVal != 0 { sqlite3.Xsqlite3ValueSetStr(tls, pVal, nA, zA, uint8(encin), uintptr(0)) n = sqlite3.Xsqlite3_value_bytes(tls, pVal) tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, pVal), n)) sqlite3.Xsqlite3ValueSetStr(tls, pVal, nB, zB, uint8(encin), uintptr(0)) n = sqlite3.Xsqlite3_value_bytes(tls, pVal) tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, pVal), n)) sqlite3.Xsqlite3ValueFree(tls, pVal) } sqlite3.Xsqlite3EndBenignMalloc(tls) tcl.XTcl_EvalObjEx(tls, i, pX, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pX if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) return *(*int32)(unsafe.Pointer(bp /* res */)) } func test_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ bp := tls.Alloc(76) defer tls.Free(76) // var db uintptr at bp+64, 8 // var val int32 at bp+72, 4 var pVal uintptr var rc int32 var zUtf16 uintptr if !(objc != 5) { goto __1 } goto bad_args __1: ; pTestCollateInterp = interp if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0) { goto __2 } return TCL_ERROR __2: ; if !(TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+72 /* &val */)) { goto __3 } return TCL_ERROR __3: ; rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), ts+16165 /* "test_collate" */, SQLITE_UTF8, uintptr(SQLITE_UTF8), func() uintptr { if *(*int32)(unsafe.Pointer(bp + 72 /* val */)) != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{test_collate_func})) } return uintptr(0) }()) if !(rc == SQLITE_OK) { goto __4 } if !(TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+72 /* &val */)) { goto __5 } return TCL_ERROR __5: ; rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), ts+16165 /* "test_collate" */, SQLITE_UTF16LE, uintptr(SQLITE_UTF16LE), func() uintptr { if *(*int32)(unsafe.Pointer(bp + 72 /* val */)) != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{test_collate_func})) } return uintptr(0) }()) if !(TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+72 /* &val */)) { goto __6 } return TCL_ERROR __6: ; sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* db */)))).Fmutex) pVal = sqlite3.Xsqlite3ValueNew(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))) sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, ts+16165 /* "test_collate" */, uint8(SQLITE_UTF8), uintptr(0)) zUtf16 = sqlite3.Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) if !((*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* db */)))).FmallocFailed != 0) { goto __7 } rc = SQLITE_NOMEM goto __8 __7: rc = sqlite3.Xsqlite3_create_collation16(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), zUtf16, SQLITE_UTF16BE, uintptr(SQLITE_UTF16BE), func() uintptr { if *(*int32)(unsafe.Pointer(bp + 72 /* val */)) != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{test_collate_func})) } return uintptr(0) }()) __8: ; sqlite3.Xsqlite3ValueFree(tls, pVal) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* db */)))).Fmutex) __4: ; if !(sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), rc) != 0) { goto __9 } return TCL_ERROR __9: ; if !(rc != SQLITE_OK) { goto __10 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR __10: ; return TCL_OK bad_args: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16202 /* " // // Add a utf-16 collation sequence named "utf16bin" to the database // handle. This collation sequence compares arguments in the same way as the // built-in collation "binary". func test_utf16bin_collate_func(tls *libc.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:3090:12: */ var nCmp int32 = func() int32 { if nA > nB { return nB } return nA }() var res int32 = libc.Xmemcmp(tls, zA, zB, uint64(nCmp)) if res == 0 { res = (nA - nB) } return res } func test_utf16bin_collate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if !(objc != 2) { goto __1 } goto bad_args __1: ; if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) { goto __2 } return TCL_ERROR __2: ; rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+16235 /* "utf16bin" */, SQLITE_UTF16, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{test_utf16bin_collate_func}))) if !(sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* db */)), rc) != 0) { goto __3 } return TCL_ERROR __3: ; return TCL_OK bad_args: tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } // When the collation needed callback is invoked, record the name of // the requested collating function here. The recorded name is linked // to a TCL variable and used to make sure that the requested collation // name is correct. var zNeededCollation [200]int8 /* test1.c:3129:13: */ var pzNeededCollation uintptr = 0 /* test1.c:3130:13 */ // Called when a collating sequence is needed. Registered using // sqlite3_collation_needed16(). func test_collate_needed_cb(tls *libc.TLS, pCtx uintptr, db uintptr, eTextRep int32, pName uintptr) { /* test1.c:3137:13: */ var enc int32 = int32((*sqlite31)(unsafe.Pointer(db)).Fenc) var i int32 var z uintptr z = pName i = 0 for ; (*(*int8)(unsafe.Pointer(z)) != 0) || (*(*int8)(unsafe.Pointer(z + 1)) != 0); z++ { if *(*int8)(unsafe.Pointer(z)) != 0 { zNeededCollation[libc.PostIncInt32(&i, 1)] = *(*int8)(unsafe.Pointer(z)) } } zNeededCollation[i] = int8(0) sqlite3.Xsqlite3_create_collation(tls, db, ts+16165 /* "test_collate" */, int32((*sqlite31)(unsafe.Pointer(db)).Fenc), uintptr(intptr_t(enc)), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{test_collate_func}))) } // Usage: add_test_collate_needed DB func test_collate_needed(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3157:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if !(objc != 2) { goto __1 } goto bad_args __1: ; if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) { goto __2 } return TCL_ERROR __2: ; rc = sqlite3.Xsqlite3_collation_needed16(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) }{test_collate_needed_cb}))) zNeededCollation[0] = int8(0) if !(sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* db */)), rc) != 0) { goto __3 } return TCL_ERROR __3: ; return TCL_OK bad_args: tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } // tclcmd: add_alignment_test_collations DB // // Add two new collating sequences to the database DB // // utf16_aligned // utf16_unaligned // // Both collating sequences use the same sort order as BINARY. // The only difference is that the utf16_aligned collating // sequence is declared with the SQLITE_UTF16_ALIGNED flag. // Both collating functions increment the unaligned utf16 counter // whenever they see a string that begins on an odd byte boundary. var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ func alignmentCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ var rc int32 var n int32 if nKey1 < nKey2 { n = nKey1 } else { n = nKey2 } if (nKey1 > 0) && (1 == (1 & (int32(pKey1)))) { unaligned_string_counter++ } if (nKey2 > 0) && (1 == (1 & (int32(pKey2)))) { unaligned_string_counter++ } rc = libc.Xmemcmp(tls, pKey1, pKey2, uint64(n)) if rc == 0 { rc = (nKey1 - nKey2) } return rc } func add_alignment_test_collations(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 if objc >= 2 { if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+16244 /* "utf16_unaligned" */, SQLITE_UTF16, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{alignmentCollFunc}))) sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+16260 /* "utf16_aligned" */, SQLITE_UTF16_ALIGNED, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{alignmentCollFunc}))) } return SQLITE_OK } // Usage: add_test_function // // This function is used to test that SQLite selects the correct user // function callback when multiple versions (for different text encodings) // are available. // // Calling this routine registers up to three versions of the user function // "test_function" with database handle . If the second argument is // true, then a version of test_function is registered for UTF-8, if the // third is true, a version is registered for UTF-16le, if the fourth is // true, a UTF-16be version is available. Previous versions of // test_function are deleted. // // The user function is implemented by calling the following TCL script: // // "test_function " // // Where is one of UTF-8, UTF-16LE or UTF16BE, and is the // single argument passed to the SQL function. The value returned by // the TCL script is used as the return value of the SQL function. It // is passed to SQLite using UTF-16BE for a UTF-8 test_function(), UTF-8 // for a UTF-16LE test_function(), and UTF-16LE for an implementation that // prefers UTF-16BE. func test_function_utf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3252:13: */ var interp uintptr var pX uintptr var pVal uintptr interp = sqlite3.Xsqlite3_user_data(tls, pCtx) pX = tcl.XTcl_NewStringObj(tls, ts+16274 /* "test_function" */, -1) (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, ts+16178 /* "UTF-8" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), -1)) tcl.XTcl_EvalObjEx(tls, interp, pX, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pX if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } sqlite3.Xsqlite3_result_text(tls, pCtx, tcl.XTcl_GetStringResult(tls, interp), -1, libc.UintptrFromInt32(-1)) pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, tcl.XTcl_GetStringResult(tls, interp), uint8(SQLITE_UTF8), uintptr(0)) sqlite3.Xsqlite3_result_text16be(tls, pCtx, sqlite3.Xsqlite3_value_text16be(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } func test_function_utf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ var interp uintptr var pX uintptr var pVal uintptr interp = sqlite3.Xsqlite3_user_data(tls, pCtx) pX = tcl.XTcl_NewStringObj(tls, ts+16274 /* "test_function" */, -1) (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, ts+16184 /* "UTF-16LE" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), -1)) tcl.XTcl_EvalObjEx(tls, interp, pX, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pX if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, tcl.XTcl_GetStringResult(tls, interp), uint8(SQLITE_UTF8), uintptr(0)) sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } func test_function_utf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ var interp uintptr var pX uintptr var pVal uintptr interp = sqlite3.Xsqlite3_user_data(tls, pCtx) pX = tcl.XTcl_NewStringObj(tls, ts+16274 /* "test_function" */, -1) (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, ts+16193 /* "UTF-16BE" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), -1)) tcl.XTcl_EvalObjEx(tls, interp, pX, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pX if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, tcl.XTcl_GetStringResult(tls, interp), uint8(SQLITE_UTF8), uintptr(0)) sqlite3.Xsqlite3_result_text16(tls, pCtx, sqlite3.Xsqlite3_value_text16le(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_result_text16be(tls, pCtx, sqlite3.Xsqlite3_value_text16le(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_result_text16le(tls, pCtx, sqlite3.Xsqlite3_value_text16le(tls, pVal), -1, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3ValueFree(tls, pVal) } func test_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var db uintptr at bp+40, 8 // var val int32 at bp+48, 4 if !(objc != 5) { goto __1 } goto bad_args __1: ; if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0) { goto __2 } return TCL_ERROR __2: ; if !(TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &val */)) { goto __3 } return TCL_ERROR __3: ; if !(*(*int32)(unsafe.Pointer(bp + 48 /* val */)) != 0) { goto __4 } sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+16274 /* "test_function" */, 1, SQLITE_UTF8, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{test_function_utf8})), uintptr(0), uintptr(0)) __4: ; if !(TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+48 /* &val */)) { goto __5 } return TCL_ERROR __5: ; if !(*(*int32)(unsafe.Pointer(bp + 48 /* val */)) != 0) { goto __6 } sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+16274 /* "test_function" */, 1, SQLITE_UTF16LE, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{test_function_utf16le})), uintptr(0), uintptr(0)) __6: ; if !(TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+48 /* &val */)) { goto __7 } return TCL_ERROR __7: ; if !(*(*int32)(unsafe.Pointer(bp + 48 /* val */)) != 0) { goto __8 } sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+16274 /* "test_function" */, 1, SQLITE_UTF16BE, interp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{test_function_utf16be})), uintptr(0), uintptr(0)) __8: ; return TCL_OK bad_args: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16202 /* " // // Test that the english language string equivalents for sqlite error codes // are sane. The parameter is an integer representing an sqlite error code. // The result is a list of two elements, the string representation of the // error code and the english language explanation. func test_errstr(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3371:26: */ var zCode uintptr var i int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16288 /* "" */) } zCode = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) for i = 0; i < 200; i++ { if 0 == libc.Xstrcmp(tls, sqlite3.Xsqlite3ErrName(tls, i), zCode) { break } } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrStr(tls, i), uintptr(0)) return TCL_OK } // Usage: breakpoint // // This routine exists for one purpose - to provide a place to put a // breakpoint with GDB that can be triggered using TCL code. The use // for this is when a particular test fails on (say) the 1485th iteration. // In the TCL test script, we can add code like this: // // if {$i==1485} breakpoint // // Then run testfixture in the debugger and wait for the breakpoint to // fire. Then additional breakpoints can be set to trace down the bug. func test_breakpoint(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:3404:26: */ return TCL_OK // Do nothing } // Usage: sqlite3_bind_zeroblob STMT IDX N // // Test the sqlite3_bind_zeroblob interface. STMT is a prepared statement. // IDX is the index of a wildcard in the prepared statement. This command // binds a N-byte zero-filled BLOB to the wildcard. func test_bind_zeroblob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3420:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var pStmt uintptr at bp, 8 // var idx int32 at bp+8, 4 // var n int32 at bp+12, 4 var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16301 /* "STMT IDX N" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &idx */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+12 /* &n */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_zeroblob(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 8 /* idx */)), *(*int32)(unsafe.Pointer(bp + 12 /* n */))) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_bind_zeroblob64 STMT IDX N // // Test the sqlite3_bind_zeroblob64 interface. STMT is a prepared statement. // IDX is the index of a wildcard in the prepared statement. This command // binds a N-byte zero-filled BLOB to the wildcard. func test_bind_zeroblob64(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3456:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+24, 8 // var idx int32 at bp+32, 4 // var n Tcl_WideInt at bp+40, 8 var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16301 /* "STMT IDX N" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+32 /* &idx */) != 0 { return TCL_ERROR } if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+40 /* &n */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_zeroblob64(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 32 /* idx */)), uint64(*(*Tcl_WideInt)(unsafe.Pointer(bp + 40 /* n */)))) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: sqlite3_bind_int STMT N VALUE // // Test the sqlite3_bind_int interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a 32-bit integer VALUE to that wildcard. func test_bind_int(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3493:26: */ bp := tls.Alloc(56) defer tls.Free(56) // var pStmt uintptr at bp+40, 8 // var idx int32 at bp+48, 4 // var value int32 at bp+52, 4 var rc int32 if objc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16312 /* " STMT N VALUE" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &idx */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+52 /* &value */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* idx */)), *(*int32)(unsafe.Pointer(bp + 52 /* value */))) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { return TCL_ERROR } return TCL_OK } // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. // // Space to hold the array is obtained from malloc(). Call this procedure once // with no arguments in order to release memory. Each call to this procedure // overwrites the previous array. func test_intarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3533:26: */ var i int32 sqlite3.Xsqlite3_free(tls, p) p = uintptr(0) if objc > 1 { p = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(int32(0))) * (uint64(objc - 1))))) if p == uintptr(0) { return TCL_ERROR } for i = 0; i < (objc - 1); i++ { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((1+i))*8)), (p+uintptr(i)*4)) != 0 { sqlite3.Xsqlite3_free(tls, p) p = uintptr(0) return TCL_ERROR } } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(p))) return TCL_OK } var p uintptr = uintptr(0) /* test1.c:3540:14 */ // Usage: intarray_addr INT ... // // Return the address of a C-language array of 32-bit integers. // // Space to hold the array is obtained from malloc(). Call this procedure once // with no arguments in order to release memory. Each call to this procedure // overwrites the previous array. func test_int64array_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3567:26: */ bp := tls.Alloc(8) defer tls.Free(8) var i int32 sqlite3.Xsqlite3_free(tls, p1) p1 = uintptr(0) if objc > 1 { p1 = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(sqlite3_int64(0))) * (uint64(objc - 1))))) if p1 == uintptr(0) { return TCL_ERROR } for i = 0; i < (objc - 1); i++ { // var v Tcl_WideInt at bp, 8 if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((1+i))*8)), bp /* &v */) != 0 { sqlite3.Xsqlite3_free(tls, p1) p1 = uintptr(0) return TCL_ERROR } *(*sqlite3_int64)(unsafe.Pointer(p1 + uintptr(i)*8)) = *(*Tcl_WideInt)(unsafe.Pointer(bp /* v */)) } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(p1))) return TCL_OK } var p1 uintptr = uintptr(0) /* test1.c:3574:24 */ // Usage: doublearray_addr INT ... // // Return the address of a C-language array of doubles. // // Space to hold the array is obtained from malloc(). Call this procedure once // with no arguments in order to release memory. Each call to this procedure // overwrites the previous array. func test_doublearray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3603:26: */ var i int32 sqlite3.Xsqlite3_free(tls, p2) p2 = uintptr(0) if objc > 1 { p2 = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(float64(0))) * (uint64(objc - 1))))) if p2 == uintptr(0) { return TCL_ERROR } for i = 0; i < (objc - 1); i++ { if tcl.XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((1+i))*8)), (p2+uintptr(i)*8)) != 0 { sqlite3.Xsqlite3_free(tls, p2) p2 = uintptr(0) return TCL_ERROR } } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(p2))) return TCL_OK } var p2 uintptr = uintptr(0) /* test1.c:3610:17 */ // Usage: textarray_addr TEXT ... // // Return the address of a C-language array of strings. // // Space to hold the array is obtained from malloc(). Call this procedure once // with no arguments in order to release memory. Each call to this procedure // overwrites the previous array. func test_textarray_addr(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3637:26: */ bp := tls.Alloc(16) defer tls.Free(16) var i int32 for i = 0; i < n; i++ { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p3 + uintptr(i)*8))) } sqlite3.Xsqlite3_free(tls, p3) p3 = uintptr(0) if objc > 1 { p3 = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(uintptr(0))) * (uint64(objc - 1))))) if p3 == uintptr(0) { return TCL_ERROR } for i = 0; i < (objc - 1); i++ { *(*uintptr)(unsafe.Pointer(p3 + uintptr(i)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((1+i))*8))))) } } n = (objc - 1) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(p3))) return TCL_OK } var n int32 = 0 /* test1.c:3644:14 */ var p3 uintptr = uintptr(0) /* test1.c:3645:15 */ // Usage: sqlite3_bind_int64 STMT N VALUE // // Test the sqlite3_bind_int64 interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a 64-bit integer VALUE to that wildcard. func test_bind_int64(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3670:26: */ bp := tls.Alloc(64) defer tls.Free(64) // var pStmt uintptr at bp+40, 8 // var idx int32 at bp+48, 4 // var value Tcl_WideInt at bp+56, 8 var rc int32 if objc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16312 /* " STMT N VALUE" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &idx */) != 0 { return TCL_ERROR } if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+56 /* &value */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* idx */)), *(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* value */))) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_bind_double STMT N VALUE // // Test the sqlite3_bind_double interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a 64-bit integer VALUE to that wildcard. func test_bind_double(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3708:26: */ bp := tls.Alloc(72) defer tls.Free(72) // var pStmt uintptr at bp+40, 8 // var idx int32 at bp+48, 4 *(*float64)(unsafe.Pointer(bp + 56 /* value */)) = float64(0) var rc int32 var zVal uintptr var i int32 if objc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16312 /* " STMT N VALUE" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &idx */) != 0 { return TCL_ERROR } // Intercept the string "NaN" and generate a NaN value for it. // All other strings are passed through to Tcl_GetDoubleFromObj(). // Tcl_GetDoubleFromObj() should understand "NaN" but some versions // contain a bug. zVal = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aSpecialFp)) / uint64(unsafe.Sizeof(struct { FzName uintptr FiUpper uint32 FiLower uint32 }{}))); i++ { if libc.Xstrcmp(tls, aSpecialFp[i].FzName, zVal) == 0 { // var x sqlite3_uint64 at bp+64, 8 *(*sqlite3_uint64)(unsafe.Pointer(bp + 64 /* x */)) = sqlite3_uint64(aSpecialFp[i].FiUpper) *(*sqlite3_uint64)(unsafe.Pointer(bp + 64 /* x */)) <<= 32 *(*sqlite3_uint64)(unsafe.Pointer(bp + 64 /* x */)) |= sqlite3_uint64(aSpecialFp[i].FiLower) libc.Xmemcpy(tls, bp+56 /* &value */, bp+64 /* &x */, uint64(8)) break } } if (uint64(i) >= (uint64(unsafe.Sizeof(aSpecialFp)) / uint64(unsafe.Sizeof(struct { FzName uintptr FiUpper uint32 FiLower uint32 }{})))) && (tcl.XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+56 /* &value */) != 0) { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_double(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* idx */)), *(*float64)(unsafe.Pointer(bp + 56 /* value */))) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { return TCL_ERROR } return TCL_OK } var aSpecialFp = [10]struct { FzName uintptr FiUpper uint32 FiLower uint32 }{ {FzName: ts + 16326 /* "NaN" */, FiUpper: uint32(0x7fffffff), FiLower: 0xffffffff}, {FzName: ts + 16330 /* "SNaN" */, FiUpper: uint32(0x7ff7ffff), FiLower: 0xffffffff}, {FzName: ts + 16335 /* "-NaN" */, FiUpper: 0xffffffff, FiLower: 0xffffffff}, {FzName: ts + 16340 /* "-SNaN" */, FiUpper: 0xfff7ffff, FiLower: 0xffffffff}, {FzName: ts + 16346 /* "+Inf" */, FiUpper: uint32(0x7ff00000)}, {FzName: ts + 16351 /* "-Inf" */, FiUpper: 0xfff00000}, {FzName: ts + 16356 /* "Epsilon" */, FiLower: uint32(0x00000001)}, {FzName: ts + 16364 /* "-Epsilon" */, FiUpper: 0x80000000, FiLower: uint32(0x00000001)}, {FzName: ts + 16373 /* "NaN0" */, FiUpper: uint32(0x7ff80000)}, {FzName: ts + 16378 /* "-NaN0" */, FiUpper: 0xfff80000}, } /* test1.c:3724:5 */ // Usage: sqlite3_bind_null STMT N // // Test the sqlite3_bind_null interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a NULL to the wildcard. func test_bind_null(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3784:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var idx int32 at bp+48, 4 var rc int32 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16384 /* " STMT N" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &idx */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* idx */))) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_bind_text STMT N STRING BYTES // // Test the sqlite3_bind_text interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a UTF-8 string STRING to the wildcard. The string is BYTES bytes // long. func test_bind_text(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3820:26: */ bp := tls.Alloc(80) defer tls.Free(80) // var pStmt uintptr at bp+64, 8 // var idx int32 at bp+72, 4 // var bytes int32 at bp+76, 4 var value uintptr var rc int32 if objc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16392 /* " STMT N VALUE BY..." */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+72 /* &idx */) != 0 { return TCL_ERROR } value = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+76 /* &bytes */) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+76 /* &bytes */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 72 /* idx */)), value, *(*int32)(unsafe.Pointer(bp + 76 /* bytes */)), libc.UintptrFromInt32(-1)) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: sqlite3_bind_text16 ?-static? STMT N STRING BYTES // // Test the sqlite3_bind_text16 interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a UTF-16 string STRING to the wildcard. The string is BYTES bytes // long. func test_bind_text16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3861:26: */ bp := tls.Alloc(80) defer tls.Free(80) // var pStmt uintptr at bp+64, 8 // var idx int32 at bp+72, 4 // var bytes int32 at bp+76, 4 var value uintptr var rc int32 var xDel uintptr = func() uintptr { if objc == 6 { return uintptr(0) } return libc.UintptrFromInt32(-1) }() var oStmt uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-4))*8)) var oN uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8)) var oString uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8)) var oBytes uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) if (objc != 5) && (objc != 6) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16392 /* " STMT N VALUE BY..." */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, oStmt), bp+64 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, oN, bp+72 /* &idx */) != 0 { return TCL_ERROR } value = tcl.XTcl_GetByteArrayFromObj(tls, oString, uintptr(0)) if tcl.XTcl_GetIntFromObj(tls, interp, oBytes, bp+76 /* &bytes */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_text16(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 72 /* idx */)), value, *(*int32)(unsafe.Pointer(bp + 76 /* bytes */)), xDel) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: sqlite3_bind_blob ?-static? STMT N DATA BYTES // // Test the sqlite3_bind_blob interface. STMT is a prepared statement. // N is the index of a wildcard in the prepared statement. This command // binds a BLOB to the wildcard. The BLOB is BYTES bytes in size. func test_bind_blob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3909:26: */ bp := tls.Alloc(308) defer tls.Free(308) // var pStmt uintptr at bp+88, 8 // var len int32 at bp+100, 4 // var idx int32 at bp+96, 4 // var bytes int32 at bp+104, 4 var value uintptr var rc int32 var xDestructor sqlite3_destructor_type = libc.UintptrFromInt32(-1) if (objc != 5) && (objc != 6) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+16412 /* " STMT N DATA BYT..." */, 0)) return TCL_ERROR } if objc == 6 { xDestructor = uintptr(0) objv += 8 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+88 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+96 /* &idx */) != 0 { return TCL_ERROR } value = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+100 /* &len */) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+104 /* &bytes */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 104 /* bytes */)) > *(*int32)(unsafe.Pointer(bp + 100 /* len */)) { // var zBuf [200]int8 at bp+108, 200 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+108, /* &zBuf[0] */ ts+16431 /* "cannot use %d bl..." */, libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 104 /* bytes */)), *(*int32)(unsafe.Pointer(bp + 100 /* len */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, bp+108 /* &zBuf[0] */, uintptr(0))) return TCL_ERROR } rc = sqlite3.Xsqlite3_bind_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 96 /* idx */)), value, *(*int32)(unsafe.Pointer(bp + 104 /* bytes */)), xDestructor) if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pStmt */))), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { return TCL_ERROR } return TCL_OK } // sqlite3_carray_bind [options...] STMT NAME VALUE ... // // Options: // -transient // -static // -int32 // -int64 // -double // -text // // Each call clears static data. Called with no options does nothing // but clear static data. func test_carray_bind(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3972:26: */ bp := tls.Alloc(152) defer tls.Free(152) // var pStmt uintptr at bp+120, 8 var eType int32 // CARRAY_INT32 var nData int32 var aData uintptr var isTransient int32 var isStatic int32 // var idx int32 at bp+128, 4 var i int32 var j int32 var rc int32 var xDel uintptr var z uintptr // var v int32 at bp+132, 4 // INT32 var a uintptr // var v1 Tcl_WideInt at bp+136, 8 // INT64 var a1 uintptr // var v2 float64 at bp+144, 8 // DOUBLE var a2 uintptr var v3 uintptr // TEXT var a3 uintptr eType = 0 nData = 0 aData = uintptr(0) isTransient = 0 isStatic = 0 xDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free})) if !(aStaticData != 0) { goto __1 } // Always clear preexisting static data on every call if !(eStaticType == 3) { goto __2 } i = 0 __3: if !(i < nStaticData) { goto __5 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((aStaticData) + uintptr(i)*8))) goto __4 __4: i++ goto __3 goto __5 __5: ; __2: ; sqlite3.Xsqlite3_free(tls, aStaticData) aStaticData = uintptr(0) nStaticData = 0 eStaticType = 0 __1: ; if !(objc == 1) { goto __6 } return TCL_OK __6: ; i = 1 __7: if !((i < objc) && (int32(*(*int8)(unsafe.Pointer(tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))))) == '-')) { goto __9 } z = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) if !(libc.Xstrcmp(tls, z, ts+16465 /* "-transient" */) == 0) { goto __10 } isTransient = 1 xDel = libc.UintptrFromInt32(-1) goto __11 __10: if !(libc.Xstrcmp(tls, z, ts+16476 /* "-static" */) == 0) { goto __12 } isStatic = 1 xDel = uintptr(0) goto __13 __12: if !(libc.Xstrcmp(tls, z, ts+16484 /* "-int32" */) == 0) { goto __14 } eType = 0 // CARRAY_INT32 goto __15 __14: if !(libc.Xstrcmp(tls, z, ts+16491 /* "-int64" */) == 0) { goto __16 } eType = 1 // CARRAY_INT64 goto __17 __16: if !(libc.Xstrcmp(tls, z, ts+16498 /* "-double" */) == 0) { goto __18 } eType = 2 // CARRAY_DOUBLE goto __19 __18: if !(libc.Xstrcmp(tls, z, ts+16506 /* "-text" */) == 0) { goto __20 } eType = 3 // CARRAY_TEXT goto __21 __20: if !(libc.Xstrcmp(tls, z, ts+16512 /* "--" */) == 0) { goto __22 } goto __9 goto __23 __22: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+12135 /* "unknown option: " */, z, uintptr(0))) return TCL_ERROR __23: ; __21: ; __19: ; __17: ; __15: ; __13: ; __11: ; goto __8 __8: i++ goto __7 goto __9 __9: ; if !(((eType == 3) && !(isStatic != 0)) && !(isTransient != 0)) { goto __24 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+16515, /* "text data must b..." */ uintptr(0))) return TCL_ERROR __24: ; if !((isStatic != 0) && (isTransient != 0)) { goto __25 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, ts+16562, /* "cannot be both -..." */ uintptr(0))) return TCL_ERROR __25: ; if !((objc - i) < 2) { goto __26 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16600 /* "[OPTIONS] STMT I..." */) return TCL_ERROR __26: ; if !(getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))), bp+120 /* &pStmt */) != 0) { goto __27 } return TCL_ERROR __27: ; i++ if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+128 /* &idx */) != 0) { goto __28 } return TCL_ERROR __28: ; i++ nData = (objc - i) switch eType + (4 * (libc.Bool32(nData <= 0))) { case 0: goto __30 case 1: goto __31 case 2: goto __32 case 3: goto __33 case 4: goto __34 } goto __29 __30: // INT32 a = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(int32(0))) * uint64(nData)))) if !(a == uintptr(0)) { goto __35 } rc = SQLITE_NOMEM goto carray_bind_done __35: ; j = 0 __36: if !(j < nData) { goto __38 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+j))*8)), bp+132 /* &v */) != 0) { goto __39 } sqlite3.Xsqlite3_free(tls, a) return TCL_ERROR __39: ; *(*int32)(unsafe.Pointer(a + uintptr(j)*4)) = *(*int32)(unsafe.Pointer(bp + 132 /* v */)) goto __37 __37: j++ goto __36 goto __38 __38: ; aData = a goto __29 __31: // INT64 a1 = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(sqlite3_int64(0))) * uint64(nData)))) if !(a1 == uintptr(0)) { goto __40 } rc = SQLITE_NOMEM goto carray_bind_done __40: ; j = 0 __41: if !(j < nData) { goto __43 } if !(tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+j))*8)), bp+136 /* &v1 */) != 0) { goto __44 } sqlite3.Xsqlite3_free(tls, a1) return TCL_ERROR __44: ; *(*sqlite3_int64)(unsafe.Pointer(a1 + uintptr(j)*8)) = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* v1 */)) goto __42 __42: j++ goto __41 goto __43 __43: ; aData = a1 goto __29 __32: // DOUBLE a2 = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(float64(0))) * uint64(nData)))) if !(a2 == uintptr(0)) { goto __45 } rc = SQLITE_NOMEM goto carray_bind_done __45: ; j = 0 __46: if !(j < nData) { goto __48 } if !(tcl.XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+j))*8)), bp+144 /* &v2 */) != 0) { goto __49 } sqlite3.Xsqlite3_free(tls, a2) return TCL_ERROR __49: ; *(*float64)(unsafe.Pointer(a2 + uintptr(j)*8)) = *(*float64)(unsafe.Pointer(bp + 144 /* v2 */)) goto __47 __47: j++ goto __46 goto __48 __48: ; aData = a2 goto __29 __33: // TEXT a3 = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nData)))) if !(a3 == uintptr(0)) { goto __50 } rc = SQLITE_NOMEM goto carray_bind_done __50: ; j = 0 __51: if !(j < nData) { goto __53 } v3 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+j))*8))) *(*uintptr)(unsafe.Pointer(a3 + uintptr(j)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+80, v3)) goto __52 __52: j++ goto __51 goto __53 __53: ; aData = a3 goto __29 __34: // nData==0 aData = ts + 489 /* "" */ xDel = uintptr(0) isTransient = 0 isStatic = 0 goto __29 __29: ; if !(isStatic != 0) { goto __54 } aStaticData = aData nStaticData = nData eStaticType = eType __54: ; rc = sqlite3_carray_bind(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 128 /* idx */)), aData, nData, eType, xDel) if !(isTransient != 0) { goto __55 } if !(eType == 3) { goto __56 } i = 0 __57: if !(i < nData) { goto __59 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((aData) + uintptr(i)*8))) goto __58 __58: i++ goto __57 goto __59 __59: ; __56: ; sqlite3.Xsqlite3_free(tls, aData) __55: ; carray_bind_done: if !(rc != 0) { goto __60 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+96, sqlite3.Xsqlite3_errstr(tls, rc), uintptr(0))) return TCL_ERROR __60: ; return TCL_OK } var aStaticData uintptr = uintptr(0) /* test1.c:3988:15 */ var nStaticData int32 = 0 /* test1.c:3989:14 */ var eStaticType int32 = 0 /* test1.c:3990:14 */ // Usage: sqlite3_bind_parameter_count STMT // // Return the number of wildcards in the given statement. func test_bind_parameter_count(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4150:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pStmt uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16629 /* "STMT" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_bind_parameter_count(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))))) return TCL_OK } // Usage: sqlite3_bind_parameter_name STMT N // // Return the name of the Nth wildcard. The first wildcard is 1. // An empty string is returned if N is out of range or if the wildcard // is nameless. func test_bind_parameter_name(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4174:26: */ bp := tls.Alloc(12) defer tls.Free(12) // var pStmt uintptr at bp, 8 // var i int32 at bp+8, 4 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16634 /* "STMT N" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &i */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_bind_parameter_name(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 8 /* i */))), -1)) return TCL_OK } // Usage: sqlite3_bind_parameter_index STMT NAME // // Return the index of the wildcard called NAME. Return 0 if there is // no such wildcard. func test_bind_parameter_index(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4201:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pStmt uintptr at bp, 8 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16641 /* "STMT NAME" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_bind_parameter_index(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))))) return TCL_OK } // Usage: sqlite3_clear_bindings STMT // func test_clear_bindings(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4226:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pStmt uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16629 /* "STMT" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_clear_bindings(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))))) return TCL_OK } // Usage: sqlite3_sleep MILLISECONDS func test_sleep(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4246:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var ms int32 at bp, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12808 /* "MILLISECONDS" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &ms */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_sleep(tls, *(*int32)(unsafe.Pointer(bp /* ms */))))) return TCL_OK } // Usage: sqlite3_extended_errcode DB // // Return the string representation of the most recent sqlite3_* API // error code. e.g. "SQLITE_ERROR". func test_ex_errcode(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4271:26: */ bp := tls.Alloc(72) defer tls.Free(72) // var db uintptr at bp+64, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_extended_errcode(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_OK } // Usage: sqlite3_errcode DB // // Return the string representation of the most recent sqlite3_* API // error code. e.g. "SQLITE_ERROR". func test_errcode(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4298:26: */ bp := tls.Alloc(72) defer tls.Free(72) // var db uintptr at bp+64, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_errcode(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_OK } // Usage: sqlite3_errmsg DB // // Returns the UTF-8 representation of the error message string for the // most recent sqlite3_* API call. func test_errmsg(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4324:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 var zErr uintptr if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0 { return TCL_ERROR } zErr = sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, zErr, -1)) return TCL_OK } // Usage: test_errmsg16 DB // // Returns the UTF-16 representation of the error message string for the // most recent sqlite3_* API call. This is a byte array object at the TCL // level, and it includes the 0x00 0x00 terminator bytes at the end of the // UTF-16 string. func test_errmsg16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4353:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 var zErr uintptr var z uintptr var bytes int32 = 0 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0 { return TCL_ERROR } zErr = sqlite3.Xsqlite3_errmsg16(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))) if zErr != 0 { z = zErr for bytes = 0; (*(*int8)(unsafe.Pointer(z + uintptr(bytes))) != 0) || (*(*int8)(unsafe.Pointer(z + uintptr((bytes + 1)))) != 0); bytes = bytes + (2) { } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, zErr, bytes)) return TCL_OK } // Usage: sqlite3_prepare DB sql bytes ?tailvar? // // Compile up to bytes of the supplied SQL string using // database handle . The parameter is the name of a global // variable that is set to the unused portion of (if any). A // STMT handle is returned. func test_prepare(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4390:26: */ bp := tls.Alloc(194) defer tls.Free(194) // var db uintptr at bp+112, 8 var zSql uintptr // var bytes int32 at bp+120, 4 *(*uintptr)(unsafe.Pointer(bp + 136 /* zTail */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */)) = uintptr(0) // var zBuf [50]int8 at bp+144, 50 var rc int32 if (objc != 5) && (objc != 4) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16651 /* " DB sql bytes ?t..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+112 /* &db */) != 0 { return TCL_ERROR } zSql = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+120 /* &bytes */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_prepare(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), zSql, *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)), bp+128 /* &pStmt */, func() uintptr { if objc >= 5 { return bp + 136 /* &zTail */ } return uintptr(0) }()) tcl.XTcl_ResetResult(tls, interp) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), rc) != 0 { return TCL_ERROR } if (*(*uintptr)(unsafe.Pointer(bp + 136 /* zTail */)) != 0) && (objc >= 5) { if *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) >= 0 { *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) = (*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 136 /* zTail */))) - int64(zSql)) / 1))) } if int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* zTail */)))) < *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) { *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* zTail */)))) } tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), uintptr(0), tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 120 /* bytes */))), 0) } if rc != SQLITE_OK { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+144 /* &zBuf[0] */, ts+16159 /* "(%d) " */, libc.VaList(bp+40, rc)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+144 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */))), 0)) return TCL_ERROR } if *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+144 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 128 /* pStmt */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+88, bp+144 /* &zBuf[0] */, 0)) } return TCL_OK } // Usage: sqlite3_prepare_v2 DB sql bytes ?tailvar? // // Compile up to bytes of the supplied SQL string using // database handle . The parameter is the name of a global // variable that is set to the unused portion of (if any). A // STMT handle is returned. func test_prepare_v2(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4447:26: */ bp := tls.Alloc(194) defer tls.Free(194) // var db uintptr at bp+112, 8 var zSql uintptr var zCopy uintptr = uintptr(0) // malloc() copy of zSql // var bytes int32 at bp+120, 4 *(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)) = uintptr(0) var pzTail uintptr *(*uintptr)(unsafe.Pointer(bp + 136 /* pStmt */)) = uintptr(0) // var zBuf [50]int8 at bp+144, 50 var rc int32 if (objc != 5) && (objc != 4) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16675 /* " DB sql bytes ta..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+112 /* &db */) != 0 { return TCL_ERROR } zSql = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+120 /* &bytes */) != 0 { return TCL_ERROR } // Instead of using zSql directly, make a copy into a buffer obtained // directly from malloc(). The idea is to make it easier for valgrind // to spot buffer overreads. if *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) >= 0 { zCopy = libc.Xmalloc(tls, uint64(*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)))) libc.Xmemcpy(tls, zCopy, zSql, uint64(*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)))) } else { var n int32 = (int32(libc.Xstrlen(tls, zSql)) + 1) zCopy = libc.Xmalloc(tls, uint64(n)) libc.Xmemcpy(tls, zCopy, zSql, uint64(n)) } if objc >= 5 { pzTail = bp + 128 /* &zTail */ } else { pzTail = uintptr(0) } rc = sqlite3.Xsqlite3_prepare_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), zCopy, *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)), bp+136 /* &pStmt */, pzTail) if objc >= 5 { *(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)) = (zSql + uintptr(((int64(*(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */))) - int64(zCopy)) / 1))) } libc.Xfree(tls, zCopy) tcl.XTcl_ResetResult(tls, interp) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), rc) != 0 { return TCL_ERROR } if ((rc == SQLITE_OK) && (objc >= 5)) && (*(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)) != 0) { if *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) >= 0 { *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) = (*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */))) - int64(zSql)) / 1))) } tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), uintptr(0), tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 120 /* bytes */))), 0) } if rc != SQLITE_OK { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+144 /* &zBuf[0] */, ts+16159 /* "(%d) " */, libc.VaList(bp+40, rc)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+144 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */))), 0)) return TCL_ERROR } if *(*uintptr)(unsafe.Pointer(bp + 136 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+144 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 136 /* pStmt */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+88, bp+144 /* &zBuf[0] */, 0)) } return TCL_OK } // Usage: sqlite3_prepare_v3 DB sql bytes flags ?tailvar? // // Compile up to bytes of the supplied SQL string using // database handle and flags . The parameter is // the name of a global variable that is set to the unused portion of // (if any). A STMT handle is returned. func test_prepare_v3(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4521:26: */ bp := tls.Alloc(194) defer tls.Free(194) // var db uintptr at bp+112, 8 var zSql uintptr var zCopy uintptr = uintptr(0) // malloc() copy of zSql // var bytes int32 at bp+120, 4 // var flags int32 at bp+124, 4 *(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)) = uintptr(0) var pzTail uintptr *(*uintptr)(unsafe.Pointer(bp + 136 /* pStmt */)) = uintptr(0) // var zBuf [50]int8 at bp+144, 50 var rc int32 if (objc != 6) && (objc != 5) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16697 /* " DB sql bytes fl..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+112 /* &db */) != 0 { return TCL_ERROR } zSql = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+120 /* &bytes */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+124 /* &flags */) != 0 { return TCL_ERROR } // Instead of using zSql directly, make a copy into a buffer obtained // directly from malloc(). The idea is to make it easier for valgrind // to spot buffer overreads. if *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) >= 0 { zCopy = libc.Xmalloc(tls, uint64(*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)))) libc.Xmemcpy(tls, zCopy, zSql, uint64(*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)))) } else { var n int32 = (int32(libc.Xstrlen(tls, zSql)) + 1) zCopy = libc.Xmalloc(tls, uint64(n)) libc.Xmemcpy(tls, zCopy, zSql, uint64(n)) } if objc >= 6 { pzTail = bp + 128 /* &zTail */ } else { pzTail = uintptr(0) } rc = sqlite3.Xsqlite3_prepare_v3(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), zCopy, *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)), uint32(*(*int32)(unsafe.Pointer(bp + 124 /* flags */))), bp+136 /* &pStmt */, pzTail) libc.Xfree(tls, zCopy) *(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)) = (zSql + uintptr(((int64(*(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */))) - int64(zCopy)) / 1))) tcl.XTcl_ResetResult(tls, interp) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), rc) != 0 { return TCL_ERROR } if ((rc == SQLITE_OK) && (*(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)) != 0)) && (objc >= 6) { if *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) >= 0 { *(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) = (*(*int32)(unsafe.Pointer(bp + 120 /* bytes */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */))) - int64(zSql)) / 1))) } tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 5*8)), uintptr(0), tcl.XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 120 /* bytes */))), 0) } if rc != SQLITE_OK { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+144 /* &zBuf[0] */, ts+16159 /* "(%d) " */, libc.VaList(bp+40, rc)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+144 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */))), 0)) return TCL_ERROR } if *(*uintptr)(unsafe.Pointer(bp + 136 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+144 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 136 /* pStmt */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+88, bp+144 /* &zBuf[0] */, 0)) } return TCL_OK } // Usage: sqlite3_prepare_tkt3134 DB // // Generate a prepared statement for a zero-byte string as a test // for ticket #3134. The string should be preceded by a zero byte. func test_prepare_tkt3134(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4592:26: */ bp := tls.Alloc(178) defer tls.Free(178) // var db uintptr at bp+112, 8 *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */)) = uintptr(0) // var zBuf [50]int8 at bp+128, 50 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16675 /* " DB sql bytes ta..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+112 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_prepare_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), (uintptr(unsafe.Pointer(&zSql)) + 1), 0, bp+120 /* &pStmt */, uintptr(0)) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */)), rc) != 0 { return TCL_ERROR } if rc != SQLITE_OK { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+128 /* &zBuf[0] */, ts+16159 /* "(%d) " */, libc.VaList(bp+40, rc)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+128 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* db */))), 0)) return TCL_ERROR } if *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+128 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+88, bp+128 /* &zBuf[0] */, 0)) } return TCL_OK } var zSql = *(*[10]int8)(unsafe.Pointer(ts + 16725 /* "\x00SELECT 1" */)) /* test1.c:4599:21 */ // Usage: sqlite3_prepare16 DB sql bytes tailvar // // Compile up to bytes of the supplied SQL string using // database handle . The parameter is the name of a global // variable that is set to the unused portion of (if any). A // STMT handle is returned. func test_prepare16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4635:26: */ bp := tls.Alloc(146) defer tls.Free(146) // var db uintptr at bp+64, 8 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */)) = uintptr(0) var pTail uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) = uintptr(0) // var zBuf [50]int8 at bp+96, 50 var rc int32 // var bytes int32 at bp+76, 4 // The integer specified as arg 3 // var objlen int32 at bp+72, 4 // The byte-array length of arg 2 if (objc != 5) && (objc != 4) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16651 /* " DB sql bytes ?t..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } zSql = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+72 /* &objlen */) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+76 /* &bytes */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_prepare16(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), zSql, *(*int32)(unsafe.Pointer(bp + 76 /* bytes */)), bp+80 /* &pStmt */, func() uintptr { if objc >= 5 { return bp + 88 /* &zTail */ } return uintptr(0) }()) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), rc) != 0 { return TCL_ERROR } if rc != 0 { return TCL_ERROR } if objc >= 5 { if *(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */)) != 0 { *(*int32)(unsafe.Pointer(bp + 72 /* objlen */)) = (*(*int32)(unsafe.Pointer(bp + 72 /* objlen */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */))) - int64(zSql)) / 1))) } else { *(*int32)(unsafe.Pointer(bp + 72 /* objlen */)) = 0 } pTail = tcl.XTcl_NewByteArrayObj(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 72 /* objlen */))) (*Tcl_Obj)(unsafe.Pointer(pTail)).FrefCount++ tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), uintptr(0), pTail, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pTail if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+96 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) != 0 { return TCL_ERROR } } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+96 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: sqlite3_prepare16_v2 DB sql bytes ?tailvar? // // Compile up to bytes of the supplied SQL string using // database handle . The parameter is the name of a global // variable that is set to the unused portion of (if any). A // STMT handle is returned. func test_prepare16_v2(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4695:26: */ bp := tls.Alloc(146) defer tls.Free(146) // var db uintptr at bp+64, 8 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */)) = uintptr(0) var pTail uintptr = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) = uintptr(0) // var zBuf [50]int8 at bp+96, 50 var rc int32 // var bytes int32 at bp+76, 4 // The integer specified as arg 3 // var objlen int32 at bp+72, 4 // The byte-array length of arg 2 if (objc != 5) && (objc != 4) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16651 /* " DB sql bytes ?t..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } zSql = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+72 /* &objlen */) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+76 /* &bytes */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_prepare16_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), zSql, *(*int32)(unsafe.Pointer(bp + 76 /* bytes */)), bp+80 /* &pStmt */, func() uintptr { if objc >= 5 { return bp + 88 /* &zTail */ } return uintptr(0) }()) if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), rc) != 0 { return TCL_ERROR } if rc != 0 { return TCL_ERROR } if objc >= 5 { if *(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */)) != 0 { *(*int32)(unsafe.Pointer(bp + 72 /* objlen */)) = (*(*int32)(unsafe.Pointer(bp + 72 /* objlen */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */))) - int64(zSql)) / 1))) } else { *(*int32)(unsafe.Pointer(bp + 72 /* objlen */)) = 0 } pTail = tcl.XTcl_NewByteArrayObj(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 72 /* objlen */))) (*Tcl_Obj)(unsafe.Pointer(pTail)).FrefCount++ tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), uintptr(0), pTail, 0) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pTail if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) != 0 { if sqlite3TestMakePointerStr(tls, interp, bp+96 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) != 0 { return TCL_ERROR } } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+96 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: sqlite3_open filename ?options-list? func test_open(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4750:26: */ bp := tls.Alloc(172) defer tls.Free(172) var zFilename uintptr // var db uintptr at bp+64, 8 // var zBuf [100]int8 at bp+72, 100 if ((objc != 3) && (objc != 2)) && (objc != 1) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16735 /* " filename option..." */, 0)) return TCL_ERROR } if objc > 1 { zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) } else { zFilename = uintptr(0) } sqlite3.Xsqlite3_open(tls, zFilename, bp+64 /* &db */) if sqlite3TestMakePointerStr(tls, interp, bp+72 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+72 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: sqlite3_open_v2 FILENAME FLAGS VFS func test_open_v2(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4777:26: */ bp := tls.Alloc(476) defer tls.Free(476) var zFilename uintptr var zVfs uintptr var flags int32 = 0 // var db uintptr at bp+368, 8 var rc int32 // var zBuf [100]int8 at bp+376, 100 // var nFlag int32 at bp+24, 4 // var apFlag uintptr at bp+32, 8 var i int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16758 /* "FILENAME FLAGS V..." */) return TCL_ERROR } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if int32(*(*int8)(unsafe.Pointer(zVfs))) == 0x00 { zVfs = uintptr(0) } rc = tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+24 /* &nFlag */, bp+32 /* &apFlag */) if rc != TCL_OK { return rc } for i = 0; i < *(*int32)(unsafe.Pointer(bp + 24 /* nFlag */)); i++ { // var iFlag int32 at bp+360, 4 *(*[20]OpenFlag)(unsafe.Pointer(bp + 40 /* aFlag */)) = [20]OpenFlag{ {FzFlag: ts + 16777 /* "SQLITE_OPEN_READ..." */, Fflag: SQLITE_OPEN_READONLY}, {FzFlag: ts + 16798 /* "SQLITE_OPEN_READ..." */, Fflag: SQLITE_OPEN_READWRITE}, {FzFlag: ts + 16820 /* "SQLITE_OPEN_CREA..." */, Fflag: SQLITE_OPEN_CREATE}, {FzFlag: ts + 16839 /* "SQLITE_OPEN_DELE..." */, Fflag: SQLITE_OPEN_DELETEONCLOSE}, {FzFlag: ts + 16865 /* "SQLITE_OPEN_EXCL..." */, Fflag: SQLITE_OPEN_EXCLUSIVE}, {FzFlag: ts + 16887 /* "SQLITE_OPEN_AUTO..." */, Fflag: SQLITE_OPEN_AUTOPROXY}, {FzFlag: ts + 16909 /* "SQLITE_OPEN_MAIN..." */, Fflag: SQLITE_OPEN_MAIN_DB}, {FzFlag: ts + 16929 /* "SQLITE_OPEN_TEMP..." */, Fflag: SQLITE_OPEN_TEMP_DB}, {FzFlag: ts + 16949 /* "SQLITE_OPEN_TRAN..." */, Fflag: SQLITE_OPEN_TRANSIENT_DB}, {FzFlag: ts + 16974 /* "SQLITE_OPEN_MAIN..." */, Fflag: SQLITE_OPEN_MAIN_JOURNAL}, {FzFlag: ts + 16999 /* "SQLITE_OPEN_TEMP..." */, Fflag: SQLITE_OPEN_TEMP_JOURNAL}, {FzFlag: ts + 17024 /* "SQLITE_OPEN_SUBJ..." */, Fflag: SQLITE_OPEN_SUBJOURNAL}, {FzFlag: ts + 17047 /* "SQLITE_OPEN_SUPE..." */, Fflag: SQLITE_OPEN_SUPER_JOURNAL}, {FzFlag: ts + 17073 /* "SQLITE_OPEN_NOMU..." */, Fflag: SQLITE_OPEN_NOMUTEX}, {FzFlag: ts + 17093 /* "SQLITE_OPEN_FULL..." */, Fflag: SQLITE_OPEN_FULLMUTEX}, {FzFlag: ts + 17115 /* "SQLITE_OPEN_SHAR..." */, Fflag: SQLITE_OPEN_SHAREDCACHE}, {FzFlag: ts + 17139 /* "SQLITE_OPEN_PRIV..." */, Fflag: SQLITE_OPEN_PRIVATECACHE}, {FzFlag: ts + 17164 /* "SQLITE_OPEN_WAL" */, Fflag: SQLITE_OPEN_WAL}, {FzFlag: ts + 17180 /* "SQLITE_OPEN_URI" */, Fflag: SQLITE_OPEN_URI}, {}, } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* apFlag */)) + uintptr(i)*8)), bp+40 /* &aFlag[0] */, int32(unsafe.Sizeof(OpenFlag{})), ts+17196 /* "flag" */, 0, bp+360 /* &iFlag */) if rc != TCL_OK { return rc } flags = flags | ((*OpenFlag)(unsafe.Pointer(bp + 40 /* &aFlag */ + uintptr(*(*int32)(unsafe.Pointer(bp + 360 /* iFlag */)))*16)).Fflag) } rc = sqlite3.Xsqlite3_open_v2(tls, zFilename, bp+368 /* &db */, flags, zVfs) if sqlite3TestMakePointerStr(tls, interp, bp+376 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 368 /* db */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, bp+376 /* &zBuf[0] */, 0)) return TCL_OK } type OpenFlag = struct { FzFlag uintptr Fflag int32 _ [4]byte } /* test1.c:4806:5 */ // Usage: sqlite3_open16 filename options func test_open16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4847:26: */ bp := tls.Alloc(172) defer tls.Free(172) var zFilename uintptr // var db uintptr at bp+64, 8 // var zBuf [100]int8 at bp+72, 100 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+16735 /* " filename option..." */, 0)) return TCL_ERROR } zFilename = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0)) sqlite3.Xsqlite3_open16(tls, zFilename, bp+64 /* &db */) if sqlite3TestMakePointerStr(tls, interp, bp+72 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+72 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: sqlite3_complete16 // // Return 1 if the supplied argument is a complete SQL statement, or zero // otherwise. func test_complete16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4879:26: */ var zBuf uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17201 /* "" */) return TCL_ERROR } zBuf = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_complete16(tls, zBuf))) return TCL_OK } // Usage: sqlite3_normalize SQL // // Return the normalized value for an SQL statement. func test_normalize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4904:26: */ var zSql uintptr var zNorm uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10172 /* "SQL" */) return TCL_ERROR } zSql = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zNorm = sqlite3_normalize(tls, zSql) if zNorm != 0 { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, zNorm, -1)) sqlite3.Xsqlite3_free(tls, zNorm) } return TCL_OK } // Usage: sqlite3_step STMT // // Advance the statement to the next row. func test_step(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4933:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+15998 /* " STMT" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) // if( rc!=SQLITE_DONE && rc!=SQLITE_ROW ) return TCL_ERROR; tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } func test_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4956:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pStmt uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16629 /* "STMT" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))), uintptr(1)) return TCL_OK } func test_ex_sql(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4973:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pStmt uintptr at bp, 8 var z uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16629 /* "STMT" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } z = sqlite3.Xsqlite3_expanded_sql(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) tcl.XTcl_SetResult(tls, interp, z, uintptr(1)) sqlite3.Xsqlite3_free(tls, z) return TCL_OK } // Usage: sqlite3_column_count STMT // // Return the number of columns returned by the sql statement STMT. func test_column_count(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5018:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))))) return TCL_OK } // Usage: sqlite3_column_type STMT column // // Return the type of the data in column 'column' of the current row. func test_column_type(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5043:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var tp int32 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } tp = sqlite3.Xsqlite3_column_type(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) switch tp { case SQLITE_INTEGER: tcl.XTcl_SetResult(tls, interp, ts+2274 /* "INTEGER" */, uintptr(0)) break case SQLITE_NULL: tcl.XTcl_SetResult(tls, interp, ts+5717 /* "NULL" */, uintptr(0)) break case SQLITE_FLOAT: tcl.XTcl_SetResult(tls, interp, ts+17227 /* "FLOAT" */, uintptr(0)) break case SQLITE_TEXT: tcl.XTcl_SetResult(tls, interp, ts+17233 /* "TEXT" */, uintptr(0)) break case SQLITE_BLOB: tcl.XTcl_SetResult(tls, interp, ts+17238 /* "BLOB" */, uintptr(0)) break default: } return TCL_OK } // Usage: sqlite3_column_int64 STMT column // // Return the data in column 'column' of the current row cast as an // wide (64-bit) integer. func test_column_int64(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5092:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var iVal i64 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } iVal = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, iVal)) return TCL_OK } // Usage: sqlite3_column_blob STMT column func test_column_blob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5119:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var len int32 var pBlob uintptr if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } len = sqlite3.Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) pBlob = sqlite3.Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, pBlob, len)) return TCL_OK } // Usage: sqlite3_column_double STMT column // // Return the data in column 'column' of the current row cast as a double. func test_column_double(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5151:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var rVal float64 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } rVal = sqlite3.Xsqlite3_column_double(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewDoubleObj(tls, rVal)) return TCL_OK } // Usage: sqlite3_data_count STMT // // Return the number of columns returned by the sql statement STMT. func test_data_count(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5180:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+40, 8 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_data_count(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))))) return TCL_OK } // Usage: sqlite3_column_text STMT column // // Usage: sqlite3_column_decltype STMT column // // Usage: sqlite3_column_name STMT column func test_stmt_utf8(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5207:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var xFunc uintptr var zRet uintptr xFunc = clientData if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } zRet = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(&xFunc)))(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) if zRet != 0 { tcl.XTcl_SetResult(tls, interp, zRet, uintptr(0)) } return TCL_OK } func test_global_recover(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5234:26: */ var rc int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } rc = sqlite3.Xsqlite3_global_recover(tls) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Usage: sqlite3_column_text STMT column // // Usage: sqlite3_column_decltype STMT column // // Usage: sqlite3_column_name STMT column func test_stmt_utf16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5259:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var pRet uintptr var zName16 uintptr var xFunc uintptr xFunc = clientData if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } zName16 = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(&xFunc)))(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))) if zName16 != 0 { var n int32 var z uintptr = zName16 for n = 0; (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) || (*(*int8)(unsafe.Pointer(z + uintptr((n + 1)))) != 0); n = n + (2) { } pRet = tcl.XTcl_NewByteArrayObj(tls, zName16, (n + 2)) tcl.XTcl_SetObjResult(tls, interp, pRet) } return TCL_OK } // Usage: sqlite3_column_int STMT column // // Usage: sqlite3_column_bytes STMT column // // Usage: sqlite3_column_bytes16 STMT column // func test_stmt_int(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5303:26: */ bp := tls.Alloc(52) defer tls.Free(52) // var pStmt uintptr at bp+40, 8 // var col int32 at bp+48, 4 var xFunc uintptr xFunc = clientData if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))), ts+17214 /* " STMT column" */, 0)) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &pStmt */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &col */) != 0 { return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&xFunc)))(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 48 /* col */))))) return TCL_OK } // Usage: sqlite_set_magic DB MAGIC-NUMBER // // Set the db->magic value. This is used to test error recovery logic. func sqlite_set_magic(tls *libc.TLS, clientData uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:5332:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+17243 /* " DB MAGIC" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ts+17253 /* "SQLITE_MAGIC_OPE..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmagic = SQLITE_MAGIC_OPEN } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ts+17271 /* "SQLITE_MAGIC_CLO..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmagic = SQLITE_MAGIC_CLOSED } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ts+17291 /* "SQLITE_MAGIC_BUS..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmagic = SQLITE_MAGIC_BUSY } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ts+17309 /* "SQLITE_MAGIC_ERR..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmagic = SQLITE_MAGIC_ERROR } else if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), (*(*uintptr)(unsafe.Pointer(bp + 40 /* db */))+116 /* &.magic */)) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_interrupt DB // // Trigger an interrupt on DB func test_interrupt(tls *libc.TLS, clientData uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:5364:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_interrupt(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))) return TCL_OK } // Usage: sqlite_delete_function DB function-name // // Delete the user function 'function-name' from database handle DB. It // is assumed that the user function was created as UTF8, any number of // arguments (the way the TCL interface does it). func delete_function(tls *libc.TLS, clientData uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:5387:26: */ bp := tls.Alloc(48) defer tls.Free(48) var rc int32 // var db uintptr at bp+40, 8 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+17328 /* " DB function-nam..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), -1, SQLITE_UTF8, uintptr(0), uintptr(0), uintptr(0), uintptr(0)) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Usage: sqlite_delete_collation DB collation-name // // Delete the collation sequence 'collation-name' from database handle // DB. It is assumed that the collation sequence was created as UTF8 (the // way the TCL interface does it). func delete_collation(tls *libc.TLS, clientData uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:5413:26: */ bp := tls.Alloc(48) defer tls.Free(48) var rc int32 // var db uintptr at bp+40, 8 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+17328 /* " DB function-nam..." */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), SQLITE_UTF8, uintptr(0), uintptr(0)) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Usage: sqlite3_get_autocommit DB // // Return true if the database DB is currently in auto-commit mode. // Return false if not. func get_autocommit(tls *libc.TLS, clientData uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:5438:26: */ bp := tls.Alloc(118) defer tls.Free(118) // var zBuf [30]int8 at bp+88, 30 // var db uintptr at bp+80, 8 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+80 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+88 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, sqlite3.Xsqlite3_get_autocommit(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+88 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: sqlite3_busy_timeout DB MS // // Set the busy timeout. This is more easily done using the timeout // method of the TCL interface. But we need a way to test the case // where it returns SQLITE_MISUSE. func test_busy_timeout(tls *libc.TLS, clientData uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:5464:26: */ bp := tls.Alloc(76) defer tls.Free(76) var rc int32 // var ms int32 at bp+72, 4 // var db uintptr at bp+64, 8 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+64 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+72 /* &ms */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_busy_timeout(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), *(*int32)(unsafe.Pointer(bp + 72 /* ms */))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_OK } // Usage: tcl_variable_type VARIABLENAME // // Return the name of the internal representation for the // value of the given variable. func tcl_variable_type(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5490:26: */ var pVar uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17346 /* "VARIABLE" */) return TCL_ERROR } pVar = tcl.XTcl_GetVar2Ex(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0), TCL_LEAVE_ERR_MSG) if pVar == uintptr(0) { return TCL_ERROR } if (*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr != 0 { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr)).Fname, -1)) } return TCL_OK } // Usage: sqlite3_release_memory ?N? // // Attempt to release memory currently held but not actually required. // The integer N is the number of bytes we are trying to release. The // return value is the amount of memory actually released. func test_release_memory(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5516:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var N int32 at bp, 4 var amt int32 if (objc != 1) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17355 /* "?N?" */) return TCL_ERROR } if objc == 2 { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &N */) != 0 { return TCL_ERROR } } else { *(*int32)(unsafe.Pointer(bp /* N */)) = -1 } amt = sqlite3.Xsqlite3_release_memory(tls, *(*int32)(unsafe.Pointer(bp /* N */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, amt)) return TCL_OK } // Usage: sqlite3_db_release_memory DB // // Attempt to release memory currently held by database DB. Return the // result code (which in the current implementation is always zero). func test_db_release_memory(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5547:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_db_release_memory(tls, *(*uintptr)(unsafe.Pointer(bp /* db */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // Usage: sqlite3_db_cacheflush DB // // Attempt to flush any dirty pages to disk. func test_db_cacheflush(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5570:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_db_cacheflush(tls, *(*uintptr)(unsafe.Pointer(bp /* db */))) if rc != 0 { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrStr(tls, rc), uintptr(0)) return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } // Usage: sqlite3_system_errno DB // // Return the low-level system errno value. func test_system_errno(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5598:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var iErrno int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } iErrno = sqlite3.Xsqlite3_system_errno(tls, *(*uintptr)(unsafe.Pointer(bp /* db */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, iErrno)) return TCL_OK } // Usage: sqlite3_db_filename DB DBNAME // // Return the name of a file associated with a database. func test_db_filename(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5621:26: */ bp := tls.Alloc(32) defer tls.Free(32) // var db uintptr at bp+24, 8 var zDbName uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15908 /* "DB DBNAME" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0 { return TCL_ERROR } zDbName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3_db_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), zDbName), uintptr(0))) return TCL_OK } // Usage: sqlite3_db_readonly DB DBNAME // // Return 1 or 0 if DBNAME is readonly or not. Return -1 if DBNAME does // not exist. func test_db_readonly(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5645:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var zDbName uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15908 /* "DB DBNAME" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zDbName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_db_readonly(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDbName))) return TCL_OK } // Usage: sqlite3_soft_heap_limit ?N? // // Query or set the soft heap limit for the current thread. The // limit is only changed if the N is present. The previous limit // is returned. func test_soft_heap_limit(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5670:26: */ bp := tls.Alloc(8) defer tls.Free(8) var amt sqlite3_int64 *(*Tcl_WideInt)(unsafe.Pointer(bp /* N */)) = int64(-1) if (objc != 1) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17355 /* "?N?" */) return TCL_ERROR } if objc == 2 { if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &N */) != 0 { return TCL_ERROR } } amt = sqlite3.Xsqlite3_soft_heap_limit64(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp /* N */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, amt)) return TCL_OK } // Usage: sqlite3_hard_heap_limit ?N? // // Query or set the hard heap limit for the current thread. The // limit is only changed if the N is present. The previous limit // is returned. func test_hard_heap_limit(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5697:26: */ bp := tls.Alloc(8) defer tls.Free(8) var amt sqlite3_int64 *(*Tcl_WideInt)(unsafe.Pointer(bp /* N */)) = int64(-1) if (objc != 1) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17355 /* "?N?" */) return TCL_ERROR } if objc == 2 { if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &N */) != 0 { return TCL_ERROR } } amt = sqlite3.Xsqlite3_hard_heap_limit64(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp /* N */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, amt)) return TCL_OK } // Usage: sqlite3_thread_cleanup // // Call the sqlite3_thread_cleanup API. func test_thread_cleanup(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5722:26: */ sqlite3.Xsqlite3_thread_cleanup(tls) return TCL_OK } // Usage: sqlite3_pager_refcounts DB // // Return a list of numbers which are the PagerRefcount for all // pagers on each database connection. func test_pager_refcounts(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5740:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 var i int32 var v int32 var a uintptr var pResult uintptr if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0 { return TCL_ERROR } pResult = tcl.XTcl_NewObj(tls) for i = 0; i < (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).FnDb; i++ { if (*Db)(unsafe.Pointer((*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).FaDb+uintptr(i)*32)).FpBt == uintptr(0) { v = -1 } else { sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) a = sqlite3.Xsqlite3PagerStats(tls, sqlite3.Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer((*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).FaDb+uintptr(i)*32)).FpBt)) v = *(*int32)(unsafe.Pointer(a)) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* db */)))).Fmutex) } tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, v)) } tcl.XTcl_SetObjResult(tls, interp, pResult) return TCL_OK } // tclcmd: working_64bit_int // // Some TCL builds (ex: cygwin) do not support 64-bit integers. This // leads to a number of test failures. The present command checks the // TCL build to see whether or not it supports 64-bit integers. It // returns TRUE if it does and FALSE if not. // // This command is used to warn users that their TCL build is defective // and that the errors they are seeing in the test scripts might be // a result of their defective TCL rather than problems in SQLite. func working_64bit_int(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5786:26: */ var pTestObj uintptr var working int32 = 0 pTestObj = tcl.XTcl_NewWideIntObj(tls, (int64(1000000) * int64(1234567890))) working = (libc.Bool32(libc.Xstrcmp(tls, tcl.XTcl_GetString(tls, pTestObj), ts+17359 /* "1234567890000000" */) == 0)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pTestObj if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((working) != 0)))) return TCL_OK } // tclcmd: vfs_unlink_test // // This TCL command unregisters the primary VFS and then registers // it back again. This is used to test the ability to register a // VFS when none are previously registered, and the ability to // unregister the only available VFS. Ticket #2738 func vfs_unlink_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5811:26: */ bp := tls.Alloc(496) defer tls.Free(496) var i int32 var pMain uintptr // var apVfs [20]uintptr at bp+336, 160 // var one sqlite3_vfs at bp, 168 // var two sqlite3_vfs at bp+168, 168 sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(0)) // Unregister of NULL is harmless (*sqlite3_vfs)(unsafe.Pointer(bp /* &one */)).FzName = ts + 17376 /* "__one" */ (*sqlite3_vfs)(unsafe.Pointer(bp + 168 /* &two */)).FzName = ts + 17382 /* "__two" */ // Calling sqlite3_vfs_register with 2nd argument of 0 does not // change the default VFS pMain = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) sqlite3.Xsqlite3_vfs_register(tls, bp /* &one */, 0) sqlite3.Xsqlite3_vfs_register(tls, bp+168 /* &two */, 0) // We can find a VFS by its name // Calling sqlite_vfs_register with non-zero second parameter changes the // default VFS, even if the 1st parameter is an existig VFS that is // previously registered as the non-default. sqlite3.Xsqlite3_vfs_register(tls, bp /* &one */, 1) sqlite3.Xsqlite3_vfs_register(tls, bp+168 /* &two */, 1) if pMain != 0 { sqlite3.Xsqlite3_vfs_register(tls, pMain, 1) } // Unlink the default VFS. Repeat until there are no more VFSes // registered. for i = 0; uint64(i) < (uint64(unsafe.Sizeof([20]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))); i++ { *(*uintptr)(unsafe.Pointer(bp + 336 /* &apVfs[0] */ + uintptr(i)*8)) = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) if *(*uintptr)(unsafe.Pointer(bp + 336 /* &apVfs[0] */ + uintptr(i)*8)) != 0 { sqlite3.Xsqlite3_vfs_unregister(tls, *(*uintptr)(unsafe.Pointer(bp + 336 /* &apVfs[0] */ + uintptr(i)*8))) } } // Register the main VFS as non-default (will be made default, since // it'll be the only one in existence). sqlite3.Xsqlite3_vfs_register(tls, pMain, 0) // Un-register the main VFS again to restore an empty VFS list sqlite3.Xsqlite3_vfs_unregister(tls, pMain) /* Relink all VFSes in reverse order. */ for i = (int32((uint64(unsafe.Sizeof([20]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))) - uint64(1))); i >= 0; i-- { if *(*uintptr)(unsafe.Pointer(bp + 336 /* &apVfs[0] */ + uintptr(i)*8)) != 0 { sqlite3.Xsqlite3_vfs_register(tls, *(*uintptr)(unsafe.Pointer(bp + 336 /* &apVfs[0] */ + uintptr(i)*8)), 1) } } // Unregister out sample VFSes. sqlite3.Xsqlite3_vfs_unregister(tls, bp /* &one */) sqlite3.Xsqlite3_vfs_unregister(tls, bp+168 /* &two */) // Unregistering a VFS that is not currently registered is harmless sqlite3.Xsqlite3_vfs_unregister(tls, bp /* &one */) sqlite3.Xsqlite3_vfs_unregister(tls, bp+168 /* &two */) // We should be left with the original default VFS back as the // original return TCL_OK } // tclcmd: vfs_initfail_test // // This TCL command attempts to vfs_find and vfs_register when the // sqlite3_initialize() interface is failing. All calls should fail. func vfs_initfail_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5913:26: */ bp := tls.Alloc(168) defer tls.Free(168) // var one sqlite3_vfs at bp, 168 (*sqlite3_vfs)(unsafe.Pointer(bp /* &one */)).FzName = ts + 17376 /* "__one" */ if sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_vfs_register(tls, bp /* &one */, 0) if sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_vfs_register(tls, bp /* &one */, 1) if sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) != 0 { return TCL_ERROR } return TCL_OK } // Saved VFSes var apVfs [20]uintptr /* test1.c:5933:20: */ var nVfs int32 = 0 /* test1.c:5934:12 */ // tclcmd: vfs_unregister_all // // Unregister all VFSes. func vfs_unregister_all(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5941:26: */ var i int32 for i = 0; i < (int32(uint64(unsafe.Sizeof(apVfs)) / uint64(unsafe.Sizeof(uintptr(0))))); i++ { apVfs[i] = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) if apVfs[i] == uintptr(0) { break } sqlite3.Xsqlite3_vfs_unregister(tls, apVfs[i]) } nVfs = i return TCL_OK } // tclcmd: vfs_reregister_all // // Restore all VFSes that were removed using vfs_unregister_all. Taking // care to put the linked list back together in the same order as it was // in before vfs_unregister_all was invoked. func vfs_reregister_all(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5963:26: */ var i int32 for i = (nVfs - 1); i >= 0; i-- { sqlite3.Xsqlite3_vfs_register(tls, apVfs[i], 1) } return TCL_OK } // tclcmd: file_control_test DB // // This TCL command runs the sqlite3_file_control interface and // verifies correct operation of the same. func file_control_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5983:26: */ bp := tls.Alloc(52) defer tls.Free(52) *(*int32)(unsafe.Pointer(bp + 48 /* iArg */)) = 0 // var db uintptr at bp+40, 8 var rc int32 _ = rc if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), uintptr(0), 0, bp+48 /* &iArg */) rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+17388 /* "notadatabase" */, SQLITE_FCNTL_LOCKSTATE, bp+48 /* &iArg */) rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+85 /* "main" */, -1, bp+48 /* &iArg */) rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), ts+8379 /* "temp" */, -1, bp+48 /* &iArg */) return TCL_OK } // tclcmd: file_control_lasterrno_test DB // // This TCL command runs the sqlite3_file_control interface and // verifies correct operation of the SQLITE_LAST_ERRNO verb. func file_control_lasterrno_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6018:26: */ bp := tls.Alloc(92) defer tls.Free(92) *(*int32)(unsafe.Pointer(bp + 88 /* iArg */)) = 0 // var db uintptr at bp+80, 8 var rc int32 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+80 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */)), uintptr(0), SQLITE_FCNTL_LAST_ERRNO, bp+88 /* &iArg */) if rc != 0 { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 88 /* iArg */)) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+17401, /* "Unexpected non-z..." */ tcl.XTcl_GetStringFromObj(tls, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 88 /* iArg */))), uintptr(0)), ts+4765 /* " " */, 0)) return TCL_ERROR } return TCL_OK } // tclcmd: file_control_data_version DB DBNAME // // This TCL command runs the sqlite3_file_control with the // SQLITE_FCNTL_DATA_VERSION opcode, returning the result. func file_control_data_version(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6055:26: */ bp := tls.Alloc(128) defer tls.Free(128) // var iVers uint32 at bp+24, 4 // data version var zDb uintptr // Db name ("main", "temp" etc.) // var db uintptr at bp+16, 8 // Database handle var rc int32 // file_control() return code // var zBuf [100]int8 at bp+28, 100 if (objc != 3) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17429 /* "DB [DBNAME]" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+16 /* &db */) != 0 { return TCL_ERROR } if objc == 3 { zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } else { zDb = uintptr(0) } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), zDb, SQLITE_FCNTL_DATA_VERSION, bp+24 /* &iVers */) if rc != 0 { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_ERROR } else { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+28 /* &zBuf[0] */, ts+17441 /* "%u" */, libc.VaList(bp, *(*uint32)(unsafe.Pointer(bp + 24 /* iVers */)))) tcl.XTcl_SetResult(tls, interp, bp+28 /* zBuf */, uintptr(1)) return TCL_OK } return int32(0) } // tclcmd: file_control_chunksize_test DB DBNAME SIZE // // This TCL command runs the sqlite3_file_control interface and // verifies correct operation of the SQLITE_GET_LOCKPROXYFILE and // SQLITE_SET_LOCKPROXYFILE verbs. func file_control_chunksize_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6094:26: */ bp := tls.Alloc(12) defer tls.Free(12) // var nSize int32 at bp+8, 4 // New chunk size var zDb uintptr // Db name ("main", "temp" etc.) // var db uintptr at bp, 8 // Database handle var rc int32 // file_control() return code if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17444 /* "DB DBNAME SIZE" */) return TCL_ERROR } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+8 /* &nSize */) != 0) { return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if int32(*(*int8)(unsafe.Pointer(zDb))) == 0 { zDb = uintptr(0) } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDb, SQLITE_FCNTL_CHUNK_SIZE, bp+8 /* &nSize */) if rc != 0 { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_ERROR } return TCL_OK } // tclcmd: file_control_sizehint_test DB DBNAME SIZE // // This TCL command runs the sqlite3_file_control interface // with SQLITE_FCNTL_SIZE_HINT func file_control_sizehint_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6131:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var nSize Tcl_WideInt at bp+8, 8 // Hinted size var zDb uintptr // Db name ("main", "temp" etc.) // var db uintptr at bp, 8 // Database handle var rc int32 // file_control() return code if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17444 /* "DB DBNAME SIZE" */) return TCL_ERROR } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) || (tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+8 /* &nSize */) != 0) { return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if int32(*(*int8)(unsafe.Pointer(zDb))) == 0 { zDb = uintptr(0) } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDb, SQLITE_FCNTL_SIZE_HINT, bp+8 /* &nSize */) if rc != 0 { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_ERROR } return TCL_OK } // tclcmd: file_control_lockproxy_test DB PWD // // This TCL command runs the sqlite3_file_control interface and // verifies correct operation of the SQLITE_GET_LOCKPROXYFILE and // SQLITE_SET_LOCKPROXYFILE verbs. func file_control_lockproxy_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6169:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var db uintptr at bp+40, 8 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17459 /* " DB PWD" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0 { return TCL_ERROR } return TCL_OK } // tclcmd: file_control_win32_av_retry DB NRETRY DELAY // // This TCL command runs the sqlite3_file_control interface with // the SQLITE_FCNTL_WIN32_AV_RETRY opcode. func file_control_win32_av_retry(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6239:26: */ bp := tls.Alloc(212) defer tls.Free(212) // var db uintptr at bp+96, 8 var rc int32 // var a [2]int32 at bp+104, 8 // var z [100]int8 at bp+112, 100 if objc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17467 /* " DB NRETRY DELAY" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+96 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), (bp+104 /* &a */)) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), (bp+104 /* &a */ +1*4)) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* db */)), uintptr(0), SQLITE_FCNTL_WIN32_AV_RETRY, bp+104 /* a */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+112 /* &z[0] */, ts+17484 /* "%d %d %d" */, libc.VaList(bp+40, rc, *(*int32)(unsafe.Pointer(bp + 104 /* &a[0] */)), *(*int32)(unsafe.Pointer(bp + 104 /* &a[0] */ + 1*4)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, bp+112 /* &z[0] */, uintptr(0))) return TCL_OK } // tclcmd: file_control_win32_get_handle DB // // This TCL command runs the sqlite3_file_control interface with // the SQLITE_FCNTL_WIN32_GET_HANDLE opcode. func file_control_win32_get_handle(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6272:12: */ bp := tls.Alloc(204) defer tls.Free(204) // var db uintptr at bp+88, 8 var rc int32 *(*HANDLE)(unsafe.Pointer(bp + 96 /* hFile */)) = uintptr(0) // var z [100]int8 at bp+104, 100 if objc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+14683 /* " DB" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+88 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* db */)), uintptr(0), SQLITE_FCNTL_WIN32_GET_HANDLE, bp+96 /* &hFile */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+104 /* &z[0] */, ts+17493 /* "%d %p" */, libc.VaList(bp+40, rc, *(*HANDLE)(unsafe.Pointer(bp + 96 /* hFile */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, bp+104 /* &z[0] */, uintptr(0))) return TCL_OK } // tclcmd: file_control_win32_set_handle DB HANDLE // // This TCL command runs the sqlite3_file_control interface with // the SQLITE_FCNTL_WIN32_SET_HANDLE opcode. func file_control_win32_set_handle(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6304:26: */ bp := tls.Alloc(204) defer tls.Free(204) // var db uintptr at bp+88, 8 var rc int32 *(*HANDLE)(unsafe.Pointer(bp + 96 /* hFile */)) = uintptr(0) // var z [100]int8 at bp+104, 100 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17499 /* " DB HANDLE" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+88 /* &db */) != 0 { return TCL_ERROR } if getWin32Handle(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+96 /* &hFile */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* db */)), uintptr(0), SQLITE_FCNTL_WIN32_SET_HANDLE, bp+96 /* &hFile */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+104 /* &z[0] */, ts+17493 /* "%d %p" */, libc.VaList(bp+40, rc, *(*HANDLE)(unsafe.Pointer(bp + 96 /* hFile */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, bp+104 /* &z[0] */, uintptr(0))) return TCL_OK } // tclcmd: file_control_persist_wal DB PERSIST-FLAG // // This TCL command runs the sqlite3_file_control interface with // the SQLITE_FCNTL_PERSIST_WAL opcode. func file_control_persist_wal(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6340:26: */ bp := tls.Alloc(200) defer tls.Free(200) // var db uintptr at bp+88, 8 var rc int32 // var bPersist int32 at bp+96, 4 // var z [100]int8 at bp+100, 100 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17510 /* " DB FLAG" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+88 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+96 /* &bPersist */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* db */)), uintptr(0), SQLITE_FCNTL_PERSIST_WAL, bp+96 /* &bPersist */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+100 /* &z[0] */, ts+17519 /* "%d %d" */, libc.VaList(bp+40, rc, *(*int32)(unsafe.Pointer(bp + 96 /* bPersist */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, bp+100 /* &z[0] */, uintptr(0))) return TCL_OK } // tclcmd: file_control_powersafe_overwrite DB PSOW-FLAG // // This TCL command runs the sqlite3_file_control interface with // the SQLITE_FCNTL_POWERSAFE_OVERWRITE opcode. func file_control_powersafe_overwrite(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6372:26: */ bp := tls.Alloc(200) defer tls.Free(200) // var db uintptr at bp+88, 8 var rc int32 // var b int32 at bp+96, 4 // var z [100]int8 at bp+100, 100 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17510 /* " DB FLAG" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+88 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+96 /* &b */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* db */)), uintptr(0), SQLITE_FCNTL_POWERSAFE_OVERWRITE, bp+96 /* &b */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+100 /* &z[0] */, ts+17519 /* "%d %d" */, libc.VaList(bp+40, rc, *(*int32)(unsafe.Pointer(bp + 96 /* b */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, bp+100 /* &z[0] */, uintptr(0))) return TCL_OK } // tclcmd: file_control_vfsname DB ?AUXDB? // // Return a string that describes the stack of VFSes. func file_control_vfsname(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6404:26: */ bp := tls.Alloc(80) defer tls.Free(80) // var db uintptr at bp+64, 8 var zDbName uintptr = ts + 85 /* "main" */ *(*uintptr)(unsafe.Pointer(bp + 72 /* zVfsName */)) = uintptr(0) if (objc != 2) && (objc != 3) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17525 /* " DB ?AUXDB?" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } if objc == 3 { zDbName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), zDbName, SQLITE_FCNTL_VFSNAME, bp+72 /* &zVfsName */) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 72 /* zVfsName */)), uintptr(0))) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zVfsName */))) return TCL_OK } // tclcmd: file_control_reservebytes DB N func file_control_reservebytes(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6434:26: */ bp := tls.Alloc(12) defer tls.Free(12) // var db uintptr at bp, 8 var zDbName uintptr = ts + 85 /* "main" */ *(*int32)(unsafe.Pointer(bp + 8 /* n */)) = 0 var rc int32 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17537 /* "DB N" */) return TCL_ERROR } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &n */) != 0) { return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDbName, SQLITE_FCNTL_RESERVE_BYTES, bp+8 /* &n */) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_OK } // tclcmd: file_control_tempfilename DB ?AUXDB? // // Return a string that is a temporary filename func file_control_tempfilename(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6466:26: */ bp := tls.Alloc(80) defer tls.Free(80) // var db uintptr at bp+64, 8 var zDbName uintptr = ts + 85 /* "main" */ *(*uintptr)(unsafe.Pointer(bp + 72 /* zTName */)) = uintptr(0) if (objc != 2) && (objc != 3) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17525 /* " DB ?AUXDB?" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &db */) != 0 { return TCL_ERROR } if objc == 3 { zDbName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), zDbName, SQLITE_FCNTL_TEMPFILENAME, bp+72 /* &zTName */) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 72 /* zTName */)), uintptr(0))) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zTName */))) return TCL_OK } // tclcmd: sqlite3_vfs_list // // Return a tcl list containing the names of all registered vfs's. func vfs_list(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6499:26: */ var pVfs uintptr var pRet uintptr = tcl.XTcl_NewObj(tls) if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } for pVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)); pVfs != 0; pVfs = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext { tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, -1)) } tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } // tclcmd: sqlite3_limit DB ID VALUE // // This TCL command runs the sqlite3_limit interface and // verifies correct operation of the same. func test_limit(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6524:26: */ bp := tls.Alloc(84) defer tls.Free(84) // var db uintptr at bp+72, 8 var rc int32 var i int32 var id int32 = 0 // var val int32 at bp+80, 4 var zId uintptr if objc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+17542 /* " DB ID VALUE" */, 0)) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+72 /* &db */) != 0 { return TCL_ERROR } zId = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aId)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fid int32 _ [4]byte }{}))); i++ { if libc.Xstrcmp(tls, zId, aId[i].FzName) == 0 { id = aId[i].Fid break } } if uint64(i) >= (uint64(unsafe.Sizeof(aId)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fid int32 _ [4]byte }{}))) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+17555 /* "unknown limit ty..." */, zId, uintptr(0))) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+80 /* &val */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_limit(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* db */)), id, *(*int32)(unsafe.Pointer(bp + 80 /* val */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } var aId = [14]struct { FzName uintptr Fid int32 _ [4]byte }{ {FzName: ts + 17576 /* "SQLITE_LIMIT_LEN..." */}, {FzName: ts + 17596 /* "SQLITE_LIMIT_SQL..." */, Fid: SQLITE_LIMIT_SQL_LENGTH}, {FzName: ts + 17620 /* "SQLITE_LIMIT_COL..." */, Fid: SQLITE_LIMIT_COLUMN}, {FzName: ts + 17640 /* "SQLITE_LIMIT_EXP..." */, Fid: SQLITE_LIMIT_EXPR_DEPTH}, {FzName: ts + 17664 /* "SQLITE_LIMIT_COM..." */, Fid: SQLITE_LIMIT_COMPOUND_SELECT}, {FzName: ts + 17693 /* "SQLITE_LIMIT_VDB..." */, Fid: SQLITE_LIMIT_VDBE_OP}, {FzName: ts + 17714 /* "SQLITE_LIMIT_FUN..." */, Fid: SQLITE_LIMIT_FUNCTION_ARG}, {FzName: ts + 17740 /* "SQLITE_LIMIT_ATT..." */, Fid: SQLITE_LIMIT_ATTACHED}, {FzName: ts + 17762 /* "SQLITE_LIMIT_LIK..." */, Fid: SQLITE_LIMIT_LIKE_PATTERN_LENGTH}, {FzName: ts + 17795 /* "SQLITE_LIMIT_VAR..." */, Fid: SQLITE_LIMIT_VARIABLE_NUMBER}, {FzName: ts + 17824 /* "SQLITE_LIMIT_TRI..." */, Fid: SQLITE_LIMIT_TRIGGER_DEPTH}, {FzName: ts + 17851 /* "SQLITE_LIMIT_WOR..." */, Fid: SQLITE_LIMIT_WORKER_THREADS}, // Out of range test cases {FzName: ts + 17879 /* "SQLITE_LIMIT_TOO..." */, Fid: -1}, {FzName: ts + 17901 /* "SQLITE_LIMIT_TOO..." */, Fid: (SQLITE_LIMIT_WORKER_THREADS + 1)}, } /* test1.c:6535:5 */ // tclcmd: save_prng_state // // Save the state of the pseudo-random number generator. // At the same time, verify that sqlite3_test_control works even when // called with an out-of-range opcode. func save_prng_state(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6587:26: */ var rc int32 = sqlite3.Xsqlite3_test_control(tls, 9999, 0) _ = rc rc = sqlite3.Xsqlite3_test_control(tls, -1, 0) sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_PRNG_SAVE, 0) return TCL_OK } // tclcmd: restore_prng_state func restore_prng_state(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6603:26: */ sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_PRNG_RESTORE, 0) return TCL_OK } // tclcmd: reset_prng_state func reset_prng_state(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6615:26: */ sqlite3.Xsqlite3_randomness(tls, 0, uintptr(0)) return TCL_OK } // tclcmd: prng_seed INT ?DB? // // Set up the SQLITE_TESTCTRL_PRNG_SEED pragma with parameter INT and DB. // INT is an integer. DB is a database connection, or a NULL pointer if // omitted. // // When INT!=0 and DB!=0, set the PRNG seed to the value of the schema // cookie for DB, or to INT if the schema cookie happens to be zero. // // When INT!=0 and DB==0, set the PRNG seed to just INT. // // If INT==0 and DB==0 then use the default procedure of calling the // xRandomness method on the default VFS to get the PRNG seed. func prng_seed(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6639:26: */ bp := tls.Alloc(40) defer tls.Free(40) *(*int32)(unsafe.Pointer(bp + 24 /* i */)) = 0 *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)) = uintptr(0) if (objc != 2) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17921 /* "SEED ?DB?" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &i */) != 0 { return TCL_ERROR } if (objc == 3) && (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+32 /* &db */) != 0) { return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_PRNG_SEED, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 24 /* i */)), *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))) return TCL_OK } // tclcmd: extra_schema_checks BOOLEAN // // Enable or disable schema checks when parsing the sqlite_schema file. // This is always enabled in production, but it is sometimes useful to // disable the checks in order to make some internal error states reachable // for testing. func extra_schema_checks(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6667:26: */ bp := tls.Alloc(20) defer tls.Free(20) *(*int32)(unsafe.Pointer(bp + 16 /* i */)) = 0 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17931 /* "BOOLEAN" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16 /* &i */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* i */)))) return TCL_OK } // tclcmd: database_may_be_corrupt // // Indicate that database files might be corrupt. In other words, set the normal // state of operation. func database_may_be_corrupt(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6689:26: */ bp := tls.Alloc(16) defer tls.Free(16) sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_NEVER_CORRUPT, libc.VaList(bp, 0)) return TCL_OK } // tclcmd: database_never_corrupt // // Indicate that database files are always well-formed. This enables // extra assert() statements that test conditions that are always true // for well-formed databases. func database_never_corrupt(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6705:26: */ bp := tls.Alloc(16) defer tls.Free(16) sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_NEVER_CORRUPT, libc.VaList(bp, 1)) return TCL_OK } // tclcmd: pcache_stats func test_pcache_stats(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6718:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var nMin int32 at bp+8, 4 // var nMax int32 at bp+4, 4 // var nCurrent int32 at bp, 4 // var nRecyclable int32 at bp+12, 4 var pRet uintptr sqlite3.Xsqlite3PcacheStats(tls, bp /* &nCurrent */, bp+4 /* &nMax */, bp+8 /* &nMin */, bp+12 /* &nRecyclable */) pRet = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+17939 /* "current" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp /* nCurrent */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+17947 /* "max" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 4 /* nMax */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+17951 /* "min" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 8 /* nMin */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+17955 /* "recyclable" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 12 /* nRecyclable */)))) tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } func test_unlock_notify_cb(tls *libc.TLS, aArg uintptr, nArg int32) { /* test1.c:6748:13: */ var ii int32 for ii = 0; ii < nArg; ii++ { tcl.XTcl_EvalEx(tls, *(*uintptr)(unsafe.Pointer(aArg + uintptr(ii)*8)), ts+13374 /* "unlock_notify" */, -1, TCL_EVAL_GLOBAL) } } // tclcmd: sqlite3_unlock_notify db func test_unlock_notify(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6760:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_unlock_notify(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) }{test_unlock_notify_cb})), interp) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_wal_checkpoint db ?NAME? func test_wal_checkpoint(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6786:26: */ bp := tls.Alloc(8) defer tls.Free(8) var zDb uintptr = uintptr(0) // var db uintptr at bp, 8 var rc int32 if (objc != 3) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17966 /* "DB ?NAME?" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } if objc == 3 { zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } rc = sqlite3.Xsqlite3_wal_checkpoint(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDb) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_wal_checkpoint_v2 db MODE ?NAME? // // This command calls the wal_checkpoint_v2() function with the specified // mode argument (passive, full or restart). If present, the database name // NAME is passed as the second argument to wal_checkpoint_v2(). If it the // NAME argument is not present, a NULL pointer is passed instead. // // If wal_checkpoint_v2() returns any value other than SQLITE_BUSY or // SQLITE_OK, then this command returns TCL_ERROR. The Tcl result is set // to the error message obtained from sqlite3_errmsg(). // // Otherwise, this command returns a list of three integers. The first integer // is 1 if SQLITE_BUSY was returned, or 0 otherwise. The following two integers // are the values returned via the output parameters by wal_checkpoint_v2() - // the number of frames in the log and the number of frames in the log // that have been checkpointed. func test_wal_checkpoint_v2(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6830:26: */ bp := tls.Alloc(104) defer tls.Free(104) var zDb uintptr = uintptr(0) // var db uintptr at bp+40, 8 var rc int32 // var eMode int32 at bp+48, 4 *(*int32)(unsafe.Pointer(bp + 96 /* nLog */)) = -555 *(*int32)(unsafe.Pointer(bp + 100 /* nCkpt */)) = -555 var pRet uintptr *(*[5]uintptr)(unsafe.Pointer(bp + 56 /* aMode */)) = [5]uintptr{ts + 17976 /* "passive" */, ts + 17984 /* "full" */, ts + 17989 /* "restart" */, ts + 17997 /* "truncate" */, uintptr(0)} if (objc != 3) && (objc != 4) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18006 /* "DB MODE ?NAME?" */) return TCL_ERROR } if objc == 4 { zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+40 /* &db */) != 0) || ((TCL_OK != tcl.XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+48 /* &eMode */)) && (TCL_OK != tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+56 /* &aMode[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+18021 /* "mode" */, 0, bp+48 /* &eMode */))) { return TCL_ERROR } rc = sqlite3.Xsqlite3_wal_checkpoint_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), zDb, *(*int32)(unsafe.Pointer(bp + 48 /* eMode */)), bp+96 /* &nLog */, bp+100 /* &nCkpt */) if (rc != SQLITE_OK) && (rc != SQLITE_BUSY) { var zErrCode uintptr = sqlite3.Xsqlite3ErrName(tls, rc) tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, zErrCode, ts+10282 /* " - " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */))), 0)) return TCL_ERROR } pRet = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, func() int32 { if rc == SQLITE_BUSY { return 1 } return 0 }())) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 96 /* nLog */)))) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 100 /* nCkpt */)))) tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } // tclcmd: sqlite3_wal_autocheckpoint db VALUE func test_wal_autocheckpoint(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6886:26: */ bp := tls.Alloc(12) defer tls.Free(12) // var db uintptr at bp, 8 var rc int32 // var iVal int32 at bp+8, 4 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18026 /* "DB VALUE" */) return TCL_ERROR } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) || (tcl.XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &iVal */) != 0) { return TCL_ERROR } rc = sqlite3.Xsqlite3_wal_autocheckpoint(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), *(*int32)(unsafe.Pointer(bp + 8 /* iVal */))) tcl.XTcl_ResetResult(tls, interp) if rc != SQLITE_OK { var zErrCode uintptr = sqlite3.Xsqlite3ErrName(tls, rc) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, zErrCode, -1)) return TCL_ERROR } return TCL_OK } // tclcmd: test_sqlite3_log ?SCRIPT? type LogCallback = struct { FpInterp uintptr FpObj uintptr } /* test1.c:6923:8 */ // tclcmd: test_sqlite3_log ?SCRIPT? var logcallback = LogCallback{} /* test1.c:6926:3 */ func xLogcallback(tls *libc.TLS, unused uintptr, err int32, zMsg uintptr) { /* test1.c:6927:13: */ var pNew uintptr = tcl.XTcl_DuplicateObj(tls, logcallback.FpObj) (*Tcl_Obj)(unsafe.Pointer(pNew)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pNew, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, err), -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pNew, tcl.XTcl_NewStringObj(tls, zMsg, -1)) tcl.XTcl_EvalObjEx(tls, logcallback.FpInterp, pNew, (TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pNew if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } func test_sqlite3_log(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6937:26: */ bp := tls.Alloc(48) defer tls.Free(48) if objc > 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11585 /* "SCRIPT" */) return TCL_ERROR } if logcallback.FpObj != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = logcallback.FpObj if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } logcallback.FpObj = uintptr(0) logcallback.FpInterp = uintptr(0) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_LOG, libc.VaList(bp, uintptr(0), uintptr(0))) } if objc > 1 { logcallback.FpObj = *(*uintptr)(unsafe.Pointer(objv + 1*8)) (*Tcl_Obj)(unsafe.Pointer(logcallback.FpObj)).FrefCount++ logcallback.FpInterp = interp sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_LOG, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{xLogcallback})), uintptr(0))) } return TCL_OK } // tcl_objproc COMMANDNAME ARGS... // // Run a TCL command using its objProc interface. Throw an error if // the command has no objProc interface. func runAsObjProc(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:6968:26: */ bp := tls.Alloc(128) defer tls.Free(128) // var cmdInfo Tcl_CmdInfo at bp+64, 64 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18035 /* "COMMAND ..." */) return TCL_ERROR } if !(tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &cmdInfo */) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14541, /* "command not foun..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } if (*Tcl_CmdInfo)(unsafe.Pointer(bp+64 /* &cmdInfo */)).FobjProc == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+18047, /* "command has no o..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } return (*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer((bp + 64 /* &cmdInfo */ + 8 /* &.objProc */))))(tls, (*Tcl_CmdInfo)(unsafe.Pointer(bp+64 /* &cmdInfo */)).FobjClientData, interp, (objc - 1), (objv + uintptr(1)*8)) } // WARNING: The following function, printExplainQueryPlan() is an exact // copy of example code from eqp.in (eqp.html). If this code is modified, // then the documentation copy needs to be modified as well. // Argument pStmt is a prepared SQL statement. This function compiles // an EXPLAIN QUERY PLAN command to report on the prepared statement, // and prints the report to stdout using printf(). func printExplainQueryPlan(tls *libc.TLS, pStmt uintptr) int32 { /* test1.c:7003:5: */ bp := tls.Alloc(64) defer tls.Free(64) var zSql uintptr // Input SQL var zExplain uintptr // SQL with EXPLAIN QUERY PLAN prepended // var pExplain uintptr at bp+56, 8 // Compiled EXPLAIN QUERY PLAN command var rc int32 // Return code from sqlite3_prepare_v2() zSql = sqlite3.Xsqlite3_sql(tls, pStmt) if zSql == uintptr(0) { return SQLITE_ERROR } zExplain = sqlite3.Xsqlite3_mprintf(tls, ts+235 /* "EXPLAIN QUERY PL..." */, libc.VaList(bp, zSql)) if zExplain == uintptr(0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_prepare_v2(tls, sqlite3.Xsqlite3_db_handle(tls, pStmt), zExplain, -1, bp+56 /* &pExplain */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zExplain) if rc != SQLITE_OK { return rc } for SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pExplain */))) { var iSelectid int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pExplain */)), 0) var iOrder int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pExplain */)), 1) var iFrom int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pExplain */)), 2) var zDetail uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pExplain */)), 3) libc.Xprintf(tls, ts+18072 /* "%d %d %d %s\n" */, libc.VaList(bp+16, iSelectid, iOrder, iFrom, zDetail)) } return sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pExplain */))) } func test_print_eqp(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7031:26: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var pStmt uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16629 /* "STMT" */) return TCL_ERROR } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &pStmt */) != 0 { return TCL_ERROR } rc = printExplainQueryPlan(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) // This is needed on Windows so that a test case using this // function can open a read pipe and get the output of // printExplainQueryPlan() immediately. libc.Xfflush(tls, libc.X__acrt_iob_func(tls, uint32(1))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // sqlite3_test_control VERB ARGS... func test_test_control(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7059:26: */ bp := tls.Alloc(216) defer tls.Free(216) *(*[4]Verb)(unsafe.Pointer(bp + 96 /* aVerb */)) = [4]Verb{ {FzName: ts + 18085 /* "SQLITE_TESTCTRL_..." */, Fi: SQLITE_TESTCTRL_LOCALTIME_FAULT}, {FzName: ts + 18117 /* "SQLITE_TESTCTRL_..." */, Fi: SQLITE_TESTCTRL_SORTER_MMAP}, {FzName: ts + 18145 /* "SQLITE_TESTCTRL_..." */, Fi: SQLITE_TESTCTRL_IMPOSTER}, {FzName: ts + 18170 /* "SQLITE_TESTCTRL_..." */, Fi: SQLITE_TESTCTRL_INTERNAL_FUNCTIONS}, } // var iVerb int32 at bp+160, 4 var iFlag int32 var rc int32 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18205 /* "VERB ARGS..." */) return TCL_ERROR } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+96 /* &aVerb[0] */, int32(unsafe.Sizeof(Verb{})), ts+18218 /* "VERB" */, 0, bp+160 /* &iVerb */) if rc != TCL_OK { return rc } iFlag = (*Verb)(unsafe.Pointer(bp + 96 /* &aVerb */ + uintptr(*(*int32)(unsafe.Pointer(bp + 160 /* iVerb */)))*16)).Fi switch iFlag { case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: { *(*uintptr)(unsafe.Pointer(bp + 168 /* db */)) = uintptr(0) if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+168 /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 168 /* db */)))) break } case SQLITE_TESTCTRL_LOCALTIME_FAULT: { // var val int32 at bp+176, 4 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18223 /* "ONOFF" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+176 /* &val */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, iFlag, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(bp + 176 /* val */)))) break } case SQLITE_TESTCTRL_SORTER_MMAP: { // var val int32 at bp+192, 4 // var db uintptr at bp+184, 8 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18229 /* "DB LIMIT" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+184 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+192 /* &val */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_SORTER_MMAP, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 184 /* db */)), *(*int32)(unsafe.Pointer(bp + 192 /* val */)))) break } case SQLITE_TESTCTRL_IMPOSTER: { // var onOff int32 at bp+208, 4 // var tnum int32 at bp+212, 4 var zDbName uintptr // var db uintptr at bp+200, 8 if objc != 6 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18238 /* "DB dbName onOff ..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+200 /* &db */) != 0 { return TCL_ERROR } zDbName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+208 /* &onOff */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 5*8)), bp+212 /* &tnum */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+56, *(*uintptr)(unsafe.Pointer(bp + 200 /* db */)), zDbName, *(*int32)(unsafe.Pointer(bp + 208 /* onOff */)), *(*int32)(unsafe.Pointer(bp + 212 /* tnum */)))) break } } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } type Verb = struct { FzName uintptr Fi int32 _ [4]byte } /* test1.c:7065:3 */ // Information passed from the main thread into the windows file locker // background thread. type win32FileLocker = struct { FevName uintptr Fh HANDLE Fdelay1 int32 Fdelay2 int32 Fok int32 Ferr int32 } /* test1.c:7176:1 */ type _PVFV = uintptr /* corecrt_startup.h:20:14 */ type _PIFV = uintptr /* corecrt_startup.h:21:13 */ type _PVFI = uintptr /* corecrt_startup.h:22:14 */ type _onexit_table_t1 = struct { F_first uintptr F_last uintptr F_end uintptr } /* corecrt_startup.h:24:9 */ type _onexit_table_t = _onexit_table_t1 /* corecrt_startup.h:28:3 */ type _tls_callback_type = uintptr /* process.h:58:16 */ // The background thread that does file locking. func win32_file_locker(tls *libc.TLS, pAppData uintptr) { /* test1.c:7192:26: */ var p uintptr = pAppData if (*win32FileLocker)(unsafe.Pointer(p)).FevName != 0 { var ev HANDLE = libc.XOpenEventA(tls, uint32(EVENT_MODIFY_STATE), FALSE, (*win32FileLocker)(unsafe.Pointer(p)).FevName) if ev != 0 { libc.XSetEvent(tls, ev) libc.XCloseHandle(tls, ev) } } if (*win32FileLocker)(unsafe.Pointer(p)).Fdelay1 != 0 { libc.XSleep(tls, uint32((*win32FileLocker)(unsafe.Pointer(p)).Fdelay1)) } if libc.XLockFile(tls, (*win32FileLocker)(unsafe.Pointer(p)).Fh, uint32(0), uint32(0), uint32(100000000), uint32(0)) != 0 { libc.XSleep(tls, uint32((*win32FileLocker)(unsafe.Pointer(p)).Fdelay2)) libc.XUnlockFile(tls, (*win32FileLocker)(unsafe.Pointer(p)).Fh, uint32(0), uint32(0), uint32(100000000), uint32(0)) (*win32FileLocker)(unsafe.Pointer(p)).Fok = 1 } else { (*win32FileLocker)(unsafe.Pointer(p)).Ferr = 1 } libc.XCloseHandle(tls, (*win32FileLocker)(unsafe.Pointer(p)).Fh) (*win32FileLocker)(unsafe.Pointer(p)).Fh = uintptr(0) (*win32FileLocker)(unsafe.Pointer(p)).Fdelay1 = 0 (*win32FileLocker)(unsafe.Pointer(p)).Fdelay2 = 0 } // lock_win32_file FILENAME DELAY1 DELAY2 // // Get an exclusive manditory lock on file for DELAY2 milliseconds. // Wait DELAY1 milliseconds before acquiring the lock. func win32_file_lock(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7223:26: */ bp := tls.Alloc(408) defer tls.Free(408) var zFilename uintptr // var zBuf [200]int8 at bp+208, 200 var retry int32 = 0 var ev HANDLE var wResult DWORD if (objc != 4) && (objc != 1) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18259 /* "FILENAME DELAY1 ..." */) return TCL_ERROR } if objc == 1 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+208 /* &zBuf[0] */, ts+18282, /* "%d %d %d %d %d" */ libc.VaList(bp, x.Fok, x.Ferr, x.Fdelay1, x.Fdelay2, x.Fh)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+48, bp+208 /* &zBuf[0] */, uintptr(0))) return TCL_OK } for (x.Fh != 0) && (retry < 30) { retry++ libc.XSleep(tls, uint32(100)) } if x.Fh != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, ts+13077 /* "busy" */, uintptr(0))) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), (uintptr(unsafe.Pointer(&x))+16 /* &.delay1 */)) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), (uintptr(unsafe.Pointer(&x))+20 /* &.delay2 */)) != 0 { return TCL_ERROR } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) x.Fh = libc.XCreateFileA(tls, zFilename, ((0x80000000) | (uint32(0x40000000))), (uint32(FILE_SHARE_READ | FILE_SHARE_WRITE)), uintptr(0), uint32(OPEN_ALWAYS), uint32(FILE_ATTRIBUTE_NORMAL), uintptr(0)) if !(int32(x.Fh) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+96, ts+18297 /* "cannot open file..." */, zFilename, uintptr(0))) return TCL_ERROR } ev = libc.XCreateEventA(tls, uintptr(0), TRUE, FALSE, x.FevName) if !(ev != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+128, ts+18316 /* "cannot create ev..." */, x.FevName, uintptr(0))) return TCL_ERROR } libc.X_beginthread(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{win32_file_locker})), uint32(0), uintptr(unsafe.Pointer(&x))) libc.XSleep(tls, uint32(0)) if (libc.AssignUint32(&wResult, libc.XWaitForSingleObject(tls, ev, uint32(10000)))) != ((DWORD(0x00000000)) + DWORD(0)) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+208 /* &zBuf[0] */, ts+18338 /* "0x%x" */, libc.VaList(bp+160, wResult)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+176, ts+18343 /* "wait failed: " */, bp+208 /* &zBuf[0] */, uintptr(0))) libc.XCloseHandle(tls, ev) return TCL_ERROR } libc.XCloseHandle(tls, ev) return TCL_OK } var x = win32FileLocker{FevName: ts + 18357 /* "win32_file_lock" */} /* test1.c:7229:33 */ // exists_win32_path PATH // // Returns non-zero if the specified path exists, whose fully qualified name // may exceed 260 characters if it is prefixed with "\\?\". func win32_exists_path(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7287:26: */ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15984 /* "PATH" */) return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((libc.Bool32(libc.XGetFileAttributesW(tls, tcl.XTcl_GetUnicode(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) != (libc.Uint32(libc.Uint32FromInt32(-1))))) != 0)))) return TCL_OK } // find_win32_file PATTERN // // Returns a list of entries in a directory that match the specified pattern, // whose fully qualified name may exceed 248 characters if it is prefixed with // "\\?\". func win32_find_file(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7309:26: */ bp := tls.Alloc(592) defer tls.Free(592) var hFindFile HANDLE = libc.UintptrFromInt64(int64(-1)) // var findData WIN32_FIND_DATAW at bp, 592 var listObj uintptr var lastErrno DWORD if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18373 /* "PATTERN" */) return TCL_ERROR } hFindFile = libc.XFindFirstFileW(tls, tcl.XTcl_GetUnicode(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &findData */) if hFindFile == (libc.UintptrFromInt64(int64(-1))) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(libc.XGetLastError(tls)))) return TCL_ERROR } listObj = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(listObj)).FrefCount++ for ok := true; ok; ok = libc.XFindNextFileW(tls, hFindFile, bp /* &findData */) != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, listObj, tcl.XTcl_NewUnicodeObj(tls, bp /* &findData */ +44 /* &.cFileName */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, listObj, tcl.XTcl_NewWideIntObj(tls, int64((*WIN32_FIND_DATAW)(unsafe.Pointer(bp /* &findData */)).FdwFileAttributes))) } lastErrno = libc.XGetLastError(tls) if (lastErrno != DWORD(0)) && (lastErrno != DWORD(18)) { libc.XFindClose(tls, hFindFile) for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = listObj if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(libc.XGetLastError(tls)))) return TCL_ERROR } libc.XFindClose(tls, hFindFile) tcl.XTcl_SetObjResult(tls, interp, listObj) return TCL_OK } // delete_win32_file FILENAME // // Deletes the specified file, whose fully qualified name may exceed 260 // characters if it is prefixed with "\\?\". func win32_delete_file(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7354:26: */ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18381 /* "FILENAME" */) return TCL_ERROR } if !(libc.XDeleteFileW(tls, tcl.XTcl_GetUnicode(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) != 0) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(libc.XGetLastError(tls)))) return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } // make_win32_dir DIRECTORY // // Creates the specified directory, whose fully qualified name may exceed 248 // characters if it is prefixed with "\\?\". func win32_mkdir(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7378:26: */ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18390 /* "DIRECTORY" */) return TCL_ERROR } if !(libc.XCreateDirectoryW(tls, tcl.XTcl_GetUnicode(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0)) != 0) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(libc.XGetLastError(tls)))) return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } // remove_win32_dir DIRECTORY // // Removes the specified directory, whose fully qualified name may exceed 248 // characters if it is prefixed with "\\?\". func win32_rmdir(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7402:26: */ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18390 /* "DIRECTORY" */) return TCL_ERROR } if !(libc.XRemoveDirectoryW(tls, tcl.XTcl_GetUnicode(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) != 0) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(libc.XGetLastError(tls)))) return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } // optimization_control DB OPT BOOLEAN // // Enable or disable query optimizations using the sqlite3_test_control() // interface. Disable if BOOLEAN is false and enable if BOOLEAN is true. // OPT is the name of the optimization to be disabled. func optimization_control(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7429:26: */ bp := tls.Alloc(92) defer tls.Free(92) var i int32 // var db uintptr at bp+80, 8 var zOpt uintptr // var onoff int32 at bp+88, 4 var mask int32 = 0 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18400 /* "DB OPT BOOLEAN" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+80 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+88 /* &onoff */) != 0 { return TCL_ERROR } zOpt = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aOpt)) / uint64(unsafe.Sizeof(struct { FzOptName uintptr Fmask int32 _ [4]byte }{}))); i++ { if libc.Xstrcmp(tls, zOpt, aOpt[i].FzOptName) == 0 { mask = aOpt[i].Fmask break } } if *(*int32)(unsafe.Pointer(bp + 88 /* onoff */)) != 0 { mask = ^mask } if uint64(i) >= (uint64(unsafe.Sizeof(aOpt)) / uint64(unsafe.Sizeof(struct { FzOptName uintptr Fmask int32 _ [4]byte }{}))) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+18415, /* "unknown optimiza..." */ uintptr(0))) for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aOpt)) / uint64(unsafe.Sizeof(struct { FzOptName uintptr Fmask int32 _ [4]byte }{}))); i++ { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+4765 /* " " */, aOpt[i].FzOptName, uintptr(0))) } return TCL_ERROR } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_OPTIMIZATIONS, libc.VaList(bp+56, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */)), mask)) return TCL_OK } var aOpt = [13]struct { FzOptName uintptr Fmask int32 _ [4]byte }{ {FzOptName: ts + 18456 /* "all" */, Fmask: libc.Int32FromUint32(SQLITE_AllOpts)}, {FzOptName: ts + 18460 /* "none" */}, {FzOptName: ts + 18465 /* "query-flattener" */, Fmask: SQLITE_QueryFlattener}, {FzOptName: ts + 18481 /* "groupby-order" */, Fmask: SQLITE_GroupByOrder}, {FzOptName: ts + 18495 /* "factor-constants" */, Fmask: SQLITE_FactorOutConst}, {FzOptName: ts + 18512 /* "distinct-opt" */, Fmask: SQLITE_DistinctOpt}, {FzOptName: ts + 18525 /* "cover-idx-scan" */, Fmask: SQLITE_CoverIdxScan}, {FzOptName: ts + 18540 /* "order-by-idx-joi..." */, Fmask: SQLITE_OrderByIdxJoin}, {FzOptName: ts + 18558 /* "transitive" */, Fmask: SQLITE_Transitive}, {FzOptName: ts + 18569 /* "omit-noop-join" */, Fmask: SQLITE_OmitNoopJoin}, {FzOptName: ts + 18584 /* "stat4" */, Fmask: SQLITE_Stat4}, {FzOptName: ts + 18590 /* "skip-scan" */, Fmask: SQLITE_SkipScan}, {FzOptName: ts + 18600 /* "push-down" */, Fmask: SQLITE_PushDown}, } /* test1.c:7443:5 */ // load_static_extension DB NAME ... // // Load one or more statically linked extensions. func tclLoadStaticExtensionCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7490:26: */ bp := tls.Alloc(96) defer tls.Free(96) // var db uintptr at bp+80, 8 var zName uintptr var i int32 var j int32 var rc int32 *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrMsg */)) = uintptr(0) if objc < 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18610 /* "DB NAME ..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+80 /* &db */) != 0 { return TCL_ERROR } for j = 2; j < objc; j++ { zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8))) for i = 0; i < (int32(uint64(unsafe.Sizeof(aExtension)) / uint64(unsafe.Sizeof(struct { FzExtName uintptr FpInit uintptr }{})))); i++ { if libc.Xstrcmp(tls, zName, aExtension[i].FzExtName) == 0 { break } } if i >= (int32(uint64(unsafe.Sizeof(aExtension)) / uint64(unsafe.Sizeof(struct { FzExtName uintptr FpInit uintptr }{})))) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+18622 /* "no such extensio..." */, zName, uintptr(0))) return TCL_ERROR } if aExtension[i].FpInit != 0 { rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aExtension)) + uintptr(i)*16 + 8 /* &.pInit */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */)), bp+88 /* &zErrMsg */, uintptr(0)) } else { rc = SQLITE_OK } if ((rc != SQLITE_OK) && (rc != (SQLITE_OK | (int32(1) << 8)))) || (*(*uintptr)(unsafe.Pointer(bp + 88 /* zErrMsg */)) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+18642 /* "initialization o..." */, zName, ts+18661 /* " failed: " */, *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrMsg */)), uintptr(0))) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrMsg */))) return TCL_ERROR } } return TCL_OK } var aExtension = [22]struct { FzExtName uintptr FpInit uintptr }{ {FzExtName: ts + 18671 /* "amatch" */, FpInit: 0}, {FzExtName: ts + 18678 /* "appendvfs" */, FpInit: 0}, {FzExtName: ts + 3931 /* "carray" */, FpInit: 0}, {FzExtName: ts + 18688 /* "closure" */, FpInit: 0}, {FzExtName: ts + 4686 /* "csv" */, FpInit: 0}, {FzExtName: ts + 4709 /* "decimal" */, FpInit: 0}, {FzExtName: ts + 4767 /* "eval" */, FpInit: 0}, {FzExtName: ts + 4845 /* "explain" */, FpInit: 0}, {FzExtName: ts + 18696 /* "fileio" */, FpInit: 0}, {FzExtName: ts + 5354 /* "fuzzer" */, FpInit: 0}, {FzExtName: ts + 5378 /* "ieee754" */, FpInit: 0}, {FzExtName: ts + 18703 /* "nextchar" */, FpInit: 0}, {FzExtName: ts + 5958 /* "percentile" */, FpInit: 0}, {FzExtName: ts + 6033 /* "prefixes" */, FpInit: 0}, {FzExtName: ts + 6345 /* "regexp" */, FpInit: 0}, {FzExtName: ts + 6352 /* "remember" */, FpInit: 0}, {FzExtName: ts + 18712 /* "series" */, FpInit: 0}, {FzExtName: ts + 18719 /* "spellfix" */, FpInit: 0}, {FzExtName: ts + 18728 /* "totype" */, FpInit: 0}, {FzExtName: ts + 8369 /* "unionvtab" */, FpInit: 0}, {FzExtName: ts + 8911 /* "wholenumber" */, FpInit: 0}, {FzExtName: ts + 9014 /* "zipfile" */, FpInit: 0}, } /* test1.c:7525:5 */ // sorter_test_fakeheap BOOL // func sorter_test_fakeheap(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7590:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var bArg int32 at bp, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18735 /* "BOOL" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &bArg */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp /* bArg */)) != 0 { if sqlite3.Xsqlite3Config.FpHeap == uintptr(0) { sqlite3.Xsqlite3Config.FpHeap = libc.UintptrFromInt64(int64(-1)) } } else { if sqlite3.Xsqlite3Config.FpHeap == (libc.UintptrFromInt64(int64(-1))) { sqlite3.Xsqlite3Config.FpHeap = uintptr(0) } } tcl.XTcl_ResetResult(tls, interp) return TCL_OK } // sorter_test_sort4_helper DB SQL1 NSTEP SQL2 // // Compile SQL statement $SQL1 and step it $NSTEP times. For each row, // check that the leftmost and rightmost columns returned are both integers, // and that both contain the same value. // // Then execute statement $SQL2. Check that the statement returns the same // set of integers in the same order as in the previous step (using $SQL1). func sorter_test_sort4_helper(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7630:26: */ bp := tls.Alloc(104) defer tls.Free(104) var zSql1 uintptr var zSql2 uintptr // var nStep int32 at bp+88, 4 var iStep int32 var iCksum1 uint32 var iCksum2 uint32 var rc int32 var iB int32 // var db uintptr at bp+80, 8 // var pStmt uintptr at bp+96, 8 var a int32 var a1 int32 iCksum1 = uint32(0) iCksum2 = uint32(0) if !(objc != 5) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18740 /* "DB SQL1 NSTEP SQ..." */) return TCL_ERROR __1: ; if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+80 /* &db */) != 0) { goto __2 } return TCL_ERROR __2: ; zSql1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+88 /* &nStep */) != 0) { goto __3 } return TCL_ERROR __3: ; zSql2 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) rc = sqlite3.Xsqlite3_prepare_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */)), zSql1, -1, bp+96 /* &pStmt */, uintptr(0)) if !(rc != SQLITE_OK) { goto __4 } goto sql_error __4: ; iB = (sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))) - 1) iStep = 0 __5: if !((iStep < *(*int32)(unsafe.Pointer(bp + 88 /* nStep */))) && (SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))))) { goto __7 } a = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)), 0) if !(a != sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)), iB)) { goto __8 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+18759 /* "data error: (a!=..." */, 0)) return TCL_ERROR __8: ; iCksum1 = iCksum1 + ((iCksum1 << 3) + uint32(a)) goto __6 __6: iStep++ goto __5 goto __7 __7: ; rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))) if !(rc != SQLITE_OK) { goto __9 } goto sql_error __9: ; rc = sqlite3.Xsqlite3_prepare_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */)), zSql2, -1, bp+96 /* &pStmt */, uintptr(0)) if !(rc != SQLITE_OK) { goto __10 } goto sql_error __10: ; iStep = 0 __11: if !(SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)))) { goto __13 } a1 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)), 0) iCksum2 = iCksum2 + ((iCksum2 << 3) + uint32(a1)) goto __12 __12: iStep++ goto __11 goto __13 __13: ; rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))) if !(rc != SQLITE_OK) { goto __14 } goto sql_error __14: ; if !(iCksum1 != iCksum2) { goto __15 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+18778 /* "checksum mismatc..." */, 0)) return TCL_ERROR __15: ; return TCL_OK sql_error: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+48, ts+18796 /* "sql error: " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))), 0)) return TCL_ERROR } // tclcmd: bad_behavior TYPE // // Do some things that should trigger a valgrind or -fsanitize=undefined // warning. This is used to verify that errors and warnings output by those // tools are detected by the test scripts. // // TYPE BEHAVIOR // 1 Overflow a signed integer // 2 Jump based on an uninitialized variable // 3 Read after free // 4 Panic func test_bad_behavior(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7833:26: */ bp := tls.Alloc(44) defer tls.Free(44) // var iType int32 at bp, 4 var xyz int32 var i int32 = *(*int32)(unsafe.Pointer(clientData)) var j int32 // var w [10]int32 at bp+4, 40 var a uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18808 /* "TYPE" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &iType */) != 0 { return TCL_ERROR } switch *(*int32)(unsafe.Pointer(bp /* iType */)) { case 1: { xyz = (0x7fffff00 - i) xyz = xyz + (0x100) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, xyz)) break } case 2: { *(*int32)(unsafe.Pointer(bp + 4 /* &w[0] */ + 1*4)) = 5 if *(*int32)(unsafe.Pointer(bp + 4 /* &w[0] */ + uintptr(i)*4)) > 0 { *(*int32)(unsafe.Pointer(bp + 4 /* &w[0] */ + 1*4))++ } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 4 /* &w[0] */ + 1*4)))) break } case 3: { a = libc.Xmalloc(tls, (uint64(unsafe.Sizeof(int32(0))) * uint64(10))) for j = 0; j < 10; j++ { *(*int32)(unsafe.Pointer(a + uintptr(j)*4)) = j } libc.Xfree(tls, a) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) break } case 4: { tcl.XTcl_Panic(tls, ts+18813 /* "Deliberate panic" */, 0) break } } return TCL_OK } // tclcmd: register_dbstat_vtab DB // // Cause the dbstat virtual table to be available on the connection DB func test_register_dbstat_vtab(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7883:26: */ bp := tls.Alloc(64) defer tls.Free(64) var zDb uintptr // var cmdInfo Tcl_CmdInfo at bp, 64 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if tcl.XTcl_GetCommandInfo(tls, interp, zDb, bp /* &cmdInfo */) != 0 { var db uintptr = (*struct{ Fdb uintptr })(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp /* &cmdInfo */)).FobjClientData)).Fdb sqlite3.Xsqlite3DbstatRegister(tls, db) } return TCL_OK } // tclcmd: sqlite3_db_config DB SETTING VALUE // // Invoke sqlite3_db_config() for one of the setting values. func test_sqlite3_db_config(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7917:26: */ bp := tls.Alloc(36) defer tls.Free(36) var i int32 *(*int32)(unsafe.Pointer(bp + 32 /* v */)) = 0 var zSetting uintptr // var db uintptr at bp+24, 8 if (objc != 4) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18830 /* "DB SETTING [VALU..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0 { return TCL_ERROR } zSetting = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if sqlite3.Xsqlite3_strglob(tls, ts+18849 /* "SQLITE_*" */, zSetting) == 0 { zSetting += uintptr(7) } if sqlite3.Xsqlite3_strglob(tls, ts+18858 /* "DBCONFIG_*" */, zSetting) == 0 { zSetting += uintptr(9) } if sqlite3.Xsqlite3_strglob(tls, ts+18869 /* "ENABLE_*" */, zSetting) == 0 { zSetting += uintptr(7) } for i = 0; i < (int32(uint64(unsafe.Sizeof(aSetting)) / uint64(unsafe.Sizeof(struct { FzName uintptr FeVal int32 _ [4]byte }{})))); i++ { if libc.Xstrcmp(tls, zSetting, aSetting[i].FzName) == 0 { break } } if i >= (int32(uint64(unsafe.Sizeof(aSetting)) / uint64(unsafe.Sizeof(struct { FzName uintptr FeVal int32 _ [4]byte }{})))) { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, ts+18878 /* "unknown sqlite3_..." */, -1)) return TCL_ERROR } if objc == 4 { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+32 /* &v */) != 0 { return TCL_ERROR } } else { *(*int32)(unsafe.Pointer(bp + 32 /* v */)) = -1 } sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), aSetting[i].FeVal, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 32 /* v */)), bp+32 /* &v */)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 32 /* v */)))) return TCL_OK } var aSetting = [14]struct { FzName uintptr FeVal int32 _ [4]byte }{ {FzName: ts + 18912 /* "FKEY" */, FeVal: SQLITE_DBCONFIG_ENABLE_FKEY}, {FzName: ts + 18917 /* "TRIGGER" */, FeVal: SQLITE_DBCONFIG_ENABLE_TRIGGER}, {FzName: ts + 18925 /* "FTS3_TOKENIZER" */, FeVal: SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER}, {FzName: ts + 18940 /* "LOAD_EXTENSION" */, FeVal: SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION}, {FzName: ts + 18955 /* "NO_CKPT_ON_CLOSE" */, FeVal: SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE}, {FzName: ts + 18972 /* "QPSG" */, FeVal: SQLITE_DBCONFIG_ENABLE_QPSG}, {FzName: ts + 18977 /* "TRIGGER_EQP" */, FeVal: SQLITE_DBCONFIG_TRIGGER_EQP}, {FzName: ts + 18989 /* "RESET_DB" */, FeVal: SQLITE_DBCONFIG_RESET_DATABASE}, {FzName: ts + 18998 /* "DEFENSIVE" */, FeVal: SQLITE_DBCONFIG_DEFENSIVE}, {FzName: ts + 19008 /* "WRITABLE_SCHEMA" */, FeVal: SQLITE_DBCONFIG_WRITABLE_SCHEMA}, {FzName: ts + 19024 /* "LEGACY_ALTER_TAB..." */, FeVal: SQLITE_DBCONFIG_LEGACY_ALTER_TABLE}, {FzName: ts + 19043 /* "DQS_DML" */, FeVal: SQLITE_DBCONFIG_DQS_DML}, {FzName: ts + 19051 /* "DQS_DDL" */, FeVal: SQLITE_DBCONFIG_DQS_DDL}, {FzName: ts + 19059 /* "LEGACY_FILE_FORM..." */, FeVal: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT}, } /* test1.c:7926:5 */ // tclcmd: sqlite3_txn_state DB ?SCHEMA? // // Invoke sqlite3_txn_state(DB,SCHEMA) and return the // numeric value that results. Use NULL for SCHEMA if the 3 argument // is omitted. func test_sqlite3_txn_state(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:7980:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var zSchema uintptr var iTxn int32 if (objc != 2) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+19078 /* "DB ?SCHEMA?" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } if objc == 3 { zSchema = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } else { zSchema = uintptr(0) } iTxn = sqlite3.Xsqlite3_txn_state(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zSchema) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, iTxn)) return TCL_OK } // Change the name of the main database schema from "main" to "icecube". func test_dbconfig_maindbname_icecube(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:8004:26: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // var db uintptr at bp+16, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } else { if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+16 /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), SQLITE_DBCONFIG_MAINDBNAME, libc.VaList(bp, ts+19090 /* "icecube" */)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } return int32(0) } // Usage: sqlite3_mmap_warm DB DBNAME func test_mmap_warm(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:8027:26: */ bp := tls.Alloc(8) defer tls.Free(8) if (objc != 2) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+19098 /* "DB ?DBNAME?" */) return TCL_ERROR } else { var rc int32 // var db uintptr at bp, 8 var zDb uintptr = uintptr(0) if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } if objc == 3 { zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } rc = sqlite3_mmap_warm(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDb) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_OK } return int32(0) } // Usage: test_write_db DB OFFSET DATA // // Obtain the sqlite3_file* object for the database file for the "main" db // of handle DB. Then invoke its xWrite method to write data DATA to offset // OFFSET. func test_write_db(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:8060:26: */ bp := tls.Alloc(32) defer tls.Free(32) *(*uintptr)(unsafe.Pointer(bp /* db */)) = uintptr(0) *(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* iOff */)) = int64(0) var aData uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* nData */)) = 0 *(*uintptr)(unsafe.Pointer(bp + 24 /* pFile */)) = uintptr(0) var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+19110 /* "DB OFFSET DATA" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &iOff */) != 0 { return TCL_ERROR } aData = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+16 /* &nData */) sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+85 /* "main" */, SQLITE_FCNTL_FILE_POINTER, bp+24 /* &pFile */) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pFile */)))).FpMethods + 24 /* &.xWrite */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pFile */)), aData, *(*int32)(unsafe.Pointer(bp + 16 /* nData */)), *(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* iOff */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // Usage: sqlite3_register_cksumvfs // func test_register_cksumvfs(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:8092:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } else { var rc int32 = sqlite3_register_cksumvfs(tls, uintptr(0)) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) } return TCL_OK } // Usage: sqlite3_unregister_cksumvfs // func test_unregister_cksumvfs(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:8113:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } else { var rc int32 = sqlite3_unregister_cksumvfs(tls) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) } return TCL_OK } // Usage: decode_hexdb TEXT // // Example: db deserialize [decode_hexdb $output_of_dbtotxt] // // This routine returns a byte-array for an SQLite database file that // is constructed from a text input which is the output of the "dbtotxt" // utility. func test_decode_hexdb(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:8139:26: */ bp := tls.Alloc(344) defer tls.Free(344) var zIn uintptr = uintptr(0) var a uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 264 /* n */)) = 0 var lineno int32 = 0 var i int32 var iNext int32 var iOffset int32 = 0 // var j int32 at bp+272, 4 // var k int32 at bp+276, 4 var rc int32 // var x [16]uint32 at bp+280, 64 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+19125 /* "HEXDB" */) return TCL_ERROR } zIn = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) for i = 0; *(*int8)(unsafe.Pointer(zIn + uintptr(i))) != 0; i = iNext { lineno++ for iNext = i; (*(*int8)(unsafe.Pointer(zIn + uintptr(iNext))) != 0) && (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iNext)))) != '\n'); iNext++ { } if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iNext)))) == '\n' { iNext++ } for (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) == ' ') || (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) == '\t') { i++ } if a == uintptr(0) { // var pgsz int32 at bp+268, 4 rc = libc.Xsscanf(tls, (zIn + uintptr(i)), ts+19131 /* "| size %d pagesi..." */, libc.VaList(bp, bp+264 /* &n */, bp+268 /* &pgsz */)) if rc != 2 { continue } if ((*(*int32)(unsafe.Pointer(bp + 268 /* pgsz */)) < 512) || (*(*int32)(unsafe.Pointer(bp + 268 /* pgsz */)) > 65536)) || ((*(*int32)(unsafe.Pointer(bp + 268 /* pgsz */)) & (*(*int32)(unsafe.Pointer(bp + 268 /* pgsz */)) - 1)) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+19153 /* "bad 'pagesize' f..." */, uintptr(0))) return TCL_ERROR } *(*int32)(unsafe.Pointer(bp + 264 /* n */)) = (((*(*int32)(unsafe.Pointer(bp + 264 /* n */)) + *(*int32)(unsafe.Pointer(bp + 268 /* pgsz */))) - 1) & ^(*(*int32)(unsafe.Pointer(bp + 268 /* pgsz */)) - 1)) // Round n up to the next multiple of pgsz if *(*int32)(unsafe.Pointer(bp + 264 /* n */)) < 512 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+48, ts+19174 /* "bad 'size' field" */, uintptr(0))) return TCL_ERROR } a = libc.Xmalloc(tls, uint64(*(*int32)(unsafe.Pointer(bp + 264 /* n */)))) if a == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, ts+1930 /* "out of memory" */, uintptr(0))) return TCL_ERROR } libc.Xmemset(tls, a, 0, uint64(*(*int32)(unsafe.Pointer(bp + 264 /* n */)))) continue } rc = libc.Xsscanf(tls, (zIn + uintptr(i)), ts+19191 /* "| page %d offset..." */, libc.VaList(bp+96, bp+272 /* &j */, bp+276 /* &k */)) if rc == 2 { iOffset = *(*int32)(unsafe.Pointer(bp + 276 /* k */)) continue } rc = libc.Xsscanf(tls, (zIn + uintptr(i)), ts+19211, /* "| %d: %x %x %x %..." */ libc.VaList(bp+120, bp+272 /* &j */, (bp+280 /* &x */), (bp+280 /* &x */ +1*4), (bp+280 /* &x */ +2*4), (bp+280 /* &x */ +3*4), (bp+280 /* &x */ +4*4), (bp+280 /* &x */ +5*4), (bp+280 /* &x */ +6*4), (bp+280 /* &x */ +7*4), (bp+280 /* &x */ +8*4), (bp+280 /* &x */ +9*4), (bp+280 /* &x */ +10*4), (bp+280 /* &x */ +11*4), (bp+280 /* &x */ +12*4), (bp+280 /* &x */ +13*4), (bp+280 /* &x */ +14*4), (bp+280 /* &x */ +15*4))) if rc == 17 { *(*int32)(unsafe.Pointer(bp + 276 /* k */)) = (iOffset + *(*int32)(unsafe.Pointer(bp + 272 /* j */))) if (*(*int32)(unsafe.Pointer(bp + 276 /* k */)) + 16) <= *(*int32)(unsafe.Pointer(bp + 264 /* n */)) { var ii int32 for ii = 0; ii < 16; ii++ { *(*uint8)(unsafe.Pointer(a + uintptr((*(*int32)(unsafe.Pointer(bp + 276 /* k */)) + ii)))) = (uint8(*(*uint32)(unsafe.Pointer(bp + 280 /* &x[0] */ + uintptr(ii)*4)) & uint32(0xff))) } } continue } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, a, *(*int32)(unsafe.Pointer(bp + 264 /* n */)))) libc.Xfree(tls, a) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest1_Init(tls *libc.TLS, interp uintptr) int32 { /* test1.c:8211:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd1)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateCommand(tls, interp, aCmd1[i].FzName, aCmd1[i].FxProc, uintptr(0), uintptr(0)) } for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd1)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd1[i].FzName, aObjCmd1[i].FxProc, aObjCmd1[i].FclientData, uintptr(0)) } tcl.XTcl_LinkVar(tls, interp, ts+19265, /* "sqlite_search_co..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_search_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19285, /* "sqlite_found_cou..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_found_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19304, /* "sqlite_sort_coun..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_sort_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19322, /* "sqlite3_max_blob..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_max_blobsize)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19343, /* "sqlite_like_coun..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_like_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19361, /* "sqlite_interrupt..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_interrupt_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19384, /* "sqlite_open_file..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_open_file_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19407, /* "sqlite_current_t..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_current_time)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19427, /* "sqlite3_xferopt_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_xferopt_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19449, /* "sqlite3_pager_re..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_pager_readdb_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19476, /* "sqlite3_pager_wr..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_pager_writedb_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19504, /* "sqlite3_pager_wr..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_pager_writej_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19531, /* "unaligned_string..." */ uintptr(unsafe.Pointer(&unaligned_string_counter)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19556, /* "sqlite_last_need..." */ uintptr(unsafe.Pointer(&pzNeededCollation)), (TCL_LINK_STRING | TCL_LINK_READ_ONLY)) tcl.XTcl_LinkVar(tls, interp, ts+19585, /* "sqlite_os_type" */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_os_type)), TCL_LINK_LONG) { tcl.XTcl_LinkVar(tls, interp, ts+19600, /* "sqlite_query_pla..." */ uintptr(unsafe.Pointer(&query_plan)), (TCL_LINK_STRING | TCL_LINK_READ_ONLY)) } tcl.XTcl_LinkVar(tls, interp, ts+19618, /* "sqlite_opentemp_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_opentemp_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19640, /* "sqlite_static_bi..." */ uintptr(unsafe.Pointer(&sqlite_static_bind_value)), TCL_LINK_STRING) tcl.XTcl_LinkVar(tls, interp, ts+19665, /* "sqlite_static_bi..." */ uintptr(unsafe.Pointer(&sqlite_static_bind_nbyte)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19690, /* "sqlite_temp_dire..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_temp_directory)), TCL_LINK_STRING) tcl.XTcl_LinkVar(tls, interp, ts+19712, /* "sqlite_data_dire..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_data_directory)), TCL_LINK_STRING) tcl.XTcl_LinkVar(tls, interp, ts+19734, /* "bitmask_size" */ uintptr(unsafe.Pointer(&bitmask_size)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) tcl.XTcl_LinkVar(tls, interp, ts+19747, /* "longdouble_size" */ uintptr(unsafe.Pointer(&longdouble_size)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) tcl.XTcl_LinkVar(tls, interp, ts+19763, /* "sqlite_sync_coun..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_sync_count)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+19781, /* "sqlite_fullsync_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_fullsync_count)), TCL_LINK_INT) return TCL_OK } var iZero int32 = 0 /* test1.c:8224:14 */ var aCmd1 = [40]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 19803 /* "db_enter" */, FxProc: 0}, {FzName: ts + 19812 /* "db_leave" */, FxProc: 0}, {FzName: ts + 19821 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19841 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19863 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19884 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19904 /* "sqlite3_snprintf..." */, FxProc: 0}, {FzName: ts + 19925 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19949 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19972 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 19995 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 20021 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 20044 /* "sqlite3_mprintf_..." */, FxProc: 0}, {FzName: ts + 20067 /* "sqlite3_snprintf..." */, FxProc: 0}, {FzName: ts + 20088 /* "sqlite3_last_ins..." */, FxProc: 0}, {FzName: ts + 20114 /* "sqlite3_exec_pri..." */, FxProc: 0}, {FzName: ts + 20134 /* "sqlite3_exec_hex" */, FxProc: 0}, {FzName: ts + 20151 /* "sqlite3_exec" */, FxProc: 0}, {FzName: ts + 20164 /* "sqlite3_exec_nr" */, FxProc: 0}, {FzName: ts + 20180 /* "sqlite3_get_tabl..." */, FxProc: 0}, {FzName: ts + 20205 /* "sqlite3_close" */, FxProc: 0}, {FzName: ts + 20219 /* "sqlite3_close_v2" */, FxProc: 0}, {FzName: ts + 20236 /* "sqlite3_create_f..." */, FxProc: 0}, {FzName: ts + 20260 /* "sqlite3_create_a..." */, FxProc: 0}, {FzName: ts + 20285 /* "sqlite3_drop_mod..." */, FxProc: 0}, {FzName: ts + 20306 /* "sqlite_register_..." */, FxProc: 0}, {FzName: ts + 20336 /* "sqlite_abort" */, FxProc: 0}, {FzName: ts + 20349 /* "sqlite_bind" */, FxProc: 0}, {FzName: ts + 20361 /* "breakpoint" */, FxProc: 0}, {FzName: ts + 20372 /* "sqlite3_key" */, FxProc: 0}, {FzName: ts + 20384 /* "sqlite3_rekey" */, FxProc: 0}, {FzName: ts + 20398 /* "sqlite_set_magic" */, FxProc: 0}, {FzName: ts + 20415 /* "sqlite3_interrup..." */, FxProc: 0}, {FzName: ts + 20433 /* "sqlite_delete_fu..." */, FxProc: 0}, {FzName: ts + 20456 /* "sqlite_delete_co..." */, FxProc: 0}, {FzName: ts + 20480 /* "sqlite3_get_auto..." */, FxProc: 0}, {FzName: ts + 20503 /* "sqlite3_busy_tim..." */, FxProc: 0}, {FzName: ts + 20524 /* "printf" */, FxProc: 0}, {FzName: ts + 20531 /* "sqlite3IoTrace" */, FxProc: 0}, {FzName: ts + 20546 /* "clang_sanitize_a..." */, FxProc: 0}, } /* test1.c:8228:5 */ var aObjCmd1 = [168]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 20569 /* "sqlite3_db_confi..." */, FxProc: 0}, {FzName: ts + 20587 /* "sqlite3_txn_stat..." */, FxProc: 0}, {FzName: ts + 20605 /* "bad_behavior" */, FxProc: 0, FclientData: 0}, {FzName: ts + 20618 /* "register_dbstat_..." */, FxProc: 0}, {FzName: ts + 20639 /* "sqlite3_connecti..." */, FxProc: 0}, {FzName: ts + 20666 /* "intarray_addr" */, FxProc: 0}, {FzName: ts + 20680 /* "int64array_addr" */, FxProc: 0}, {FzName: ts + 20696 /* "doublearray_addr" */, FxProc: 0}, {FzName: ts + 20713 /* "textarray_addr" */, FxProc: 0}, {FzName: ts + 20728 /* "sqlite3_bind_int" */, FxProc: 0}, {FzName: ts + 20745 /* "sqlite3_bind_zer..." */, FxProc: 0}, {FzName: ts + 20767 /* "sqlite3_bind_zer..." */, FxProc: 0}, {FzName: ts + 20791 /* "sqlite3_bind_int..." */, FxProc: 0}, {FzName: ts + 20810 /* "sqlite3_bind_dou..." */, FxProc: 0}, {FzName: ts + 20830 /* "sqlite3_bind_nul..." */, FxProc: 0}, {FzName: ts + 20848 /* "sqlite3_bind_tex..." */, FxProc: 0}, {FzName: ts + 20866 /* "sqlite3_bind_tex..." */, FxProc: 0}, {FzName: ts + 20886 /* "sqlite3_bind_blo..." */, FxProc: 0}, {FzName: ts + 20904 /* "sqlite3_carray_b..." */, FxProc: 0}, {FzName: ts + 20924 /* "sqlite3_bind_par..." */, FxProc: 0}, {FzName: ts + 20953 /* "sqlite3_bind_par..." */, FxProc: 0}, {FzName: ts + 20981 /* "sqlite3_bind_par..." */, FxProc: 0}, {FzName: ts + 21010 /* "sqlite3_clear_bi..." */, FxProc: 0}, {FzName: ts + 21033 /* "sqlite3_sleep" */, FxProc: 0}, {FzName: ts + 21047 /* "sqlite3_errcode" */, FxProc: 0}, {FzName: ts + 21063 /* "sqlite3_extended..." */, FxProc: 0}, {FzName: ts + 21088 /* "sqlite3_errmsg" */, FxProc: 0}, {FzName: ts + 21103 /* "sqlite3_errmsg16" */, FxProc: 0}, {FzName: ts + 21120 /* "sqlite3_open" */, FxProc: 0}, {FzName: ts + 21133 /* "sqlite3_open16" */, FxProc: 0}, {FzName: ts + 21148 /* "sqlite3_open_v2" */, FxProc: 0}, {FzName: ts + 21164 /* "sqlite3_complete..." */, FxProc: 0}, {FzName: ts + 21183 /* "sqlite3_normaliz..." */, FxProc: 0}, {FzName: ts + 21201 /* "sqlite3_prepare" */, FxProc: 0}, {FzName: ts + 21217 /* "sqlite3_prepare1..." */, FxProc: 0}, {FzName: ts + 21235 /* "sqlite3_prepare_..." */, FxProc: 0}, {FzName: ts + 21254 /* "sqlite3_prepare_..." */, FxProc: 0}, {FzName: ts + 21273 /* "sqlite3_prepare_..." */, FxProc: 0}, {FzName: ts + 21297 /* "sqlite3_prepare1..." */, FxProc: 0}, {FzName: ts + 21318 /* "sqlite3_finalize" */, FxProc: 0}, {FzName: ts + 21335 /* "sqlite3_stmt_sta..." */, FxProc: 0}, {FzName: ts + 21355 /* "sqlite3_reset" */, FxProc: 0}, {FzName: ts + 21369 /* "sqlite3_expired" */, FxProc: 0}, {FzName: ts + 21385 /* "sqlite3_transfer..." */, FxProc: 0}, {FzName: ts + 21411 /* "sqlite3_changes" */, FxProc: 0}, {FzName: ts + 21427 /* "sqlite3_step" */, FxProc: 0}, {FzName: ts + 21440 /* "sqlite3_sql" */, FxProc: 0}, {FzName: ts + 21452 /* "sqlite3_expanded..." */, FxProc: 0}, {FzName: ts + 21473 /* "sqlite3_next_stm..." */, FxProc: 0}, {FzName: ts + 21491 /* "sqlite3_stmt_rea..." */, FxProc: 0}, {FzName: ts + 21513 /* "sqlite3_stmt_ise..." */, FxProc: 0}, {FzName: ts + 21536 /* "sqlite3_stmt_bus..." */, FxProc: 0}, {FzName: ts + 21554 /* "uses_stmt_journa..." */, FxProc: 0}, {FzName: ts + 21572 /* "sqlite3_release_..." */, FxProc: 0}, {FzName: ts + 21595 /* "sqlite3_db_relea..." */, FxProc: 0}, {FzName: ts + 21621 /* "sqlite3_db_cache..." */, FxProc: 0}, {FzName: ts + 21643 /* "sqlite3_system_e..." */, FxProc: 0}, {FzName: ts + 21664 /* "sqlite3_db_filen..." */, FxProc: 0}, {FzName: ts + 21684 /* "sqlite3_db_reado..." */, FxProc: 0}, {FzName: ts + 21704 /* "sqlite3_soft_hea..." */, FxProc: 0}, {FzName: ts + 21728 /* "sqlite3_soft_hea..." */, FxProc: 0}, {FzName: ts + 21754 /* "sqlite3_hard_hea..." */, FxProc: 0}, {FzName: ts + 21780 /* "sqlite3_thread_c..." */, FxProc: 0}, {FzName: ts + 21803 /* "sqlite3_pager_re..." */, FxProc: 0}, {FzName: ts + 21827 /* "sqlite3_load_ext..." */, FxProc: 0}, {FzName: ts + 21850 /* "sqlite3_enable_l..." */, FxProc: 0}, {FzName: ts + 21880 /* "sqlite3_extended..." */, FxProc: 0}, {FzName: ts + 21910 /* "sqlite3_limit" */, FxProc: 0}, {FzName: ts + 21924 /* "dbconfig_maindbn..." */, FxProc: 0}, {FzName: ts + 21952 /* "save_prng_state" */, FxProc: 0}, {FzName: ts + 21968 /* "restore_prng_sta..." */, FxProc: 0}, {FzName: ts + 21987 /* "reset_prng_state" */, FxProc: 0}, {FzName: ts + 22004 /* "prng_seed" */, FxProc: 0}, {FzName: ts + 22014 /* "extra_schema_che..." */, FxProc: 0}, {FzName: ts + 22034 /* "database_never_c..." */, FxProc: 0}, {FzName: ts + 22057 /* "database_may_be_..." */, FxProc: 0}, {FzName: ts + 22081 /* "optimization_con..." */, FxProc: 0}, {FzName: ts + 22102 /* "lock_win32_file" */, FxProc: 0}, {FzName: ts + 22118 /* "exists_win32_pat..." */, FxProc: 0}, {FzName: ts + 22136 /* "find_win32_file" */, FxProc: 0}, {FzName: ts + 22152 /* "delete_win32_fil..." */, FxProc: 0}, {FzName: ts + 22170 /* "make_win32_dir" */, FxProc: 0}, {FzName: ts + 22185 /* "remove_win32_dir" */, FxProc: 0}, {FzName: ts + 22202 /* "tcl_objproc" */, FxProc: 0}, // sqlite3_column_*() API {FzName: ts + 22214 /* "sqlite3_column_c..." */, FxProc: 0}, {FzName: ts + 22235 /* "sqlite3_data_cou..." */, FxProc: 0}, {FzName: ts + 22254 /* "sqlite3_column_t..." */, FxProc: 0}, {FzName: ts + 22274 /* "sqlite3_column_b..." */, FxProc: 0}, {FzName: ts + 22294 /* "sqlite3_column_d..." */, FxProc: 0}, {FzName: ts + 22316 /* "sqlite3_column_i..." */, FxProc: 0}, {FzName: ts + 22337 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22357 /* "sqlite3_column_n..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22377 /* "sqlite3_column_i..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22396 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22417 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22441 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22470 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22496 /* "sqlite3_column_o..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22523 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22546 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22568 /* "sqlite3_column_n..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22590 /* "add_alignment_te..." */, FxProc: 0}, {FzName: ts + 22620 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22646, /* "sqlite3_column_d..." */ FxProc: 0, FclientData: 0}, {FzName: ts + 22677 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22705 /* "sqlite3_column_o..." */, FxProc: 0, FclientData: 0}, {FzName: ts + 22734 /* "sqlite3_create_c..." */, FxProc: 0}, {FzName: ts + 22762 /* "sqlite3_global_r..." */, FxProc: 0}, {FzName: ts + 22785 /* "working_64bit_in..." */, FxProc: 0}, {FzName: ts + 22803 /* "vfs_unlink_test" */, FxProc: 0}, {FzName: ts + 22819 /* "vfs_initfail_tes..." */, FxProc: 0}, {FzName: ts + 22837 /* "vfs_unregister_a..." */, FxProc: 0}, {FzName: ts + 22856 /* "vfs_reregister_a..." */, FxProc: 0}, {FzName: ts + 22875 /* "file_control_tes..." */, FxProc: 0}, {FzName: ts + 22893 /* "file_control_las..." */, FxProc: 0}, {FzName: ts + 22921 /* "file_control_loc..." */, FxProc: 0}, {FzName: ts + 22949 /* "file_control_chu..." */, FxProc: 0}, {FzName: ts + 22977 /* "file_control_siz..." */, FxProc: 0}, {FzName: ts + 23004 /* "file_control_dat..." */, FxProc: 0}, {FzName: ts + 23030 /* "file_control_win..." */, FxProc: 0}, {FzName: ts + 23058 /* "file_control_win..." */, FxProc: 0}, {FzName: ts + 23088 /* "file_control_win..." */, FxProc: 0}, {FzName: ts + 23118 /* "file_control_per..." */, FxProc: 0}, {FzName: ts + 23143 /* "file_control_pow..." */, FxProc: 0}, {FzName: ts + 23176 /* "file_control_vfs..." */, FxProc: 0}, {FzName: ts + 23197 /* "file_control_res..." */, FxProc: 0}, {FzName: ts + 23223 /* "file_control_tem..." */, FxProc: 0}, {FzName: ts + 23249 /* "sqlite3_vfs_list" */, FxProc: 0}, {FzName: ts + 23266 /* "sqlite3_create_f..." */, FxProc: 0}, // Functions from os.h {FzName: ts + 23293 /* "add_test_collate" */, FxProc: 0}, {FzName: ts + 23310 /* "add_test_collate..." */, FxProc: 0}, {FzName: ts + 23334 /* "add_test_functio..." */, FxProc: 0}, {FzName: ts + 23352 /* "add_test_utf16bi..." */, FxProc: 0}, {FzName: ts + 23378 /* "sqlite3_test_err..." */, FxProc: 0}, {FzName: ts + 23398 /* "tcl_variable_typ..." */, FxProc: 0}, {FzName: ts + 23416 /* "sqlite3_enable_s..." */, FxProc: 0}, {FzName: ts + 23444 /* "sqlite3_shared_c..." */, FxProc: 0}, {FzName: ts + 23472 /* "sqlite3_libversi..." */, FxProc: 0}, {FzName: ts + 23498 /* "sqlite3_table_co..." */, FxProc: 0}, {FzName: ts + 23528 /* "sqlite3_blob_reo..." */, FxProc: 0}, {FzName: ts + 23548 /* "pcache_stats" */, FxProc: 0}, {FzName: ts + 23561 /* "sqlite3_unlock_n..." */, FxProc: 0}, {FzName: ts + 23583 /* "sqlite3_wal_chec..." */, FxProc: 0}, {FzName: ts + 23606 /* "sqlite3_wal_chec..." */, FxProc: 0}, {FzName: ts + 23632 /* "sqlite3_wal_auto..." */, FxProc: 0}, {FzName: ts + 23659 /* "test_sqlite3_log" */, FxProc: 0}, {FzName: ts + 23676 /* "print_explain_qu..." */, FxProc: 0}, {FzName: ts + 23701 /* "sqlite3_test_con..." */, FxProc: 0}, {FzName: ts + 23722 /* "load_static_exte..." */, FxProc: 0}, {FzName: ts + 23744 /* "sorter_test_fake..." */, FxProc: 0}, {FzName: ts + 23765 /* "sorter_test_sort..." */, FxProc: 0}, {FzName: ts + 23790 /* "vfs_current_time..." */, FxProc: 0}, {FzName: ts + 23813 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23834 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23856 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23878 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23899 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23924 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23950 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 23977 /* "sqlite3_snapshot..." */, FxProc: 0}, {FzName: ts + 24003 /* "sqlite3_delete_d..." */, FxProc: 0}, {FzName: ts + 24027 /* "atomic_batch_wri..." */, FxProc: 0}, {FzName: ts + 24046 /* "sqlite3_mmap_war..." */, FxProc: 0}, {FzName: ts + 24064 /* "sqlite3_config_s..." */, FxProc: 0}, {FzName: ts + 24089 /* "decode_hexdb" */, FxProc: 0}, {FzName: ts + 24102 /* "test_write_db" */, FxProc: 0}, {FzName: ts + 24116 /* "sqlite3_register..." */, FxProc: 0}, {FzName: ts + 24142 /* "sqlite3_unregist..." */, FxProc: 0}, } /* test1.c:8276:5 */ var bitmask_size int32 = (int32(uint64(unsafe.Sizeof(Bitmask(0))) * uint64(8))) /* test1.c:8503:14 */ var longdouble_size int32 = int32(unsafe.Sizeof(float64(0))) /* test1.c:8504:14 */ var query_plan uintptr = ts + 24170 /* "*** OBSOLETE VAR..." */ /* test1.c:8576:23 */ // Page size and reserved size used for testing. var test_pagesize int32 = 1024 /* test2.c:31:12 */ // Dummy page reinitializer func pager_test_reiniter(tls *libc.TLS, pNotUsed uintptr) { /* test2.c:36:13: */ return } // Usage: pager_open FILENAME N-PAGE // // Open a new pager func pager_open(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:45:26: */ bp := tls.Alloc(224) defer tls.Free(224) // var pageSize u32 at bp+120, 4 // var pPager uintptr at bp+112, 8 // var nPage int32 at bp+104, 4 var rc int32 // var zBuf [100]int8 at bp+124, 100 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24196 /* " FILENAME N-PAGE..." */, 0)) return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+104 /* &nPage */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3PagerOpen(tls, sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)), bp+112 /* &pPager */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), 0, 0, ((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_MAIN_DB), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{pager_test_reiniter}))) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } sqlite3.Xsqlite3PagerSetCachesize(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pPager */)), *(*int32)(unsafe.Pointer(bp + 104 /* nPage */))) *(*u32)(unsafe.Pointer(bp + 120 /* pageSize */)) = u32(test_pagesize) sqlite3.Xsqlite3PagerSetPagesize(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pPager */)), bp+120 /* &pageSize */, -1) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+124 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 112 /* pPager */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+124 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: pager_close ID // // Close the given pager. func pager_close(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:82:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pPager uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerClose(tls, pPager, uintptr(0)) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: pager_rollback ID // // Rollback changes func pager_rollback(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:109:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pPager uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerRollback(tls, pPager) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: pager_commit ID // // Commit all changes func pager_commit(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:136:26: */ bp := tls.Alloc(88) defer tls.Free(88) var pPager uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerCommitPhaseOne(tls, pPager, uintptr(0), 0) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } rc = sqlite3.Xsqlite3PagerCommitPhaseTwo(tls, pPager) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: pager_stmt_begin ID // // Start a new checkpoint. func pager_stmt_begin(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:168:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pPager uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerOpenSavepoint(tls, pPager, 1) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: pager_stmt_rollback ID // // Rollback changes to a checkpoint func pager_stmt_rollback(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:195:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pPager uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerSavepoint(tls, pPager, SAVEPOINT_ROLLBACK, 0) sqlite3.Xsqlite3PagerSavepoint(tls, pPager, SAVEPOINT_RELEASE, 0) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: pager_stmt_commit ID // // Commit changes to a checkpoint func pager_stmt_commit(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:223:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pPager uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerSavepoint(tls, pPager, SAVEPOINT_RELEASE, 0) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: pager_stats ID // // Return pager statistics. func pager_stats(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:250:26: */ bp := tls.Alloc(156) defer tls.Free(156) var pPager uintptr var i int32 var a uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) a = sqlite3.Xsqlite3PagerStats(tls, pPager) for i = 0; i < 9; i++ { // var zBuf [100]int8 at bp+56, 100 tcl.XTcl_AppendElement(tls, interp, zName[i]) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+56 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) tcl.XTcl_AppendElement(tls, interp, bp+56 /* &zBuf[0] */) } return TCL_OK } var zName = [9]uintptr{ ts + 24219 /* "ref" */, ts + 24223 /* "page" */, ts + 17947 /* "max" */, ts + 11493 /* "size" */, ts + 10195 /* "state" */, ts + 24228, /* "err" */ ts + 24232 /* "hit" */, ts + 24236 /* "miss" */, ts + 24241, /* "ovfl" */ } /* test2.c:266:17 */ // Usage: pager_pagecount ID // // Return the size of the database file. func pager_pagecount(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:283:26: */ bp := tls.Alloc(184) defer tls.Free(184) var pPager uintptr // var zBuf [100]int8 at bp+84, 100 // var nPage int32 at bp+80, 4 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3PagerPagecount(tls, pPager, bp+80 /* &nPage */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+84 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 80 /* nPage */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+84 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: page_get ID PGNO // // Return a pointer to a page from the database. func page_get(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:309:26: */ bp := tls.Alloc(220) defer tls.Free(220) var pPager uintptr // var zBuf [100]int8 at bp+120, 100 *(*uintptr)(unsafe.Pointer(bp + 112 /* pPage */)) = uintptr(0) // var pgno int32 at bp+104, 4 var rc int32 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24246 /* " ID PGNO\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+104 /* &pgno */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3PagerSharedLock(tls, pPager) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3PagerGet(tls, pPager, uint32(*(*int32)(unsafe.Pointer(bp + 104 /* pgno */))), bp+112 /* &pPage */, 0) } if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+120 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 112 /* pPage */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+120 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: page_lookup ID PGNO // // Return a pointer to a page if the page is already in cache. // If not in cache, return an empty string. func page_lookup(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:346:26: */ bp := tls.Alloc(184) defer tls.Free(184) var pPager uintptr // var zBuf [100]int8 at bp+84, 100 var pPage uintptr // var pgno int32 at bp+80, 4 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24246 /* " ID PGNO\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80 /* &pgno */) != 0 { return TCL_ERROR } pPage = sqlite3.Xsqlite3PagerLookup(tls, pPager, uint32(*(*int32)(unsafe.Pointer(bp + 80 /* pgno */)))) if pPage != 0 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+84 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+40, pPage)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+84 /* &zBuf[0] */, 0)) } return TCL_OK } // Usage: pager_truncate ID PGNO func pager_truncate(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:374:26: */ bp := tls.Alloc(44) defer tls.Free(44) var pPager uintptr // var pgno int32 at bp+40, 4 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24246 /* " ID PGNO\"" */, 0)) return TCL_ERROR } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+40 /* &pgno */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3PagerTruncateImage(tls, pPager, uint32(*(*int32)(unsafe.Pointer(bp + 40 /* pgno */)))) return TCL_OK } // Usage: page_unref PAGE // // Drop a pointer to a page. func page_unref(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:399:26: */ bp := tls.Alloc(40) defer tls.Free(40) var pPage uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24256 /* " PAGE\"" */, 0)) return TCL_ERROR } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3PagerUnref(tls, pPage) return TCL_OK } // Usage: page_read PAGE // // Return the content of a page func page_read(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:421:26: */ bp := tls.Alloc(164) defer tls.Free(164) // var zBuf [100]int8 at bp+64, 100 var pPage uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24256 /* " PAGE\"" */, 0)) return TCL_ERROR } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) libc.Xmemcpy(tls, bp+64 /* &zBuf[0] */, sqlite3.Xsqlite3PagerGetData(tls, pPage), uint64(unsafe.Sizeof([100]int8{}))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+64 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: page_number PAGE // // Return the page number for a page. func page_number(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:445:26: */ bp := tls.Alloc(180) defer tls.Free(180) // var zBuf [100]int8 at bp+80, 100 var pPage uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24256 /* " PAGE\"" */, 0)) return TCL_ERROR } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+80 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, sqlite3.Xsqlite3PagerPagenumber(tls, pPage))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+80 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: page_write PAGE DATA // // Write something into a page. func page_write(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:469:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pPage uintptr var pData uintptr var rc int32 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24263 /* " PAGE DATA\"" */, 0)) return TCL_ERROR } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3PagerWrite(tls, pPage) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } pData = sqlite3.Xsqlite3PagerGetData(tls, pPage) libc.Xstrncpy(tls, pData, *(*uintptr)(unsafe.Pointer(argv + 2*8)), (uint64(test_pagesize - 1))) *(*int8)(unsafe.Pointer(pData + uintptr((test_pagesize - 1)))) = int8(0) return TCL_OK } // Usage: fake_big_file N FILENAME // // Write a few bytes at the N megabyte point of FILENAME. This will // create a large file. If the file was a valid SQLite database, then // the next time the database is opened, SQLite will begin allocating // new pages after N. If N is 2096 or bigger, this will test the // ability of SQLite to write to large files. func fake_big_file(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:505:26: */ bp := tls.Alloc(120) defer tls.Free(120) var pVfs uintptr *(*uintptr)(unsafe.Pointer(bp + 112 /* fd */)) = uintptr(0) var rc int32 // var n int32 at bp+104, 4 var offset i64 var zFile uintptr var nFile int32 if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24275 /* " N-MEGABYTES FIL..." */, 0)) return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+104 /* &n */) != 0 { return TCL_ERROR } pVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) nFile = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) zFile = sqlite3.Xsqlite3_malloc(tls, (nFile + 2)) if zFile == uintptr(0) { return TCL_ERROR } libc.Xmemcpy(tls, zFile, *(*uintptr)(unsafe.Pointer(argv + 2*8)), (uint64(nFile + 1))) *(*int8)(unsafe.Pointer(zFile + uintptr((nFile + 1)))) = int8(0) rc = sqlite3.Xsqlite3OsOpenMalloc(tls, pVfs, zFile, bp+112, /* &fd */ ((SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) | SQLITE_OPEN_MAIN_DB), uintptr(0)) if rc != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+24294 /* "open failed: " */, sqlite3.Xsqlite3ErrName(tls, rc), 0)) sqlite3.Xsqlite3_free(tls, zFile) return TCL_ERROR } offset = i64(*(*int32)(unsafe.Pointer(bp + 104 /* n */))) offset = offset * (int64(1024 * 1024)) rc = sqlite3.Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* fd */)), ts+24308 /* "Hello, World!" */, 14, offset) sqlite3.Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* fd */))) sqlite3.Xsqlite3_free(tls, zFile) if rc != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, ts+24322 /* "write failed: " */, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // test_control_pending_byte PENDING_BYTE // // Set the PENDING_BYTE using the sqlite3_test_control() interface. func testPendingByte(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:558:26: */ bp := tls.Alloc(60) defer tls.Free(60) // var pbyte int32 at bp+56, 4 var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24337 /* " PENDING-BYTE\"" */, uintptr(0))) return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+56 /* &pbyte */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_PENDING_BYTE, libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 56 /* pbyte */)))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // The sqlite3FaultSim() callback: var faultSimInterp uintptr = uintptr(0) /* test2.c:580:19 */ var faultSimScriptSize int32 = 0 /* test2.c:581:12 */ var faultSimScript uintptr /* test2.c:582:13: */ func faultSimCallback(tls *libc.TLS, x int32) int32 { /* test2.c:583:12: */ bp := tls.Alloc(46) defer tls.Free(46) // var zInt [30]int8 at bp+16, 30 var i int32 var isNeg int32 var rc int32 if x == 0 { libc.Xmemcpy(tls, (faultSimScript + uintptr(faultSimScriptSize)), ts+13875 /* "0" */, uint64(2)) } else { // Convert x to text without using any sqlite3 routines if x < 0 { isNeg = 1 x = -x } else { isNeg = 0 } *(*int8)(unsafe.Pointer(bp + 16 /* &zInt[0] */ + 29)) = int8(0) i = (int32(uint64(unsafe.Sizeof([30]int8{})) - uint64(2))) __1: if !((i > 0) && (x > 0)) { goto __3 } { *(*int8)(unsafe.Pointer(bp + 16 /* &zInt[0] */ + uintptr(i))) = (int8((x % 10) + '0')) } goto __2 __2: i-- x = x / (10) goto __1 goto __3 __3: ; if isNeg != 0 { *(*int8)(unsafe.Pointer(bp + 16 /* &zInt[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = int8('-') } libc.Xmemcpy(tls, (faultSimScript + uintptr(faultSimScriptSize)), ((bp + 16 /* &zInt[0] */ + uintptr(i)) + uintptr(1)), (uint64(unsafe.Sizeof([30]int8{})) - uint64(i))) } rc = tcl.XTcl_Eval(tls, faultSimInterp, faultSimScript) if rc != 0 { libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)), ts+24352 /* "fault simulator ..." */, libc.VaList(bp, faultSimScript)) rc = SQLITE_ERROR } else { rc = libc.Xatoi(tls, tcl.XTcl_GetStringResult(tls, faultSimInterp)) } tcl.XTcl_ResetResult(tls, faultSimInterp) return rc } // sqlite3_test_control_fault_install SCRIPT // // Arrange to invoke SCRIPT with the integer argument to sqlite3FaultSim() // appended, whenever sqlite3FaultSim() is called. Or, if SCRIPT is the // empty string, cancel the sqlite3FaultSim() callback. func faultInstallCmd(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:623:26: */ bp := tls.Alloc(96) defer tls.Free(96) var zScript uintptr var nScript int32 var rc int32 if (argc != 1) && (argc != 2) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24388 /* " SCRIPT\"" */, uintptr(0))) } if argc == 2 { zScript = *(*uintptr)(unsafe.Pointer(argv + 1*8)) } else { zScript = ts + 489 /* "" */ } nScript = int32(libc.Xstrlen(tls, zScript)) if faultSimScript != 0 { libc.Xfree(tls, faultSimScript) faultSimScript = uintptr(0) } if nScript == 0 { rc = sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_FAULT_INSTALL, libc.VaList(bp+40, 0)) } else { faultSimScript = libc.Xmalloc(tls, (uint64(nScript + 100))) if faultSimScript == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, ts+1930 /* "out of memory" */, uintptr(0))) return SQLITE_ERROR } libc.Xmemcpy(tls, faultSimScript, zScript, uint64(nScript)) *(*int8)(unsafe.Pointer(faultSimScript + uintptr(nScript))) = int8(' ') faultSimScriptSize = (nScript + 1) faultSimInterp = interp rc = sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_FAULT_INSTALL, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{faultSimCallback})))) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return SQLITE_OK } // sqlite3BitvecBuiltinTest SIZE PROGRAM // // Invoke the SQLITE_TESTCTRL_BITVEC_TEST operator on test_control. // See comments on sqlite3BitvecBuiltinTest() for additional information. func testBitvecBuiltinTest(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test2.c:666:26: */ bp := tls.Alloc(468) defer tls.Free(468) // var sz int32 at bp+64, 4 var rc int32 var nProg int32 = 0 // var aProg [100]int32 at bp+68, 400 var z uintptr if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24397 /* " SIZE PROGRAM\"" */, uintptr(0))) } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+64 /* &sz */) != 0 { return TCL_ERROR } z = *(*uintptr)(unsafe.Pointer(argv + 2*8)) for (nProg < 99) && (*(*int8)(unsafe.Pointer(z)) != 0) { for (*(*int8)(unsafe.Pointer(z)) != 0) && !((int32(sqlite3.Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0) { z++ } if int32(*(*int8)(unsafe.Pointer(z))) == 0 { break } *(*int32)(unsafe.Pointer(bp + 68 /* &aProg[0] */ + uintptr(libc.PostIncInt32(&nProg, 1))*4)) = libc.Xatoi(tls, z) for (int32(sqlite3.Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0 { z++ } } *(*int32)(unsafe.Pointer(bp + 68 /* &aProg[0] */ + uintptr(nProg)*4)) = 0 rc = sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_BITVEC_TEST, libc.VaList(bp+40, *(*int32)(unsafe.Pointer(bp + 64 /* sz */)), bp+68 /* &aProg[0] */)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest2_Init(tls *libc.TLS, interp uintptr) int32 { /* test2.c:697:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd2)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateCommand(tls, interp, aCmd2[i].FzName, aCmd2[i].FxProc, uintptr(0), uintptr(0)) } tcl.XTcl_LinkVar(tls, interp, ts+24412, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_pending)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+24436, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_persist)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+24460, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_hit)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+24480, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_hardhit)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+24504, /* "sqlite_diskfull_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_diskfull_pending)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+24528, /* "sqlite_diskfull" */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_diskfull)), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+24544, /* "sqlite_pending_b..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3PendingByte)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) return TCL_OK } var aCmd2 = [20]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 24564 /* "pager_open" */, FxProc: 0}, {FzName: ts + 24575 /* "pager_close" */, FxProc: 0}, {FzName: ts + 24587 /* "pager_commit" */, FxProc: 0}, {FzName: ts + 24600 /* "pager_rollback" */, FxProc: 0}, {FzName: ts + 24615 /* "pager_stmt_begin" */, FxProc: 0}, {FzName: ts + 24632 /* "pager_stmt_commi..." */, FxProc: 0}, {FzName: ts + 24650 /* "pager_stmt_rollb..." */, FxProc: 0}, {FzName: ts + 24670 /* "pager_stats" */, FxProc: 0}, {FzName: ts + 24682 /* "pager_pagecount" */, FxProc: 0}, {FzName: ts + 24698 /* "page_get" */, FxProc: 0}, {FzName: ts + 24707 /* "page_lookup" */, FxProc: 0}, {FzName: ts + 24719 /* "page_unref" */, FxProc: 0}, {FzName: ts + 24730 /* "page_read" */, FxProc: 0}, {FzName: ts + 24740 /* "page_write" */, FxProc: 0}, {FzName: ts + 24751 /* "page_number" */, FxProc: 0}, {FzName: ts + 24763 /* "pager_truncate" */, FxProc: 0}, {FzName: ts + 24778 /* "fake_big_file" */, FxProc: 0}, {FzName: ts + 24792 /* "sqlite3BitvecBui..." */, FxProc: 0}, {FzName: ts + 24817 /* "sqlite3_test_con..." */, FxProc: 0}, {FzName: ts + 24851 /* "sqlite3_test_con..." */, FxProc: 0}, } /* test2.c:707:5 */ // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This header file defines the interface that the sqlite B-Tree file // subsystem. See comments in the source code for a detailed description // of what each interface routine does. // TODO: This definition is just included so other modules compile. It // needs to be revisited. // If defined as non-zero, auto-vacuum is enabled by default. Otherwise // it must be turned on for each database using "PRAGMA auto_vacuum = 1". // Forward declarations of structure type Btree = Btree1 /* btree.h:39:22 */ type BtCursor = BtCursor1 /* btree.h:40:25 */ type BtShared = BtShared1 /* btree.h:41:25 */ // 2004 April 6 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This file implements an external (disk-based) database using BTrees. // For a detailed discussion of BTrees, refer to // // Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3: // "Sorting And Searching", pages 473-480. Addison-Wesley // Publishing Company, Reading, Massachusetts. // // The basic idea is that each page of the file contains N database // entries and N+1 pointers to subpages. // // ---------------------------------------------------------------- // | Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) | // ---------------------------------------------------------------- // // All of the keys on the page that Ptr(0) points to have values less // than Key(0). All of the keys on page Ptr(1) and its subpages have // values greater than Key(0) and less than Key(1). All of the keys // on Ptr(N) and its subpages have values greater than Key(N-1). And // so forth. // // Finding a particular key requires reading O(log(M)) pages from the // disk where M is the number of entries in the tree. // // In this implementation, a single file can hold one or more separate // BTrees. Each BTree is identified by the index of its root page. The // key and data for any entry are combined to form the "payload". A // fixed amount of payload can be carried directly on the database // page. If the payload is larger than the preset amount then surplus // bytes are stored on overflow pages. The payload for an entry // and the preceding pointer are combined to form a "Cell". Each // page has a small header which contains the Ptr(N) pointer and other // information such as the size of key and data. // // FORMAT DETAILS // // The file is divided into pages. The first page is called page 1, // the second is page 2, and so forth. A page number of zero indicates // "no such page". The page size can be any power of 2 between 512 and 65536. // Each page can be either a btree page, a freelist page, an overflow // page, or a pointer-map page. // // The first page is always a btree page. The first 100 bytes of the first // page contain a special header (the "file header") that describes the file. // The format of the file header is as follows: // // OFFSET SIZE DESCRIPTION // 0 16 Header string: "SQLite format 3\000" // 16 2 Page size in bytes. (1 means 65536) // 18 1 File format write version // 19 1 File format read version // 20 1 Bytes of unused space at the end of each page // 21 1 Max embedded payload fraction (must be 64) // 22 1 Min embedded payload fraction (must be 32) // 23 1 Min leaf payload fraction (must be 32) // 24 4 File change counter // 28 4 Reserved for future use // 32 4 First freelist page // 36 4 Number of freelist pages in the file // 40 60 15 4-byte meta values passed to higher layers // // 40 4 Schema cookie // 44 4 File format of schema layer // 48 4 Size of page cache // 52 4 Largest root-page (auto/incr_vacuum) // 56 4 1=UTF-8 2=UTF16le 3=UTF16be // 60 4 User version // 64 4 Incremental vacuum mode // 68 4 Application-ID // 72 20 unused // 92 4 The version-valid-for number // 96 4 SQLITE_VERSION_NUMBER // // All of the integer values are big-endian (most significant byte first). // // The file change counter is incremented when the database is changed // This counter allows other processes to know when the file has changed // and thus when they need to flush their cache. // // The max embedded payload fraction is the amount of the total usable // space in a page that can be consumed by a single cell for standard // B-tree (non-LEAFDATA) tables. A value of 255 means 100%. The default // is to limit the maximum cell size so that at least 4 cells will fit // on one page. Thus the default max embedded payload fraction is 64. // // If the payload for a cell is larger than the max payload, then extra // payload is spilled to overflow pages. Once an overflow page is allocated, // as many bytes as possible are moved into the overflow pages without letting // the cell size drop below the min embedded payload fraction. // // The min leaf payload fraction is like the min embedded payload fraction // except that it applies to leaf nodes in a LEAFDATA tree. The maximum // payload fraction for a LEAFDATA tree is always 100% (or 255) and it // not specified in the header. // // Each btree pages is divided into three sections: The header, the // cell pointer array, and the cell content area. Page 1 also has a 100-byte // file header that occurs before the page header. // // |----------------| // | file header | 100 bytes. Page 1 only. // |----------------| // | page header | 8 bytes for leaves. 12 bytes for interior nodes // |----------------| // | cell pointer | | 2 bytes per cell. Sorted order. // | array | | Grows downward // | | v // |----------------| // | unallocated | // | space | // |----------------| ^ Grows upwards // | cell content | | Arbitrary order interspersed with freeblocks. // | area | | and free space fragments. // |----------------| // // The page headers looks like this: // // OFFSET SIZE DESCRIPTION // 0 1 Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf // 1 2 byte offset to the first freeblock // 3 2 number of cells on this page // 5 2 first byte of the cell content area // 7 1 number of fragmented free bytes // 8 4 Right child (the Ptr(N) value). Omitted on leaves. // // The flags define the format of this btree page. The leaf flag means that // this page has no children. The zerodata flag means that this page carries // only keys and no data. The intkey flag means that the key is an integer // which is stored in the key size entry of the cell header rather than in // the payload area. // // The cell pointer array begins on the first byte after the page header. // The cell pointer array contains zero or more 2-byte numbers which are // offsets from the beginning of the page to the cell content in the cell // content area. The cell pointers occur in sorted order. The system strives // to keep free space after the last cell pointer so that new cells can // be easily added without having to defragment the page. // // Cell content is stored at the very end of the page and grows toward the // beginning of the page. // // Unused space within the cell content area is collected into a linked list of // freeblocks. Each freeblock is at least 4 bytes in size. The byte offset // to the first freeblock is given in the header. Freeblocks occur in // increasing order. Because a freeblock must be at least 4 bytes in size, // any group of 3 or fewer unused bytes in the cell content area cannot // exist on the freeblock chain. A group of 3 or fewer free bytes is called // a fragment. The total number of bytes in all fragments is recorded. // in the page header at offset 7. // // SIZE DESCRIPTION // 2 Byte offset of the next freeblock // 2 Bytes in this freeblock // // Cells are of variable length. Cells are stored in the cell content area at // the end of the page. Pointers to the cells are in the cell pointer array // that immediately follows the page header. Cells is not necessarily // contiguous or in order, but cell pointers are contiguous and in order. // // Cell content makes use of variable length integers. A variable // length integer is 1 to 9 bytes where the lower 7 bits of each // byte are used. The integer consists of all bytes that have bit 8 set and // the first byte with bit 8 clear. The most significant byte of the integer // appears first. A variable-length integer may not be more than 9 bytes long. // As a special case, all 8 bytes of the 9th byte are used as data. This // allows a 64-bit integer to be encoded in 9 bytes. // // 0x00 becomes 0x00000000 // 0x7f becomes 0x0000007f // 0x81 0x00 becomes 0x00000080 // 0x82 0x00 becomes 0x00000100 // 0x80 0x7f becomes 0x0000007f // 0x8a 0x91 0xd1 0xac 0x78 becomes 0x12345678 // 0x81 0x81 0x81 0x81 0x01 becomes 0x10204081 // // Variable length integers are used for rowids and to hold the number of // bytes of key and data in a btree cell. // // The content of a cell looks like this: // // SIZE DESCRIPTION // 4 Page number of the left child. Omitted if leaf flag is set. // var Number of bytes of data. Omitted if the zerodata flag is set. // var Number of bytes of key. Or the key itself if intkey flag is set. // * Payload // 4 First page of the overflow chain. Omitted if no overflow // // Overflow pages form a linked list. Each page except the last is completely // filled with data (pagesize - 4 bytes). The last page can have as little // as 1 byte of data. // // SIZE DESCRIPTION // 4 Page number of next overflow page // * Data // // Freelist pages come in two subtypes: trunk pages and leaf pages. The // file header points to the first in a linked list of trunk page. Each trunk // page points to multiple leaf pages. The content of a leaf page is // unspecified. A trunk page looks like this: // // SIZE DESCRIPTION // 4 Page number of next trunk page // 4 Number of leaf pointers on this page // * zero or more pages numbers of leaves // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // Internal interface definitions for SQLite. // // The following value is the maximum cell size assuming a maximum page // size give above. // The maximum number of cells on a single page of the database. This // assumes a minimum cell size of 6 bytes (4 bytes for the cell itself // plus 2 bytes for the index to the cell in the page header). Such // small cells will be rare, but they are possible. // Forward declarations type MemPage1 = struct { FisInit u8 FbBusy u8 FintKey u8 FintKeyLeaf u8 Fpgno Pgno Fleaf u8 FhdrOffset u8 FchildPtrSize u8 Fmax1bytePayload u8 FnOverflow u8 _ [1]byte FmaxLocal u16 FminLocal u16 FcellOffset u16 FnFree int32 FnCell u16 FmaskPage u16 FaiOvfl [4]u16 _ [4]byte FapOvfl [4]uintptr FpBt uintptr FaData uintptr FaDataEnd uintptr FaCellIdx uintptr FaDataOfst uintptr FpDbPage uintptr FxCellSize uintptr FxParseCell uintptr } /* btree.h:39:9 */ // 2004 April 6 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // This file implements an external (disk-based) database using BTrees. // For a detailed discussion of BTrees, refer to // // Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3: // "Sorting And Searching", pages 473-480. Addison-Wesley // Publishing Company, Reading, Massachusetts. // // The basic idea is that each page of the file contains N database // entries and N+1 pointers to subpages. // // ---------------------------------------------------------------- // | Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) | // ---------------------------------------------------------------- // // All of the keys on the page that Ptr(0) points to have values less // than Key(0). All of the keys on page Ptr(1) and its subpages have // values greater than Key(0) and less than Key(1). All of the keys // on Ptr(N) and its subpages have values greater than Key(N-1). And // so forth. // // Finding a particular key requires reading O(log(M)) pages from the // disk where M is the number of entries in the tree. // // In this implementation, a single file can hold one or more separate // BTrees. Each BTree is identified by the index of its root page. The // key and data for any entry are combined to form the "payload". A // fixed amount of payload can be carried directly on the database // page. If the payload is larger than the preset amount then surplus // bytes are stored on overflow pages. The payload for an entry // and the preceding pointer are combined to form a "Cell". Each // page has a small header which contains the Ptr(N) pointer and other // information such as the size of key and data. // // FORMAT DETAILS // // The file is divided into pages. The first page is called page 1, // the second is page 2, and so forth. A page number of zero indicates // "no such page". The page size can be any power of 2 between 512 and 65536. // Each page can be either a btree page, a freelist page, an overflow // page, or a pointer-map page. // // The first page is always a btree page. The first 100 bytes of the first // page contain a special header (the "file header") that describes the file. // The format of the file header is as follows: // // OFFSET SIZE DESCRIPTION // 0 16 Header string: "SQLite format 3\000" // 16 2 Page size in bytes. (1 means 65536) // 18 1 File format write version // 19 1 File format read version // 20 1 Bytes of unused space at the end of each page // 21 1 Max embedded payload fraction (must be 64) // 22 1 Min embedded payload fraction (must be 32) // 23 1 Min leaf payload fraction (must be 32) // 24 4 File change counter // 28 4 Reserved for future use // 32 4 First freelist page // 36 4 Number of freelist pages in the file // 40 60 15 4-byte meta values passed to higher layers // // 40 4 Schema cookie // 44 4 File format of schema layer // 48 4 Size of page cache // 52 4 Largest root-page (auto/incr_vacuum) // 56 4 1=UTF-8 2=UTF16le 3=UTF16be // 60 4 User version // 64 4 Incremental vacuum mode // 68 4 Application-ID // 72 20 unused // 92 4 The version-valid-for number // 96 4 SQLITE_VERSION_NUMBER // // All of the integer values are big-endian (most significant byte first). // // The file change counter is incremented when the database is changed // This counter allows other processes to know when the file has changed // and thus when they need to flush their cache. // // The max embedded payload fraction is the amount of the total usable // space in a page that can be consumed by a single cell for standard // B-tree (non-LEAFDATA) tables. A value of 255 means 100%. The default // is to limit the maximum cell size so that at least 4 cells will fit // on one page. Thus the default max embedded payload fraction is 64. // // If the payload for a cell is larger than the max payload, then extra // payload is spilled to overflow pages. Once an overflow page is allocated, // as many bytes as possible are moved into the overflow pages without letting // the cell size drop below the min embedded payload fraction. // // The min leaf payload fraction is like the min embedded payload fraction // except that it applies to leaf nodes in a LEAFDATA tree. The maximum // payload fraction for a LEAFDATA tree is always 100% (or 255) and it // not specified in the header. // // Each btree pages is divided into three sections: The header, the // cell pointer array, and the cell content area. Page 1 also has a 100-byte // file header that occurs before the page header. // // |----------------| // | file header | 100 bytes. Page 1 only. // |----------------| // | page header | 8 bytes for leaves. 12 bytes for interior nodes // |----------------| // | cell pointer | | 2 bytes per cell. Sorted order. // | array | | Grows downward // | | v // |----------------| // | unallocated | // | space | // |----------------| ^ Grows upwards // | cell content | | Arbitrary order interspersed with freeblocks. // | area | | and free space fragments. // |----------------| // // The page headers looks like this: // // OFFSET SIZE DESCRIPTION // 0 1 Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf // 1 2 byte offset to the first freeblock // 3 2 number of cells on this page // 5 2 first byte of the cell content area // 7 1 number of fragmented free bytes // 8 4 Right child (the Ptr(N) value). Omitted on leaves. // // The flags define the format of this btree page. The leaf flag means that // this page has no children. The zerodata flag means that this page carries // only keys and no data. The intkey flag means that the key is an integer // which is stored in the key size entry of the cell header rather than in // the payload area. // // The cell pointer array begins on the first byte after the page header. // The cell pointer array contains zero or more 2-byte numbers which are // offsets from the beginning of the page to the cell content in the cell // content area. The cell pointers occur in sorted order. The system strives // to keep free space after the last cell pointer so that new cells can // be easily added without having to defragment the page. // // Cell content is stored at the very end of the page and grows toward the // beginning of the page. // // Unused space within the cell content area is collected into a linked list of // freeblocks. Each freeblock is at least 4 bytes in size. The byte offset // to the first freeblock is given in the header. Freeblocks occur in // increasing order. Because a freeblock must be at least 4 bytes in size, // any group of 3 or fewer unused bytes in the cell content area cannot // exist on the freeblock chain. A group of 3 or fewer free bytes is called // a fragment. The total number of bytes in all fragments is recorded. // in the page header at offset 7. // // SIZE DESCRIPTION // 2 Byte offset of the next freeblock // 2 Bytes in this freeblock // // Cells are of variable length. Cells are stored in the cell content area at // the end of the page. Pointers to the cells are in the cell pointer array // that immediately follows the page header. Cells is not necessarily // contiguous or in order, but cell pointers are contiguous and in order. // // Cell content makes use of variable length integers. A variable // length integer is 1 to 9 bytes where the lower 7 bits of each // byte are used. The integer consists of all bytes that have bit 8 set and // the first byte with bit 8 clear. The most significant byte of the integer // appears first. A variable-length integer may not be more than 9 bytes long. // As a special case, all 8 bytes of the 9th byte are used as data. This // allows a 64-bit integer to be encoded in 9 bytes. // // 0x00 becomes 0x00000000 // 0x7f becomes 0x0000007f // 0x81 0x00 becomes 0x00000080 // 0x82 0x00 becomes 0x00000100 // 0x80 0x7f becomes 0x0000007f // 0x8a 0x91 0xd1 0xac 0x78 becomes 0x12345678 // 0x81 0x81 0x81 0x81 0x01 becomes 0x10204081 // // Variable length integers are used for rowids and to hold the number of // bytes of key and data in a btree cell. // // The content of a cell looks like this: // // SIZE DESCRIPTION // 4 Page number of the left child. Omitted if leaf flag is set. // var Number of bytes of data. Omitted if the zerodata flag is set. // var Number of bytes of key. Or the key itself if intkey flag is set. // * Payload // 4 First page of the overflow chain. Omitted if no overflow // // Overflow pages form a linked list. Each page except the last is completely // filled with data (pagesize - 4 bytes). The last page can have as little // as 1 byte of data. // // SIZE DESCRIPTION // 4 Page number of next overflow page // * Data // // Freelist pages come in two subtypes: trunk pages and leaf pages. The // file header points to the first in a linked list of trunk page. Each trunk // page points to multiple leaf pages. The content of a leaf page is // unspecified. A trunk page looks like this: // // SIZE DESCRIPTION // 4 Page number of next trunk page // 4 Number of leaf pointers on this page // * zero or more pages numbers of leaves // 2001 September 15 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // Internal interface definitions for SQLite. // // The following value is the maximum cell size assuming a maximum page // size give above. // The maximum number of cells on a single page of the database. This // assumes a minimum cell size of 6 bytes (4 bytes for the cell itself // plus 2 bytes for the index to the cell in the page header). Such // small cells will be rare, but they are possible. // Forward declarations type MemPage = MemPage1 /* btreeInt.h:232:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno FeLock u8 _ [3]byte FpNext uintptr } /* btree.h:39:9 */ type BtLock = BtLock1 /* btreeInt.h:233:23 */ type CellInfo1 = struct { FnKey i64 FpPayload uintptr FnPayload u32 FnLocal u16 FnSize u16 } /* btree.h:39:9 */ type CellInfo = CellInfo1 /* btreeInt.h:234:25 */ // Legal values for BtCursor.curFlags // Potential values for BtCursor.eState. // // CURSOR_INVALID: // Cursor does not point to a valid entry. This can happen (for example) // because the table is empty or because BtreeCursorFirst() has not been // called. // // CURSOR_VALID: // Cursor points to a valid entry. getPayload() etc. may be called. // // CURSOR_SKIPNEXT: // Cursor is valid except that the Cursor.skipNext field is non-zero // indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious() // operation should be a no-op. // // CURSOR_REQUIRESEEK: // The table that this cursor was opened on still exists, but has been // modified since the cursor was last used. The cursor position is saved // in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in // this state, restoreCursorPosition() can be called to attempt to // seek the cursor to the saved position. // // CURSOR_FAULT: // An unrecoverable error (an I/O error or a malloc failure) has occurred // on a different connection that shares the BtShared cache with this // cursor. The error has left the cache in an inconsistent state. // Do nothing else with this cursor. Any attempt to use the cursor // should return the error code stored in BtCursor.skipNext // The database page the PENDING_BYTE occupies. This page is never used. // These macros define the location of the pointer-map entry for a // database page. The first argument to each is the number of usable // bytes on each page of the database (often 1024). The second is the // page number to look up in the pointer map. // // PTRMAP_PAGENO returns the database page number of the pointer-map // page that stores the required pointer. PTRMAP_PTROFFSET returns // the offset of the requested map entry. // // If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page, // then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be // used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements // this test. // The pointer map is a lookup table that identifies the parent page for // each child page in the database file. The parent page is the page that // contains a pointer to the child. Every page in the database contains // 0 or 1 parent pages. (In this context 'database page' refers // to any page that is not part of the pointer map itself.) Each pointer map // entry consists of a single byte 'type' and a 4 byte parent page number. // The PTRMAP_XXX identifiers below are the valid types. // // The purpose of the pointer map is to facility moving pages from one // position in the file to another as part of autovacuum. When a page // is moved, the pointer in its parent must be updated to point to the // new location. The pointer map is used to locate the parent page quickly. // // PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not // used in this case. // // PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number // is not used in this case. // // PTRMAP_OVERFLOW1: The database page is the first page in a list of // overflow pages. The page number identifies the page that // contains the cell with a pointer to this overflow page. // // PTRMAP_OVERFLOW2: The database page is the second or later page in a list of // overflow pages. The page-number identifies the previous // page in the overflow page list. // // PTRMAP_BTREE: The database page is a non-root btree page. The page number // identifies the parent page in the btree. // A bunch of assert() statements to check the transaction state variables // of handle p (type Btree*) are internally consistent. // The ISAUTOVACUUM macro is used within balance_nonroot() to determine // if the database supports auto-vacuum or not. Because it is used // within an expression that is an argument to another macro // (sqliteMallocRaw), it is not possible to use conditional compilation. // So, this macro is defined instead. // This structure is passed around through all the sanity checking routines // in order to keep track of some global state information. // // The aRef[] array is allocated so that there is 1 bit for each page in // the database. As the integrity-check proceeds, for each page used in // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). type IntegrityCk1 = struct { FpBt uintptr FpPager uintptr FaPgRef uintptr FnPage Pgno FmxErr int32 FnErr int32 FbOomFault int32 FzPfx uintptr Fv1 Pgno Fv2 int32 FerrMsg StrAccum Fheap uintptr Fdb uintptr } /* btreeInt.h:692:9 */ // Legal values for BtCursor.curFlags // Potential values for BtCursor.eState. // // CURSOR_INVALID: // Cursor does not point to a valid entry. This can happen (for example) // because the table is empty or because BtreeCursorFirst() has not been // called. // // CURSOR_VALID: // Cursor points to a valid entry. getPayload() etc. may be called. // // CURSOR_SKIPNEXT: // Cursor is valid except that the Cursor.skipNext field is non-zero // indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious() // operation should be a no-op. // // CURSOR_REQUIRESEEK: // The table that this cursor was opened on still exists, but has been // modified since the cursor was last used. The cursor position is saved // in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in // this state, restoreCursorPosition() can be called to attempt to // seek the cursor to the saved position. // // CURSOR_FAULT: // An unrecoverable error (an I/O error or a malloc failure) has occurred // on a different connection that shares the BtShared cache with this // cursor. The error has left the cache in an inconsistent state. // Do nothing else with this cursor. Any attempt to use the cursor // should return the error code stored in BtCursor.skipNext // The database page the PENDING_BYTE occupies. This page is never used. // These macros define the location of the pointer-map entry for a // database page. The first argument to each is the number of usable // bytes on each page of the database (often 1024). The second is the // page number to look up in the pointer map. // // PTRMAP_PAGENO returns the database page number of the pointer-map // page that stores the required pointer. PTRMAP_PTROFFSET returns // the offset of the requested map entry. // // If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page, // then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be // used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements // this test. // The pointer map is a lookup table that identifies the parent page for // each child page in the database file. The parent page is the page that // contains a pointer to the child. Every page in the database contains // 0 or 1 parent pages. (In this context 'database page' refers // to any page that is not part of the pointer map itself.) Each pointer map // entry consists of a single byte 'type' and a 4 byte parent page number. // The PTRMAP_XXX identifiers below are the valid types. // // The purpose of the pointer map is to facility moving pages from one // position in the file to another as part of autovacuum. When a page // is moved, the pointer in its parent must be updated to point to the // new location. The pointer map is used to locate the parent page quickly. // // PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not // used in this case. // // PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number // is not used in this case. // // PTRMAP_OVERFLOW1: The database page is the first page in a list of // overflow pages. The page number identifies the page that // contains the cell with a pointer to this overflow page. // // PTRMAP_OVERFLOW2: The database page is the second or later page in a list of // overflow pages. The page-number identifies the previous // page in the overflow page list. // // PTRMAP_BTREE: The database page is a non-root btree page. The page number // identifies the parent page in the btree. // A bunch of assert() statements to check the transaction state variables // of handle p (type Btree*) are internally consistent. // The ISAUTOVACUUM macro is used within balance_nonroot() to determine // if the database supports auto-vacuum or not. Because it is used // within an expression that is an argument to another macro // (sqliteMallocRaw), it is not possible to use conditional compilation. // So, this macro is defined instead. // This structure is passed around through all the sanity checking routines // in order to keep track of some global state information. // // The aRef[] array is allocated so that there is 1 bit for each page in // the database. As the integrity-check proceeds, for each page used in // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). type IntegrityCk = IntegrityCk1 /* btreeInt.h:692:28 */ // A bogus sqlite3 connection structure for use in the btree // tests. var sDb sqlite31 /* test3.c:32:16: */ var nRefSqlite3 int32 = 0 /* test3.c:33:12 */ // Usage: btree_open FILENAME NCACHE // // Open a new database func btree_open(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:40:26: */ bp := tls.Alloc(220) defer tls.Free(220) // var pBt uintptr at bp+112, 8 var rc int32 // var nCache int32 at bp+104, 4 // var zBuf [100]int8 at bp+120, 100 var n int32 var zFilename uintptr if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24886 /* " FILENAME NCACHE..." */, 0)) return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+104 /* &nCache */) != 0 { return TCL_ERROR } nRefSqlite3++ if nRefSqlite3 == 1 { sDb.FpVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) sDb.Fmutex = sqlite3.Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_RECURSIVE) sqlite3.Xsqlite3_mutex_enter(tls, sDb.Fmutex) } n = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) zFilename = sqlite3.Xsqlite3_malloc(tls, (n + 2)) if zFilename == uintptr(0) { return TCL_ERROR } libc.Xmemcpy(tls, zFilename, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (uint64(n + 1))) *(*int8)(unsafe.Pointer(zFilename + uintptr((n + 1)))) = int8(0) rc = sqlite3.Xsqlite3BtreeOpen(tls, sDb.FpVfs, zFilename, uintptr(unsafe.Pointer(&sDb)), bp+112 /* &pBt */, 0, ((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_MAIN_DB)) sqlite3.Xsqlite3_free(tls, zFilename) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } sqlite3.Xsqlite3BtreeSetCacheSize(tls, *(*uintptr)(unsafe.Pointer(bp + 112 /* pBt */)), *(*int32)(unsafe.Pointer(bp + 104 /* nCache */))) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+120 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 112 /* pBt */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+120 /* &zBuf[0] */, 0)) return TCL_OK } // Usage: btree_close ID // // Close the given database. func btree_close(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:86:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pBt uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) rc = sqlite3.Xsqlite3BtreeClose(tls, pBt) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } nRefSqlite3-- if nRefSqlite3 == 0 { sqlite3.Xsqlite3_mutex_leave(tls, sDb.Fmutex) sqlite3.Xsqlite3_mutex_free(tls, sDb.Fmutex) sDb.Fmutex = uintptr(0) sDb.FpVfs = uintptr(0) } return TCL_OK } // Usage: btree_begin_transaction ID // // Start a new transaction func btree_begin_transaction(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:121:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pBt uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3BtreeEnter(tls, pBt) rc = sqlite3.Xsqlite3BtreeBeginTrans(tls, pBt, 1, uintptr(0)) sqlite3.Xsqlite3BtreeLeave(tls, pBt) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return TCL_OK } // Usage: btree_pager_stats ID // // Returns pager statistics func btree_pager_stats(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:150:26: */ bp := tls.Alloc(156) defer tls.Free(156) var pBt uintptr var i int32 var a uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) // Normally in this file, with a b-tree handle opened using the // [btree_open] command it is safe to call sqlite3BtreeEnter() directly. // But this function is sometimes called with a btree handle obtained // from an open SQLite connection (using [btree_from_db]). In this case // we need to obtain the mutex for the controlling SQLite handle before // it is safe to call sqlite3BtreeEnter(). sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) sqlite3.Xsqlite3BtreeEnter(tls, pBt) a = sqlite3.Xsqlite3PagerStats(tls, sqlite3.Xsqlite3BtreePager(tls, pBt)) for i = 0; i < 11; i++ { // var zBuf [100]int8 at bp+56, 100 tcl.XTcl_AppendElement(tls, interp, zName1[i]) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+56 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) tcl.XTcl_AppendElement(tls, interp, bp+56 /* &zBuf[0] */) } sqlite3.Xsqlite3BtreeLeave(tls, pBt) // Release the mutex on the SQLite handle that controls this b-tree sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) return TCL_OK } var zName1 = [11]uintptr{ ts + 24219 /* "ref" */, ts + 24223 /* "page" */, ts + 17947 /* "max" */, ts + 11493 /* "size" */, ts + 10195 /* "state" */, ts + 24228, /* "err" */ ts + 24232 /* "hit" */, ts + 24236 /* "miss" */, ts + 24241 /* "ovfl" */, ts + 24910 /* "read" */, ts + 24915, /* "write" */ } /* test3.c:179:17 */ // Usage: btree_cursor ID TABLENUM WRITEABLE // // Create a new cursor. Return the ID for the cursor. func btree_cursor(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:200:26: */ bp := tls.Alloc(142) defer tls.Free(142) var pBt uintptr // var iTable int32 at bp+104, 4 var pCur uintptr var rc int32 = SQLITE_OK // var wrFlag int32 at bp+108, 4 // var zBuf [30]int8 at bp+112, 30 if argc != 4 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24921 /* " ID TABLENUM WRI..." */, 0)) return TCL_ERROR } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+104 /* &iTable */) != 0 { return TCL_ERROR } if tcl.XTcl_GetBoolean(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 3*8)), bp+108 /* &wrFlag */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 108 /* wrFlag */)) != 0 { *(*int32)(unsafe.Pointer(bp + 108 /* wrFlag */)) = BTREE_WRCSR } pCur = tcl.XTcl_Alloc(tls, uint32(sqlite3.Xsqlite3BtreeCursorSize(tls))) libc.Xmemset(tls, pCur, 0, uint64(sqlite3.Xsqlite3BtreeCursorSize(tls))) sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) sqlite3.Xsqlite3BtreeEnter(tls, pBt) rc = sqlite3.Xsqlite3BtreeLockTable(tls, pBt, *(*int32)(unsafe.Pointer(bp + 104 /* iTable */)), libc.BoolUint8(!(!(*(*int32)(unsafe.Pointer(bp + 108 /* wrFlag */)) != 0)))) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3BtreeCursor(tls, pBt, uint32(*(*int32)(unsafe.Pointer(bp + 104 /* iTable */))), *(*int32)(unsafe.Pointer(bp + 108 /* wrFlag */)), uintptr(0), pCur) } sqlite3.Xsqlite3BtreeLeave(tls, pBt) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) if rc != 0 { tcl.XTcl_Free(tls, pCur) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+112 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+64, pCur)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+112 /* &zBuf[0] */, 0)) return SQLITE_OK } // Usage: btree_close_cursor ID // // Close a cursor opened using btree_cursor. func btree_close_cursor(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:249:26: */ bp := tls.Alloc(64) defer tls.Free(64) var pCur uintptr var rc int32 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) sqlite3.Xsqlite3BtreeEnter(tls, pBt) rc = sqlite3.Xsqlite3BtreeCloseCursor(tls, pCur) sqlite3.Xsqlite3BtreeLeave(tls, pBt) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) } tcl.XTcl_Free(tls, pCur) if rc != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } return SQLITE_OK } // Usage: btree_next ID // // Move the cursor to the next entry in the table. Return 0 on success // or 1 if the cursor was already on the last entry in the table or if // the table is empty. func btree_next(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:291:26: */ bp := tls.Alloc(204) defer tls.Free(204) var pCur uintptr var rc int32 var res int32 = 0 // var zBuf [100]int8 at bp+104, 100 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) rc = sqlite3.Xsqlite3BtreeNext(tls, pCur, 0) if rc == SQLITE_DONE { res = 1 rc = SQLITE_OK } sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) if rc != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+104 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+64, res)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+104 /* &zBuf[0] */, 0)) return SQLITE_OK } // Usage: btree_first ID // // Move the cursor to the first entry in the table. Return 0 if the // cursor was left point to something and 1 if the table is empty. func btree_first(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:330:26: */ bp := tls.Alloc(208) defer tls.Free(208) var pCur uintptr var rc int32 *(*int32)(unsafe.Pointer(bp + 104 /* res */)) = 0 // var zBuf [100]int8 at bp+108, 100 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) rc = sqlite3.Xsqlite3BtreeFirst(tls, pCur, bp+104 /* &res */) sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) if rc != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return TCL_ERROR } sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+108 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+64, *(*int32)(unsafe.Pointer(bp + 104 /* res */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+108 /* &zBuf[0] */, 0)) return SQLITE_OK } // Usage: btree_eof ID // // Return TRUE if the given cursor is not pointing at a valid entry. // Return FALSE if the cursor does point to a valid entry. func btree_eof(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:365:26: */ bp := tls.Alloc(130) defer tls.Free(130) var pCur uintptr var rc int32 // var zBuf [50]int8 at bp+80, 50 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) rc = sqlite3.Xsqlite3BtreeEof(tls, pCur) sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+80 /* &zBuf[0] */, ts+1238 /* "%d" */, libc.VaList(bp+40, rc)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+80 /* &zBuf[0] */, 0)) return SQLITE_OK } // Usage: btree_payload_size ID // // Return the number of bytes of payload func btree_payload_size(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:394:26: */ bp := tls.Alloc(130) defer tls.Free(130) var pCur uintptr var n u32 // var zBuf [50]int8 at bp+80, 50 if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) n = sqlite3.Xsqlite3BtreePayloadSize(tls, pCur) sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+80 /* &zBuf[0] */, ts+17441 /* "%u" */, libc.VaList(bp+40, n)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+80 /* &zBuf[0] */, 0)) return SQLITE_OK } // usage: varint_test START MULTIPLIER COUNT INCREMENT // // This command tests the putVarint() and getVarint() // routines, both for accuracy and for speed. // // An integer is written using putVarint() and read back with // getVarint() and varified to be unchanged. This repeats COUNT // times. The first integer is START*MULTIPLIER. Each iteration // increases the integer by INCREMENT. // // This command returns nothing if it works. It returns an error message // if something goes wrong. func btree_varint_test(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:432:26: */ bp := tls.Alloc(604) defer tls.Free(604) // var start u32 at bp+272, 4 // var mult u32 at bp+276, 4 // var count u32 at bp+280, 4 // var incr u32 at bp+284, 4 var in u64 // var out u64 at bp+592, 8 var n1 int32 var n2 int32 var i int32 var j int32 // var zBuf [100]uint8 at bp+288, 100 if argc != 5 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24945 /* " START MULTIPLIE..." */, 0)) return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+272 /* &start */) != 0 { return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+276 /* &mult */) != 0 { return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 3*8)), bp+280 /* &count */) != 0 { return TCL_ERROR } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 4*8)), bp+284 /* &incr */) != 0 { return TCL_ERROR } in = u64(*(*u32)(unsafe.Pointer(bp + 272 /* start */))) in = in * (u64(*(*u32)(unsafe.Pointer(bp + 276 /* mult */)))) for i = 0; i < int32(*(*u32)(unsafe.Pointer(bp + 280 /* count */))); i++ { // var zErr [200]int8 at bp+388, 200 n1 = sqlite3.Xsqlite3PutVarint(tls, bp+288 /* &zBuf[0] */, in) if (n1 > 9) || (n1 < 1) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+388, /* &zErr[0] */ ts+24980 /* "putVarint return..." */, libc.VaList(bp+40, n1)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+388 /* &zErr[0] */, 0)) return TCL_ERROR } n2 = int32(sqlite3.Xsqlite3GetVarint(tls, bp+288 /* &zBuf[0] */, bp+592 /* &out */)) if n1 != n2 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+388, /* &zErr[0] */ ts+25030 /* "putVarint return..." */, libc.VaList(bp+80, n1, n2)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+104, bp+388 /* &zErr[0] */, 0)) return TCL_ERROR } if in != *(*u64)(unsafe.Pointer(bp + 592 /* out */)) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+388, /* &zErr[0] */ ts+25078 /* "Wrote 0x%016llx ..." */, libc.VaList(bp+128, in, *(*u64)(unsafe.Pointer(bp + 592 /* out */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+152, bp+388 /* &zErr[0] */, 0)) return TCL_ERROR } if (in & uint64(0xffffffff)) == in { // var out32 u32 at bp+600, 4 n2 = int32(func() uint8 { if int32(*(*uint8)(unsafe.Pointer(bp + 288 /* zBuf */))) < int32(u8(0x80)) { return uint8(func() int32 { (*(*u32)(unsafe.Pointer(bp + 600 /* out32 */))) = u32(*(*uint8)(unsafe.Pointer(bp + 288 /* zBuf */))) return 1 }()) } return sqlite3.Xsqlite3GetVarint32(tls, bp+288 /* &zBuf[0] */, bp+600 /* &out32 */) }()) *(*u64)(unsafe.Pointer(bp + 592 /* out */)) = u64(*(*u32)(unsafe.Pointer(bp + 600 /* out32 */))) if n1 != n2 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+388, /* &zErr[0] */ ts+25117, /* "putVarint return..." */ libc.VaList(bp+176, n1, n2)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+200, bp+388 /* &zErr[0] */, 0)) return TCL_ERROR } if in != *(*u64)(unsafe.Pointer(bp + 592 /* out */)) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+388, /* &zErr[0] */ ts+25167, /* "Wrote 0x%016llx ..." */ libc.VaList(bp+224, in, *(*u64)(unsafe.Pointer(bp + 592 /* out */)))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+248, bp+388 /* &zErr[0] */, 0)) return TCL_ERROR } } // In order to get realistic timings, run getVarint 19 more times. // This is because getVarint is called about 20 times more often // than putVarint. for j = 0; j < 19; j++ { sqlite3.Xsqlite3GetVarint(tls, bp+288 /* &zBuf[0] */, bp+592 /* &out */) } in = in + (u64(*(*u32)(unsafe.Pointer(bp + 284 /* incr */)))) } return TCL_OK } // usage: btree_from_db DB-HANDLE // // This command returns the btree handle for the main database associated // with the database-handle passed as the argument. Example usage: // // sqlite3 db test.db // set bt [btree_from_db db] func btree_from_db(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:516:26: */ bp := tls.Alloc(260) defer tls.Free(260) // var zBuf [100]int8 at bp+160, 100 // var info Tcl_CmdInfo at bp+96, 64 var db uintptr var pBt uintptr var iDb int32 = 0 if (argc != 2) && (argc != 3) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+25223 /* " DB-HANDLE ?N?\"" */, 0)) return TCL_ERROR } if 1 != tcl.XTcl_GetCommandInfo(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 1*8)), bp+96 /* &info */) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+25239 /* "No such db-handl..." */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), ts+11636 /* "\"" */, 0)) return TCL_ERROR } if argc == 3 { iDb = libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) } db = *(*uintptr)(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 96 /* &info */)).FobjClientData)) pBt = (*Db)(unsafe.Pointer((*sqlite31)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+160 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp+80, pBt)) tcl.XTcl_SetResult(tls, interp, bp+160 /* &zBuf[0] */, uintptr(1)) return TCL_OK } // Usage: btree_ismemdb ID // // Return true if the B-Tree is currently stored entirely in memory. func btree_ismemdb(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:556:26: */ bp := tls.Alloc(40) defer tls.Free(40) var pBt uintptr var res int32 var pFile uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+24214 /* " ID\"" */, 0)) return TCL_ERROR } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) sqlite3.Xsqlite3BtreeEnter(tls, pBt) pFile = sqlite3.Xsqlite3PagerFile(tls, sqlite3.Xsqlite3BtreePager(tls, pBt)) res = (libc.Bool32((*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods == uintptr(0))) sqlite3.Xsqlite3BtreeLeave(tls, pBt) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (libc.Bool32((res) != 0)))) return SQLITE_OK } // usage: btree_set_cache_size ID NCACHE // // Set the size of the cache used by btree $ID. func btree_set_cache_size(tls *libc.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test3.c:587:26: */ bp := tls.Alloc(44) defer tls.Free(44) // var nCache int32 at bp+40, 4 var pBt uintptr if argc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+25260 /* " BT NCACHE\"" */, 0)) return TCL_ERROR } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+40 /* &nCache */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) sqlite3.Xsqlite3BtreeEnter(tls, pBt) sqlite3.Xsqlite3BtreeSetCacheSize(tls, pBt, *(*int32)(unsafe.Pointer(bp + 40 /* nCache */))) sqlite3.Xsqlite3BtreeLeave(tls, pBt) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBt)).Fdb)).Fmutex) return TCL_OK } // usage: btree_insert CSR ?KEY? VALUE // // Set the size of the cache used by btree $ID. func btree_insert(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test3.c:617:26: */ bp := tls.Alloc(76) defer tls.Free(76) var pCur uintptr // var rc int32 at bp+72, 4 // var x BtreePayload at bp+24, 48 if (objc != 4) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25272 /* "?-intkey? CSR KE..." */) return TCL_ERROR } libc.Xmemset(tls, bp+24 /* &x */, 0, uint64(unsafe.Sizeof(BtreePayload{}))) if objc == 4 { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+72 /* &rc */) != 0 { return TCL_ERROR } (*BtreePayload)(unsafe.Pointer(bp + 24 /* &x */)).FnKey = sqlite3_int64(*(*int32)(unsafe.Pointer(bp + 72 /* rc */))) (*BtreePayload)(unsafe.Pointer(bp + 24 /* &x */)).FpData = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), (bp + 24 /* &x */ + 36 /* &.nData */)) } else { (*BtreePayload)(unsafe.Pointer(bp + 24 /* &x */)).FpKey = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+72 /* &rc */) (*BtreePayload)(unsafe.Pointer(bp + 24 /* &x */)).FnKey = sqlite3_int64(*(*int32)(unsafe.Pointer(bp + 72 /* rc */))) } pCur = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).Fdb)).Fmutex) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = sqlite3.Xsqlite3BtreeInsert(tls, pCur, bp+24 /* &x */, 0, 0) sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer((*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).Fdb)).Fmutex) tcl.XTcl_ResetResult(tls, interp) if *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3ErrName(tls, *(*int32)(unsafe.Pointer(bp + 72 /* rc */))), 0)) return TCL_ERROR } return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest3_Init(tls *libc.TLS, interp uintptr) int32 { /* test3.c:661:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd3)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateCommand(tls, interp, aCmd3[i].FzName, aCmd3[i].FxProc, uintptr(0), uintptr(0)) } tcl.XTcl_CreateObjCommand(tls, interp, ts+25296 /* "btree_insert" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{btree_insert})), uintptr(0), uintptr(0)) return TCL_OK } var aCmd3 = [14]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 25309 /* "btree_open" */, FxProc: 0}, {FzName: ts + 25320 /* "btree_close" */, FxProc: 0}, {FzName: ts + 25332 /* "btree_begin_tran..." */, FxProc: 0}, {FzName: ts + 25356 /* "btree_pager_stat..." */, FxProc: 0}, {FzName: ts + 25374 /* "btree_cursor" */, FxProc: 0}, {FzName: ts + 25387 /* "btree_close_curs..." */, FxProc: 0}, {FzName: ts + 25406 /* "btree_next" */, FxProc: 0}, {FzName: ts + 25417 /* "btree_eof" */, FxProc: 0}, {FzName: ts + 25427 /* "btree_payload_si..." */, FxProc: 0}, {FzName: ts + 25446 /* "btree_first" */, FxProc: 0}, {FzName: ts + 25458 /* "btree_varint_tes..." */, FxProc: 0}, {FzName: ts + 25476 /* "btree_from_db" */, FxProc: 0}, {FzName: ts + 25490 /* "btree_ismemdb" */, FxProc: 0}, {FzName: ts + 25504 /* "btree_set_cache_..." */, FxProc: 0}, } /* test3.c:665:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: func Sqlitetest4_Init(tls *libc.TLS, interp uintptr) int32 { /* test4.c:725:5: */ return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // The first argument is a TCL UTF-8 string. Return the byte array // object with the encoded representation of the string, including // the NULL terminator. func binarize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:33:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var len int32 at bp, 4 var bytes uintptr var pRet uintptr bytes = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &len */) pRet = tcl.XTcl_NewByteArrayObj(tls, bytes, (*(*int32)(unsafe.Pointer(bp /* len */)) + 1)) tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } // Usage: test_value_overhead . // // This routine is used to test the overhead of calls to // sqlite3_value_text(), on a value that contains a UTF-8 string. The idea // is to figure out whether or not it is a problem to use sqlite3_value // structures with collation sequence functions. // // If is 0, then the calls to sqlite3_value_text() are not // actually made. func test_value_overhead(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:61:26: */ bp := tls.Alloc(104) defer tls.Free(104) // var do_calls int32 at bp+44, 4 // var repeat_count int32 at bp+40, 4 var i int32 // var val Mem at bp+48, 56 if objc != 3 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+25525 /* " ..." */, 0)) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+40 /* &repeat_count */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+44 /* &do_calls */) != 0 { return TCL_ERROR } (*Mem)(unsafe.Pointer(bp + 48 /* &val */)).Fflags = (u16((MEM_Str | MEM_Term) | MEM_Static)) (*Mem)(unsafe.Pointer(bp + 48 /* &val */)).Fz = ts + 25552 /* "hello world" */ (*Mem)(unsafe.Pointer(bp + 48 /* &val */)).Fenc = u8(SQLITE_UTF8) for i = 0; i < *(*int32)(unsafe.Pointer(bp + 40 /* repeat_count */)); i++ { if *(*int32)(unsafe.Pointer(bp + 44 /* do_calls */)) != 0 { sqlite3.Xsqlite3_value_text(tls, bp+48 /* &val */) } } return TCL_OK } func name_to_enc(tls *libc.TLS, interp uintptr, pObj uintptr) u8 { /* test5.c:94:11: */ bp := tls.Alloc(112) defer tls.Free(112) *(*[5]EncName)(unsafe.Pointer(bp + 32 /* encnames */)) = [5]EncName{ {FzName: ts + 25564 /* "UTF8" */, Fenc: u8(SQLITE_UTF8)}, {FzName: ts + 25569 /* "UTF16LE" */, Fenc: u8(SQLITE_UTF16LE)}, {FzName: ts + 25577 /* "UTF16BE" */, Fenc: u8(SQLITE_UTF16BE)}, {FzName: ts + 25585 /* "UTF16" */, Fenc: u8(SQLITE_UTF16)}, {}, } var pEnc uintptr var z uintptr = tcl.XTcl_GetString(tls, pObj) for pEnc = (bp + 32 /* &encnames */); (*EncName)(unsafe.Pointer(pEnc)).FzName != 0; pEnc += 16 { if 0 == sqlite3.Xsqlite3StrICmp(tls, z, (*EncName)(unsafe.Pointer(pEnc)).FzName) { break } } if !(int32((*EncName)(unsafe.Pointer(pEnc)).Fenc) != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+25591 /* "No such encoding..." */, z, 0)) } if int32((*EncName)(unsafe.Pointer(pEnc)).Fenc) == SQLITE_UTF16 { return u8(SQLITE_UTF16LE) } return (*EncName)(unsafe.Pointer(pEnc)).Fenc } type EncName = struct { FzName uintptr Fenc u8 _ [7]byte } /* test5.c:95:3 */ // Usage: test_translate ?? // func test_translate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:125:26: */ bp := tls.Alloc(60) defer tls.Free(60) var enc_from u8 var enc_to u8 var pVal uintptr var z uintptr // var len int32 at bp+56, 4 var xDel uintptr = uintptr(0) if (objc != 4) && (objc != 5) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0)), ts+25610 /* " <..." */, 0)) return TCL_ERROR } if objc == 5 { xDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free})) } enc_from = name_to_enc(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if !(enc_from != 0) { return TCL_ERROR } enc_to = name_to_enc(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if !(enc_to != 0) { return TCL_ERROR } pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) if int32(enc_from) == SQLITE_UTF8 { z = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if objc == 5 { z = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+40, z)) } sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, z, enc_from, xDel) } else { z = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56 /* &len */) if objc == 5 { var zTmp uintptr = z z = sqlite3.Xsqlite3_malloc(tls, *(*int32)(unsafe.Pointer(bp + 56 /* len */))) libc.Xmemcpy(tls, z, zTmp, uint64(*(*int32)(unsafe.Pointer(bp + 56 /* len */)))) } sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, z, enc_from, xDel) } z = sqlite3.Xsqlite3ValueText(tls, pVal, enc_to) *(*int32)(unsafe.Pointer(bp + 56 /* len */)) = (sqlite3.Xsqlite3ValueBytes(tls, pVal, enc_to) + (func() int32 { if int32(enc_to) == SQLITE_UTF8 { return 1 } return 2 }())) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, z, *(*int32)(unsafe.Pointer(bp + 56 /* len */)))) sqlite3.Xsqlite3ValueFree(tls, pVal) return TCL_OK } func test_translate_selftest(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ sqlite3.Xsqlite3UtfSelfTest(tls) return SQLITE_OK } // Register commands with the TCL interpreter. func Sqlitetest5_Init(tls *libc.TLS, interp uintptr) int32 { /* test5.c:205:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd4)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aCmd4[i].FzName, aCmd4[i].FxProc, uintptr(0), uintptr(0)) } return SQLITE_OK } var aCmd4 = [4]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 25645 /* "binarize" */, FxProc: 0}, {FzName: ts + 25654 /* "test_value_overh..." */, FxProc: 0}, {FzName: ts + 25674 /* "test_translate" */, FxProc: 0}, {FzName: ts + 25689 /* "translate_selfte..." */, FxProc: 0}, } /* test5.c:209:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // #define TRACE_CRASHTEST type CrashFile1 = struct { FpMethod uintptr FpRealFile uintptr FzName uintptr Fflags int32 _ [4]byte FzData uintptr FnData int32 _ [4]byte FiSize i64 } /* test6.c:29:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // #define TRACE_CRASHTEST type CrashFile = CrashFile1 /* test6.c:29:26 */ type CrashGlobal1 = struct { FpWriteList uintptr FpWriteListEnd uintptr FiSectorSize int32 FiDeviceCharacteristics int32 FiCrash int32 FzCrashFile [500]int8 } /* test6.c:30:9 */ type CrashGlobal = CrashGlobal1 /* test6.c:30:28 */ type WriteBuffer1 = struct { FiOffset i64 FnBuf int32 _ [4]byte FzBuf uintptr FpFile uintptr FpNext uintptr } /* test6.c:30:9 */ type WriteBuffer = WriteBuffer1 /* test6.c:31:28 */ var g = CrashGlobal{FiSectorSize: SQLITE_DEFAULT_SECTOR_SIZE} /* test6.c:156:20 */ // Set this global variable to 1 to enable crash testing. var sqlite3CrashTestEnable int32 = 0 /* test6.c:161:12 */ func crash_malloc(tls *libc.TLS, nByte int32) uintptr { /* test6.c:163:13: */ return tcl.XTcl_AttemptAlloc(tls, uint32(size_t(nByte))) } func crash_free(tls *libc.TLS, p uintptr) { /* test6.c:166:13: */ tcl.XTcl_Free(tls, p) } func crash_realloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test6.c:169:13: */ return tcl.XTcl_AttemptRealloc(tls, p, uint32(size_t(n))) } // Wrapper around the sqlite3OsWrite() function that avoids writing to the // 512 byte block begining at offset PENDING_BYTE. func writeDbFile(tls *libc.TLS, p uintptr, z uintptr, iAmt i64, iOff i64) int32 { /* test6.c:177:12: */ var rc int32 = SQLITE_OK var iSkip int32 = 0 if (iAmt - i64(iSkip)) > int64(0) { rc = sqlite3.Xsqlite3OsWrite(tls, (*CrashFile)(unsafe.Pointer(p)).FpRealFile, (z + uintptr(iSkip)), (int32(iAmt - i64(iSkip))), (iOff + i64(iSkip))) } return rc } // Flush the write-list as if xSync() had been called on file handle // pFile. If isCrash is true, simulate a crash. func writeListSync(tls *libc.TLS, pFile uintptr, isCrash int32) int32 { /* test6.c:190:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK var iDc int32 = g.FiDeviceCharacteristics var pWrite uintptr var ppPtr uintptr // If this is not a crash simulation, set pFinal to point to the // last element of the write-list that is associated with file handle // pFile. // // If this is a crash simulation, set pFinal to an arbitrarily selected // element of the write-list. var pFinal uintptr = uintptr(0) if !(isCrash != 0) { for pWrite = g.FpWriteList; pWrite != 0; pWrite = (*WriteBuffer)(unsafe.Pointer(pWrite)).FpNext { if (*WriteBuffer)(unsafe.Pointer(pWrite)).FpFile == pFile { pFinal = pWrite } } } else if (iDc & (SQLITE_IOCAP_SEQUENTIAL | SQLITE_IOCAP_SAFE_APPEND)) != 0 { var nWrite int32 = 0 // var iFinal int32 at bp, 4 for pWrite = g.FpWriteList; pWrite != 0; pWrite = (*WriteBuffer)(unsafe.Pointer(pWrite)).FpNext { nWrite++ } sqlite3.Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp /* &iFinal */) *(*int32)(unsafe.Pointer(bp /* iFinal */)) = ((func() int32 { if *(*int32)(unsafe.Pointer(bp /* iFinal */)) < 0 { return (-1 * *(*int32)(unsafe.Pointer(bp /* iFinal */))) } return *(*int32)(unsafe.Pointer(bp /* iFinal */)) }()) % nWrite) for pWrite = g.FpWriteList; *(*int32)(unsafe.Pointer(bp /* iFinal */)) > 0; pWrite = (*WriteBuffer)(unsafe.Pointer(pWrite)).FpNext { *(*int32)(unsafe.Pointer(bp /* iFinal */))-- } pFinal = pWrite } ppPtr = (uintptr(unsafe.Pointer(&g)) /* &.pWriteList */) for pWrite = *(*uintptr)(unsafe.Pointer(ppPtr)); (rc == SQLITE_OK) && (pWrite != 0); pWrite = *(*uintptr)(unsafe.Pointer(ppPtr)) { var pRealFile uintptr = (*CrashFile)(unsafe.Pointer((*WriteBuffer)(unsafe.Pointer(pWrite)).FpFile)).FpRealFile // (eAction==1) -> write block out normally, // (eAction==2) -> do nothing, // (eAction==3) -> trash sectors. var eAction int32 = 0 if !(isCrash != 0) { eAction = 2 if ((*WriteBuffer)(unsafe.Pointer(pWrite)).FpFile == pFile) || ((iDc & SQLITE_IOCAP_SEQUENTIAL) != 0) { eAction = 1 } } else { // var random int8 at bp+4, 1 sqlite3.Xsqlite3_randomness(tls, 1, bp+4 /* &random */) // Do not select option 3 (sector trashing) if the IOCAP_ATOMIC flag // is set or this is an OsTruncate(), not an Oswrite(). if ((iDc & SQLITE_IOCAP_ATOMIC) != 0) || ((*WriteBuffer)(unsafe.Pointer(pWrite)).FzBuf == uintptr(0)) { *(*int8)(unsafe.Pointer(bp + 4 /* random */)) &= int8(0x01) } // If IOCAP_SEQUENTIAL is set and this is not the final entry // in the truncated write-list, always select option 1 (write // out correctly). if ((iDc & SQLITE_IOCAP_SEQUENTIAL) != 0) && (pWrite != pFinal) { *(*int8)(unsafe.Pointer(bp + 4 /* random */)) = int8(0) } // If IOCAP_SAFE_APPEND is set and this OsWrite() operation is // an append (first byte of the written region is 1 byte past the // current EOF), always select option 1 (write out correctly). if ((iDc & SQLITE_IOCAP_SAFE_APPEND) != 0) && ((*WriteBuffer)(unsafe.Pointer(pWrite)).FzBuf != 0) { // var iSize i64 at bp+8, 8 sqlite3.Xsqlite3OsFileSize(tls, pRealFile, bp+8 /* &iSize */) if *(*i64)(unsafe.Pointer(bp + 8 /* iSize */)) == (*WriteBuffer)(unsafe.Pointer(pWrite)).FiOffset { *(*int8)(unsafe.Pointer(bp + 4 /* random */)) = int8(0) } } if (int32(*(*int8)(unsafe.Pointer(bp + 4 /* random */))) & 0x06) == 0x06 { eAction = 3 } else { eAction = func() int32 { if (int32(*(*int8)(unsafe.Pointer(bp + 4 /* random */))) & 0x01) != 0 { return 2 } return 1 }() } } switch eAction { case 1: { // Write out correctly if (*WriteBuffer)(unsafe.Pointer(pWrite)).FzBuf != 0 { rc = writeDbFile(tls, (*WriteBuffer)(unsafe.Pointer(pWrite)).FpFile, (*WriteBuffer)(unsafe.Pointer(pWrite)).FzBuf, int64((*WriteBuffer)(unsafe.Pointer(pWrite)).FnBuf), (*WriteBuffer)(unsafe.Pointer(pWrite)).FiOffset) } else { rc = sqlite3.Xsqlite3OsTruncate(tls, pRealFile, (*WriteBuffer)(unsafe.Pointer(pWrite)).FiOffset) } *(*uintptr)(unsafe.Pointer(ppPtr)) = (*WriteBuffer)(unsafe.Pointer(pWrite)).FpNext crash_free(tls, pWrite) break } case 2: { // Do nothing ppPtr = (pWrite + 32 /* &.pNext */) break } case 3: { // Trash sectors var zGarbage uintptr var iFirst int32 = (int32((*WriteBuffer)(unsafe.Pointer(pWrite)).FiOffset / i64(g.FiSectorSize))) var iLast int32 = (int32((((*WriteBuffer)(unsafe.Pointer(pWrite)).FiOffset + i64((*WriteBuffer)(unsafe.Pointer(pWrite)).FnBuf)) - int64(1)) / i64(g.FiSectorSize))) zGarbage = crash_malloc(tls, g.FiSectorSize) if zGarbage != 0 { var i sqlite3_int64 for i = sqlite3_int64(iFirst); (rc == SQLITE_OK) && (i <= sqlite3_int64(iLast)); i++ { sqlite3.Xsqlite3_randomness(tls, g.FiSectorSize, zGarbage) rc = writeDbFile(tls, (*WriteBuffer)(unsafe.Pointer(pWrite)).FpFile, zGarbage, int64(g.FiSectorSize), (i * sqlite3_int64(g.FiSectorSize))) } crash_free(tls, zGarbage) } else { rc = SQLITE_NOMEM } ppPtr = (pWrite + 32 /* &.pNext */) break } default: } if pWrite == pFinal { break } } if (rc == SQLITE_OK) && (isCrash != 0) { libc.Xexit(tls, -1) } for pWrite = g.FpWriteList; (pWrite != 0) && ((*WriteBuffer)(unsafe.Pointer(pWrite)).FpNext != 0); pWrite = (*WriteBuffer)(unsafe.Pointer(pWrite)).FpNext { } g.FpWriteListEnd = pWrite return rc } // Add an entry to the end of the write-list. func writeListAppend(tls *libc.TLS, pFile uintptr, iOffset sqlite3_int64, zBuf uintptr, nBuf int32) int32 { /* test6.c:362:12: */ var pNew uintptr pNew = crash_malloc(tls, (int32(uint64(unsafe.Sizeof(WriteBuffer{})) + uint64(nBuf)))) if pNew == uintptr(0) { libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)), ts+25708 /* "out of memory in..." */, 0) } libc.Xmemset(tls, pNew, 0, (uint64(unsafe.Sizeof(WriteBuffer{})) + uint64(nBuf))) (*WriteBuffer)(unsafe.Pointer(pNew)).FiOffset = iOffset (*WriteBuffer)(unsafe.Pointer(pNew)).FnBuf = nBuf (*WriteBuffer)(unsafe.Pointer(pNew)).FpFile = pFile if zBuf != 0 { (*WriteBuffer)(unsafe.Pointer(pNew)).FzBuf = (pNew + 1*40) libc.Xmemcpy(tls, (*WriteBuffer)(unsafe.Pointer(pNew)).FzBuf, zBuf, uint64(nBuf)) } if g.FpWriteList != 0 { (*WriteBuffer)(unsafe.Pointer(g.FpWriteListEnd)).FpNext = pNew } else { g.FpWriteList = pNew } g.FpWriteListEnd = pNew return SQLITE_OK } // Close a crash-file. func cfClose(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:399:12: */ var pCrash uintptr = pFile writeListSync(tls, pCrash, 0) sqlite3.Xsqlite3OsClose(tls, (*CrashFile)(unsafe.Pointer(pCrash)).FpRealFile) return SQLITE_OK } // Read data from a crash-file. func cfRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test6.c:409:12: */ var pCrash uintptr = pFile var nCopy int32 = func() int32 { if (i64(iAmt)) < ((*CrashFile)(unsafe.Pointer(pCrash)).FiSize - iOfst) { return int32(i64(iAmt)) } return (int32((*CrashFile)(unsafe.Pointer(pCrash)).FiSize - iOfst)) }() if nCopy > 0 { libc.Xmemcpy(tls, zBuf, ((*CrashFile)(unsafe.Pointer(pCrash)).FzData + uintptr(iOfst)), uint64(nCopy)) } // Check the file-size to see if this is a short-read if nCopy < iAmt { return (SQLITE_IOERR | (int32(2) << 8)) } return SQLITE_OK } // Write data to a crash-file. func cfWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test6.c:433:12: */ var pCrash uintptr = pFile if (sqlite_int64(iAmt) + iOfst) > (*CrashFile)(unsafe.Pointer(pCrash)).FiSize { (*CrashFile)(unsafe.Pointer(pCrash)).FiSize = i64((int32(sqlite_int64(iAmt) + iOfst))) } for (*CrashFile)(unsafe.Pointer(pCrash)).FiSize > i64((*CrashFile)(unsafe.Pointer(pCrash)).FnData) { var zNew uintptr var nNew int32 = (((*CrashFile)(unsafe.Pointer(pCrash)).FnData * 2) + 4096) zNew = crash_realloc(tls, (*CrashFile)(unsafe.Pointer(pCrash)).FzData, nNew) if !(zNew != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, (zNew + uintptr((*CrashFile)(unsafe.Pointer(pCrash)).FnData)), 0, (uint64(nNew - (*CrashFile)(unsafe.Pointer(pCrash)).FnData))) (*CrashFile)(unsafe.Pointer(pCrash)).FnData = nNew (*CrashFile)(unsafe.Pointer(pCrash)).FzData = zNew } libc.Xmemcpy(tls, ((*CrashFile)(unsafe.Pointer(pCrash)).FzData + uintptr(iOfst)), zBuf, uint64(iAmt)) return writeListAppend(tls, pFile, iOfst, zBuf, iAmt) } // Truncate a crash-file. func cfTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test6.c:461:12: */ var pCrash uintptr = pFile if (*CrashFile)(unsafe.Pointer(pCrash)).FiSize > size { (*CrashFile)(unsafe.Pointer(pCrash)).FiSize = i64(int32(size)) } return writeListAppend(tls, pFile, size, uintptr(0), 0) } // Sync a crash-file. func cfSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test6.c:473:12: */ var pCrash uintptr = pFile var isCrash int32 = 0 var zName uintptr = (*CrashFile)(unsafe.Pointer(pCrash)).FzName var zCrashFile uintptr = uintptr(unsafe.Pointer(&g)) + 28 /* &.zCrashFile */ var nName int32 = int32(libc.Xstrlen(tls, zName)) var nCrashFile int32 = int32(libc.Xstrlen(tls, zCrashFile)) if (nCrashFile > 0) && (int32(*(*int8)(unsafe.Pointer(zCrashFile + uintptr((nCrashFile - 1))))) == '*') { nCrashFile-- if nName > nCrashFile { nName = nCrashFile } } if (nName == nCrashFile) && (0 == libc.Xmemcmp(tls, zName, zCrashFile, uint64(nName))) { if (libc.PreDecInt32(&g.FiCrash, 1)) == 0 { isCrash = 1 } } return writeListSync(tls, pCrash, isCrash) } // Return the current file-size of the crash-file. func cfFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test6.c:505:12: */ var pCrash uintptr = pFile *(*sqlite_int64)(unsafe.Pointer(pSize)) = (*CrashFile)(unsafe.Pointer(pCrash)).FiSize return SQLITE_OK } // Calls related to file-locks are passed on to the real file handle. func cfLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:514:12: */ return sqlite3.Xsqlite3OsLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } func cfUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test6.c:517:12: */ return sqlite3.Xsqlite3OsUnlock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, eLock) } func cfCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test6.c:520:12: */ return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, pResOut) } func cfFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test6.c:523:12: */ if op == SQLITE_FCNTL_SIZE_HINT { var pCrash uintptr = pFile var nByte i64 = *(*i64)(unsafe.Pointer(pArg)) if nByte > (*CrashFile)(unsafe.Pointer(pCrash)).FiSize { if SQLITE_OK == writeListAppend(tls, pFile, nByte, uintptr(0), 0) { (*CrashFile)(unsafe.Pointer(pCrash)).FiSize = i64(int32(nByte)) } } return SQLITE_OK } return sqlite3.Xsqlite3OsFileControl(tls, (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile, op, pArg) } // The xSectorSize() and xDeviceCharacteristics() functions return // the global values configured by the [sqlite_crashparams] tcl // interface. func cfSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:542:12: */ return g.FiSectorSize } func cfDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test6.c:545:12: */ return g.FiDeviceCharacteristics } // Pass-throughs for WAL support. func cfShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test6.c:552:12: */ var pReal uintptr = (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 112 /* &.xShmLock */))))(tls, pReal, ofst, n, flags) } func cfShmBarrier(tls *libc.TLS, pFile uintptr) { /* test6.c:556:13: */ var pReal uintptr = (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 120 /* &.xShmBarrier */))))(tls, pReal) } func cfShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test6.c:560:12: */ var pReal uintptr = (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, pReal, delFlag) } func cfShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, sz int32, w int32, pp uintptr) int32 { /* test6.c:564:12: */ var pReal uintptr = (*CrashFile)(unsafe.Pointer(pFile)).FpRealFile return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 104 /* &.xShmMap */))))(tls, pReal, iRegion, sz, w, libc.AtomicLoadUintptr(&pp)) } var CrashFileVtab = sqlite3_io_methods{ FiVersion: 2, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap } /* test6.c:575:33 */ // Application data for the crash VFS type crashAppData = struct{ FpOrig uintptr } /* test6.c:598:1 */ // Open a crash-file file handle. // // The caller will have allocated pVfs->szOsFile bytes of space // at pFile. This file uses this space for the CrashFile structure // and allocates space for the "real" file structure using // sqlite3_malloc(). The assumption here is (pVfs->szOsFile) is // equal or greater than sizeof(CrashFile). func cfOpen(tls *libc.TLS, pCfVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test6.c:611:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData var rc int32 var pWrapper uintptr = pFile var pReal uintptr = (pWrapper + 1*56) libc.Xmemset(tls, pWrapper, 0, uint64(unsafe.Sizeof(CrashFile{}))) rc = sqlite3.Xsqlite3OsOpen(tls, pVfs, zName, pReal, flags, pOutFlags) if rc == SQLITE_OK { // var iSize i64 at bp, 8 (*CrashFile)(unsafe.Pointer(pWrapper)).FpMethod = uintptr(unsafe.Pointer(&CrashFileVtab)) (*CrashFile)(unsafe.Pointer(pWrapper)).FzName = zName (*CrashFile)(unsafe.Pointer(pWrapper)).FpRealFile = pReal rc = sqlite3.Xsqlite3OsFileSize(tls, pReal, bp /* &iSize */) (*CrashFile)(unsafe.Pointer(pWrapper)).FiSize = i64(int32(*(*i64)(unsafe.Pointer(bp /* iSize */)))) (*CrashFile)(unsafe.Pointer(pWrapper)).Fflags = flags } if rc == SQLITE_OK { (*CrashFile)(unsafe.Pointer(pWrapper)).FnData = (int32(int64(4096) + (*CrashFile)(unsafe.Pointer(pWrapper)).FiSize)) (*CrashFile)(unsafe.Pointer(pWrapper)).FzData = crash_malloc(tls, (*CrashFile)(unsafe.Pointer(pWrapper)).FnData) if (*CrashFile)(unsafe.Pointer(pWrapper)).FzData != 0 { // os_unix.c contains an assert() that fails if the caller attempts // to read data from the 512-byte locking region of a file opened // with the SQLITE_OPEN_MAIN_DB flag. This region of a database file // never contains valid data anyhow. So avoid doing such a read here. // // UPDATE: It also contains an assert() verifying that each call // to the xRead() method reads less than 128KB of data. var iOff i64 libc.Xmemset(tls, (*CrashFile)(unsafe.Pointer(pWrapper)).FzData, 0, uint64((*CrashFile)(unsafe.Pointer(pWrapper)).FnData)) for iOff = int64(0); iOff < (*CrashFile)(unsafe.Pointer(pWrapper)).FiSize; iOff = iOff + (int64(512)) { var nRead int32 = (int32((*CrashFile)(unsafe.Pointer(pWrapper)).FiSize - iOff)) if nRead > 512 { nRead = 512 } rc = sqlite3.Xsqlite3OsRead(tls, pReal, ((*CrashFile)(unsafe.Pointer(pWrapper)).FzData + uintptr(iOff)), nRead, iOff) } } else { rc = SQLITE_NOMEM } } if (rc != SQLITE_OK) && ((*CrashFile)(unsafe.Pointer(pWrapper)).FpMethod != 0) { sqlite3.Xsqlite3OsClose(tls, pFile) } return rc } func cfDelete(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test6.c:665:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync) } func cfAccess(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test6.c:669:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut) } func cfFullPathname(tls *libc.TLS, pCfVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test6.c:678:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut) } func cfDlOpen(tls *libc.TLS, pCfVfs uintptr, zPath uintptr) uintptr { /* test6.c:687:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath) } func cfDlError(tls *libc.TLS, pCfVfs uintptr, nByte int32, zErrMsg uintptr) { /* test6.c:691:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zErrMsg) } func cfDlSym(tls *libc.TLS, pCfVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test6.c:695:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pH, zSym) } func cfDlClose(tls *libc.TLS, pCfVfs uintptr, pHandle uintptr) { /* test6.c:699:13: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle) } func cfRandomness(tls *libc.TLS, pCfVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test6.c:703:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 104 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut) } func cfSleep(tls *libc.TLS, pCfVfs uintptr, nMicro int32) int32 { /* test6.c:707:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro) } func cfCurrentTime(tls *libc.TLS, pCfVfs uintptr, pTimeOut uintptr) int32 { /* test6.c:711:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, pTimeOut) } func cfGetLastError(tls *libc.TLS, pCfVfs uintptr, n int32, z uintptr) int32 { /* test6.c:715:12: */ var pVfs uintptr = (*sqlite3_vfs)(unsafe.Pointer(pCfVfs)).FpAppData return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, n, z) } func processDevSymArgs(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, piDeviceChar uintptr, piSectorSize uintptr) int32 { /* test6.c:720:12: */ bp := tls.Alloc(332) defer tls.Free(332) *(*[14]DeviceFlag)(unsafe.Pointer(bp + 104 /* aFlag */)) = [14]DeviceFlag{ {FzName: ts + 25746 /* "atomic" */, FiValue: SQLITE_IOCAP_ATOMIC}, {FzName: ts + 25753 /* "atomic512" */, FiValue: SQLITE_IOCAP_ATOMIC512}, {FzName: ts + 25763 /* "atomic1k" */, FiValue: SQLITE_IOCAP_ATOMIC1K}, {FzName: ts + 25772 /* "atomic2k" */, FiValue: SQLITE_IOCAP_ATOMIC2K}, {FzName: ts + 25781 /* "atomic4k" */, FiValue: SQLITE_IOCAP_ATOMIC4K}, {FzName: ts + 25790 /* "atomic8k" */, FiValue: SQLITE_IOCAP_ATOMIC8K}, {FzName: ts + 25799 /* "atomic16k" */, FiValue: SQLITE_IOCAP_ATOMIC16K}, {FzName: ts + 25809 /* "atomic32k" */, FiValue: SQLITE_IOCAP_ATOMIC32K}, {FzName: ts + 25819 /* "atomic64k" */, FiValue: SQLITE_IOCAP_ATOMIC64K}, {FzName: ts + 25829 /* "sequential" */, FiValue: SQLITE_IOCAP_SEQUENTIAL}, {FzName: ts + 25840 /* "safe_append" */, FiValue: SQLITE_IOCAP_SAFE_APPEND}, {FzName: ts + 25852 /* "powersafe_overwr..." */, FiValue: SQLITE_IOCAP_POWERSAFE_OVERWRITE}, {FzName: ts + 25872 /* "batch-atomic" */, FiValue: SQLITE_IOCAP_BATCH_ATOMIC}, {}, } var i int32 var iDc int32 = 0 *(*int32)(unsafe.Pointer(bp + 84 /* iSectorSize */)) = 0 var setSectorsize int32 = 0 var setDeviceChar int32 = 0 for i = 0; i < objc; i = i + (2) { // var nOpt int32 at bp+80, 4 var zOpt uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+80 /* &nOpt */) if (((*(*int32)(unsafe.Pointer(bp + 80 /* nOpt */)) > 11) || (*(*int32)(unsafe.Pointer(bp + 80 /* nOpt */)) < 2)) || (libc.Xstrncmp(tls, ts+25885 /* "-sectorsize" */, zOpt, uint64(*(*int32)(unsafe.Pointer(bp + 80 /* nOpt */)))) != 0)) && (((*(*int32)(unsafe.Pointer(bp + 80 /* nOpt */)) > 16) || (*(*int32)(unsafe.Pointer(bp + 80 /* nOpt */)) < 2)) || (libc.Xstrncmp(tls, ts+25897 /* "-characteristics" */, zOpt, uint64(*(*int32)(unsafe.Pointer(bp + 80 /* nOpt */)))) != 0)) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+25914 /* "Bad option: \"" */, zOpt, ts+25928 /* "\" - must be \"-ch..." */, 0)) return TCL_ERROR } if i == (objc - 1) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+25976 /* "Option requires ..." */, zOpt, ts+11636 /* "\"" */, 0)) return TCL_ERROR } if int32(*(*int8)(unsafe.Pointer(zOpt + 1))) == 's' { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+84 /* &iSectorSize */) != 0 { return TCL_ERROR } setSectorsize = 1 } else { var j int32 // var apObj uintptr at bp+96, 8 // var nObj int32 at bp+88, 4 if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+88 /* &nObj */, bp+96 /* &apObj */) != 0 { return TCL_ERROR } for j = 0; j < *(*int32)(unsafe.Pointer(bp + 88 /* nObj */)); j++ { var rc int32 // var iChoice int32 at bp+328, 4 var pFlag uintptr = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* apObj */)) + uintptr(j)*8))) (*Tcl_Obj)(unsafe.Pointer(pFlag)).FrefCount++ tcl.XTcl_UtfToLower(tls, tcl.XTcl_GetString(tls, pFlag)) rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, pFlag, bp+104 /* &aFlag[0] */, int32(unsafe.Sizeof(DeviceFlag{})), ts+26007 /* "no such flag" */, 0, bp+328 /* &iChoice */) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pFlag if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if rc != 0 { return TCL_ERROR } iDc = iDc | ((*DeviceFlag)(unsafe.Pointer(bp + 104 /* &aFlag */ + uintptr(*(*int32)(unsafe.Pointer(bp + 328 /* iChoice */)))*16)).FiValue) } setDeviceChar = 1 } } if setDeviceChar != 0 { *(*int32)(unsafe.Pointer(piDeviceChar)) = iDc } if setSectorsize != 0 { *(*int32)(unsafe.Pointer(piSectorSize)) = *(*int32)(unsafe.Pointer(bp + 84 /* iSectorSize */)) } return TCL_OK } type DeviceFlag = struct { FzName uintptr FiValue int32 _ [4]byte } /* test6.c:727:3 */ // tclcmd: sqlite3_crash_now // // Simulate a crash immediately. This function does not return // (writeListSync() calls exit(-1)). func crashNowCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:820:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } writeListSync(tls, uintptr(0), 1) return TCL_OK } // tclcmd: sqlite_crash_enable ENABLE ?DEFAULT? // // Parameter ENABLE must be a boolean value. If true, then the "crash" // vfs is added to the system. If false, it is removed. func crashEnableCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:841:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var isEnable int32 at bp, 4 *(*int32)(unsafe.Pointer(bp + 4 /* isDefault */)) = 0 if (objc != 2) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26020 /* "ENABLE ?DEFAULT?" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &isEnable */) != 0 { return TCL_ERROR } if (objc == 3) && (tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4 /* &isDefault */) != 0) { return TCL_ERROR } if ((*(*int32)(unsafe.Pointer(bp /* isEnable */)) != 0) && (crashVfs.FpAppData != 0)) || (!(*(*int32)(unsafe.Pointer(bp /* isEnable */)) != 0) && !(int32(crashVfs.FpAppData) != 0)) { return TCL_OK } if crashVfs.FpAppData == uintptr(0) { var pOriginalVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) crashVfs.FmxPathname = (*sqlite3_vfs)(unsafe.Pointer(pOriginalVfs)).FmxPathname crashVfs.FpAppData = pOriginalVfs crashVfs.FszOsFile = (int32(uint64(unsafe.Sizeof(CrashFile{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pOriginalVfs)).FszOsFile))) sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&crashVfs)), *(*int32)(unsafe.Pointer(bp + 4 /* isDefault */))) } else { crashVfs.FpAppData = uintptr(0) sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(unsafe.Pointer(&crashVfs))) } return TCL_OK } var crashVfs = sqlite3_vfs{ FiVersion: 2, // pNext FzName: ts + 26037, /* "crash" */ // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // xCurrentTimeInt64 } /* test6.c:849:22 */ // tclcmd: sqlite_crashparams ?OPTIONS? DELAY CRASHFILE // // This procedure implements a TCL command that enables crash testing // in testfixture. Once enabled, crash testing cannot be disabled. // // Available options are "-characteristics" and "-sectorsize". Both require // an argument. For -sectorsize, this is the simulated sector size in // bytes. For -characteristics, the argument must be a list of io-capability // flags to simulate. Valid flags are "atomic", "atomic512", "atomic1K", // "atomic2K", "atomic4K", "atomic8K", "atomic16K", "atomic32K", // "atomic64K", "sequential" and "safe_append". // // Example: // // sqlite_crashparams -sect 1024 -char {atomic sequential} ./test.db 1 // func crashParamsObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:920:26: */ bp := tls.Alloc(56) defer tls.Free(56) // var iDelay int32 at bp+44, 4 var zCrashFile uintptr // var nCrashFile int32 at bp+40, 4 // var iDc int32 at bp+48, 4 // var iSectorSize int32 at bp+52, 4 *(*int32)(unsafe.Pointer(bp + 48 /* iDc */)) = -1 *(*int32)(unsafe.Pointer(bp + 52 /* iSectorSize */)) = -1 if !(objc < 3) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26043 /* "?OPTIONS? DELAY ..." */) goto error __1: ; zCrashFile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)), bp+40 /* &nCrashFile */) if !(uint64(*(*int32)(unsafe.Pointer(bp + 40 /* nCrashFile */))) >= uint64(unsafe.Sizeof([500]int8{}))) { goto __2 } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+26069 /* "Filename is too ..." */, zCrashFile, ts+11636 /* "\"" */, 0)) goto error __2: ; if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8)), bp+44 /* &iDelay */) != 0) { goto __3 } goto error __3: ; if !(processDevSymArgs(tls, interp, (objc-3), (objv+1*8), bp+48 /* &iDc */, bp+52 /* &iSectorSize */) != 0) { goto __4 } return TCL_ERROR __4: ; if !(*(*int32)(unsafe.Pointer(bp + 48 /* iDc */)) >= 0) { goto __5 } g.FiDeviceCharacteristics = *(*int32)(unsafe.Pointer(bp + 48 /* iDc */)) __5: ; if !(*(*int32)(unsafe.Pointer(bp + 52 /* iSectorSize */)) >= 0) { goto __6 } g.FiSectorSize = *(*int32)(unsafe.Pointer(bp + 52 /* iSectorSize */)) __6: ; g.FiCrash = *(*int32)(unsafe.Pointer(bp + 44 /* iDelay */)) libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&g))+28 /* &.zCrashFile */, zCrashFile, (uint64(*(*int32)(unsafe.Pointer(bp + 40 /* nCrashFile */)) + 1))) sqlite3CrashTestEnable = 1 return TCL_OK error: return TCL_ERROR } func devSymObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:967:26: */ bp := tls.Alloc(8) defer tls.Free(8) *(*int32)(unsafe.Pointer(bp /* iDc */)) = -1 *(*int32)(unsafe.Pointer(bp + 4 /* iSectorSize */)) = -1 if processDevSymArgs(tls, interp, (objc-1), (objv+1*8), bp /* &iDc */, bp+4 /* &iSectorSize */) != 0 { return TCL_ERROR } devsym_register(tls, *(*int32)(unsafe.Pointer(bp /* iDc */)), *(*int32)(unsafe.Pointer(bp + 4 /* iSectorSize */))) return TCL_OK } // tclcmd: sqlite3_crash_on_write N func writeCrashObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:989:26: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* nWrite */)) = 0 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26093 /* "NWRITE" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &nWrite */) != 0 { return TCL_ERROR } devsym_crash_on_write(tls, *(*int32)(unsafe.Pointer(bp /* nWrite */))) return TCL_OK } // tclcmd: unregister_devsim func dsUnregisterObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:1013:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } devsym_unregister(tls) return TCL_OK } // tclcmd: register_jt_vfs ?-default? PARENT-VFS func jtObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:1033:26: */ bp := tls.Alloc(64) defer tls.Free(64) var zParent uintptr = uintptr(0) if (objc != 2) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26100 /* "?-default? PAREN..." */) return TCL_ERROR } zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if objc == 3 { if libc.Xstrcmp(tls, zParent, ts+26122 /* "-default" */) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+11535 /* "bad option \"" */, zParent, ts+26131 /* "\": must be -defa..." */, 0)) return TCL_ERROR } zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) } if !(int32(*(*int8)(unsafe.Pointer(zParent))) != 0) { zParent = uintptr(0) } if jt_register(tls, zParent, (libc.Bool32(objc == 3))) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+26151 /* "Error in jt_regi..." */, 0)) return TCL_ERROR } return TCL_OK } // tclcmd: unregister_jt_vfs func jtUnregisterObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:1071:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } jt_unregister(tls) return TCL_OK } // This procedure registers the TCL procedures defined in this file. func Sqlitetest6_Init(tls *libc.TLS, interp uintptr) int32 { /* test6.c:1093:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+26172 /* "sqlite3_crash_en..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{crashEnableCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26193 /* "sqlite3_crashpar..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{crashParamsObjCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26213 /* "sqlite3_crash_no..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{crashNowCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26231 /* "sqlite3_simulate..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{devSymObjCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26255 /* "sqlite3_crash_on..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{writeCrashObjCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26278 /* "unregister_devsi..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{dsUnregisterObjCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26296 /* "register_jt_vfs" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{jtObjCmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+26312 /* "unregister_jt_vf..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{jtUnregisterObjCmd})), uintptr(0), uintptr(0)) return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // This test only works on UNIX with a SQLITE_THREADSAFE build that includes // the SQLITE_SERVER option. func Sqlitetest7_Init(tls *libc.TLS, interp uintptr) int32 { /* test7.c:717:5: */ return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type echo_vtab1 = struct { Fbase sqlite3_vtab Finterp uintptr Fdb uintptr FisPattern int32 FinTransaction int32 FzThis uintptr FzTableName uintptr FzLogName uintptr FnCol int32 _ [4]byte FaIndex uintptr FaCol uintptr } /* test8.c:27:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. type echo_vtab = echo_vtab1 /* test8.c:27:26 */ type echo_cursor1 = struct { Fbase sqlite3_vtab_cursor FpStmt uintptr } /* test8.c:28:9 */ type echo_cursor = echo_cursor1 /* test8.c:28:28 */ func simulateVtabError(tls *libc.TLS, p uintptr, zMethod uintptr) int32 { /* test8.c:97:12: */ bp := tls.Alloc(168) defer tls.Free(168) var zErr uintptr // var zVarname [128]int8 at bp+40, 128 *(*int8)(unsafe.Pointer(bp + 40 /* &zVarname[0] */ + 127)) = int8(0) sqlite3.Xsqlite3_snprintf(tls, 127, bp+40 /* &zVarname[0] */, ts+26330 /* "echo_module_fail..." */, libc.VaList(bp, zMethod, (*echo_vtab)(unsafe.Pointer(p)).FzTableName)) zErr = tcl.XTcl_GetVar2(tls, (*echo_vtab)(unsafe.Pointer(p)).Finterp, bp+40 /* &zVarname[0] */, uintptr(0), TCL_GLOBAL_ONLY) if zErr != 0 { (*echo_vtab)(unsafe.Pointer(p)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+26354 /* "echo-vtab-error:..." */, libc.VaList(bp+24, zErr)) } return (libc.Bool32(zErr != uintptr(0))) } // Convert an SQL-style quoted string into a normal string by removing // the quote characters. The conversion is done in-place. If the // input does not begin with a quote character, then this routine // is a no-op. // // Examples: // // "abc" becomes abc // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno func dequoteString(tls *libc.TLS, z uintptr) { /* test8.c:122:13: */ var quote int32 var i int32 var j int32 if z == uintptr(0) { return } quote = int32(*(*int8)(unsafe.Pointer(z))) switch quote { case '\'': break case '"': break case '`': break // For MySQL compatibility case '[': quote = ']' break // For MS SqlServer compatibility default: return } i = 1 j = 0 for ; *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == quote { if int32(*(*int8)(unsafe.Pointer(z + uintptr((i + 1))))) == quote { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8(quote) i++ } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8(0) break } } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(i))) } } } // Retrieve the column names for the table named zTab via database // connection db. SQLITE_OK is returned on success, or an sqlite error // code otherwise. // // If successful, the number of columns is written to *pnCol. *paCol is // set to point at sqlite3_malloc()'d space containing the array of // nCol column names. The caller is responsible for calling sqlite3_free // on *paCol. func getColumnNames(tls *libc.TLS, db uintptr, zTab uintptr, paCol uintptr, pnCol uintptr) int32 { /* test8.c:159:12: */ bp := tls.Alloc(40) defer tls.Free(40) var aCol uintptr var zSql uintptr // var pStmt uintptr at bp+32, 8 var rc int32 var nCol int32 var zName uintptr var ii int32 var nBytes int32 var zSpace uintptr aCol = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) = uintptr(0) rc = SQLITE_OK nCol = 0 // Prepare the statement "SELECT * FROM ". The column names // of the result set of the compiled SELECT will be the same as // the column names of table . zSql = sqlite3.Xsqlite3_mprintf(tls, ts+26374 /* "SELECT * FROM %Q" */, libc.VaList(bp, zTab)) if !(!(zSql != 0)) { goto __1 } rc = SQLITE_NOMEM goto out __1: ; rc = sqlite3.Xsqlite3_prepare(tls, db, zSql, -1, bp+32 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if !(rc == SQLITE_OK) { goto __2 } nCol = sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) // Figure out how much space to allocate for the array of column names // (including space for the strings themselves). Then allocate it. nBytes = (int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nCol))) ii = 0 __3: if !(ii < nCol) { goto __5 } zName = sqlite3.Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), ii) if !(!(zName != 0)) { goto __6 } rc = SQLITE_NOMEM goto out __6: ; nBytes = nBytes + (int32(libc.Xstrlen(tls, zName)) + 1) goto __4 __4: ii++ goto __3 goto __5 __5: ; aCol = sqlite3.Xsqlite3MallocZero(tls, uint64(nBytes)) if !(!(aCol != 0)) { goto __7 } rc = SQLITE_NOMEM goto out __7: ; // Copy the column names into the allocated space and set up the // pointers in the aCol[] array. zSpace = (aCol + uintptr(nCol)*8) ii = 0 __8: if !(ii < nCol) { goto __10 } *(*uintptr)(unsafe.Pointer(aCol + uintptr(ii)*8)) = zSpace sqlite3.Xsqlite3_snprintf(tls, nBytes, zSpace, ts /* "%s" */, libc.VaList(bp+16, sqlite3.Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), ii))) zSpace += (uintptr(int32(libc.Xstrlen(tls, zSpace)) + 1)) goto __9 __9: ii++ goto __8 goto __10 __10: ; __2: ; *(*uintptr)(unsafe.Pointer(paCol)) = aCol *(*int32)(unsafe.Pointer(pnCol)) = nCol out: sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) return rc } // Parameter zTab is the name of a table in database db with nCol // columns. This function allocates an array of integers nCol in // size and populates it according to any implicit or explicit // indices on table zTab. // // If successful, SQLITE_OK is returned and *paIndex set to point // at the allocated array. Otherwise, an error code is returned. // // See comments associated with the member variable aIndex above // "struct echo_vtab" for details of the contents of the array. func getIndexArray(tls *libc.TLS, db uintptr, zTab uintptr, nCol int32, paIndex uintptr) int32 { /* test8.c:239:12: */ bp := tls.Alloc(48) defer tls.Free(48) // var pStmt uintptr at bp+32, 8 var aIndex uintptr var rc int32 var zSql uintptr var cid int32 var zIdx uintptr // var pStmt2 uintptr at bp+40, 8 var rc2 int32 *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) = uintptr(0) aIndex = uintptr(0) // Allocate space for the index array aIndex = sqlite3.Xsqlite3MallocZero(tls, (uint64(unsafe.Sizeof(int32(0))) * uint64(nCol))) if !(!(aIndex != 0)) { goto __1 } rc = SQLITE_NOMEM goto get_index_array_out __1: ; // Compile an sqlite pragma to loop through all indices on table zTab zSql = sqlite3.Xsqlite3_mprintf(tls, ts+26391 /* "PRAGMA index_lis..." */, libc.VaList(bp, zTab)) if !(!(zSql != 0)) { goto __2 } rc = SQLITE_NOMEM goto get_index_array_out __2: ; rc = sqlite3.Xsqlite3_prepare(tls, db, zSql, -1, bp+32 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) // For each index, figure out the left-most column and set the // corresponding entry in aIndex[] to 1. __3: if !((*(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) != 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) == SQLITE_ROW)) { goto __4 } zIdx = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 1) *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt2 */)) = uintptr(0) if !(zIdx == uintptr(0)) { goto __5 } goto __3 __5: ; zSql = sqlite3.Xsqlite3_mprintf(tls, ts+26413 /* "PRAGMA index_inf..." */, libc.VaList(bp+16, zIdx)) if !(!(zSql != 0)) { goto __6 } rc = SQLITE_NOMEM goto get_index_array_out __6: ; rc = sqlite3.Xsqlite3_prepare(tls, db, zSql, -1, bp+40 /* &pStmt2 */, uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if !((*(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt2 */)) != 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt2 */))) == SQLITE_ROW)) { goto __7 } cid = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt2 */)), 1) *(*int32)(unsafe.Pointer(aIndex + uintptr(cid)*4)) = 1 __7: ; if !(*(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt2 */)) != 0) { goto __8 } rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt2 */))) __8: ; if !(rc != SQLITE_OK) { goto __9 } goto get_index_array_out __9: ; goto __3 __4: ; get_index_array_out: if !(*(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) != 0) { goto __10 } rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) if !(rc == SQLITE_OK) { goto __11 } rc = rc2 __11: ; __10: ; if !(rc != SQLITE_OK) { goto __12 } sqlite3.Xsqlite3_free(tls, aIndex) aIndex = uintptr(0) __12: ; *(*uintptr)(unsafe.Pointer(paIndex)) = aIndex return rc } // Global Tcl variable $echo_module is a list. This routine appends // the string element zArg to that list in interpreter interp. func appendToEchoModule(tls *libc.TLS, interp uintptr, zArg uintptr) { /* test8.c:313:13: */ var flags int32 = ((TCL_APPEND_VALUE | TCL_LIST_ELEMENT) | TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+26435 /* "echo_module" */, uintptr(0), func() uintptr { if zArg != 0 { return zArg } return ts + 489 /* "" */ }(), flags) } // This function is called from within the echo-modules xCreate and // xConnect methods. The argc and argv arguments are copies of those // passed to the calling method. This function is responsible for // calling sqlite3_declare_vtab() to declare the schema of the virtual // table being created or connected. // // If the constructor was passed just one argument, i.e.: // // CREATE TABLE t1 AS echo(t2); // // Then t2 is assumed to be the name of a *real* database table. The // schema of the virtual table is declared by passing a copy of the // CREATE TABLE statement for the real table to sqlite3_declare_vtab(). // Hence, the virtual table should have exactly the same column names and // types as the real table. func echoDeclareVtab(tls *libc.TLS, pVtab uintptr, db uintptr) int32 { /* test8.c:335:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK if (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName != 0 { *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare(tls, db, ts+26447, /* "SELECT sql FROM ..." */ -1, bp /* &pStmt */, uintptr(0)) if rc == SQLITE_OK { sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 1, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName, -1, uintptr(0)) if sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) == SQLITE_ROW { var rc2 int32 var zCreateTable uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) rc = sqlite3.Xsqlite3_declare_vtab(tls, db, zCreateTable) rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) if rc == SQLITE_OK { rc = rc2 } } else { rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) if rc == SQLITE_OK { rc = SQLITE_ERROR } } if rc == SQLITE_OK { rc = getColumnNames(tls, db, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName, (pVtab + 88 /* &.aCol */), (pVtab + 72 /* &.nCol */)) } if rc == SQLITE_OK { rc = getIndexArray(tls, db, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName, (*echo_vtab)(unsafe.Pointer(pVtab)).FnCol, (pVtab + 80 /* &.aIndex */)) } } } return rc } // This function frees all runtime structures associated with the virtual // table pVtab. func echoDestructor(tls *libc.TLS, pVtab uintptr) int32 { /* test8.c:378:12: */ var p uintptr = pVtab sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(p)).FaIndex) sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(p)).FaCol) sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(p)).FzThis) sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(p)).FzTableName) sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(p)).FzLogName) sqlite3.Xsqlite3_free(tls, p) return 0 } type EchoModule1 = struct{ Finterp uintptr } /* test8.c:389:9 */ type EchoModule = EchoModule1 /* test8.c:389:27 */ // This function is called to do the work of the xConnect() method - // to allocate the required in-memory structures for a newly connected // virtual table. func echoConstructor(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test8.c:399:12: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 var i int32 var pVtab uintptr // Allocate the sqlite3_vtab/echo_vtab structure itself pVtab = sqlite3.Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(echo_vtab{}))) if !(pVtab != 0) { return SQLITE_NOMEM } (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp = (*EchoModule)(unsafe.Pointer(pAux)).Finterp (*echo_vtab)(unsafe.Pointer(pVtab)).Fdb = db // Allocate echo_vtab.zThis (*echo_vtab)(unsafe.Pointer(pVtab)).FzThis = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) if !(int32((*echo_vtab)(unsafe.Pointer(pVtab)).FzThis) != 0) { echoDestructor(tls, pVtab) return SQLITE_NOMEM } // Allocate echo_vtab.zTableName if argc > 3 { (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) dequoteString(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName) if ((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName != 0) && (int32(*(*int8)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName))) == '*') { var z uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+26511 /* "%s%s" */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + 2*8)), ((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName+1))) sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName) (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName = z (*echo_vtab)(unsafe.Pointer(pVtab)).FisPattern = 1 } if !(int32((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName) != 0) { echoDestructor(tls, pVtab) return SQLITE_NOMEM } } // Log the arguments to this function to Tcl var ::echo_module for i = 0; i < argc; i++ { appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) } // Invoke sqlite3_declare_vtab and set up other members of the echo_vtab // structure. If an error occurs, delete the sqlite3_vtab structure and // return an error code. rc = echoDeclareVtab(tls, pVtab, db) if rc != SQLITE_OK { echoDestructor(tls, pVtab) return rc } // Success. Set *ppVtab and return *(*uintptr)(unsafe.Pointer(ppVtab)) = (pVtab /* &.base */) return SQLITE_OK } // Echo virtual table module xCreate method. func echoCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test8.c:464:12: */ bp := tls.Alloc(48) defer tls.Free(48) var rc int32 = SQLITE_OK appendToEchoModule(tls, (*EchoModule)(unsafe.Pointer(pAux)).Finterp, ts+26516 /* "xCreate" */) rc = echoConstructor(tls, db, pAux, argc, argv, ppVtab, pzErr) // If there were two arguments passed to the module at the SQL level // (i.e. "CREATE VIRTUAL TABLE tbl USING echo(arg1, arg2)"), then // the second argument is used as a table name. Attempt to create // such a table with a single column, "logmsg". This table will // be used to log calls to the xUpdate method. It will be deleted // when the virtual table is DROPed. // // Note: The main point of this is to test that we can drop tables // from within an xDestroy method call. if (rc == SQLITE_OK) && (argc == 5) { var zSql uintptr var pVtab uintptr = *(*uintptr)(unsafe.Pointer(ppVtab)) (*echo_vtab)(unsafe.Pointer(pVtab)).FzLogName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + 4*8)))) zSql = sqlite3.Xsqlite3_mprintf(tls, ts+26524 /* "CREATE TABLE %Q(..." */, libc.VaList(bp+16, (*echo_vtab)(unsafe.Pointer(pVtab)).FzLogName)) rc = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+32, sqlite3.Xsqlite3_errmsg(tls, db))) } } if (*(*uintptr)(unsafe.Pointer(ppVtab)) != 0) && (rc != SQLITE_OK) { echoDestructor(tls, *(*uintptr)(unsafe.Pointer(ppVtab))) *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) } if rc == SQLITE_OK { (*echo_vtab)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppVtab)))).FinTransaction = 1 } return rc } // Echo virtual table module xConnect method. func echoConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test8.c:512:12: */ appendToEchoModule(tls, (*EchoModule)(unsafe.Pointer(pAux)).Finterp, ts+26548 /* "xConnect" */) return echoConstructor(tls, db, pAux, argc, argv, ppVtab, pzErr) } // Echo virtual table module xDisconnect method. func echoDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* test8.c:526:12: */ appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+26557 /* "xDisconnect" */) return echoDestructor(tls, pVtab) } // Echo virtual table module xDestroy method. func echoDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* test8.c:534:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK var p uintptr = pVtab appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+26569 /* "xDestroy" */) // Drop the "log" table, if one exists (see echoCreate() for details) if (p != 0) && ((*echo_vtab)(unsafe.Pointer(p)).FzLogName != 0) { var zSql uintptr zSql = sqlite3.Xsqlite3_mprintf(tls, ts+26578 /* "DROP TABLE %Q" */, libc.VaList(bp, (*echo_vtab)(unsafe.Pointer(p)).FzLogName)) rc = sqlite3.Xsqlite3_exec(tls, (*echo_vtab)(unsafe.Pointer(p)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) } if rc == SQLITE_OK { rc = echoDestructor(tls, pVtab) } return rc } // Echo virtual table module xOpen method. func echoOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test8.c:556:12: */ var pCur uintptr if simulateVtabError(tls, pVTab, ts+26592 /* "xOpen" */) != 0 { return SQLITE_ERROR } pCur = sqlite3.Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(echo_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = pCur return func() int32 { if pCur != 0 { return SQLITE_OK } return SQLITE_NOMEM }() } // Echo virtual table module xClose method. func echoClose(tls *libc.TLS, cur uintptr) int32 { /* test8.c:569:12: */ var rc int32 var pCur uintptr = cur var pStmt uintptr = (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt = uintptr(0) sqlite3.Xsqlite3_free(tls, pCur) rc = sqlite3.Xsqlite3_finalize(tls, pStmt) return rc } // Return non-zero if the cursor does not currently point to a valid record // (i.e if the scan has finished), or zero otherwise. func echoEof(tls *libc.TLS, cur uintptr) int32 { /* test8.c:583:12: */ return func() int32 { if (*echo_cursor)(unsafe.Pointer(cur)).FpStmt != 0 { return 0 } return 1 }() } // Echo virtual table module xNext method. func echoNext(tls *libc.TLS, cur uintptr) int32 { /* test8.c:590:12: */ var rc int32 = SQLITE_OK var pCur uintptr = cur if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+26598 /* "xNext" */) != 0 { return SQLITE_ERROR } if (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt != 0 { rc = sqlite3.Xsqlite3_step(tls, (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt) if rc == SQLITE_ROW { rc = SQLITE_OK } else { rc = sqlite3.Xsqlite3_finalize(tls, (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt) (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt = uintptr(0) } } return rc } // Echo virtual table module xColumn method. func echoColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test8.c:614:12: */ var iCol int32 = (i + 1) var pStmt uintptr = (*echo_cursor)(unsafe.Pointer(cur)).FpStmt if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+26604 /* "xColumn" */) != 0 { return SQLITE_ERROR } if !(pStmt != 0) { sqlite3.Xsqlite3_result_null(tls, ctx) } else { sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, pStmt, iCol)) } return SQLITE_OK } // Echo virtual table module xRowid method. func echoRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test8.c:634:12: */ var pStmt uintptr = (*echo_cursor)(unsafe.Pointer(cur)).FpStmt if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+2165 /* "xRowid" */) != 0 { return SQLITE_ERROR } *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_column_int64(tls, pStmt, 0) return SQLITE_OK } // Compute a simple hash of the null terminated string zString. // // This module uses only sqlite3_index_info.idxStr, not // sqlite3_index_info.idxNum. So to test idxNum, when idxStr is set // in echoBestIndex(), idxNum is set to the corresponding hash value. // In echoFilter(), code assert()s that the supplied idxNum value is // indeed the hash of the supplied idxStr. func hashString(tls *libc.TLS, zString uintptr) int32 { /* test8.c:654:12: */ var val u32 = u32(0) var ii int32 for ii = 0; *(*int8)(unsafe.Pointer(zString + uintptr(ii))) != 0; ii++ { val = ((val << 3) + u32(int32(*(*int8)(unsafe.Pointer(zString + uintptr(ii)))))) } return (int32(val & u32(0x7fffffff))) } // Echo virtual table module xFilter method. func echoFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test8.c:666:12: */ var rc int32 var i int32 var pCur uintptr = pVtabCursor var pVtab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var db uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Fdb if simulateVtabError(tls, pVtab, ts+26612 /* "xFilter" */) != 0 { return SQLITE_ERROR } // Check that idxNum matches idxStr // Log arguments to the ::echo_module Tcl variable appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+26612 /* "xFilter" */) appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, idxStr) for i = 0; i < argc; i++ { appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) } sqlite3.Xsqlite3_finalize(tls, (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt) (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt = uintptr(0) // Prepare the SQL statement created by echoBestIndex and bind the // runtime parameters passed to this function to it. rc = sqlite3.Xsqlite3_prepare(tls, db, idxStr, -1, (pCur + 8 /* &.pStmt */), uintptr(0)) for i = 0; (rc == SQLITE_OK) && (i < argc); i++ { rc = sqlite3.Xsqlite3_bind_value(tls, (*echo_cursor)(unsafe.Pointer(pCur)).FpStmt, (i + 1), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) } // If everything was successful, advance to the first row of the scan if rc == SQLITE_OK { rc = echoNext(tls, pVtabCursor) } return rc } // A helper function used by echoUpdate() and echoBestIndex() for // manipulating strings in concert with the sqlite3_mprintf() function. // // Parameter pzStr points to a pointer to a string allocated with // sqlite3_mprintf. The second parameter, zAppend, points to another // string. The two strings are concatenated together and *pzStr // set to point at the result. The initial buffer pointed to by *pzStr // is deallocated via sqlite3_free(). // // If the third argument, doFree, is true, then sqlite3_free() is // also called to free the buffer pointed to by zAppend. func string_concat(tls *libc.TLS, pzStr uintptr, zAppend uintptr, doFree int32, pRc uintptr) { /* test8.c:726:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zIn uintptr = *(*uintptr)(unsafe.Pointer(pzStr)) if (!(zAppend != 0) && (doFree != 0)) && (*(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } if *(*int32)(unsafe.Pointer(pRc)) != SQLITE_OK { sqlite3.Xsqlite3_free(tls, zIn) zIn = uintptr(0) } else { if zIn != 0 { var zTemp uintptr = zIn zIn = sqlite3.Xsqlite3_mprintf(tls, ts+26511 /* "%s%s" */, libc.VaList(bp, zIn, zAppend)) sqlite3.Xsqlite3_free(tls, zTemp) } else { zIn = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+24, zAppend)) } if !(zIn != 0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } } *(*uintptr)(unsafe.Pointer(pzStr)) = zIn if doFree != 0 { sqlite3.Xsqlite3_free(tls, zAppend) } } // This function returns a pointer to an sqlite3_malloc()ed buffer // containing the select-list (the thing between keywords SELECT and FROM) // to query the underlying real table with for the scan described by // argument pIdxInfo. // // If the current SQLite version is earlier than 3.10.0, this is just "*" // (select all columns). Or, for version 3.10.0 and greater, the list of // columns identified by the pIdxInfo->colUsed mask. func echoSelectList(tls *libc.TLS, pTab uintptr, pIdxInfo uintptr) uintptr { /* test8.c:762:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = uintptr(0) if sqlite3.Xsqlite3_libversion_number(tls) < 3010000 { zRet = sqlite3.Xsqlite3_mprintf(tls, ts+26620 /* ", *" */, 0) } else { var i int32 for i = 0; i < (*echo_vtab)(unsafe.Pointer(pTab)).FnCol; i++ { if ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FcolUsed & (sqlite3_uint64(uint64(1)) << (func() int32 { if i >= 63 { return 63 } return i }()))) != 0 { zRet = sqlite3.Xsqlite3_mprintf(tls, ts+26624 /* "%z, %s" */, libc.VaList(bp, zRet, *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*8)))) } else { zRet = sqlite3.Xsqlite3_mprintf(tls, ts+26631 /* "%z, NULL" */, libc.VaList(bp+24, zRet)) } if !(zRet != 0) { break } } } return zRet } // The echo module implements the subset of query constraints and sort // orders that may take advantage of SQLite indices on the underlying // real table. For example, if the real table is declared as: // // CREATE TABLE real(a, b, c); // CREATE INDEX real_index ON real(b); // // then the echo module handles WHERE or ORDER BY clauses that refer // to the column "b", but not "a" or "c". If a multi-column index is // present, only its left most column is considered. // // This xBestIndex method encodes the proposed search strategy as // an SQL query on the real table underlying the virtual echo module // table and stores the query in sqlite3_index_info.idxStr. The SQL // statement is of the form: // // SELECT rowid, * FROM ?? ?? // // where the and are determined // by the contents of the structure pointed to by the pIdxInfo argument. func echoBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8.c:802:12: */ bp := tls.Alloc(140) defer tls.Free(140) var ii int32 *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) = uintptr(0) var zCol uintptr = uintptr(0) var zNew uintptr var nArg int32 = 0 var zSep uintptr = ts + 8840 /* "WHERE" */ var pVtab uintptr = tab *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */)) = uintptr(0) var interp uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp var nRow int32 = 0 var useIdx int32 = 0 *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = SQLITE_OK var useCost int32 = 0 var cost float64 = float64(0) var isIgnoreUsable int32 = 0 if tcl.XTcl_GetVar2(tls, interp, ts+26640 /* "echo_module_igno..." */, uintptr(0), TCL_GLOBAL_ONLY) != 0 { isIgnoreUsable = 1 } if simulateVtabError(tls, pVtab, ts+26666 /* "xBestIndex" */) != 0 { return SQLITE_ERROR } // Determine the number of rows in the table and store this value in local // variable nRow. The 'estimated-cost' of the scan will be the number of // rows in the table for a linear scan, or the log (base 2) of the // number of rows if the proposed scan uses an index. if tcl.XTcl_GetVar2(tls, interp, ts+26677 /* "echo_module_cost" */, uintptr(0), TCL_GLOBAL_ONLY) != 0 { cost = libc.Xatof(tls, tcl.XTcl_GetVar2(tls, interp, ts+26677 /* "echo_module_cost" */, uintptr(0), TCL_GLOBAL_ONLY)) useCost = 1 } else { *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) = sqlite3.Xsqlite3_mprintf(tls, ts+26694 /* "SELECT count(*) ..." */, libc.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) != 0) { return SQLITE_NOMEM } *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = sqlite3.Xsqlite3_prepare(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Fdb, *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)), -1, bp+120 /* &pStmt */, uintptr(0)) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */))) if *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */))) nRow = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */)), 0) *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* pStmt */))) if *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } } zCol = echoSelectList(tls, pVtab, pIdxInfo) if !(zCol != 0) { return SQLITE_NOMEM } *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) = sqlite3.Xsqlite3_mprintf(tls, ts+26718 /* "SELECT rowid%z F..." */, libc.VaList(bp+16, zCol, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) != 0) { return SQLITE_NOMEM } for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var pConstraint uintptr var pUsage uintptr var iCol int32 pConstraint = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) pUsage = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8) if !(isIgnoreUsable != 0) && !(int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) != 0) { continue } iCol = (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn if (iCol < 0) || (*(*int32)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaIndex + uintptr(iCol)*4)) != 0) { var zNewCol uintptr if iCol >= 0 { zNewCol = *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr(iCol)*8)) } else { zNewCol = ts + 26741 /* "rowid" */ } var zOp uintptr = uintptr(0) useIdx = 1 switch int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) { case SQLITE_INDEX_CONSTRAINT_EQ: zOp = ts + 26747 /* "=" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_LT: zOp = ts + 26749 /* "<" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_GT: zOp = ts + 26751 /* ">" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_LE: zOp = ts + 26753 /* "<=" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_GE: zOp = ts + 26756 /* ">=" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_MATCH: // Purposely translate the MATCH operator into a LIKE, which // will be used by the next block of code to construct a new // query. It should also be noted here that the next block // of code requires the first letter of this operator to be // in upper-case to trigger the special MATCH handling (i.e. // wrapping the bound parameter with literal '%'s). zOp = ts + 26759 /* "LIKE" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_LIKE: zOp = ts + 26764 /* "like" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_GLOB: zOp = ts + 26769 /* "glob" */ break fallthrough case SQLITE_INDEX_CONSTRAINT_REGEXP: zOp = ts + 6345 /* "regexp" */ break } if zOp != 0 { if int32(*(*int8)(unsafe.Pointer(zOp))) == 'L' { zNew = sqlite3.Xsqlite3_mprintf(tls, ts+26774, /* " %s %s LIKE (SEL..." */ libc.VaList(bp+40, zSep, zNewCol)) } else { zNew = sqlite3.Xsqlite3_mprintf(tls, ts+26809 /* " %s %s %s ?" */, libc.VaList(bp+64, zSep, zNewCol, zOp)) } string_concat(tls, bp+128 /* &zQuery */, zNew, 1, bp+136 /* &rc */) zSep = ts + 8867 /* "AND" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = libc.PreIncInt32(&nArg, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(1) } } } // If there is only one term in the ORDER BY clause, and it is // on a column that this virtual table has an index for, then consume // the ORDER BY clause. if ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy == 1) && (((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn < 0) || (*(*int32)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaIndex + uintptr((*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn)*4)) != 0)) { var iCol int32 = (*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn var zNewCol uintptr if iCol >= 0 { zNewCol = *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr(iCol)*8)) } else { zNewCol = ts + 26741 /* "rowid" */ } var zDir uintptr if (*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc != 0 { zDir = ts + 26821 /* "DESC" */ } else { zDir = ts + 26826 /* "ASC" */ } zNew = sqlite3.Xsqlite3_mprintf(tls, ts+26830 /* " ORDER BY %s %s" */, libc.VaList(bp+96, zNewCol, zDir)) string_concat(tls, bp+128 /* &zQuery */, zNew, 1, bp+136 /* &rc */) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+26666 /* "xBestIndex" */) appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */))) if !(*(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) != 0) { return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = hashString(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */))) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = *(*uintptr)(unsafe.Pointer(bp + 128 /* zQuery */)) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 if useCost != 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = cost } else if useIdx != 0 { // Approximation of log2(nRow). for ii = 0; uint64(ii) < ((uint64(unsafe.Sizeof(int32(0))) * uint64(8)) - uint64(1)); ii++ { if (nRow & (int32(1) << ii)) != 0 { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(ii) } } } else { (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(nRow) } return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } // The xUpdate method for echo module virtual tables. // // apData[0] apData[1] apData[2..] // // INTEGER DELETE // // INTEGER NULL (nCol args) UPDATE (do not set rowid) // INTEGER INTEGER (nCol args) UPDATE (with SET rowid = ) // // NULL NULL (nCol args) INSERT INTO (automatic rowid value) // NULL INTEGER (nCol args) INSERT (incl. rowid value) // func echoUpdate(tls *libc.TLS, tab uintptr, nData int32, apData uintptr, pRowid uintptr) int32 { /* test8.c:968:5: */ bp := tls.Alloc(200) defer tls.Free(200) var pVtab uintptr = tab var db uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Fdb *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 160 /* z */)) = uintptr(0) // SQL statement to execute var bindArgZero int32 = 0 // True to bind apData[0] to sql var no. nData var bindArgOne int32 = 0 // True to bind apData[1] to sql var no. 1 var i int32 // Counter variable used by for loops // Ticket #3083 - make sure we always start a transaction prior to // making any changes to a virtual table if simulateVtabError(tls, pVtab, ts+26846 /* "xUpdate" */) != 0 { return SQLITE_ERROR } // If apData[0] is an integer and nData>1 then do an UPDATE if (nData > 1) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData))) == SQLITE_INTEGER) { var zSep uintptr = ts + 26854 /* " SET" */ *(*uintptr)(unsafe.Pointer(bp + 160 /* z */)) = sqlite3.Xsqlite3_mprintf(tls, ts+26859 /* "UPDATE %Q" */, libc.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 160 /* z */)) != 0) { *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_NOMEM } bindArgOne = (libc.Bool32((*(*uintptr)(unsafe.Pointer(apData + 1*8)) != 0) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData + 1*8))) == SQLITE_INTEGER))) bindArgZero = 1 if bindArgOne != 0 { string_concat(tls, bp+160 /* &z */, ts+26869 /* " SET rowid=?1 " */, 0, bp+168 /* &rc */) zSep = ts + 4629 /* "," */ } for i = 2; i < nData; i++ { if *(*uintptr)(unsafe.Pointer(apData + uintptr(i)*8)) == uintptr(0) { continue } string_concat(tls, bp+160 /* &z */, sqlite3.Xsqlite3_mprintf(tls, ts+26884 /* "%s %Q=?%d" */, libc.VaList(bp+16, zSep, *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr((i-2))*8)), i)), 1, bp+168 /* &rc */) zSep = ts + 4629 /* "," */ } string_concat(tls, bp+160 /* &z */, sqlite3.Xsqlite3_mprintf(tls, ts+26894 /* " WHERE rowid=?%d" */, libc.VaList(bp+48, nData)), 1, bp+168 /* &rc */) } else if (nData == 1) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData))) == SQLITE_INTEGER) { *(*uintptr)(unsafe.Pointer(bp + 160 /* z */)) = sqlite3.Xsqlite3_mprintf(tls, ts+26911 /* "DELETE FROM %Q W..." */, libc.VaList(bp+64, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 160 /* z */)) != 0) { *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_NOMEM } bindArgZero = 1 } else if (nData > 2) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData))) == SQLITE_NULL) { var ii int32 *(*uintptr)(unsafe.Pointer(bp + 176 /* zInsert */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 184 /* zValues */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 176 /* zInsert */)) = sqlite3.Xsqlite3_mprintf(tls, ts+26943 /* "INSERT INTO %Q (" */, libc.VaList(bp+80, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 176 /* zInsert */)) != 0) { *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_NOMEM } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData + 1*8))) == SQLITE_INTEGER { bindArgOne = 1 *(*uintptr)(unsafe.Pointer(bp + 184 /* zValues */)) = sqlite3.Xsqlite3_mprintf(tls, ts+3276 /* "?" */, 0) string_concat(tls, bp+176 /* &zInsert */, ts+26741 /* "rowid" */, 0, bp+168 /* &rc */) } for ii = 2; ii < nData; ii++ { string_concat(tls, bp+176, /* &zInsert */ sqlite3.Xsqlite3_mprintf(tls, ts+26960 /* "%s%Q" */, libc.VaList(bp+96, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 184 /* zValues */)) != 0 { return ts + 90 /* ", " */ } return ts + 489 /* "" */ }(), *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr((ii-2))*8)))), 1, bp+168 /* &rc */) string_concat(tls, bp+184, /* &zValues */ sqlite3.Xsqlite3_mprintf(tls, ts+26965 /* "%s?%d" */, libc.VaList(bp+120, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 184 /* zValues */)) != 0 { return ts + 90 /* ", " */ } return ts + 489 /* "" */ }(), ii)), 1, bp+168 /* &rc */) } string_concat(tls, bp+160 /* &z */, *(*uintptr)(unsafe.Pointer(bp + 176 /* zInsert */)), 1, bp+168 /* &rc */) string_concat(tls, bp+160 /* &z */, ts+26971 /* ") VALUES(" */, 0, bp+168 /* &rc */) string_concat(tls, bp+160 /* &z */, *(*uintptr)(unsafe.Pointer(bp + 184 /* zValues */)), 1, bp+168 /* &rc */) string_concat(tls, bp+160 /* &z */, ts+490 /* ")" */, 0, bp+168 /* &rc */) } else { return SQLITE_ERROR } if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = sqlite3.Xsqlite3_prepare(tls, db, *(*uintptr)(unsafe.Pointer(bp + 160 /* z */)), -1, bp+192 /* &pStmt */, uintptr(0)) } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 160 /* z */))) if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK { if bindArgZero != 0 { sqlite3.Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */)), nData, *(*uintptr)(unsafe.Pointer(apData))) } if bindArgOne != 0 { sqlite3.Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */)), 1, *(*uintptr)(unsafe.Pointer(apData + 1*8))) } for i = 2; (i < nData) && (*(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK); i++ { if *(*uintptr)(unsafe.Pointer(apData + uintptr(i)*8)) != 0 { *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = sqlite3.Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */)), i, *(*uintptr)(unsafe.Pointer(apData + uintptr(i)*8))) } } if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK { sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */))) *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */))) } else { sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pStmt */))) } } if (pRowid != 0) && (*(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK) { *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_last_insert_rowid(tls, db) } if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) != SQLITE_OK { (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+26354 /* "echo-vtab-error:..." */, libc.VaList(bp+144, sqlite3.Xsqlite3_errmsg(tls, db))) } return *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) } // xBegin, xSync, xCommit and xRollback callbacks for echo module // virtual tables. Do nothing other than add the name of the callback // to the $::echo_module Tcl variable. func echoTransactionCall(tls *libc.TLS, tab uintptr, zCall uintptr) int32 { /* test8.c:1101:12: */ bp := tls.Alloc(16) defer tls.Free(16) var z uintptr var pVtab uintptr = tab z = sqlite3.Xsqlite3_mprintf(tls, ts+26981 /* "echo(%s)" */, libc.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if z == uintptr(0) { return SQLITE_NOMEM } appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, zCall) appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, z) sqlite3.Xsqlite3_free(tls, z) return SQLITE_OK } func echoBegin(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ var rc int32 var pVtab uintptr = tab var interp uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp var zVal uintptr // Ticket #3083 - do not start a transaction if we are already in // a transaction if simulateVtabError(tls, pVtab, ts+26990 /* "xBegin" */) != 0 { return SQLITE_ERROR } rc = echoTransactionCall(tls, tab, ts+26990 /* "xBegin" */) if rc == SQLITE_OK { // Check if the $::echo_module_begin_fail variable is defined. If it is, // and it is set to the name of the real table underlying this virtual // echo module table, then cause this xSync operation to fail. zVal = tcl.XTcl_GetVar2(tls, interp, ts+26997 /* "echo_module_begi..." */, uintptr(0), TCL_GLOBAL_ONLY) if (zVal != 0) && (0 == libc.Xstrcmp(tls, zVal, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) { rc = SQLITE_ERROR } } if rc == SQLITE_OK { (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 1 } return rc } func echoSync(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ var rc int32 var pVtab uintptr = tab var interp uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp var zVal uintptr // Ticket #3083 - Only call xSync if we have previously started a // transaction if simulateVtabError(tls, pVtab, ts+27020 /* "xSync" */) != 0 { return SQLITE_ERROR } rc = echoTransactionCall(tls, tab, ts+27020 /* "xSync" */) if rc == SQLITE_OK { // Check if the $::echo_module_sync_fail variable is defined. If it is, // and it is set to the name of the real table underlying this virtual // echo module table, then cause this xSync operation to fail. zVal = tcl.XTcl_GetVar2(tls, interp, ts+27026 /* "echo_module_sync..." */, uintptr(0), TCL_GLOBAL_ONLY) if (zVal != 0) && (0 == libc.Xstrcmp(tls, zVal, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) { rc = -1 } } return rc } func echoCommit(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ var pVtab uintptr = tab var rc int32 // Ticket #3083 - Only call xCommit if we have previously started // a transaction if simulateVtabError(tls, pVtab, ts+27048 /* "xCommit" */) != 0 { return SQLITE_ERROR } sqlite3.Xsqlite3BeginBenignMalloc(tls) rc = echoTransactionCall(tls, tab, ts+27048 /* "xCommit" */) sqlite3.Xsqlite3EndBenignMalloc(tls) (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } func echoRollback(tls *libc.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ var rc int32 var pVtab uintptr = tab // Ticket #3083 - Only call xRollback if we have previously started // a transaction rc = echoTransactionCall(tls, tab, ts+27056 /* "xRollback" */) (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } // Implementation of "GLOB" function on the echo module. Pass // all arguments to the ::echo_glob_overload procedure of TCL // and return the result of that procedure as a string. func overloadedGlobFunction(tls *libc.TLS, pContext uintptr, nArg int32, apArg uintptr) { /* test8.c:1206:13: */ bp := tls.Alloc(216) defer tls.Free(216) var interp uintptr = sqlite3.Xsqlite3_user_data(tls, pContext) // var str Tcl_DString at bp, 216 var i int32 var rc int32 tcl.XTcl_DStringInit(tls, bp /* &str */) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, ts+27066 /* "::echo_glob_over..." */) for i = 0; i < nArg; i++ { tcl.XTcl_DStringAppendElement(tls, bp /* &str */, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + uintptr(i)*8)))) } rc = tcl.XTcl_Eval(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp /* &str */)).Fstring) tcl.XTcl_DStringFree(tls, bp /* &str */) if rc != 0 { sqlite3.Xsqlite3_result_error(tls, pContext, tcl.XTcl_GetStringResult(tls, interp), -1) } else { sqlite3.Xsqlite3_result_text(tls, pContext, tcl.XTcl_GetStringResult(tls, interp), -1, libc.UintptrFromInt32(-1)) } tcl.XTcl_ResetResult(tls, interp) } // This is the xFindFunction implementation for the echo module. // SQLite calls this routine when the first argument of a function // is a column of an echo virtual table. This routine can optionally // override the implementation of that function. It will choose to // do so if the function is named "glob", and a TCL command named // ::echo_glob_overload exists. func echoFindFunction(tls *libc.TLS, vtab uintptr, nArg int32, zFuncName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* test8.c:1239:12: */ bp := tls.Alloc(64) defer tls.Free(64) var pVtab uintptr = vtab var interp uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp // var info Tcl_CmdInfo at bp, 64 if libc.Xstrcmp(tls, zFuncName, ts+26769 /* "glob" */) != 0 { return 0 } if tcl.XTcl_GetCommandInfo(tls, interp, ts+27066 /* "::echo_glob_over..." */, bp /* &info */) == 0 { return 0 } *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{overloadedGlobFunction})) *(*uintptr)(unsafe.Pointer(ppArg)) = interp return 1 } func echoRename(tls *libc.TLS, vtab uintptr, zNewName uintptr) int32 { /* test8.c:1260:12: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 = SQLITE_OK var p uintptr = vtab if simulateVtabError(tls, p, ts+27087 /* "xRename" */) != 0 { return SQLITE_ERROR } if (*echo_vtab)(unsafe.Pointer(p)).FisPattern != 0 { var nThis int32 = int32(libc.Xstrlen(tls, (*echo_vtab)(unsafe.Pointer(p)).FzThis)) var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+27095, /* "ALTER TABLE %s R..." */ libc.VaList(bp, (*echo_vtab)(unsafe.Pointer(p)).FzTableName, zNewName, ((*echo_vtab)(unsafe.Pointer(p)).FzTableName+uintptr(nThis)))) rc = sqlite3.Xsqlite3_exec(tls, (*echo_vtab)(unsafe.Pointer(p)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) } return rc } func echoSavepoint(tls *libc.TLS, pVTab uintptr, iSavepoint int32) int32 { /* test8.c:1280:12: */ return SQLITE_OK } func echoRelease(tls *libc.TLS, pVTab uintptr, iSavepoint int32) int32 { /* test8.c:1285:12: */ return SQLITE_OK } func echoRollbackTo(tls *libc.TLS, pVTab uintptr, iSavepoint int32) int32 { /* test8.c:1290:12: */ return SQLITE_OK } // A virtual table module that merely "echos" the contents of another // table (like an SQL VIEW). var echoModule = sqlite3_module{ FiVersion: 1, // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xUpdate - write data FxBegin: 0, // xBegin - begin transaction FxSync: 0, // xSync - sync transaction FxCommit: 0, // xCommit - commit transaction FxRollback: 0, // xRollback - rollback transaction FxFindFunction: 0, // xFindFunction - function overloading FxRename: 0, // xRename - rename the table } /* test8.c:1299:23 */ var echoModuleV2 = sqlite3_module{ FiVersion: 2, // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xUpdate - write data FxBegin: 0, // xBegin - begin transaction FxSync: 0, // xSync - sync transaction FxCommit: 0, // xCommit - commit transaction FxRollback: 0, // xRollback - rollback transaction FxFindFunction: 0, // xFindFunction - function overloading FxRename: 0, // xRename - rename the table FxSavepoint: 0, FxRelease: 0, FxRollbackTo: 0, } /* test8.c:1322:23 */ func moduleDestroy(tls *libc.TLS, p uintptr) { /* test8.c:1354:13: */ sqlite3.Xsqlite3_free(tls, p) } // Register the echo virtual table module. func register_echo_module(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test8.c:1361:26: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var db uintptr at bp, 8 var pMod uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } // Virtual table module "echo" pMod = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(EchoModule{}))) (*EchoModule)(unsafe.Pointer(pMod)).Finterp = interp rc = sqlite3.Xsqlite3_create_module_v2(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+27125 /* "echo" */, uintptr(unsafe.Pointer(&echoModule)), pMod, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{moduleDestroy}))) // Virtual table module "echo_v2" if rc == SQLITE_OK { pMod = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(EchoModule{}))) (*EchoModule)(unsafe.Pointer(pMod)).Finterp = interp rc = sqlite3.Xsqlite3_create_module_v2(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+27130, /* "echo_v2" */ uintptr(unsafe.Pointer(&echoModuleV2)), pMod, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{moduleDestroy}))) } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Tcl interface to sqlite3_declare_vtab, invoked as follows from Tcl: // // sqlite3_declare_vtab DB SQL func declare_vtab(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test8.c:1401:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27138 /* "DB SQL" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_declare_vtab(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp /* db */))), uintptr(1)) return TCL_ERROR } return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest8_Init(tls *libc.TLS, interp uintptr) int32 { /* test8.c:1427:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd2)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd2[i].FzName, aObjCmd2[i].FxProc, aObjCmd2[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd2 = [2]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 27145 /* "register_echo_mo..." */, FxProc: 0}, {FzName: ts + 27166 /* "sqlite3_declare_..." */, FxProc: 0}, } /* test8.c:1433:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // c_collation_test func c_collation_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test9.c:29:26: */ bp := tls.Alloc(40) defer tls.Free(40) var zErrFunction uintptr // var db uintptr at bp+32, 8 var rc int32 zErrFunction = ts + 27187 /* "N/A" */ if !(objc != 1) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR __1: ; // Open a database. rc = sqlite3.Xsqlite3_open(tls, ts+1662 /* ":memory:" */, bp+32 /* &db */) if !(rc != SQLITE_OK) { goto __2 } zErrFunction = ts + 21120 /* "sqlite3_open" */ goto error_out __2: ; rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13096 /* "collate" */, 456, uintptr(0), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __3 } sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))) zErrFunction = ts + 27191 /* "sqlite3_create_c..." */ goto error_out __3: ; sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))) return TCL_OK error_out: tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+27216 /* "Error testing fu..." */, zErrFunction, 0)) return TCL_ERROR } // c_realloc_test func c_realloc_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test9.c:70:26: */ bp := tls.Alloc(32) defer tls.Free(32) var p uintptr var zErrFunction uintptr zErrFunction = ts + 27187 /* "N/A" */ if !(objc != 1) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR __1: ; p = sqlite3.Xsqlite3_malloc(tls, 5) if !(!(p != 0)) { goto __2 } zErrFunction = ts + 27241 /* "sqlite3_malloc" */ goto error_out __2: ; // Test that realloc()ing a block of memory to a negative size is // the same as free()ing that memory. p = sqlite3.Xsqlite3_realloc(tls, p, -1) if !(p != 0) { goto __3 } zErrFunction = ts + 27256 /* "sqlite3_realloc" */ goto error_out __3: ; return TCL_OK error_out: tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+27216 /* "Error testing fu..." */, zErrFunction, 0)) return TCL_ERROR } // c_misuse_test func c_misuse_test(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test9.c:111:26: */ bp := tls.Alloc(48) defer tls.Free(48) var zErrFunction uintptr // var db uintptr at bp+32, 8 // var pStmt uintptr at bp+40, 8 var rc int32 zErrFunction = ts + 27187 /* "N/A" */ *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)) = uintptr(0) if !(objc != 1) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR __1: ; // Open a database. Then close it again. We need to do this so that // we have a "closed database handle" to pass to various API functions. rc = sqlite3.Xsqlite3_open(tls, ts+1662 /* ":memory:" */, bp+32 /* &db */) if !(rc != SQLITE_OK) { goto __2 } zErrFunction = ts + 21120 /* "sqlite3_open" */ goto error_out __2: ; sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))) rc = sqlite3.Xsqlite3_errcode(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))) if !(rc != SQLITE_MISUSE) { goto __3 } zErrFunction = ts + 21047 /* "sqlite3_errcode" */ goto error_out __3: ; *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) = uintptr(1234) rc = sqlite3.Xsqlite3_prepare(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), uintptr(0), 0, bp+40 /* &pStmt */, uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __4 } zErrFunction = ts + 21201 /* "sqlite3_prepare" */ goto error_out __4: ; // Verify that pStmt is zeroed even on a MISUSE error *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) = uintptr(1234) rc = sqlite3.Xsqlite3_prepare_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), uintptr(0), 0, bp+40 /* &pStmt */, uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __5 } zErrFunction = ts + 21235 /* "sqlite3_prepare_..." */ goto error_out __5: ; *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) = uintptr(1234) rc = sqlite3.Xsqlite3_prepare16(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), uintptr(0), 0, bp+40 /* &pStmt */, uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __6 } zErrFunction = ts + 21217 /* "sqlite3_prepare1..." */ goto error_out __6: ; *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) = uintptr(1234) rc = sqlite3.Xsqlite3_prepare16_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), uintptr(0), 0, bp+40 /* &pStmt */, uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __7 } zErrFunction = ts + 21297 /* "sqlite3_prepare1..." */ goto error_out __7: ; return TCL_OK error_out: tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+27216 /* "Error testing fu..." */, zErrFunction, 0)) return TCL_ERROR } // Register commands with the TCL interpreter. func Sqlitetest9_Init(tls *libc.TLS, interp uintptr) int32 { /* test9.c:188:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd3)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd3[i].FzName, aObjCmd3[i].FxProc, aObjCmd3[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd3 = [3]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 27272 /* "c_misuse_test" */, FxProc: 0}, {FzName: ts + 27286 /* "c_realloc_test" */, FxProc: 0}, {FzName: ts + 27301 /* "c_collation_test" */, FxProc: 0}, } /* test9.c:193:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // This routine registers the custom TCL commands defined in this // module. This should be the only procedure visible from outside // of this module. func Sqlitetestasync_Init(tls *libc.TLS, interp uintptr) int32 { /* test_async.c:238:5: */ return TCL_OK } // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. // // This header file is also used by the loadext.c source file // (part of the main SQLite library - not an extension) so that // it can get access to the sqlite3_api_routines structure // definition. But the main library does not want to redefine // the API. So the redefinition macros are only valid if the // SQLITE_CORE macros is undefined. // This case when the file is being statically linked into the // application // tclcmd: sqlite3_reset_auto_extension // // Reset all auto-extensions func resetAutoExtObjCmd(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_autoext.c:196:26: */ sqlite3.Xsqlite3_reset_auto_extension(tls) return SQLITE_OK } // This procedure registers the TCL procs defined in this file. func Sqlitetest_autoext_Init(tls *libc.TLS, interp uintptr) int32 { /* test_autoext.c:210:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+27318, /* "sqlite3_reset_au..." */ *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{resetAutoExtObjCmd})), uintptr(0), uintptr(0)) return TCL_OK } func backupTestCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_backup.c:33:26: */ bp := tls.Alloc(196) defer tls.Free(196) *(*[5]BackupSubCommand)(unsafe.Pointer(bp /* aSub */)) = [5]BackupSubCommand{ {FzCmd: ts + 10122 /* "step" */, FnArg: 1, FzArg: ts + 27347 /* "npage" */}, {FzCmd: ts + 27353 /* "finish" */, FeCmd: uint32(1) /* BACKUP_FINISH */, FzArg: ts + 489 /* "" */}, {FzCmd: ts + 27360 /* "remaining" */, FeCmd: uint32(2) /* BACKUP_REMAINING */, FzArg: ts + 489 /* "" */}, {FzCmd: ts + 27370 /* "pagecount" */, FeCmd: uint32(3) /* BACKUP_PAGECOUNT */, FzArg: ts + 489 /* "" */}, {}, } var p uintptr = clientData // var iCmd int32 at bp+120, 4 var rc int32 rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(BackupSubCommand{})), ts+11375 /* "option" */, 0, bp+120 /* &iCmd */) if rc != TCL_OK { return rc } if objc != (2 + (*BackupSubCommand)(unsafe.Pointer(bp /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 120 /* iCmd */)))*24)).FnArg) { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, (*BackupSubCommand)(unsafe.Pointer(bp /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 120 /* iCmd */)))*24)).FzArg) return TCL_ERROR } switch (*BackupSubCommand)(unsafe.Pointer(bp /* &aSub */ + uintptr(*(*int32)(unsafe.Pointer(bp + 120 /* iCmd */)))*24)).FeCmd { case uint32(1) /* BACKUP_FINISH */ : { var zCmdName uintptr // var cmdInfo Tcl_CmdInfo at bp+128, 64 zCmdName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))) tcl.XTcl_GetCommandInfo(tls, interp, zCmdName, bp+128 /* &cmdInfo */) (*Tcl_CmdInfo)(unsafe.Pointer(bp + 128 /* &cmdInfo */)).FdeleteProc = uintptr(0) tcl.XTcl_SetCommandInfo(tls, interp, zCmdName, bp+128 /* &cmdInfo */) tcl.XTcl_DeleteCommand(tls, interp, zCmdName) rc = sqlite3.Xsqlite3_backup_finish(tls, p) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) break } case uint32(0) /* BACKUP_STEP */ : { // var nPage int32 at bp+192, 4 if TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+192 /* &nPage */) { return TCL_ERROR } rc = sqlite3.Xsqlite3_backup_step(tls, p, *(*int32)(unsafe.Pointer(bp + 192 /* nPage */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) break } case uint32(2) /* BACKUP_REMAINING */ : tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_backup_remaining(tls, p))) break case uint32(3) /* BACKUP_PAGECOUNT */ : tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_backup_pagecount(tls, p))) break } return TCL_OK } type BackupSubCommand = struct { FzCmd uintptr FeCmd uint32 FnArg int32 FzArg uintptr } /* test_backup.c:42:3 */ func backupTestFinish(tls *libc.TLS, clientData ClientData) { /* test_backup.c:108:27: */ var pBackup uintptr = clientData sqlite3.Xsqlite3_backup_finish(tls, pBackup) } // sqlite3_backup CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME // func backupTestInit(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_backup.c:117:26: */ bp := tls.Alloc(40) defer tls.Free(40) var pBackup uintptr // var pDestDb uintptr at bp+24, 8 // var pSrcDb uintptr at bp+32, 8 var zDestName uintptr var zSrcName uintptr var zCmd uintptr if objc != 6 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27380 /* "CMDNAME DESTHAND..." */) return TCL_ERROR } zCmd = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), bp+24 /* &pDestDb */) zDestName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))), bp+32 /* &pSrcDb */) zSrcName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 5*8))) pBackup = sqlite3.Xsqlite3_backup_init(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pDestDb */)), zDestName, *(*uintptr)(unsafe.Pointer(bp + 32 /* pSrcDb */)), zSrcName) if !(pBackup != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+27426 /* "sqlite3_backup_i..." */, 0)) return TCL_ERROR } tcl.XTcl_CreateObjCommand(tls, interp, zCmd, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{backupTestCmd})), pBackup, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{backupTestFinish}))) tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) return TCL_OK } func Sqlitetestbackup_Init(tls *libc.TLS, interp uintptr) int32 { /* test_backup.c:154:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+27455 /* "sqlite3_backup" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{backupTestInit})), uintptr(0), uintptr(0)) return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type tcl_vtab1 = struct { Fbase sqlite3_vtab Finterp uintptr FpCmd uintptr Fdb uintptr } /* test_bestindex.c:104:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type tcl_vtab = tcl_vtab1 /* test_bestindex.c:104:25 */ type tcl_cursor1 = struct { Fbase sqlite3_vtab_cursor FpStmt uintptr } /* test_bestindex.c:105:9 */ type tcl_cursor = tcl_cursor1 /* test_bestindex.c:105:27 */ // Dequote string z in place. func tclDequote(tls *libc.TLS, z uintptr) { /* test_bestindex.c:126:13: */ var q int8 = *(*int8)(unsafe.Pointer(z)) // Set stack variable q to the close-quote character if (((int32(q) == '[') || (int32(q) == '\'')) || (int32(q) == '"')) || (int32(q) == '`') { var iIn int32 = 1 var iOut int32 = 0 if int32(q) == '[' { q = int8(']') } for *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { if int32(*(*int8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) { if int32(*(*int8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(q) { // Character iIn was the close quote. iIn++ break } else { // Character iIn and iIn+1 form an escaped quote character. Skip // the input cursor past both and copy a single quote character // to the output buffer. iIn = iIn + (2) *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = q } } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1)))) } } *(*int8)(unsafe.Pointer(z + uintptr(iOut))) = int8(0) } } // This function is the implementation of both the xConnect and xCreate // methods of the fs virtual table. // // The argv[] array contains the following: // // argv[0] -> module name ("fs") // argv[1] -> database name // argv[2] -> table name // argv[...] -> other module argument fields. func tclConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_bestindex.c:168:12: */ bp := tls.Alloc(16) defer tls.Free(16) var interp uintptr = pAux var pTab uintptr = uintptr(0) var zCmd uintptr = uintptr(0) var pScript uintptr = uintptr(0) var rc int32 = SQLITE_OK if argc != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+27470 /* "wrong number of ..." */, 0) return SQLITE_ERROR } zCmd = sqlite3.Xsqlite3_malloc64(tls, (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + uint64(1))) pTab = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(tcl_vtab{}))) if (zCmd != 0) && (pTab != 0) { libc.Xmemcpy(tls, zCmd, *(*uintptr)(unsafe.Pointer(argv + 3*8)), (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) + uint64(1))) tclDequote(tls, zCmd) libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(tcl_vtab{}))) (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd = tcl.XTcl_NewStringObj(tls, zCmd, -1) (*tcl_vtab)(unsafe.Pointer(pTab)).Finterp = interp (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb = db (*Tcl_Obj)(unsafe.Pointer((*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd)).FrefCount++ pScript = tcl.XTcl_DuplicateObj(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+26548 /* "xConnect" */, -1)) rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, TCL_EVAL_GLOBAL) if rc != TCL_OK { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, tcl.XTcl_GetStringResult(tls, interp))) rc = SQLITE_ERROR } else { rc = sqlite3.Xsqlite3_declare_vtab(tls, db, tcl.XTcl_GetStringResult(tls, interp)) } if rc != SQLITE_OK { sqlite3.Xsqlite3_free(tls, pTab) pTab = uintptr(0) } } else { rc = SQLITE_NOMEM } sqlite3.Xsqlite3_free(tls, zCmd) *(*uintptr)(unsafe.Pointer(ppVtab)) = (pTab /* &.base */) return rc } // The xDisconnect and xDestroy methods are also the same func tclDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* test_bestindex.c:224:12: */ var pTab uintptr = pVtab for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } sqlite3.Xsqlite3_free(tls, pTab) return SQLITE_OK } // Open a new tcl cursor. func tclOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_bestindex.c:234:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(tcl_cursor{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(tcl_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Close a tcl cursor. func tclClose(tls *libc.TLS, cur uintptr) int32 { /* test_bestindex.c:246:12: */ var pCur uintptr = cur if pCur != 0 { sqlite3.Xsqlite3_finalize(tls, (*tcl_cursor)(unsafe.Pointer(pCur)).FpStmt) sqlite3.Xsqlite3_free(tls, pCur) } return SQLITE_OK } func tclNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* test_bestindex.c:255:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pCsr uintptr = pVtabCursor if (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt != 0 { var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var rc int32 = sqlite3.Xsqlite3_step(tls, (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt) if rc != SQLITE_ROW { var zErr uintptr rc = sqlite3.Xsqlite3_finalize(tls, (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt) (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt = uintptr(0) if rc != SQLITE_OK { zErr = sqlite3.Xsqlite3_errmsg(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb) (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zErr)) } } } return SQLITE_OK } func tclFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_bestindex.c:273:12: */ bp := tls.Alloc(80) defer tls.Free(80) var pCsr uintptr = pVtabCursor var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var interp uintptr = (*tcl_vtab)(unsafe.Pointer(pTab)).Finterp var pScript uintptr var pArg uintptr var ii int32 var rc int32 pScript = tcl.XTcl_DuplicateObj(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+26612 /* "xFilter" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewIntObj(tls, idxNum)) if idxStr != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, idxStr, -1)) } else { tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+489 /* "" */, -1)) } pArg = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pArg)).FrefCount++ for ii = 0; ii < argc; ii++ { var zVal uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8))) var pVal uintptr if zVal == uintptr(0) { pVal = tcl.XTcl_NewObj(tls) } else { pVal = tcl.XTcl_NewStringObj(tls, zVal, -1) } tcl.XTcl_ListObjAppendElement(tls, interp, pArg, pVal) } tcl.XTcl_ListObjAppendElement(tls, interp, pScript, pArg) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pArg if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, TCL_EVAL_GLOBAL) if rc != TCL_OK { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zErr)) } else { // Analyze the scripts return value. The return value should be a tcl // list object with an even number of elements. The first element of each // pair must be one of: // // "sql" (SQL statement to return data) var pRes uintptr = tcl.XTcl_GetObjResult(tls, interp) *(*uintptr)(unsafe.Pointer(bp + 72 /* apElem */)) = uintptr(0) // var nElem int32 at bp+64, 4 rc = tcl.XTcl_ListObjGetElements(tls, interp, pRes, bp+64 /* &nElem */, bp+72 /* &apElem */) if rc != TCL_OK { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, zErr)) } else { for ii = 0; (rc == SQLITE_OK) && (ii < *(*int32)(unsafe.Pointer(bp + 64 /* nElem */))); ii = ii + (2) { var zCmd uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* apElem */)) + uintptr(ii)*8))) var p uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* apElem */)) + uintptr((ii+1))*8)) if sqlite3.Xsqlite3_stricmp(tls, ts+1808 /* "sql" */, zCmd) == 0 { var zSql uintptr = tcl.XTcl_GetString(tls, p) rc = sqlite3.Xsqlite3_prepare_v2(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, (pCsr + 8 /* &.pStmt */), uintptr(0)) if rc != SQLITE_OK { var zErr uintptr = sqlite3.Xsqlite3_errmsg(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb) (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+27496 /* "unexpected: %s" */, libc.VaList(bp+32, zErr)) } } else { rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+27496 /* "unexpected: %s" */, libc.VaList(bp+48, zCmd)) } } } } if rc == SQLITE_OK { rc = tclNext(tls, pVtabCursor) } return rc } func tclColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* test_bestindex.c:356:12: */ var pCsr uintptr = pVtabCursor sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt, (i+1))) return SQLITE_OK } func tclRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* test_bestindex.c:366:12: */ var pCsr uintptr = pVtabCursor *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_column_int64(tls, (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt, 0) return SQLITE_OK } func tclEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* test_bestindex.c:372:12: */ var pCsr uintptr = pVtabCursor return (libc.Bool32((*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt == uintptr(0))) } func tclBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_bestindex.c:377:12: */ bp := tls.Alloc(124) defer tls.Free(124) var pTab uintptr = tab var interp uintptr = (*tcl_vtab)(unsafe.Pointer(pTab)).Finterp var pArg uintptr var pScript uintptr var ii int32 var rc int32 = SQLITE_OK pScript = tcl.XTcl_DuplicateObj(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+26666 /* "xBestIndex" */, -1)) pArg = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pArg)).FrefCount++ for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) var pElem uintptr = tcl.XTcl_NewObj(tls) var zOp uintptr = ts + 3276 /* "?" */ (*Tcl_Obj)(unsafe.Pointer(pElem)).FrefCount++ switch int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) { case SQLITE_INDEX_CONSTRAINT_EQ: zOp = ts + 27511 /* "eq" */ break case SQLITE_INDEX_CONSTRAINT_GT: zOp = ts + 27514 /* "gt" */ break case SQLITE_INDEX_CONSTRAINT_LE: zOp = ts + 27517 /* "le" */ break case SQLITE_INDEX_CONSTRAINT_LT: zOp = ts + 27520 /* "lt" */ break case SQLITE_INDEX_CONSTRAINT_GE: zOp = ts + 27523 /* "ge" */ break case SQLITE_INDEX_CONSTRAINT_MATCH: zOp = ts + 27526 /* "match" */ break case SQLITE_INDEX_CONSTRAINT_LIKE: zOp = ts + 26764 /* "like" */ break case SQLITE_INDEX_CONSTRAINT_GLOB: zOp = ts + 26769 /* "glob" */ break case SQLITE_INDEX_CONSTRAINT_REGEXP: zOp = ts + 6345 /* "regexp" */ break case SQLITE_INDEX_CONSTRAINT_NE: zOp = ts + 27532 /* "ne" */ break case SQLITE_INDEX_CONSTRAINT_ISNOT: zOp = ts + 27535 /* "isnot" */ break case SQLITE_INDEX_CONSTRAINT_ISNOTNULL: zOp = ts + 27541 /* "isnotnull" */ break case SQLITE_INDEX_CONSTRAINT_ISNULL: zOp = ts + 27551 /* "isnull" */ break case SQLITE_INDEX_CONSTRAINT_IS: zOp = ts + 5722 /* "is" */ break } tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+27558 /* "op" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, zOp, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+27561 /* "column" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, (*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+27568 /* "usable" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pArg, pElem) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pElem if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, pArg) for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pArg if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } pArg = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pArg)).FrefCount++ for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy; ii++ { var pOrder uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy + uintptr(ii)*8) var pElem uintptr = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pElem)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+27561 /* "column" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, (*sqlite3_index_orderby)(unsafe.Pointer(pOrder)).FiColumn)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+27575 /* "desc" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, int32((*sqlite3_index_orderby)(unsafe.Pointer(pOrder)).Fdesc))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pArg, pElem) for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = pElem if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, pArg) for ok3 := true; ok3; ok3 = 0 != 0 { var _objPtr uintptr = pArg if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewWideIntObj(tls, int64((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FcolUsed))) rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, TCL_EVAL_GLOBAL) for ok4 := true; ok4; ok4 = 0 != 0 { var _objPtr uintptr = pScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if rc != TCL_OK { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, zErr)) } else { // Analyze the scripts return value. The return value should be a tcl // list object with an even number of elements. The first element of each // pair must be one of: // // "orderby" (value of orderByConsumed flag) // "cost" (value of estimatedCost field) // "rows" (value of estimatedRows field) // "use" (index of used constraint in aConstraint[]) // "idxnum" (value of idxNum field) // "idxstr" (value of idxStr field) // "omit" (index of omitted constraint in aConstraint[]) var pRes uintptr = tcl.XTcl_GetObjResult(tls, interp) *(*uintptr)(unsafe.Pointer(bp + 104 /* apElem */)) = uintptr(0) // var nElem int32 at bp+96, 4 rc = tcl.XTcl_ListObjGetElements(tls, interp, pRes, bp+96 /* &nElem */, bp+104 /* &apElem */) if rc != TCL_OK { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, zErr)) } else { var iArgv int32 = 1 for ii = 0; (rc == SQLITE_OK) && (ii < *(*int32)(unsafe.Pointer(bp + 96 /* nElem */))); ii = ii + (2) { var zCmd uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* apElem */)) + uintptr(ii)*8))) var p uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* apElem */)) + uintptr((ii+1))*8)) if sqlite3.Xsqlite3_stricmp(tls, ts+27580 /* "cost" */, zCmd) == 0 { rc = tcl.XTcl_GetDoubleFromObj(tls, interp, p, (pIdxInfo + 64 /* &.estimatedCost */)) } else if sqlite3.Xsqlite3_stricmp(tls, ts+27585 /* "orderby" */, zCmd) == 0 { rc = tcl.XTcl_GetIntFromObj(tls, interp, p, (pIdxInfo + 60 /* &.orderByConsumed */)) } else if sqlite3.Xsqlite3_stricmp(tls, ts+27593 /* "idxnum" */, zCmd) == 0 { rc = tcl.XTcl_GetIntFromObj(tls, interp, p, (pIdxInfo + 40 /* &.idxNum */)) } else if sqlite3.Xsqlite3_stricmp(tls, ts+27600 /* "idxstr" */, zCmd) == 0 { sqlite3.Xsqlite3_free(tls, (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+32, tcl.XTcl_GetString(tls, p))) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 } else if sqlite3.Xsqlite3_stricmp(tls, ts+27607 /* "rows" */, zCmd) == 0 { *(*Tcl_WideInt)(unsafe.Pointer(bp + 112 /* x */)) = int64(0) rc = tcl.XTcl_GetWideIntFromObj(tls, interp, p, bp+112 /* &x */) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = sqlite3_int64(tRowcnt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 112 /* x */)))) } else if (sqlite3.Xsqlite3_stricmp(tls, ts+27612 /* "use" */, zCmd) == 0) || (sqlite3.Xsqlite3_stricmp(tls, ts+27616 /* "omit" */, zCmd) == 0) { // var iCons int32 at bp+120, 4 rc = tcl.XTcl_GetIntFromObj(tls, interp, p, bp+120 /* &iCons */) if rc == SQLITE_OK { if (*(*int32)(unsafe.Pointer(bp + 120 /* iCons */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 120 /* iCons */)) >= (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+27621 /* "unexpected: %d" */, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 120 /* iCons */)))) } else { var bOmit int32 = (libc.Bool32((int32(*(*int8)(unsafe.Pointer(zCmd))) == 'o') || (int32(*(*int8)(unsafe.Pointer(zCmd))) == 'O'))) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(*(*int32)(unsafe.Pointer(bp + 120 /* iCons */)))*8)).FargvIndex = libc.PostIncInt32(&iArgv, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(*(*int32)(unsafe.Pointer(bp + 120 /* iCons */)))*8)).Fomit = uint8(bOmit) } } } else { rc = SQLITE_ERROR (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+27496 /* "unexpected: %s" */, libc.VaList(bp+64, zCmd)) } if (rc != SQLITE_OK) && ((*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg == uintptr(0)) { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+80, zErr)) } } } } return rc } // A virtual table module that provides read-only access to a // Tcl global variable namespace. var tclModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_bestindex.c:549:23 */ // Register the echo virtual table module. func register_tcl_module(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_bestindex.c:580:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+27636 /* "tcl" */, uintptr(unsafe.Pointer(&tclModule)), interp) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetesttcl_Init(tls *libc.TLS, interp uintptr) int32 { /* test_bestindex.c:604:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd4)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd4[i].FzName, aObjCmd4[i].FxProc, aObjCmd4[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd4 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 27640 /* "register_tcl_mod..." */, FxProc: 0}, } /* test_bestindex.c:610:5 */ // Return a pointer to a buffer containing a text representation of the // pointer passed as the only argument. The original pointer may be extracted // from the text using sqlite3TestTextToPtr(). func ptrToText(tls *libc.TLS, p uintptr) uintptr { /* test_blob.c:37:13: */ bp := tls.Alloc(16) defer tls.Free(16) sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof(buf)) - uint64(1))), uintptr(unsafe.Pointer(&buf)), ts+13023 /* "%p" */, libc.VaList(bp, p)) return uintptr(unsafe.Pointer(&buf)) } var buf [100]int8 /* test_blob.c:38:15: */ // Attempt to extract a blob handle (type sqlite3_blob*) from the Tcl // object passed as the second argument. If successful, set *ppBlob to // point to the blob handle and return TCL_OK. Otherwise, store an error // message in the tcl interpreter and return TCL_ERROR. The final value // of *ppBlob is undefined in this case. // // If the object contains a string that begins with "incrblob_", then it // is assumed to be the name of a Tcl channel opened using the [db incrblob] // command (see tclsqlite.c). Otherwise, it is assumed to be a pointer // encoded using the ptrToText() routine or similar. func blobHandleFromObj1(tls *libc.TLS, interp uintptr, pObj uintptr, ppBlob uintptr) int32 { /* test_blob.c:55:12: */ bp := tls.Alloc(8) defer tls.Free(8) var z uintptr // var n int32 at bp, 4 z = tcl.XTcl_GetStringFromObj(tls, pObj, bp /* &n */) if *(*int32)(unsafe.Pointer(bp /* n */)) == 0 { *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) } else if (*(*int32)(unsafe.Pointer(bp /* n */)) > 9) && (0 == libc.Xmemcmp(tls, ts+27660 /* "incrblob_" */, z, uint64(9))) { // var notUsed int32 at bp+4, 4 var channel Tcl_Channel var instanceData ClientData channel = tcl.XTcl_GetChannel(tls, interp, z, bp+4 /* ¬Used */) if !(channel != 0) { return TCL_ERROR } tcl.XTcl_Flush(tls, channel) tcl.XTcl_Seek(tls, channel, int64(0), SEEK_SET) instanceData = tcl.XTcl_GetChannelInstanceData(tls, channel) *(*uintptr)(unsafe.Pointer(ppBlob)) = *(*uintptr)(unsafe.Pointer(instanceData)) } else { *(*uintptr)(unsafe.Pointer(ppBlob)) = sqlite3TestTextToPtr(tls, z) } return TCL_OK } // Like Tcl_GetString(), except that if the string is 0 bytes in size, a // NULL Pointer is returned. func blobStringFromObj(tls *libc.TLS, pObj uintptr) uintptr { /* test_blob.c:90:13: */ bp := tls.Alloc(4) defer tls.Free(4) // var n int32 at bp, 4 var z uintptr z = tcl.XTcl_GetStringFromObj(tls, pObj, bp /* &n */) return func() uintptr { if *(*int32)(unsafe.Pointer(bp /* n */)) != 0 { return z } return uintptr(0) }() } // sqlite3_blob_open DB DATABASE TABLE COLUMN ROWID FLAGS VARNAME // // Tcl test harness for the sqlite3_blob_open() function. func test_blob_open(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_blob.c:102:26: */ bp := tls.Alloc(40) defer tls.Free(40) // var db uintptr at bp+8, 8 var zDb uintptr var zTable uintptr var zColumn uintptr // var iRowid Tcl_WideInt at bp+16, 8 // var flags int32 at bp, 4 var zVarname uintptr // var nVarname int32 at bp+24, 4 *(*uintptr)(unsafe.Pointer(bp + 32 /* pBlob */)) = bp /* &flags */ // Non-zero initialization var rc int32 if objc != 8 { var zUsage uintptr = ts + 27670 /* "DB DATABASE TABL..." */ tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, zUsage) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+8 /* &db */) != 0 { return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zTable = blobStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) zColumn = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 5*8)), bp+16 /* &iRowid */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 6*8)), bp /* &flags */) != 0 { return TCL_ERROR } zVarname = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 7*8)), bp+24 /* &nVarname */) if *(*int32)(unsafe.Pointer(bp + 24 /* nVarname */)) > 0 { rc = sqlite3.Xsqlite3_blob_open(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)), zDb, zTable, zColumn, *(*Tcl_WideInt)(unsafe.Pointer(bp + 16 /* iRowid */)), *(*int32)(unsafe.Pointer(bp /* flags */)), bp+32 /* &pBlob */) tcl.XTcl_SetVar2(tls, interp, zVarname, uintptr(0), ptrToText(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pBlob */))), 0) } else { rc = sqlite3.Xsqlite3_blob_open(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)), zDb, zTable, zColumn, *(*Tcl_WideInt)(unsafe.Pointer(bp + 16 /* iRowid */)), *(*int32)(unsafe.Pointer(bp /* flags */)), uintptr(0)) } if rc == SQLITE_OK { tcl.XTcl_ResetResult(tls, interp) } else { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_ERROR } return TCL_OK } // sqlite3_blob_close HANDLE func test_blob_close(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_blob.c:153:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pBlob uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } if blobHandleFromObj1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &pBlob */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp /* pBlob */))) if rc != 0 { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) } else { tcl.XTcl_ResetResult(tls, interp) } return TCL_OK } // sqlite3_blob_bytes HANDLE func test_blob_bytes(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_blob.c:181:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var pBlob uintptr at bp, 8 var nByte int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } if blobHandleFromObj1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &pBlob */) != 0 { return TCL_ERROR } nByte = sqlite3.Xsqlite3_blob_bytes(tls, *(*uintptr)(unsafe.Pointer(bp /* pBlob */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nByte)) return TCL_OK } // sqlite3_blob_read CHANNEL OFFSET N // // This command is used to test the sqlite3_blob_read() in ways that // the Tcl channel interface does not. The first argument should // be the name of a valid channel created by the [incrblob] method // of a database handle. This function calls sqlite3_blob_read() // to read N bytes from offset OFFSET from the underlying SQLite // blob handle. // // On success, a byte-array object containing the read data is // returned. On failure, the interpreter result is set to the // text representation of the returned error code (i.e. "SQLITE_NOMEM") // and a Tcl exception is thrown. func test_blob_read(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_blob.c:217:26: */ bp := tls.Alloc(40) defer tls.Free(40) // var pBlob uintptr at bp+24, 8 // var nByte int32 at bp+36, 4 // var iOffset int32 at bp+32, 4 var zBuf uintptr = uintptr(0) var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27722 /* "CHANNEL OFFSET N" */) return TCL_ERROR } if blobHandleFromObj1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &pBlob */) != 0 { return TCL_ERROR } if (TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+32 /* &iOffset */)) || (TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+36 /* &nByte */)) { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 36 /* nByte */)) > 0 { zBuf = tcl.XTcl_AttemptAlloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 36 /* nByte */)))) if zBuf == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+27739 /* "out of memory in..." */, 0)) return TCL_ERROR } } rc = sqlite3.Xsqlite3_blob_read(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pBlob */)), zBuf, *(*int32)(unsafe.Pointer(bp + 36 /* nByte */)), *(*int32)(unsafe.Pointer(bp + 32 /* iOffset */))) if rc == SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, zBuf, *(*int32)(unsafe.Pointer(bp + 36 /* nByte */)))) } else { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) } tcl.XTcl_Free(tls, zBuf) return func() int32 { if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR }() } // sqlite3_blob_write HANDLE OFFSET DATA ?NDATA? // // This command is used to test the sqlite3_blob_write() in ways that // the Tcl channel interface does not. The first argument should // be the name of a valid channel created by the [incrblob] method // of a database handle. This function calls sqlite3_blob_write() // to write the DATA byte-array to the underlying SQLite blob handle. // at offset OFFSET. // // On success, an empty string is returned. On failure, the interpreter // result is set to the text representation of the returned error code // (i.e. "SQLITE_NOMEM") and a Tcl exception is thrown. func test_blob_write(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_blob.c:273:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var pBlob uintptr at bp, 8 // var iOffset int32 at bp+8, 4 var rc int32 var zBuf uintptr // var nBuf int32 at bp+12, 4 if (objc != 4) && (objc != 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27800 /* "HANDLE OFFSET DA..." */) return TCL_ERROR } if blobHandleFromObj1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &pBlob */) != 0 { return TCL_ERROR } if TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &iOffset */) { return TCL_ERROR } zBuf = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+12 /* &nBuf */) if (objc == 5) && (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+12 /* &nBuf */) != 0) { return TCL_ERROR } rc = sqlite3.Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp /* pBlob */)), zBuf, *(*int32)(unsafe.Pointer(bp + 12 /* nBuf */)), *(*int32)(unsafe.Pointer(bp + 8 /* iOffset */))) if rc != SQLITE_OK { tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) } return func() int32 { if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR }() } // Register commands with the TCL interpreter. func Sqlitetest_blob_Init(tls *libc.TLS, interp uintptr) int32 { /* test_blob.c:312:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd5)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd5[i].FzName, aObjCmd5[i].FxProc, uintptr(0), uintptr(0)) } return TCL_OK } var aObjCmd5 = [5]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 27827 /* "sqlite3_blob_ope..." */, FxProc: 0}, {FzName: ts + 27845 /* "sqlite3_blob_clo..." */, FxProc: 0}, {FzName: ts + 27864 /* "sqlite3_blob_byt..." */, FxProc: 0}, {FzName: ts + 27883 /* "sqlite3_blob_rea..." */, FxProc: 0}, {FzName: ts + 27901 /* "sqlite3_blob_wri..." */, FxProc: 0}, } /* test_blob.c:317:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // Usage: sqlite3_shared_cache_report // // Return a list of file that are shared and the number of // references to each file. func sqlite3BtreeSharedCacheReport(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_btree.c:29:19: */ var pBt uintptr var pRet uintptr = tcl.XTcl_NewObj(tls) for pBt = sqlite3.Xsqlite3SharedCacheList; pBt != 0; pBt = (*BtShared)(unsafe.Pointer(pBt)).FpNext { var zFile uintptr = sqlite3.Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, 1) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, zFile, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, (*BtShared)(unsafe.Pointer(pBt)).FnRef)) } tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } // Print debugging information about all cursors to standard output. func sqlite3BtreeCursorList(tls *libc.TLS, p uintptr) { /* test_btree.c:52:6: */ } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Macro to stringify the results of the evaluation a pre-processor // macro. i.e. so that STRINGVALUE(SQLITE_NOMEM) -> "7". // This routine sets entries in the global ::sqlite_options() array variable // according to the compile-time configuration of the database. Test // procedures use this to determine when tests should be omitted. func set_options(tls *libc.TLS, interp uintptr) { /* test_config.c:47:13: */ tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+27935 /* "malloc_usable_si..." */, ts+13875, /* "0" */ TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+27954 /* "rowid32" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+27962 /* "casesensitivelik..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+27980 /* "curdir" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+27989 /* "win32malloc" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28001 /* "debug" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28007 /* "default_ckptfull..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28029 /* "direct_read" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28041 /* "dirsync" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28049 /* "lfs" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28053 /* "pagecache_overfl..." */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28078 /* "mmap" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28083, /* "worker_threads" */ ts+28098 /* "8" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28100 /* "memdebug" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28109 /* "8_3_names" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28119 /* "cursorhints" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28131 /* "hiddencolumns" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+13154 /* "deserialize" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28145 /* "mathlib" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28153 /* "mem3" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28158 /* "mem5" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28163 /* "offset_sql_func" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+13262 /* "preupdate" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28179 /* "snapshot" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28188 /* "mutex" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28194 /* "mutex_noop" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28205 /* "altertable" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+1818 /* "analyze" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28216 /* "api_armor" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28226 /* "atomicwrite" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28238 /* "json1" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28244 /* "has_codec" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28254 /* "like_match_blobs" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28271 /* "attach" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28278 /* "auth" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28283 /* "autoinc" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+12735 /* "autoindex" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28291 /* "autoreset" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28301 /* "autovacuum" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28312, /* "default_autovacu..." */ ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28331 /* "between_opt" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28343 /* "builtin_test" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28356 /* "bloblit" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28364 /* "cast" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28369 /* "check" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28375 /* "cte" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28379 /* "columnmetadata" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28394 /* "oversize_cell_ch..." */, ts+13875, /* "0" */ TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28414 /* "compileoption_di..." */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+13133 /* "complete" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28434 /* "compound" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28443 /* "conflict" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28452 /* "crashtest" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28462 /* "datetime" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28471 /* "decltype" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28480 /* "deprecated" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28491 /* "diskio" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+4845 /* "explain" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28498 /* "floatingpoint" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28512 /* "foreignkey" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28523 /* "fts1" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28528 /* "fts2" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28533 /* "fts3" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28538 /* "fts5" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28543 /* "fts3_unicode" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28556 /* "fts4_deferred" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28570 /* "gettable" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28579 /* "icu" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28583 /* "icu_collations" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+10526 /* "incrblob" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28598 /* "integrityck" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28610 /* "legacyformat" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28623 /* "like_opt" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28632 /* "load_ext" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28641 /* "localtime" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28651 /* "lookaside" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28661, /* "long_double" */ func() uintptr { if uint64(unsafe.Sizeof(float64(0))) > uint64(unsafe.Sizeof(float64(0))) { return ts + 27987 /* "1" */ } return ts + 13875 /* "0" */ }(), TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28673 /* "memorydb" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28682 /* "memorymanage" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28695 /* "mergesort" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28705 /* "null_trim" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28715 /* "or_opt" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28722 /* "rbu" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28726 /* "pager_pragmas" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28740 /* "pragma" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+10201 /* "progress" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28747 /* "reindex" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28755 /* "rtree" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28761 /* "rtree_int_only" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28776 /* "schema_pragmas" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28791 /* "schema_version" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28806 /* "session" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+18584 /* "stat4" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28814 /* "stmtvtab" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28823 /* "scanstatus" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28834 /* "lock_proxy_pragm..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28853 /* "prefer_proxy_loc..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28874 /* "shared_cache" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28887 /* "subquery" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28896 /* "tclvar" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28903, /* "threadsafe" */ func() uintptr { if 1 != 0 { return ts + 27987 /* "1" */ } return ts + 13875 /* "0" */ }(), TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28914, /* "threadsafe1" */ func() uintptr { if SQLITE_THREADSAFE == 1 { return ts + 27987 /* "1" */ } return ts + 13875 /* "0" */ }(), TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28926, /* "threadsafe2" */ func() uintptr { if SQLITE_THREADSAFE == 2 { return ts + 27987 /* "1" */ } return ts + 13875 /* "0" */ }(), TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28938 /* "tempdb" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+13347 /* "trace" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28945 /* "trigger" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28953 /* "truncate_opt" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+15410 /* "utf16" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28966 /* "vacuum" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28973 /* "view" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28978 /* "vtab" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28983 /* "wal" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28987 /* "wsd" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+28991 /* "update_delete_li..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+13374 /* "unlock_notify" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29011 /* "fast_secure_dele..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29030 /* "secure_delete" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29044 /* "userauth" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29053 /* "multiplex_ext_ov..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29077 /* "yytrackmaxstackd..." */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29098 /* "sqllog" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29105 /* "uri_00_error" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29118 /* "normalize" */, ts+13875 /* "0" */, TCL_GLOBAL_ONLY) tcl.XTcl_SetVar2(tls, interp, ts+27920 /* "sqlite_options" */, ts+29128 /* "windowfunc" */, ts+27987 /* "1" */, TCL_GLOBAL_ONLY) { tcl.XTcl_LinkVar(tls, interp, ts+29139 /* "SQLITE_MAX_LENGT..." */, uintptr(unsafe.Pointer(&cv_MAX_LENGTH)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29157 /* "SQLITE_MAX_COLUM..." */, uintptr(unsafe.Pointer(&cv_MAX_COLUMN)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29175 /* "SQLITE_MAX_SQL_L..." */, uintptr(unsafe.Pointer(&cv_MAX_SQL_LENGTH)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29197 /* "SQLITE_MAX_EXPR_..." */, uintptr(unsafe.Pointer(&cv_MAX_EXPR_DEPTH)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29219 /* "SQLITE_MAX_COMPO..." */, uintptr(unsafe.Pointer(&cv_MAX_COMPOUND_SELECT)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29246 /* "SQLITE_MAX_VDBE_..." */, uintptr(unsafe.Pointer(&cv_MAX_VDBE_OP)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29265 /* "SQLITE_MAX_FUNCT..." */, uintptr(unsafe.Pointer(&cv_MAX_FUNCTION_ARG)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29289 /* "SQLITE_MAX_VARIA..." */, uintptr(unsafe.Pointer(&cv_MAX_VARIABLE_NUMBER)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29316 /* "SQLITE_MAX_PAGE_..." */, uintptr(unsafe.Pointer(&cv_MAX_PAGE_SIZE)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29337 /* "SQLITE_MAX_PAGE_..." */, uintptr(unsafe.Pointer(&cv_MAX_PAGE_COUNT)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29359 /* "SQLITE_MAX_LIKE_..." */, uintptr(unsafe.Pointer(&cv_MAX_LIKE_PATTERN_LENGTH)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29390 /* "SQLITE_MAX_TRIGG..." */, uintptr(unsafe.Pointer(&cv_MAX_TRIGGER_DEPTH)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29415 /* "SQLITE_DEFAULT_C..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_CACHE_SIZE)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29441 /* "SQLITE_DEFAULT_P..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_PAGE_SIZE)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29466 /* "SQLITE_DEFAULT_F..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_FILE_FORMAT)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29493 /* "SQLITE_DEFAULT_S..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_SYNCHRONOUS)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29520 /* "SQLITE_DEFAULT_W..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_WAL_SYNCHRONOUS)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29551 /* "SQLITE_MAX_ATTAC..." */, uintptr(unsafe.Pointer(&cv_MAX_ATTACHED)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29571 /* "SQLITE_MAX_DEFAU..." */, uintptr(unsafe.Pointer(&cv_MAX_DEFAULT_PAGE_SIZE)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29600 /* "SQLITE_MAX_WORKE..." */, uintptr(unsafe.Pointer(&cv_MAX_WORKER_THREADS)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29626 /* "TEMP_STORE" */, uintptr(unsafe.Pointer(&cv_TEMP_STORE)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29637 /* "_MSC_VER" */, uintptr(unsafe.Pointer(&cv__MSC_VER)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } { tcl.XTcl_LinkVar(tls, interp, ts+29646 /* "__GNUC__" */, uintptr(unsafe.Pointer(&cv___GNUC__)), (TCL_LINK_INT | TCL_LINK_READ_ONLY)) } } var cv_MAX_LENGTH int32 = SQLITE_MAX_LENGTH /* test_config.c:778:3 */ var cv_MAX_COLUMN int32 = SQLITE_MAX_COLUMN /* test_config.c:779:3 */ var cv_MAX_SQL_LENGTH int32 = SQLITE_MAX_SQL_LENGTH /* test_config.c:780:3 */ var cv_MAX_EXPR_DEPTH int32 = SQLITE_MAX_EXPR_DEPTH /* test_config.c:781:3 */ var cv_MAX_COMPOUND_SELECT int32 = SQLITE_MAX_COMPOUND_SELECT /* test_config.c:782:3 */ var cv_MAX_VDBE_OP int32 = SQLITE_MAX_VDBE_OP /* test_config.c:783:3 */ var cv_MAX_FUNCTION_ARG int32 = SQLITE_MAX_FUNCTION_ARG /* test_config.c:784:3 */ var cv_MAX_VARIABLE_NUMBER int32 = SQLITE_MAX_VARIABLE_NUMBER /* test_config.c:785:3 */ var cv_MAX_PAGE_SIZE int32 = SQLITE_MAX_PAGE_SIZE /* test_config.c:786:3 */ var cv_MAX_PAGE_COUNT int32 = SQLITE_MAX_PAGE_COUNT /* test_config.c:787:3 */ var cv_MAX_LIKE_PATTERN_LENGTH int32 = SQLITE_MAX_LIKE_PATTERN_LENGTH /* test_config.c:788:3 */ var cv_MAX_TRIGGER_DEPTH int32 = SQLITE_MAX_TRIGGER_DEPTH /* test_config.c:789:3 */ var cv_DEFAULT_CACHE_SIZE int32 = -2000 /* test_config.c:790:3 */ var cv_DEFAULT_PAGE_SIZE int32 = SQLITE_DEFAULT_PAGE_SIZE /* test_config.c:791:3 */ var cv_DEFAULT_FILE_FORMAT int32 = SQLITE_DEFAULT_FILE_FORMAT /* test_config.c:792:3 */ var cv_DEFAULT_SYNCHRONOUS int32 = SQLITE_DEFAULT_SYNCHRONOUS /* test_config.c:793:3 */ var cv_DEFAULT_WAL_SYNCHRONOUS int32 = SQLITE_DEFAULT_SYNCHRONOUS /* test_config.c:794:3 */ var cv_MAX_ATTACHED int32 = SQLITE_MAX_ATTACHED /* test_config.c:795:3 */ var cv_MAX_DEFAULT_PAGE_SIZE int32 = SQLITE_MAX_DEFAULT_PAGE_SIZE /* test_config.c:796:3 */ var cv_MAX_WORKER_THREADS int32 = SQLITE_MAX_WORKER_THREADS /* test_config.c:797:3 */ var cv_TEMP_STORE int32 = SQLITE_TEMP_STORE /* test_config.c:800:22 */ var cv__MSC_VER int32 = 1 /* test_config.c:807:22 */ var cv___GNUC__ int32 = 1 /* test_config.c:814:22 */ // Register commands with the TCL interpreter. func Sqliteconfig_Init(tls *libc.TLS, interp uintptr) int32 { /* test_config.c:825:5: */ set_options(tls, interp) return TCL_OK } // // END OF REGISTRATION API // //******* End of fts5.h ******** // The following #defines are copied from test_multiplex.c // This routine is a copy of (most of) the code from SQLite function // sqlite3FileSuffix3(). It modifies the filename in buffer z in the // same way as SQLite does when in 8.3 filenames mode. func sqlite3Delete83Name(tls *libc.TLS, z uintptr) { /* test_delete.c:46:13: */ var i int32 var sz int32 sz = int32(libc.Xstrlen(tls, z)) for i = (sz - 1); ((i > 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != '/')) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != '.'); i-- { } if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == '.') && (sz > (i + 4)) { libc.Xmemmove(tls, (z + uintptr((i + 1))), (z + uintptr((sz - 3))), uint64(4)) } } // zFile is a filename. Assuming no error occurs, if this file exists, // set *pbExists to true and unlink it. Or, if the file does not exist, // set *pbExists to false before returning. // // If an error occurs, non-zero is returned. Or, if no error occurs, zero. func sqlite3DeleteUnlinkIfExists(tls *libc.TLS, pVfs uintptr, zFile uintptr, pbExists uintptr) int32 { /* test_delete.c:60:12: */ var rc int32 = SQLITE_ERROR if pVfs != 0 { if pbExists != 0 { *(*int32)(unsafe.Pointer(pbExists)) = 1 } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zFile, 0) if rc == (SQLITE_IOERR | (int32(23) << 8)) { if pbExists != 0 { *(*int32)(unsafe.Pointer(pbExists)) = 0 } rc = SQLITE_OK } } return rc } // Delete the database file identified by the string argument passed to this // function. The string must contain a filename, not an SQLite URI. func sqlite3_delete_database(tls *libc.TLS, zFile uintptr) int32 { /* test_delete.c:95:16: */ bp := tls.Alloc(172) defer tls.Free(172) var zBuf uintptr // Buffer to sprintf() filenames to var nBuf int32 // Size of buffer in bytes var rc int32 = 0 // System error code var i int32 // Iterate through azFmt[] and aMFile[] *(*[4]uintptr)(unsafe.Pointer(bp + 40 /* azFmt */)) = [4]uintptr{ts /* "%s" */, ts + 29655 /* "%s-journal" */, ts + 29666 /* "%s-wal" */, ts + 29673 /* "%s-shm" */} *(*[6]MFile)(unsafe.Pointer(bp + 72 /* aMFile */)) = [6]MFile{ {FzFmt: ts + 29680 /* "%s%03d" */}, {FzFmt: ts + 29687 /* "%s-journal%03d" */}, {FzFmt: ts + 29702 /* "%s-wal%03d" */}, {FzFmt: ts + 29680 /* "%s%03d" */, Fb83: 1}, {FzFmt: ts + 29687 /* "%s-journal%03d" */, FiOffset: SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET, Fb83: 1}, {FzFmt: ts + 29702 /* "%s-wal%03d" */, FiOffset: SQLITE_MULTIPLEX_WAL_8_3_OFFSET, Fb83: 1}, } var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, ts+29713 /* "win32" */) // Allocate a buffer large enough for any of the files that need to be // deleted. nBuf = (int32(libc.Xstrlen(tls, zFile)) + 100) zBuf = sqlite3.Xsqlite3_malloc(tls, nBuf) if zBuf == uintptr(0) { return SQLITE_NOMEM } // Delete both the regular and 8.3 filenames versions of the database, // journal, wal and shm files. for i = 0; (rc == 0) && (uint64(i) < (uint64(unsafe.Sizeof([4]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))); i++ { sqlite3.Xsqlite3_snprintf(tls, nBuf, zBuf, *(*uintptr)(unsafe.Pointer(bp + 40 /* &azFmt[0] */ + uintptr(i)*8)), libc.VaList(bp, zFile)) rc = sqlite3DeleteUnlinkIfExists(tls, pVfs, zBuf, uintptr(0)) if (rc == 0) && (i != 0) { sqlite3Delete83Name(tls, zBuf) rc = sqlite3DeleteUnlinkIfExists(tls, pVfs, zBuf, uintptr(0)) } } // Delete any multiplexor files for i = 0; (rc == 0) && (uint64(i) < (uint64(unsafe.Sizeof([6]MFile{})) / uint64(unsafe.Sizeof(MFile{})))); i++ { var p uintptr = (bp + 72 /* &aMFile */ + uintptr(i)*16) var iChunk int32 for iChunk = 1; iChunk <= MX_CHUNK_NUMBER; iChunk++ { // var bExists int32 at bp+168, 4 sqlite3.Xsqlite3_snprintf(tls, nBuf, zBuf, (*MFile)(unsafe.Pointer(p)).FzFmt, libc.VaList(bp+16, zFile, (iChunk+(*MFile)(unsafe.Pointer(p)).FiOffset))) if (*MFile)(unsafe.Pointer(p)).Fb83 != 0 { sqlite3Delete83Name(tls, zBuf) } rc = sqlite3DeleteUnlinkIfExists(tls, pVfs, zBuf, bp+168 /* &bExists */) if (*(*int32)(unsafe.Pointer(bp + 168 /* bExists */)) == 0) || (rc != 0) { break } } } sqlite3.Xsqlite3_free(tls, zBuf) return func() int32 { if rc != 0 { return SQLITE_ERROR } return SQLITE_OK }() } type MFile = struct { FzFmt uintptr FiOffset int32 Fb83 int32 } /* test_delete.c:105:3 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: func Sqlitetest_demovfs_Init(tls *libc.TLS, interp uintptr) int32 { /* test_demovfs.c:686:5: */ return TCL_OK } // Maximum pathname length supported by the devsym backend. // Name used to identify this VFS. type devsym_file1 = struct { Fbase sqlite3_file FpReal uintptr } /* test_devsym.c:33:9 */ // Maximum pathname length supported by the devsym backend. // Name used to identify this VFS. type devsym_file = devsym_file1 /* test_devsym.c:33:28 */ type DevsymGlobal = struct { FpVfs uintptr FiDeviceChar int32 FiSectorSize int32 FnWriteCrash int32 _ [4]byte } /* test_devsym.c:76:1 */ var g1 = DevsymGlobal{FiSectorSize: 512} /* test_devsym.c:82:21 */ // Close an devsym-file. func devsymClose(tls *libc.TLS, pFile uintptr) int32 { /* test_devsym.c:87:12: */ var p uintptr = pFile sqlite3.Xsqlite3OsClose(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) return SQLITE_OK } // Read data from an devsym-file. func devsymRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_devsym.c:96:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsRead(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) } // Write data to an devsym-file. func devsymWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_devsym.c:109:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsWrite(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) } // Truncate an devsym-file. func devsymTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_devsym.c:122:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsTruncate(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, size) } // Sync an devsym-file. func devsymSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test_devsym.c:130:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsSync(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, flags) } // Return the current file-size of an devsym-file. func devsymFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_devsym.c:138:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsFileSize(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, pSize) } // Lock an devsym-file. func devsymLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_devsym.c:146:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, eLock) } // Unlock an devsym-file. func devsymUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_devsym.c:154:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsUnlock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, eLock) } // Check if another file-handle holds a RESERVED lock on an devsym-file. func devsymCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_devsym.c:162:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, pResOut) } // File control method. For custom operations on an devsym-file. func devsymFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_devsym.c:170:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsFileControl(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, op, pArg) } // Return the sector-size in bytes for an devsym-file. func devsymSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_devsym.c:178:12: */ return g1.FiSectorSize } // Return the device characteristic flags supported by an devsym-file. func devsymDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_devsym.c:185:12: */ return g1.FiDeviceChar } // Shared-memory methods are all pass-thrus. func devsymShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test_devsym.c:192:12: */ var p uintptr = pFile return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*devsym_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 112 /* &.xShmLock */))))(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) } func devsymShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_devsym.c:196:12: */ var p uintptr = pFile return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*devsym_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) } func devsymShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_devsym.c:206:13: */ var p uintptr = pFile (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*devsym_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 120 /* &.xShmBarrier */))))(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } func devsymShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* test_devsym.c:210:12: */ var p uintptr = pFile return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*devsym_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, delFlag) } // Open an devsym file handle. func devsymOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_devsym.c:220:12: */ var rc int32 var p uintptr = pFile (*devsym_file)(unsafe.Pointer(p)).FpReal = (p + 1*16) rc = sqlite3.Xsqlite3OsOpen(tls, g1.FpVfs, zName, (*devsym_file)(unsafe.Pointer(p)).FpReal, flags, pOutFlags) if (*sqlite3_file)(unsafe.Pointer((*devsym_file)(unsafe.Pointer(p)).FpReal)).FpMethods != 0 { (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&devsym_io_methods)) } return rc } var devsym_io_methods = sqlite3_io_methods{ FiVersion: 2, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap } /* test_devsym.c:227:27 */ // Delete the file located at zPath. If the dirSync argument is true, // ensure the file-system modifications are synced to disk before // returning. func devsymDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_devsym.c:262:12: */ return sqlite3.Xsqlite3OsDelete(tls, g1.FpVfs, zPath, dirSync) } // Test for access permissions. Return true if the requested permission // is available, or false otherwise. func devsymAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_devsym.c:270:12: */ return sqlite3.Xsqlite3OsAccess(tls, g1.FpVfs, zPath, flags, pResOut) } // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. func devsymFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* test_devsym.c:284:12: */ return sqlite3.Xsqlite3OsFullPathname(tls, g1.FpVfs, zPath, nOut, zOut) } // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. func devsymRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test_devsym.c:329:12: */ return sqlite3.Xsqlite3OsRandomness(tls, g1.FpVfs, nByte, zBufOut) } // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. func devsymSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* test_devsym.c:337:12: */ return sqlite3.Xsqlite3OsSleep(tls, g1.FpVfs, nMicro) } // Return the current time as a Julian Day number in *pTimeOut. func devsymCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* test_devsym.c:344:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((g1.FpVfs + 120 /* &.xCurrentTime */))))(tls, g1.FpVfs, pTimeOut) } // Return the sector-size in bytes for an writecrash-file. func writecrashSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_devsym.c:351:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsSectorSize(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } // Return the device characteristic flags supported by an writecrash-file. func writecrashDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_devsym.c:359:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsDeviceCharacteristics(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal) } // Write data to an writecrash-file. func writecrashWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_devsym.c:367:12: */ var p uintptr = pFile if g1.FnWriteCrash > 0 { g1.FnWriteCrash-- if g1.FnWriteCrash == 0 { libc.Xabort(tls) } } return sqlite3.Xsqlite3OsWrite(tls, (*devsym_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) } // Open an writecrash file handle. func writecrashOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_devsym.c:384:12: */ var rc int32 var p uintptr = pFile (*devsym_file)(unsafe.Pointer(p)).FpReal = (p + 1*16) rc = sqlite3.Xsqlite3OsOpen(tls, g1.FpVfs, zName, (*devsym_file)(unsafe.Pointer(p)).FpReal, flags, pOutFlags) if (*sqlite3_file)(unsafe.Pointer((*devsym_file)(unsafe.Pointer(p)).FpReal)).FpMethods != 0 { (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&writecrash_io_methods)) } return rc } var writecrash_io_methods = sqlite3_io_methods{ FiVersion: 2, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap } /* test_devsym.c:391:27 */ var devsym_vfs = sqlite3_vfs{ FiVersion: 2, // iVersion FszOsFile: int32(unsafe.Sizeof(devsym_file{})), // szOsFile FmxPathname: DEVSYM_MAX_PATHNAME, // pNext FzName: ts + 29719, /* "devsym" */ // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTimeInt64 } /* test_devsym.c:421:20 */ var writecrash_vfs = sqlite3_vfs{ FiVersion: 2, // iVersion FszOsFile: int32(unsafe.Sizeof(devsym_file{})), // szOsFile FmxPathname: DEVSYM_MAX_PATHNAME, // pNext FzName: ts + 29726, /* "writecrash" */ // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTimeInt64 } /* test_devsym.c:450:20 */ // This procedure registers the devsym vfs with SQLite. If the argument is // true, the devsym vfs becomes the new default vfs. It is the only publicly // available function in this file. func devsym_register(tls *libc.TLS, iDeviceChar int32, iSectorSize int32) { /* test_devsym.c:485:6: */ if g1.FpVfs == uintptr(0) { g1.FpVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 4 /* &.szOsFile */)) += ((*sqlite3_vfs)(unsafe.Pointer(g1.FpVfs)).FszOsFile) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 4 /* &.szOsFile */)) += ((*sqlite3_vfs)(unsafe.Pointer(g1.FpVfs)).FszOsFile) sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&devsym_vfs)), 0) sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&writecrash_vfs)), 0) } if iDeviceChar >= 0 { g1.FiDeviceChar = iDeviceChar } else { g1.FiDeviceChar = 0 } if iSectorSize >= 0 { g1.FiSectorSize = iSectorSize } else { g1.FiSectorSize = 512 } } func devsym_unregister(tls *libc.TLS) { /* test_devsym.c:506:6: */ sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(unsafe.Pointer(&devsym_vfs))) sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(unsafe.Pointer(&writecrash_vfs))) g1.FpVfs = uintptr(0) g1.FiDeviceChar = 0 g1.FiSectorSize = 0 } func devsym_crash_on_write(tls *libc.TLS, nWrite int32) { /* test_devsym.c:514:6: */ if g1.FpVfs == uintptr(0) { g1.FpVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 4 /* &.szOsFile */)) += ((*sqlite3_vfs)(unsafe.Pointer(g1.FpVfs)).FszOsFile) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 4 /* &.szOsFile */)) += ((*sqlite3_vfs)(unsafe.Pointer(g1.FpVfs)).FszOsFile) sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&devsym_vfs)), 0) sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&writecrash_vfs)), 0) } g1.FnWriteCrash = nWrite } type fs_vtab1 = struct { Fbase sqlite3_vtab Fdb uintptr FzDb uintptr FzTbl uintptr } /* test_fs.c:96:9 */ type fs_vtab = fs_vtab1 /* test_fs.c:96:24 */ type fs_cursor1 = struct { Fbase sqlite3_vtab_cursor FpStmt uintptr FzBuf uintptr FnBuf int32 FnAlloc int32 } /* test_fs.c:97:9 */ type fs_cursor = fs_cursor1 /* test_fs.c:97:26 */ // ************************************************************************ // // Start of fsdir implementation. type FsdirVtab1 = struct{ Fbase sqlite3_vtab } /* test_fs.c:121:9 */ // ************************************************************************ // // Start of fsdir implementation. type FsdirVtab = FsdirVtab1 /* test_fs.c:121:26 */ type FsdirCsr1 = struct { Fbase sqlite3_vtab_cursor FzDir uintptr FpDir uintptr FiRowid sqlite3_int64 FpEntry uintptr } /* test_fs.c:122:9 */ type FsdirCsr = FsdirCsr1 /* test_fs.c:122:25 */ // This function is the implementation of both the xConnect and xCreate // methods of the fsdir virtual table. // // The argv[] array contains the following: // // argv[0] -> module name ("fs") // argv[1] -> database name // argv[2] -> table name // argv[...] -> other module argument fields. func fsdirConnect1(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_fs.c:146:12: */ var pTab uintptr if argc != 3 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+27470 /* "wrong number of ..." */, 0) return SQLITE_ERROR } pTab = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(FsdirVtab{}))) if !(pTab != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(FsdirVtab{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = (pTab /* &.base */) sqlite3.Xsqlite3_declare_vtab(tls, db, ts+29737 /* "CREATE TABLE xyz..." */) return SQLITE_OK } // xDestroy/xDisconnect implementation. func fsdirDisconnect1(tls *libc.TLS, pVtab uintptr) int32 { /* test_fs.c:173:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // xBestIndex implementation. The only constraint supported is: // // (dir = ?) func fsdirBestIndex1(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_fs.c:183:12: */ var ii int32 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1000000000.0 for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var p uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) if (((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { var pUsage uintptr pUsage = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = 1 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1.0 break } } return SQLITE_OK } // xOpen implementation. // // Open a new fsdir cursor. func fsdirOpen1(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_fs.c:209:12: */ var pCur uintptr // Allocate an extra 256 bytes because it is undefined how big dirent.d_name // is and we need enough space. Linux provides plenty already, but // Solaris only provides one byte. pCur = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(FsdirCsr{})) + uint64(256)))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(FsdirCsr{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Close a fsdir cursor. func fsdirClose1(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:224:12: */ var pCur uintptr = cur if (*FsdirCsr)(unsafe.Pointer(pCur)).FpDir != 0 { closedir(tls, (*FsdirCsr)(unsafe.Pointer(pCur)).FpDir) } sqlite3.Xsqlite3_free(tls, (*FsdirCsr)(unsafe.Pointer(pCur)).FzDir) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Skip the cursor to the next entry. func fsdirNext1(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:235:12: */ var pCsr uintptr = cur if (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir != 0 { (*FsdirCsr)(unsafe.Pointer(pCsr)).FpEntry = readdir(tls, (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir) if (*FsdirCsr)(unsafe.Pointer(pCsr)).FpEntry == uintptr(0) { closedir(tls, (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir) (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir = uintptr(0) } (*FsdirCsr)(unsafe.Pointer(pCsr)).FiRowid++ } return SQLITE_OK } // xFilter method implementation. func fsdirFilter1(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_fs.c:253:12: */ var pCsr uintptr = pVtabCursor var zDir uintptr var nDir int32 if (idxNum != 1) || (argc != 1) { return SQLITE_ERROR } (*FsdirCsr)(unsafe.Pointer(pCsr)).FiRowid = int64(0) sqlite3.Xsqlite3_free(tls, (*FsdirCsr)(unsafe.Pointer(pCsr)).FzDir) if (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir != 0 { closedir(tls, (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir) (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir = uintptr(0) } zDir = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) nDir = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) (*FsdirCsr)(unsafe.Pointer(pCsr)).FzDir = sqlite3.Xsqlite3_malloc(tls, (nDir + 1)) if (*FsdirCsr)(unsafe.Pointer(pCsr)).FzDir == uintptr(0) { return SQLITE_NOMEM } libc.Xmemcpy(tls, (*FsdirCsr)(unsafe.Pointer(pCsr)).FzDir, zDir, (uint64(nDir + 1))) (*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir = opendir(tls, (*FsdirCsr)(unsafe.Pointer(pCsr)).FzDir) return fsdirNext1(tls, pVtabCursor) } // xEof method implementation. func fsdirEof1(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:287:12: */ var pCsr uintptr = cur return (libc.Bool32((*FsdirCsr)(unsafe.Pointer(pCsr)).FpDir == uintptr(0))) } // xColumn method implementation. func fsdirColumn1(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test_fs.c:295:12: */ var pCsr uintptr = cur switch i { case 0: // dir sqlite3.Xsqlite3_result_text(tls, ctx, (*FsdirCsr)(unsafe.Pointer(pCsr)).FzDir, -1, uintptr(0)) break case 1: // name sqlite3.Xsqlite3_result_text(tls, ctx, (*FsdirCsr)(unsafe.Pointer(pCsr)).FpEntry+8 /* &.d_name */, -1, libc.UintptrFromInt32(-1)) break default: } return SQLITE_OK } // xRowid method implementation. func fsdirRowid1(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test_fs.c:316:12: */ var pCsr uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*FsdirCsr)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK } // // End of fsdir implementation. // // ************************************************************************ // // Start of fstree implementation. type FstreeVtab1 = struct { Fbase sqlite3_vtab Fdb uintptr } /* test_fs.c:328:9 */ // // End of fsdir implementation. // // ************************************************************************ // // Start of fstree implementation. type FstreeVtab = FstreeVtab1 /* test_fs.c:328:27 */ type FstreeCsr1 = struct { Fbase sqlite3_vtab_cursor FpStmt uintptr Ffd int32 _ [4]byte } /* test_fs.c:329:9 */ type FstreeCsr = FstreeCsr1 /* test_fs.c:329:26 */ // This function is the implementation of both the xConnect and xCreate // methods of the fstree virtual table. // // The argv[] array contains the following: // // argv[0] -> module name ("fs") // argv[1] -> database name // argv[2] -> table name // argv[...] -> other module argument fields. func fstreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_fs.c:352:12: */ var pTab uintptr if argc != 3 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+27470 /* "wrong number of ..." */, 0) return SQLITE_ERROR } pTab = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(FstreeVtab{}))) if !(pTab != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(FstreeVtab{}))) (*FstreeVtab)(unsafe.Pointer(pTab)).Fdb = db *(*uintptr)(unsafe.Pointer(ppVtab)) = (pTab /* &.base */) sqlite3.Xsqlite3_declare_vtab(tls, db, ts+29766 /* "CREATE TABLE xyz..." */) return SQLITE_OK } // xDestroy/xDisconnect implementation. func fstreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* test_fs.c:380:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // xBestIndex implementation. The only constraint supported is: // // (dir = ?) func fstreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_fs.c:390:12: */ var ii int32 for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var p uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) if (((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0)) && (((int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_GLOB) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_LIKE)) || (int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ)) { var pUsage uintptr pUsage = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = 1 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 100000.0 return SQLITE_OK } } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1000000000.0 return SQLITE_OK } // xOpen implementation. // // Open a new fstree cursor. func fstreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_fs.c:418:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(FstreeCsr{}))) if pCur == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(FstreeCsr{}))) (*FstreeCsr)(unsafe.Pointer(pCur)).Ffd = -1 *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } func fstreeCloseFd(tls *libc.TLS, pCsr uintptr) { /* test_fs.c:428:13: */ if (*FstreeCsr)(unsafe.Pointer(pCsr)).Ffd >= 0 { libc.Xclose(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).Ffd) (*FstreeCsr)(unsafe.Pointer(pCsr)).Ffd = -1 } } // Close a fstree cursor. func fstreeClose(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:438:12: */ var pCsr uintptr = cur sqlite3.Xsqlite3_finalize(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt) fstreeCloseFd(tls, pCsr) sqlite3.Xsqlite3_free(tls, pCsr) return SQLITE_OK } // Skip the cursor to the next entry. func fstreeNext(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:449:12: */ var pCsr uintptr = cur var rc int32 fstreeCloseFd(tls, pCsr) rc = sqlite3.Xsqlite3_step(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt) if rc != SQLITE_ROW { rc = sqlite3.Xsqlite3_finalize(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt) (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt = uintptr(0) } else { rc = SQLITE_OK (*FstreeCsr)(unsafe.Pointer(pCsr)).Ffd = libc.Xopen(tls, sqlite3.Xsqlite3_column_text(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt, 0), X_O_RDONLY, 0) } return rc } // xFilter method implementation. func fstreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_fs.c:469:12: */ bp := tls.Alloc(42) defer tls.Free(42) var pCsr uintptr = pVtabCursor var pTab uintptr = (*FstreeCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab var rc int32 var zSql uintptr = ts + 29802 /* "WITH r(d) AS ( ..." */ var zRoot uintptr var nRoot int32 var zPrefix uintptr var nPrefix int32 var zDir uintptr var nDir int32 *(*[2]int8)(unsafe.Pointer(bp + 40 /* aWild */)) = [2]int8{int8(0), int8(0)} var zDrive uintptr = windirent_getenv(tls, ts+30034 /* "fstreeDrive" */) if zDrive == uintptr(0) { zDrive = windirent_getenv(tls, ts+30046 /* "SystemDrive" */) } zRoot = sqlite3.Xsqlite3_mprintf(tls, ts+30058 /* "%s%c" */, libc.VaList(bp, zDrive, '/')) nRoot = sqlite3.Xsqlite3Strlen30(tls, zRoot) zPrefix = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+24, zDrive)) nPrefix = sqlite3.Xsqlite3Strlen30(tls, zPrefix) zDir = zRoot nDir = nRoot fstreeCloseFd(tls, pCsr) sqlite3.Xsqlite3_finalize(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt) (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, (*FstreeVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, (pCsr + 8 /* &.pStmt */), uintptr(0)) if rc != SQLITE_OK { return rc } if idxNum != 0 { var zQuery uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) switch idxNum { case SQLITE_INDEX_CONSTRAINT_GLOB: *(*int8)(unsafe.Pointer(bp + 40 /* &aWild[0] */)) = int8('*') *(*int8)(unsafe.Pointer(bp + 40 /* &aWild[0] */ + 1)) = int8('?') break fallthrough case SQLITE_INDEX_CONSTRAINT_LIKE: *(*int8)(unsafe.Pointer(bp + 40 /* &aWild[0] */)) = int8('_') *(*int8)(unsafe.Pointer(bp + 40 /* &aWild[0] */ + 1)) = int8('%') break } if sqlite3.Xsqlite3_strnicmp(tls, zQuery, zPrefix, nPrefix) == 0 { var i int32 for i = nPrefix; *(*int8)(unsafe.Pointer(zQuery + uintptr(i))) != 0; i++ { if (int32(*(*int8)(unsafe.Pointer(zQuery + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp + 40 /* &aWild[0] */)))) || (int32(*(*int8)(unsafe.Pointer(zQuery + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp + 40 /* &aWild[0] */ + 1)))) { break } if int32(*(*int8)(unsafe.Pointer(zQuery + uintptr(i)))) == '/' { nDir = i } } zDir = zQuery } } if nDir == 0 { nDir = 1 } sqlite3.Xsqlite3_bind_text(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt, 1, zDir, nDir, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_bind_text(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt, 2, zRoot, nRoot, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_bind_text(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt, 3, zPrefix, nPrefix, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_free(tls, zPrefix) sqlite3.Xsqlite3_free(tls, zRoot) return fstreeNext(tls, pVtabCursor) } // xEof method implementation. func fstreeEof(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:557:12: */ var pCsr uintptr = cur return (libc.Bool32((*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt == uintptr(0))) } // xColumn method implementation. func fstreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test_fs.c:565:12: */ bp := tls.Alloc(56) defer tls.Free(56) var pCsr uintptr = cur if i == 0 { // path sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).FpStmt, 0)) } else { // var sBuf _stat64 at bp, 56 libc.X_fstat64(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).Ffd, bp /* &sBuf */) if ((int32((*_stat64)(unsafe.Pointer(bp /* &sBuf */)).Fst_mode)) & X_S_IFMT) == X_S_IFREG { if i == 1 { sqlite3.Xsqlite3_result_int64(tls, ctx, (*_stat64)(unsafe.Pointer(bp /* &sBuf */)).Fst_size) } else { var nRead int32 var aBuf uintptr = sqlite3.Xsqlite3_malloc(tls, (int32((*_stat64)(unsafe.Pointer(bp /* &sBuf */)).Fst_mode) + 1)) if !(aBuf != 0) { return SQLITE_NOMEM } nRead = libc.Xread(tls, (*FstreeCsr)(unsafe.Pointer(pCsr)).Ffd, aBuf, uint32((*_stat64)(unsafe.Pointer(bp /* &sBuf */)).Fst_mode)) if nRead != int32((*_stat64)(unsafe.Pointer(bp /* &sBuf */)).Fst_mode) { return SQLITE_IOERR } sqlite3.Xsqlite3_result_blob(tls, ctx, aBuf, nRead, libc.UintptrFromInt32(-1)) sqlite3.Xsqlite3_free(tls, aBuf) } } } return SQLITE_OK } // xRowid method implementation. func fstreeRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test_fs.c:596:12: */ *(*sqlite_int64)(unsafe.Pointer(pRowid)) = int64(0) return SQLITE_OK } // // End of fstree implementation. // // This function is the implementation of both the xConnect and xCreate // methods of the fs virtual table. // // The argv[] array contains the following: // // argv[0] -> module name ("fs") // argv[1] -> database name // argv[2] -> table name // argv[...] -> other module argument fields. func fsConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_fs.c:618:12: */ var pVtab uintptr var nByte int32 var zTbl uintptr var zDb uintptr = *(*uintptr)(unsafe.Pointer(argv + 1*8)) if argc != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+27470 /* "wrong number of ..." */, 0) return SQLITE_ERROR } zTbl = *(*uintptr)(unsafe.Pointer(argv + 3*8)) nByte = (int32((((uint64(unsafe.Sizeof(fs_vtab{})) + uint64(int32(libc.Xstrlen(tls, zTbl)))) + uint64(1)) + uint64(int32(libc.Xstrlen(tls, zDb)))) + uint64(1))) pVtab = sqlite3.Xsqlite3MallocZero(tls, uint64(nByte)) if !(pVtab != 0) { return SQLITE_NOMEM } (*fs_vtab)(unsafe.Pointer(pVtab)).FzTbl = (pVtab + 1*48) (*fs_vtab)(unsafe.Pointer(pVtab)).FzDb = ((*fs_vtab)(unsafe.Pointer(pVtab)).FzTbl + uintptr((libc.Xstrlen(tls, zTbl) + uint64(1)))) (*fs_vtab)(unsafe.Pointer(pVtab)).Fdb = db libc.Xmemcpy(tls, (*fs_vtab)(unsafe.Pointer(pVtab)).FzTbl, zTbl, libc.Xstrlen(tls, zTbl)) libc.Xmemcpy(tls, (*fs_vtab)(unsafe.Pointer(pVtab)).FzDb, zDb, libc.Xstrlen(tls, zDb)) *(*uintptr)(unsafe.Pointer(ppVtab)) = (pVtab /* &.base */) sqlite3.Xsqlite3_declare_vtab(tls, db, ts+30063 /* "CREATE TABLE x(p..." */) return SQLITE_OK } // Note that for this virtual table, the xCreate and xConnect // methods are identical. func fsDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* test_fs.c:653:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // The xDisconnect and xDestroy methods are also the same // Open a new fs cursor. func fsOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_fs.c:662:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(fs_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Close a fs cursor. func fsClose(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:672:12: */ var pCur uintptr = cur sqlite3.Xsqlite3_finalize(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt) sqlite3.Xsqlite3_free(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FzBuf) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } func fsNext(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:680:12: */ var pCur uintptr = cur var rc int32 rc = sqlite3.Xsqlite3_step(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt) if (rc == SQLITE_ROW) || (rc == SQLITE_DONE) { rc = SQLITE_OK } return rc } func fsFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_fs.c:690:12: */ bp := tls.Alloc(48) defer tls.Free(48) var rc int32 var pCur uintptr = pVtabCursor var p uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if idxNum == 1 { var zStmt uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+30100 /* "SELECT * FROM %Q..." */, libc.VaList(bp, (*fs_vtab)(unsafe.Pointer(p)).FzDb, (*fs_vtab)(unsafe.Pointer(p)).FzTbl)) if !(zStmt != 0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_prepare_v2(tls, (*fs_vtab)(unsafe.Pointer(p)).Fdb, zStmt, -1, (pCur + 8 /* &.pStmt */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zStmt) if rc == SQLITE_OK { sqlite3.Xsqlite3_bind_value(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt, 1, *(*uintptr)(unsafe.Pointer(argv))) } } else { var zStmt uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+3278 /* "SELECT * FROM %Q..." */, libc.VaList(bp+24, (*fs_vtab)(unsafe.Pointer(p)).FzDb, (*fs_vtab)(unsafe.Pointer(p)).FzTbl)) if !(zStmt != 0) { return SQLITE_NOMEM } rc = sqlite3.Xsqlite3_prepare_v2(tls, (*fs_vtab)(unsafe.Pointer(p)).Fdb, zStmt, -1, (pCur + 8 /* &.pStmt */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zStmt) } if rc == SQLITE_OK { rc = fsNext(tls, pVtabCursor) } return rc } func fsColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test_fs.c:722:12: */ bp := tls.Alloc(56) defer tls.Free(56) var pCur uintptr = cur if i == 0 { sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt, 0)) } else { var zFile uintptr = sqlite3.Xsqlite3_column_text(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt, 1) // var sbuf _stat64 at bp, 56 var fd int32 var n int32 fd = libc.Xopen(tls, zFile, X_O_RDONLY, 0) if fd < 0 { return SQLITE_IOERR } libc.X_fstat64(tls, fd, bp /* &sbuf */) if (*_stat64)(unsafe.Pointer(bp /* &sbuf */)).Fst_size >= int64((*fs_cursor)(unsafe.Pointer(pCur)).FnAlloc) { var nNew sqlite3_int64 = ((*_stat64)(unsafe.Pointer(bp /* &sbuf */)).Fst_size * int64(2)) var zNew uintptr if nNew < int64(1024) { nNew = int64(1024) } zNew = sqlite3.Xsqlite3Realloc(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FzBuf, uint64(nNew)) if zNew == uintptr(0) { libc.Xclose(tls, fd) return SQLITE_NOMEM } (*fs_cursor)(unsafe.Pointer(pCur)).FzBuf = zNew (*fs_cursor)(unsafe.Pointer(pCur)).FnAlloc = int32(nNew) } n = libc.Xread(tls, fd, (*fs_cursor)(unsafe.Pointer(pCur)).FzBuf, uint32((*_stat64)(unsafe.Pointer(bp /* &sbuf */)).Fst_size)) libc.Xclose(tls, fd) if int64(n) != (*_stat64)(unsafe.Pointer(bp /* &sbuf */)).Fst_size { return SQLITE_ERROR } (*fs_cursor)(unsafe.Pointer(pCur)).FnBuf = int32((*_stat64)(unsafe.Pointer(bp /* &sbuf */)).Fst_size) *(*int8)(unsafe.Pointer((*fs_cursor)(unsafe.Pointer(pCur)).FzBuf + uintptr((*fs_cursor)(unsafe.Pointer(pCur)).FnBuf))) = int8(0) sqlite3.Xsqlite3_result_text(tls, ctx, (*fs_cursor)(unsafe.Pointer(pCur)).FzBuf, -1, libc.UintptrFromInt32(-1)) } return SQLITE_OK } func fsRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test_fs.c:763:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_column_int64(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt, 0) return SQLITE_OK } func fsEof(tls *libc.TLS, cur uintptr) int32 { /* test_fs.c:769:12: */ var pCur uintptr = cur return (libc.Bool32(sqlite3.Xsqlite3_data_count(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt) == 0)) } func fsBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_fs.c:774:12: */ var ii int32 for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) if (((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn < 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable != 0)) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) { var pUsage uintptr pUsage = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(0) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = 1 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1.0 break } } return SQLITE_OK } // A virtual table module that provides read-only access to a // Tcl global variable namespace. var fsModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_fs.c:798:23 */ var fsdirModule = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_fs.c:821:23 */ var fstreeModule = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_fs.c:844:23 */ // Register the echo virtual table module. func register_fs_module(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_fs.c:875:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+30134 /* "fs" */, uintptr(unsafe.Pointer(&fsModule)), interp) sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+5196 /* "fsdir" */, uintptr(unsafe.Pointer(&fsdirModule)), uintptr(0)) sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+30137 /* "fstree" */, uintptr(unsafe.Pointer(&fstreeModule)), uintptr(0)) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetestfs_Init(tls *libc.TLS, interp uintptr) int32 { /* test_fs.c:901:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd6)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd6[i].FzName, aObjCmd6[i].FxProc, aObjCmd6[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd6 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 30144 /* "register_fs_modu..." */, FxProc: 0}, } /* test_fs.c:907:5 */ // Allocate nByte bytes of space using sqlite3_malloc(). If the // allocation fails, call sqlite3_result_error_nomem() to notify // the database handle that malloc() has failed. func testContextMalloc(tls *libc.TLS, context uintptr, nByte int32) uintptr { /* test_func.c:33:13: */ var z uintptr = sqlite3.Xsqlite3_malloc(tls, nByte) if !(z != 0) && (nByte > 0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } return z } // This function generates a string of random characters. Used for // generating test data. func randStr(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:45:13: */ bp := tls.Alloc(1004) defer tls.Free(1004) var iMin int32 var iMax int32 var n int32 // var r int32 at bp, 4 var i int32 // var zBuf [1000]uint8 at bp+4, 1000 // It used to be possible to call randstr() with any number of arguments, // but now it is registered with SQLite as requiring exactly 2. iMin = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) if iMin < 0 { iMin = 0 } if uint64(iMin) >= uint64(unsafe.Sizeof([1000]uint8{})) { iMin = (int32(uint64(unsafe.Sizeof([1000]uint8{})) - uint64(1))) } iMax = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if iMax < iMin { iMax = iMin } if uint64(iMax) >= uint64(unsafe.Sizeof([1000]uint8{})) { iMax = (int32(uint64(unsafe.Sizeof([1000]uint8{})) - uint64(1))) } n = iMin if iMax > iMin { sqlite3.Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp /* &r */) *(*int32)(unsafe.Pointer(bp /* r */)) &= 0x7fffffff n = n + (*(*int32)(unsafe.Pointer(bp /* r */)) % ((iMax + 1) - iMin)) } sqlite3.Xsqlite3_randomness(tls, n, bp+4 /* &zBuf[0] */) for i = 0; i < n; i++ { *(*uint8)(unsafe.Pointer(bp + 4 /* &zBuf[0] */ + uintptr(i))) = zSrc[(uint64(*(*uint8)(unsafe.Pointer(bp + 4 /* &zBuf[0] */ + uintptr(i)))) % (uint64(unsafe.Sizeof(zSrc)) - uint64(1)))] } *(*uint8)(unsafe.Pointer(bp + 4 /* &zBuf[0] */ + uintptr(n))) = uint8(0) sqlite3.Xsqlite3_result_text(tls, context, bp+4 /* zBuf */, n, libc.UintptrFromInt32(-1)) } var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 30163 /* "abcdefghijklmnop..." */)) /* test_func.c:46:30 */ // The following two SQL functions are used to test returning a text // result with a destructor. Function 'test_destructor' takes one argument // and returns the same argument interpreted as TEXT. A destructor is // passed with the sqlite3_result_text() call. // // SQL function 'test_destructor_count' returns the number of outstanding // allocations made by 'test_destructor'; // // WARNING: Not threadsafe. var test_destructor_count_var int32 = 0 /* test_func.c:91:12 */ func destructor(tls *libc.TLS, p uintptr) { /* test_func.c:92:13: */ var zVal uintptr = p zVal-- sqlite3.Xsqlite3_free(tls, zVal) test_destructor_count_var-- } func test_destructor(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:99:13: */ var zVal uintptr var len int32 test_destructor_count_var++ if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } len = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) zVal = testContextMalloc(tls, pCtx, (len + 3)) if !(zVal != 0) { return } *(*int8)(unsafe.Pointer(zVal + uintptr((len + 1)))) = int8(0) *(*int8)(unsafe.Pointer(zVal + uintptr((len + 2)))) = int8(0) zVal++ libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), uint64(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } func test_destructor16(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ var zVal uintptr var len int32 test_destructor_count_var++ if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } len = sqlite3.Xsqlite3_value_bytes16(tls, *(*uintptr)(unsafe.Pointer(argv))) zVal = testContextMalloc(tls, pCtx, (len + 3)) if !(zVal != 0) { return } *(*int8)(unsafe.Pointer(zVal + uintptr((len + 1)))) = int8(0) *(*int8)(unsafe.Pointer(zVal + uintptr((len + 2)))) = int8(0) zVal++ libc.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv))), uint64(len)) sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{destructor}))) } func test_destructor_count(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } func test_agg_errmsg16_step(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } func test_agg_errmsg16_final(tls *libc.TLS, ctx uintptr) { /* test_func.c:167:13: */ var z uintptr var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) sqlite3.Xsqlite3_aggregate_context(tls, ctx, 2048) z = sqlite3.Xsqlite3_errmsg16(tls, db) sqlite3.Xsqlite3_result_text16(tls, ctx, z, -1, libc.UintptrFromInt32(-1)) } // Routines for testing the sqlite3_get_auxdata() and sqlite3_set_auxdata() // interface. // // The test_auxdata() SQL function attempts to register each of its arguments // as auxiliary data. If there are no prior registrations of aux data for // that argument (meaning the argument is not a constant or this is its first // call) then the result for that argument is 0. If there is a prior // registration, the result for that argument is 1. The overall result // is the individual argument results separated by spaces. func free_test_auxdata(tls *libc.TLS, p uintptr) { /* test_func.c:188:13: */ sqlite3.Xsqlite3_free(tls, p) } func test_auxdata(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:189:13: */ var i int32 var zRet uintptr = testContextMalloc(tls, pCtx, (nArg * 2)) if !(zRet != 0) { return } libc.Xmemset(tls, zRet, 0, (uint64(nArg * 2))) for i = 0; i < nArg; i++ { var z uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 { var n int32 var zAux uintptr = sqlite3.Xsqlite3_get_auxdata(tls, pCtx, i) if zAux != 0 { *(*int8)(unsafe.Pointer(zRet + uintptr((i * 2)))) = int8('1') } else { *(*int8)(unsafe.Pointer(zRet + uintptr((i * 2)))) = int8('0') } n = (int32(libc.Xstrlen(tls, z)) + 1) zAux = testContextMalloc(tls, pCtx, n) if zAux != 0 { libc.Xmemcpy(tls, zAux, z, uint64(n)) sqlite3.Xsqlite3_set_auxdata(tls, pCtx, i, zAux, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{free_test_auxdata}))) } *(*int8)(unsafe.Pointer(zRet + uintptr(((i * 2) + 1)))) = int8(' ') } } sqlite3.Xsqlite3_result_text(tls, pCtx, zRet, ((2 * nArg) - 1), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{free_test_auxdata}))) } // A function to test error reporting from user functions. This function // returns a copy of its first argument as the error message. If the // second argument exists, it becomes the error code. func test_error(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:226:13: */ sqlite3.Xsqlite3_result_error(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))), -1) if nArg == 2 { sqlite3.Xsqlite3_result_error_code(tls, pCtx, sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) } } // Implementation of the counter(X) function. If X is an integer // constant, then the first invocation will return X. The second X+1. // and so forth. Can be used (for example) to provide a sequence number // in a result set. func counterFunc(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:243:13: */ var pCounter uintptr = sqlite3.Xsqlite3_get_auxdata(tls, pCtx, 0) if pCounter == uintptr(0) { pCounter = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(int32(0)))) if pCounter == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) return } *(*int32)(unsafe.Pointer(pCounter)) = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_set_auxdata(tls, pCtx, 0, pCounter, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } else { *(*int32)(unsafe.Pointer(pCounter))++ } sqlite3.Xsqlite3_result_int(tls, pCtx, *(*int32)(unsafe.Pointer(pCounter))) } // This function takes two arguments. It performance UTF-8/16 type // conversions on the first argument then returns a copy of the second // argument. // // This function is used in cases such as the following: // // SELECT test_isolation(x,x) FROM t1; // // We want to verify that the type conversions that occur on the // first argument do not invalidate the second argument. func test_isolation(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:276:13: */ sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_result_value(tls, pCtx, *(*uintptr)(unsafe.Pointer(argv + 1*8))) } // Invoke an SQL statement recursively. The function result is the // first column of the first row of the result set. func test_eval(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:294:13: */ bp := tls.Alloc(24) defer tls.Free(24) // var pStmt uintptr at bp+16, 8 var rc int32 var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, pCtx) var zSql uintptr zSql = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) rc = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc == SQLITE_ROW { sqlite3.Xsqlite3_result_value(tls, pCtx, sqlite3.Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0)) } rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) } if rc != 0 { var zErr uintptr zErr = sqlite3.Xsqlite3_mprintf(tls, ts+30242 /* "sqlite3_prepare_..." */, libc.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) sqlite3.Xsqlite3_result_text(tls, pCtx, zErr, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) } } // convert one character from hex to binary func testHexChar(tls *libc.TLS, c int8) int32 { /* test_func.c:326:12: */ if (int32(c) >= '0') && (int32(c) <= '9') { return (int32(c) - '0') } else if (int32(c) >= 'a') && (int32(c) <= 'f') { return ((int32(c) - 'a') + 10) } else if (int32(c) >= 'A') && (int32(c) <= 'F') { return ((int32(c) - 'A') + 10) } return 0 } // Convert hex to binary. func testHexToBin(tls *libc.TLS, zIn uintptr, zOut uintptr) { /* test_func.c:340:13: */ for (*(*int8)(unsafe.Pointer(zIn)) != 0) && (*(*int8)(unsafe.Pointer(zIn + 1)) != 0) { *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8((testHexChar(tls, *(*int8)(unsafe.Pointer(zIn))) << 4) + testHexChar(tls, *(*int8)(unsafe.Pointer(zIn + 1))))) zIn += uintptr(2) } } // hex_to_utf16be(HEX) // // Convert the input string from HEX into binary. Then return the // result using sqlite3_result_text16le(). func testHexToUtf16be(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:354:13: */ var n int32 var zIn uintptr var zOut uintptr n = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zOut = sqlite3.Xsqlite3_malloc(tls, (n / 2)) if zOut == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) } else { testHexToBin(tls, zIn, zOut) sqlite3.Xsqlite3_result_text16be(tls, pCtx, zOut, (n / 2), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } // hex_to_utf8(HEX) // // Convert the input string from HEX into binary. Then return the // result using sqlite3_result_text16le(). func testHexToUtf8(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:381:13: */ var n int32 var zIn uintptr var zOut uintptr n = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zOut = sqlite3.Xsqlite3_malloc(tls, (n / 2)) if zOut == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) } else { testHexToBin(tls, zIn, zOut) sqlite3.Xsqlite3_result_text(tls, pCtx, zOut, (n / 2), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } // hex_to_utf16le(HEX) // // Convert the input string from HEX into binary. Then return the // result using sqlite3_result_text16le(). func testHexToUtf16le(tls *libc.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:408:13: */ var n int32 var zIn uintptr var zOut uintptr n = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zOut = sqlite3.Xsqlite3_malloc(tls, (n / 2)) if zOut == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) } else { testHexToBin(tls, zIn, zOut) sqlite3.Xsqlite3_result_text16le(tls, pCtx, zOut, (n / 2), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } } // SQL function: real2hex(X) // // If argument X is a real number, then convert it into a string which is // the big-endian hexadecimal representation of the ieee754 encoding of // that number. If X is not a real number, return NULL. func real2hex(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:436:13: */ bp := tls.Alloc(28) defer tls.Free(28) // var v struct {Fi sqlite3_uint64;} at bp, 8 // var zOut [20]int8 at bp+8, 20 var i int32 var bigEndian int32 *(*sqlite3_uint64)(unsafe.Pointer(bp /* &v */)) = uint64(1) bigEndian = (libc.Bool32(int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */)))) == 0)) *(*float64)(unsafe.Pointer(bp /* &v */)) = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) for i = 0; i < 8; i++ { if bigEndian != 0 { *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr((i * 2)))) = *(*int8)(unsafe.Pointer(ts + 30273 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) >> 4)))) *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(((i * 2) + 1)))) = *(*int8)(unsafe.Pointer(ts + 30273 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) & 0xf)))) } else { *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr((14 - (i * 2))))) = *(*int8)(unsafe.Pointer(ts + 30273 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) >> 4)))) *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(((14 - (i * 2)) + 1)))) = *(*int8)(unsafe.Pointer(ts + 30273 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) & 0xf)))) } } *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + 16)) = int8(0) sqlite3.Xsqlite3_result_text(tls, context, bp+8 /* &zOut[0] */, -1, libc.UintptrFromInt32(-1)) } // test_extract(record, field) // // This function implements an SQL user-function that accepts a blob // containing a formatted database record as the first argument. The // second argument is the index of the field within that record to // extract and return. func test_extract(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:473:13: */ bp := tls.Alloc(72) defer tls.Free(72) var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context) var pRec uintptr var pEndHdr uintptr // Points to one byte past record header var pHdr uintptr // Current point in record header var pBody uintptr // Current point in record data // var nHdr u64 at bp, 8 // Bytes in record header var iIdx int32 // Required field var iCurrent int32 = 0 // Current field pRec = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) iIdx = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) pHdr = (pRec + uintptr(sqlite3.Xsqlite3GetVarint(tls, pRec, bp /* &nHdr */))) pBody = libc.AssignUintptr(&pEndHdr, (pRec + uintptr(*(*u64)(unsafe.Pointer(bp /* nHdr */))))) for iCurrent = 0; (pHdr < pEndHdr) && (iCurrent <= iIdx); iCurrent++ { // var iSerialType u64 at bp+64, 8 // var mem Mem at bp+8, 56 libc.Xmemset(tls, bp+8 /* &mem */, 0, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 8 /* &mem */)).Fdb = db (*Mem)(unsafe.Pointer(bp + 8 /* &mem */)).Fenc = (*sqlite31)(unsafe.Pointer(db)).Fenc pHdr += uintptr(sqlite3.Xsqlite3GetVarint(tls, pHdr, bp+64 /* &iSerialType */)) pBody += uintptr(sqlite3.Xsqlite3VdbeSerialGet(tls, pBody, u32(*(*u64)(unsafe.Pointer(bp + 64 /* iSerialType */))), bp+8 /* &mem */)) if iCurrent == iIdx { sqlite3.Xsqlite3_result_value(tls, context, bp+8 /* &mem */) } if (*Mem)(unsafe.Pointer(bp+8 /* &mem */)).FszMalloc != 0 { sqlite3.Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(bp+8 /* &mem */)).FzMalloc) } } } // test_decode(record) // // This function implements an SQL user-function that accepts a blob // containing a formatted database record as its only argument. It returns // a tcl list (type SQLITE_TEXT) containing each of the values stored // in the record. func test_decode(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:520:13: */ bp := tls.Alloc(139) defer tls.Free(139) var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context) var pRec uintptr var pEndHdr uintptr // Points to one byte past record header var pHdr uintptr // Current point in record header var pBody uintptr // Current point in record data // var nHdr u64 at bp+48, 8 // Bytes in record header var pRet uintptr // Return value pRet = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pRet)).FrefCount++ pRec = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) pHdr = (pRec + uintptr(sqlite3.Xsqlite3GetVarint(tls, pRec, bp+48 /* &nHdr */))) pBody = libc.AssignUintptr(&pEndHdr, (pRec + uintptr(*(*u64)(unsafe.Pointer(bp + 48 /* nHdr */))))) for pHdr < pEndHdr { var pVal uintptr = uintptr(0) // var iSerialType u64 at bp+112, 8 // var mem Mem at bp+56, 56 libc.Xmemset(tls, bp+56 /* &mem */, 0, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 56 /* &mem */)).Fdb = db (*Mem)(unsafe.Pointer(bp + 56 /* &mem */)).Fenc = (*sqlite31)(unsafe.Pointer(db)).Fenc pHdr += uintptr(sqlite3.Xsqlite3GetVarint(tls, pHdr, bp+112 /* &iSerialType */)) pBody += uintptr(sqlite3.Xsqlite3VdbeSerialGet(tls, pBody, u32(*(*u64)(unsafe.Pointer(bp + 112 /* iSerialType */))), bp+56 /* &mem */)) switch sqlite3.Xsqlite3_value_type(tls, bp+56 /* &mem */) { case SQLITE_TEXT: pVal = tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, bp+56 /* &mem */), -1) break case SQLITE_BLOB: { *(*[16]int8)(unsafe.Pointer(bp + 123 /* hexdigit */)) = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('a'), int8('b'), int8('c'), int8('d'), int8('e'), int8('f'), } var n int32 = sqlite3.Xsqlite3_value_bytes(tls, bp+56 /* &mem */) var z uintptr = sqlite3.Xsqlite3_value_blob(tls, bp+56 /* &mem */) var i int32 pVal = tcl.XTcl_NewStringObj(tls, ts+30290 /* "x'" */, -1) for i = 0; i < n; i++ { // var hex [3]int8 at bp+120, 3 *(*int8)(unsafe.Pointer(bp + 120 /* &hex[0] */)) = *(*int8)(unsafe.Pointer(bp + 123 /* &hexdigit[0] */ + uintptr(((int32(*(*u8)(unsafe.Pointer(z + uintptr(i)))) >> 4) & 0x0F)))) *(*int8)(unsafe.Pointer(bp + 120 /* &hex[0] */ + 1)) = *(*int8)(unsafe.Pointer(bp + 123 /* &hexdigit[0] */ + uintptr((int32(*(*u8)(unsafe.Pointer(z + uintptr(i)))) & 0x0F)))) *(*int8)(unsafe.Pointer(bp + 120 /* &hex[0] */ + 2)) = int8(0) tcl.XTcl_AppendStringsToObj(tls, pVal, libc.VaList(bp, bp+120 /* &hex[0] */, 0)) } tcl.XTcl_AppendStringsToObj(tls, pVal, libc.VaList(bp+24, ts+5495 /* "'" */, 0)) break } case SQLITE_FLOAT: pVal = tcl.XTcl_NewDoubleObj(tls, sqlite3.Xsqlite3_value_double(tls, bp+56 /* &mem */)) break case SQLITE_INTEGER: pVal = tcl.XTcl_NewWideIntObj(tls, sqlite3.Xsqlite3_value_int64(tls, bp+56 /* &mem */)) break case SQLITE_NULL: pVal = tcl.XTcl_NewStringObj(tls, ts+5717 /* "NULL" */, -1) break default: } tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRet, pVal) if (*Mem)(unsafe.Pointer(bp+56 /* &mem */)).FszMalloc != 0 { sqlite3.Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(bp+56 /* &mem */)).FzMalloc) } } sqlite3.Xsqlite3_result_text(tls, context, tcl.XTcl_GetString(tls, pRet), -1, libc.UintptrFromInt32(-1)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pRet if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } // test_zeroblob(N) // // The implementation of scalar SQL function "test_zeroblob()". This is // similar to the built-in zeroblob() function, except that it does not // check that the integer parameter is within range before passing it // to sqlite3_result_zeroblob(). func test_zeroblob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:612:13: */ var nZero int32 = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_result_zeroblob(tls, context, nZero) } // test_getsubtype(V) // // Return the subtype for value V. func test_getsubtype(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:625:13: */ sqlite3.Xsqlite3_result_int(tls, context, int32(sqlite3.Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // test_frombind(A,B,C,...) // // Return an integer bitmask that has a bit set for every argument // (up to the first 63 arguments) that originates from a bind a parameter. func test_frombind(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:638:13: */ var m sqlite3_uint64 = uint64(0) var i int32 for i = 0; (i < argc) && (i < 63); i++ { if sqlite3.Xsqlite3_value_frombind(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != 0 { m = m | (sqlite3_uint64((uint64(1))) << i) } } sqlite3.Xsqlite3_result_int64(tls, context, sqlite3_int64(m)) } // test_setsubtype(V, T) // // Return the value V with its subtype changed to T func test_setsubtype(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_func.c:655:13: */ sqlite3.Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) sqlite3.Xsqlite3_result_subtype(tls, context, uint32(sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func registerTestFunctions(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_func.c:664:12: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aFuncs)) / uint64(unsafe.Sizeof(struct { FzName uintptr FnArg int8 _ [3]byte FeTextRep uint32 FxFunc uintptr }{}))); i++ { sqlite3.Xsqlite3_create_function(tls, db, aFuncs[i].FzName, int32(aFuncs[i].FnArg), int32(aFuncs[i].FeTextRep), uintptr(0), aFuncs[i].FxFunc, uintptr(0), uintptr(0)) } sqlite3.Xsqlite3_create_function(tls, db, ts+30293 /* "test_agg_errmsg1..." */, 0, SQLITE_ANY, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{test_agg_errmsg16_step})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{test_agg_errmsg16_final}))) return SQLITE_OK } var aFuncs = [20]struct { FzName uintptr FnArg int8 _ [3]byte FeTextRep uint32 FxFunc uintptr }{ {FzName: ts + 30311 /* "randstr" */, FnArg: int8(2), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30319 /* "test_destructor" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30335 /* "test_destructor1..." */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30353 /* "hex_to_utf16be" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30368 /* "hex_to_utf16le" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30383 /* "hex_to_utf8" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30395 /* "test_destructor_..." */, FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30417 /* "test_auxdata" */, FnArg: int8(-1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30430 /* "test_error" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30430 /* "test_error" */, FnArg: int8(2), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30441 /* "test_eval" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30451 /* "test_isolation" */, FnArg: int8(2), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30466 /* "test_counter" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30479 /* "real2hex" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30488 /* "test_decode" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30500 /* "test_extract" */, FnArg: int8(2), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30513 /* "test_zeroblob" */, FnArg: int8(1), FeTextRep: (uint32(SQLITE_UTF8 | SQLITE_DETERMINISTIC)), FxFunc: 0}, {FzName: ts + 30527 /* "test_getsubtype" */, FnArg: int8(1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30543 /* "test_setsubtype" */, FnArg: int8(2), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, {FzName: ts + 30559 /* "test_frombind" */, FnArg: int8(-1), FeTextRep: uint32(SQLITE_UTF8), FxFunc: 0}, } /* test_func.c:674:5 */ // TCLCMD: autoinstall_test_functions // // Invoke this TCL command to use sqlite3_auto_extension() to cause // the standard set of test functions to be loaded into each new // database connection. func autoinstall_test_funcs(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_func.c:718:26: */ var rc int32 = sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{registerTestFunctions}))) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{Md5_Register}))) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // A bogus step function and finalizer function. func tStep(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:736:13: */ } func tFinal(tls *libc.TLS, a uintptr) { /* test_func.c:737:13: */ } // tclcmd: abuse_create_function // // Make various calls to sqlite3_create_function that do not have valid // parameters. Verify that the error condition is detected and reported. func abuse_create_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_func.c:746:26: */ bp := tls.Alloc(32) defer tls.Free(32) // var db uintptr at bp+24, 8 var rc int32 var mxArg int32 if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0) { goto __1 } return TCL_ERROR __1: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{tFinal}))) if !(rc != SQLITE_MISUSE) { goto __2 } goto abuse_err __2: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __3 } goto abuse_err __3: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{tFinal}))) if !(rc != SQLITE_MISUSE) { goto __4 } goto abuse_err __4: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, 1, SQLITE_UTF8, uintptr(0), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{tFinal}))) if !(rc != SQLITE_MISUSE) { goto __5 } goto abuse_err __5: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, 1, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __6 } goto abuse_err __6: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, -2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __7 } goto abuse_err __7: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30573 /* "tx" */, 128, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __8 } goto abuse_err __8: ; rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30576, /* "funcxx_123456789..." */ 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __9 } goto abuse_err __9: ; // This last function registration should actually work. Generate // a no-op function (that always returns NULL) and which has the // maximum-length function name and the maximum number of parameters. sqlite3.Xsqlite3_limit(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), SQLITE_LIMIT_FUNCTION_ARG, 10000) mxArg = sqlite3.Xsqlite3_limit(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), SQLITE_LIMIT_FUNCTION_ARG, -1) rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+30833, /* "nullx_123456789_..." */ mxArg, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) if !(rc != SQLITE_OK) { goto __10 } goto abuse_err __10: ; return TCL_OK abuse_err: tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31089, /* "sqlite3_create_f..." */ uintptr(0))) return TCL_ERROR } // SQLite user defined function to use with matchinfo() to calculate the // relevancy of an FTS match. The value returned is the relevancy score // (a real value greater than or equal to zero). A larger value indicates // a more relevant document. // // The overall relevancy returned is the sum of the relevancies of each // column value in the FTS table. The relevancy of a column value is the // sum of the following for each reportable phrase in the FTS query: // // ( / ) * // // where is the number of instances of the phrase in the // column value of the current row and is the number // of instances of the phrase in the same column of all rows in the FTS // table. The is a weighting factor assigned to each // column by the caller (see below). // // The first argument to this function must be the return value of the FTS // matchinfo() function. Following this must be one argument for each column // of the FTS table containing a numeric weight factor for the corresponding // column. Example: // // CREATE VIRTUAL TABLE documents USING fts3(title, content) // // The following query returns the docids of documents that match the full-text // query sorted from most to least relevant. When calculating // relevance, query term instances in the 'title' column are given twice the // weighting of those in the 'content' column. // // SELECT docid FROM documents // WHERE documents MATCH // ORDER BY rank(matchinfo(documents), 1.0, 0.5) DESC func rankfunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* test_func.c:847:13: */ var aMatchinfo uintptr // Return value of matchinfo() var nMatchinfo int32 // Number of elements in aMatchinfo[] var nCol int32 // Number of columns in the table var nPhrase int32 // Number of phrases in the query var iPhrase int32 // Current phrase var score float64 var nHitCount int32 var nGlobalHitCount int32 var weight float64 var iCol int32 // Current column // Now iterate through each column in the users query. For each column, // increment the relevancy score by: // // ( / ) * // // aPhraseinfo[] points to the start of the data for phrase iPhrase. So // the hit count and global hit counts for each column are found in // aPhraseinfo[iCol*3] and aPhraseinfo[iCol*3+1], respectively. var aPhraseinfo uintptr nCol = 0 nPhrase = 0 score = 0.0 // Value to return // Check that the number of arguments passed to this function is correct. // If not, jump to wrong_number_args. Set aMatchinfo to point to the array // of unsigned integer values returned by FTS function matchinfo. Set // nPhrase to contain the number of reportable phrases in the users full-text // query, and nCol to the number of columns in the table. Then check that the // size of the matchinfo blob is as expected. Return an error if it is not. if !(nVal < 1) { goto __1 } goto wrong_number_args __1: ; aMatchinfo = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apVal))) nMatchinfo = (int32(uint64(sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal)))) / uint64(unsafe.Sizeof(int32(0))))) if !(nMatchinfo >= 2) { goto __2 } nPhrase = *(*int32)(unsafe.Pointer(aMatchinfo)) nCol = *(*int32)(unsafe.Pointer(aMatchinfo + 1*4)) __2: ; if !(nMatchinfo != (2 + ((3 * nCol) * nPhrase))) { goto __3 } sqlite3.Xsqlite3_result_error(tls, pCtx, ts+31132 /* "invalid matchinf..." */, -1) return __3: ; if !(nVal != (1 + nCol)) { goto __4 } goto wrong_number_args __4: ; // Iterate through each phrase in the users query. iPhrase = 0 __5: if !(iPhrase < nPhrase) { goto __7 } // Current column // Now iterate through each column in the users query. For each column, // increment the relevancy score by: // // ( / ) * // // aPhraseinfo[] points to the start of the data for phrase iPhrase. So // the hit count and global hit counts for each column are found in // aPhraseinfo[iCol*3] and aPhraseinfo[iCol*3+1], respectively. aPhraseinfo = (aMatchinfo + uintptr((2+((iPhrase*nCol)*3)))*4) iCol = 0 __8: if !(iCol < nCol) { goto __10 } nHitCount = *(*int32)(unsafe.Pointer(aPhraseinfo + uintptr((3*iCol))*4)) nGlobalHitCount = *(*int32)(unsafe.Pointer(aPhraseinfo + uintptr(((3*iCol)+1))*4)) weight = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr((iCol+1))*8))) if !(nHitCount > 0) { goto __11 } score = score + ((float64(nHitCount) / float64(nGlobalHitCount)) * weight) __11: ; goto __9 __9: iCol++ goto __8 goto __10 __10: ; goto __6 __6: iPhrase++ goto __5 goto __7 __7: ; sqlite3.Xsqlite3_result_double(tls, pCtx, score) return // Jump here if the wrong number of arguments are passed to this function wrong_number_args: sqlite3.Xsqlite3_result_error(tls, pCtx, ts+31181 /* "wrong number of ..." */, -1) } func install_fts3_rank_function(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_func.c:910:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+31226 /* "rank" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rankfunc})), uintptr(0), uintptr(0)) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest_func_Init(tls *libc.TLS, interp uintptr) int32 { /* test_func.c:933:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd7)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd7[i].FzName, aObjCmd7[i].FxProc, uintptr(0), uintptr(0)) } sqlite3.Xsqlite3_initialize(tls) sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{registerTestFunctions}))) sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{Md5_Register}))) return TCL_OK } var aObjCmd7 = [3]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 31231 /* "autoinstall_test..." */, FxProc: 0}, {FzName: ts + 31258 /* "abuse_create_fun..." */, FxProc: 0}, {FzName: ts + 31280 /* "install_fts3_ran..." */, FxProc: 0}, } /* test_func.c:937:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. // Convert binary to hex. The input zBuf[] contains N bytes of // binary data. zBuf[] is 2*n+1 bytes long. Overwrite zBuf[] // with a hexadecimal representation of its original binary input. func sqlite3TestBinToHex(tls *libc.TLS, zBuf uintptr, N int32) { /* test_hexio.c:36:6: */ bp := tls.Alloc(17) defer tls.Free(17) *(*[17]uint8)(unsafe.Pointer(bp /* zHex */)) = *(*[17]uint8)(unsafe.Pointer(ts + 31307 /* "0123456789ABCDEF" */)) var i int32 var j int32 var c uint8 i = (N * 2) *(*uint8)(unsafe.Pointer(zBuf + uintptr(libc.PostDecInt32(&i, 1)))) = uint8(0) for j = (N - 1); j >= 0; j-- { c = *(*uint8)(unsafe.Pointer(zBuf + uintptr(j))) *(*uint8)(unsafe.Pointer(zBuf + uintptr(libc.PostDecInt32(&i, 1)))) = *(*uint8)(unsafe.Pointer(bp /* &zHex[0] */ + uintptr((int32(c) & 0xf)))) *(*uint8)(unsafe.Pointer(zBuf + uintptr(libc.PostDecInt32(&i, 1)))) = *(*uint8)(unsafe.Pointer(bp /* &zHex[0] */ + uintptr((int32(c) >> 4)))) } } // Convert hex to binary. The input zIn[] contains N bytes of // hexadecimal. Convert this into binary and write aOut[] with // the binary data. Spaces in the original input are ignored. // Return the number of bytes of binary rendered. func sqlite3TestHexToBin(tls *libc.TLS, zIn uintptr, N int32, aOut uintptr) int32 { /* test_hexio.c:56:5: */ bp := tls.Alloc(256) defer tls.Free(256) *(*[256]uint8)(unsafe.Pointer(bp /* aMap */)) = [256]uint8{ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), uint8(10), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), } var i int32 var j int32 var hi int32 = 1 var c uint8 for i = libc.AssignInt32(&j, 0); i < N; i++ { c = *(*uint8)(unsafe.Pointer(bp /* &aMap[0] */ + uintptr(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))))) if int32(c) == 0 { continue } if hi != 0 { *(*uint8)(unsafe.Pointer(aOut + uintptr(j))) = (uint8((int32(c) - 1) << 4)) hi = 0 } else { *(*uint8)(unsafe.Pointer(aOut + uintptr(libc.PostIncInt32(&j, 1)))) |= uint8((int32(c) - 1)) hi = 1 } } return j } // Usage: hexio_read FILENAME OFFSET AMT // // Read AMT bytes from file FILENAME beginning at OFFSET from the // beginning of the file. Convert that information to hexadecimal // and return the resulting HEX string. func hexio_read(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:101:26: */ bp := tls.Alloc(64) defer tls.Free(64) // var offset int32 at bp+56, 4 // var amt int32 at bp+60, 4 var got int32 var zFile uintptr var zBuf uintptr var in uintptr if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31324 /* "FILENAME OFFSET ..." */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+56 /* &offset */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+60 /* &amt */) != 0 { return TCL_ERROR } zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zBuf = sqlite3.Xsqlite3_malloc(tls, ((*(*int32)(unsafe.Pointer(bp + 60 /* amt */)) * 2) + 1)) if zBuf == uintptr(0) { return TCL_ERROR } in = libc.Xfopen(tls, zFile, ts+4273 /* "rb" */) if in == uintptr(0) { in = libc.Xfopen(tls, zFile, ts+31344 /* "r" */) } if in == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31346 /* "cannot open inpu..." */, zFile, 0)) return TCL_ERROR } libc.Xfseek(tls, in, int32(*(*int32)(unsafe.Pointer(bp + 56 /* offset */))), SEEK_SET) got = int32(libc.Xfread(tls, zBuf, uint64(1), uint64(*(*int32)(unsafe.Pointer(bp + 60 /* amt */))), in)) libc.Xfclose(tls, in) if got < 0 { got = 0 } sqlite3TestBinToHex(tls, zBuf, got) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, zBuf, 0)) sqlite3.Xsqlite3_free(tls, zBuf) return TCL_OK } // Usage: hexio_write FILENAME OFFSET DATA // // Write DATA into file FILENAME beginning at OFFSET from the // beginning of the file. DATA is expressed in hexadecimal. func hexio_write(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:151:26: */ bp := tls.Alloc(40) defer tls.Free(40) // var offset int32 at bp+32, 4 // var nIn int32 at bp+36, 4 var nOut int32 var written int32 var zFile uintptr var zIn uintptr var aOut uintptr var out uintptr if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31370 /* "FILENAME OFFSET ..." */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+32 /* &offset */) != 0 { return TCL_ERROR } zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zIn = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+36 /* &nIn */) aOut = sqlite3.Xsqlite3_malloc(tls, (1 + (*(*int32)(unsafe.Pointer(bp + 36 /* nIn */)) / 2))) if aOut == uintptr(0) { return TCL_ERROR } nOut = sqlite3TestHexToBin(tls, zIn, *(*int32)(unsafe.Pointer(bp + 36 /* nIn */)), aOut) out = libc.Xfopen(tls, zFile, ts+31394 /* "r+b" */) if out == uintptr(0) { out = libc.Xfopen(tls, zFile, ts+31398 /* "r+" */) } if out == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31401 /* "cannot open outp..." */, zFile, 0)) return TCL_ERROR } libc.Xfseek(tls, out, int32(*(*int32)(unsafe.Pointer(bp + 32 /* offset */))), SEEK_SET) written = int32(libc.Xfwrite(tls, aOut, uint64(1), uint64(nOut), out)) sqlite3.Xsqlite3_free(tls, aOut) libc.Xfclose(tls, out) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, written)) return TCL_OK } // USAGE: hexio_get_int HEXDATA // // Interpret the HEXDATA argument as a big-endian integer. Return // the value of that integer. HEXDATA can contain between 2 and 8 // hexadecimal digits. func hexio_get_int(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:199:26: */ bp := tls.Alloc(8) defer tls.Free(8) var val int32 // var nIn int32 at bp, 4 var nOut int32 var zIn uintptr var aOut uintptr // var aNum [4]uint8 at bp+4, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31426 /* "HEXDATA" */) return TCL_ERROR } zIn = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &nIn */) aOut = sqlite3.Xsqlite3_malloc(tls, (1 + (*(*int32)(unsafe.Pointer(bp /* nIn */)) / 2))) if aOut == uintptr(0) { return TCL_ERROR } nOut = sqlite3TestHexToBin(tls, zIn, *(*int32)(unsafe.Pointer(bp /* nIn */)), aOut) if nOut >= 4 { libc.Xmemcpy(tls, bp+4 /* &aNum[0] */, aOut, uint64(4)) } else { libc.Xmemset(tls, bp+4 /* &aNum[0] */, 0, uint64(unsafe.Sizeof([4]uint8{}))) libc.Xmemcpy(tls, (bp + 4 /* &aNum */ + uintptr((4 - nOut))), aOut, uint64(nOut)) } sqlite3.Xsqlite3_free(tls, aOut) val = ((((int32(*(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */))) << 24) | (int32(*(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 1))) << 16)) | (int32(*(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 2))) << 8)) | int32(*(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 3)))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, val)) return TCL_OK } // USAGE: hexio_render_int16 INTEGER // // Render INTEGER has a 16-bit big-endian integer in hexadecimal. func hexio_render_int16(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:239:26: */ bp := tls.Alloc(14) defer tls.Free(14) // var val int32 at bp, 4 // var aNum [10]uint8 at bp+4, 10 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2274 /* "INTEGER" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &val */) != 0 { return TCL_ERROR } *(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */)) = (uint8(*(*int32)(unsafe.Pointer(bp /* val */)) >> 8)) *(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 1)) = uint8(*(*int32)(unsafe.Pointer(bp /* val */))) sqlite3TestBinToHex(tls, bp+4 /* &aNum[0] */, 2) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, bp+4 /* aNum */, 4)) return TCL_OK } // USAGE: hexio_render_int32 INTEGER // // Render INTEGER has a 32-bit big-endian integer in hexadecimal. func hexio_render_int32(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:266:26: */ bp := tls.Alloc(14) defer tls.Free(14) // var val int32 at bp, 4 // var aNum [10]uint8 at bp+4, 10 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2274 /* "INTEGER" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &val */) != 0 { return TCL_ERROR } *(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */)) = (uint8(*(*int32)(unsafe.Pointer(bp /* val */)) >> 24)) *(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 1)) = (uint8(*(*int32)(unsafe.Pointer(bp /* val */)) >> 16)) *(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 2)) = (uint8(*(*int32)(unsafe.Pointer(bp /* val */)) >> 8)) *(*uint8)(unsafe.Pointer(bp + 4 /* &aNum[0] */ + 3)) = uint8(*(*int32)(unsafe.Pointer(bp /* val */))) sqlite3TestBinToHex(tls, bp+4 /* &aNum[0] */, 4) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, bp+4 /* aNum */, 8)) return TCL_OK } // USAGE: utf8_to_utf8 HEX // // The argument is a UTF8 string represented in hexadecimal. // The UTF8 might not be well-formed. Run this string through // sqlite3Utf8to8() convert it back to hex and return the result. func utf8_to_utf8(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:296:26: */ bp := tls.Alloc(24) defer tls.Free(24) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31434 /* "[utf8_to_utf8] u..." */, 0)) return TCL_ERROR } func getFts3Varint(tls *libc.TLS, p uintptr, v uintptr) int32 { /* test_hexio.c:328:12: */ var q uintptr = p var x sqlite_uint64 = uint64(0) var y sqlite_uint64 = uint64(1) for (int32(*(*uint8)(unsafe.Pointer(q))) & 0x80) == 0x80 { x = x + (y * (sqlite_uint64(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1)))) & 0x7f))) y <<= 7 } x = x + (y * (sqlite_uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1)))))) *(*sqlite_int64)(unsafe.Pointer(v)) = sqlite_int64(x) return (int32((int64(q) - int64(p)) / 1)) } func putFts3Varint(tls *libc.TLS, p uintptr, v sqlite_int64) int32 { /* test_hexio.c:340:12: */ var q uintptr = p var vu sqlite_uint64 = sqlite_uint64(v) for ok := true; ok; ok = (vu != uint64(0)) { *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) = (uint8((vu & uint64(0x7f)) | uint64(0x80))) vu >>= 7 } *(*uint8)(unsafe.Pointer(q + libc.UintptrFromInt32(-1))) &= uint8((0x7f)) // turn off high bit in final byte return (int32((int64(q) - int64(p)) / 1)) } // USAGE: read_fts3varint BLOB VARNAME // // Read a varint from the start of BLOB. Set variable VARNAME to contain // the interpreted value. Return the number of bytes of BLOB consumed. func read_fts3varint(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:358:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var nBlob int32 at bp, 4 var zBlob uintptr // var iVal sqlite3_int64 at bp+8, 8 var nVal int32 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31488 /* "BLOB VARNAME" */) return TCL_ERROR } zBlob = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &nBlob */) nVal = getFts3Varint(tls, zBlob, bp+8 /* &iVal */) tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0), tcl.XTcl_NewWideIntObj(tls, *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* iVal */))), 0) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nVal)) return TCL_OK } // USAGE: make_fts3record ARGLIST func make_fts3record(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_hexio.c:384:26: */ bp := tls.Alloc(28) defer tls.Free(28) *(*uintptr)(unsafe.Pointer(bp + 8 /* aArg */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp /* nArg */)) = 0 var aOut uintptr = uintptr(0) var nOut int32 = 0 var nAlloc int32 = 0 var i int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31501 /* "LIST" */) return TCL_ERROR } if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &nArg */, bp+8 /* &aArg */) != 0 { return TCL_ERROR } for i = 0; i < *(*int32)(unsafe.Pointer(bp /* nArg */)); i++ { // var iVal sqlite3_int64 at bp+16, 8 if TCL_OK == tcl.XTcl_GetWideIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* aArg */)) + uintptr(i)*8)), bp+16 /* &iVal */) { if (nOut + 10) > nAlloc { var nNew int32 if nAlloc != 0 { nNew = (nAlloc * 2) } else { nNew = 128 } var aNew uintptr = sqlite3.Xsqlite3_realloc(tls, aOut, nNew) if aNew == uintptr(0) { sqlite3.Xsqlite3_free(tls, aOut) return TCL_ERROR } aOut = aNew nAlloc = nNew } nOut = nOut + (putFts3Varint(tls, (aOut + uintptr(nOut)), *(*sqlite3_int64)(unsafe.Pointer(bp + 16 /* iVal */)))) } else { *(*int32)(unsafe.Pointer(bp + 24 /* nVal */)) = 0 var zVal uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* aArg */)) + uintptr(i)*8)), bp+24 /* &nVal */) for (nOut + *(*int32)(unsafe.Pointer(bp + 24 /* nVal */))) > nAlloc { var nNew int32 if nAlloc != 0 { nNew = (nAlloc * 2) } else { nNew = 128 } var aNew uintptr = sqlite3.Xsqlite3_realloc(tls, aOut, nNew) if aNew == uintptr(0) { sqlite3.Xsqlite3_free(tls, aOut) return TCL_ERROR } aOut = aNew nAlloc = nNew } libc.Xmemcpy(tls, (aOut + uintptr(nOut)), zVal, uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nVal */)))) nOut = nOut + (*(*int32)(unsafe.Pointer(bp + 24 /* nVal */))) } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, aOut, nOut)) sqlite3.Xsqlite3_free(tls, aOut) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest_hexio_Init(tls *libc.TLS, interp uintptr) int32 { /* test_hexio.c:446:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd8)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd8[i].FzName, aObjCmd8[i].FxProc, uintptr(0), uintptr(0)) } return TCL_OK } var aObjCmd8 = [8]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 31506 /* "hexio_read" */, FxProc: 0}, {FzName: ts + 31517 /* "hexio_write" */, FxProc: 0}, {FzName: ts + 31529 /* "hexio_get_int" */, FxProc: 0}, {FzName: ts + 31543 /* "hexio_render_int..." */, FxProc: 0}, {FzName: ts + 31562 /* "hexio_render_int..." */, FxProc: 0}, {FzName: ts + 31581 /* "utf8_to_utf8" */, FxProc: 0}, {FzName: ts + 31594 /* "read_fts3varint" */, FxProc: 0}, {FzName: ts + 31610 /* "make_fts3record" */, FxProc: 0}, } /* test_hexio.c:450:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type Wrapped = struct { Fpcache sqlite3_pcache_methods2 Fmem sqlite3_mem_methods Fmutex sqlite3_mutex_methods Fmem_init int32 Fmem_fail int32 Fmutex_init int32 Fmutex_fail int32 Fpcache_init int32 Fpcache_fail int32 } /* test_init.c:36:8 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: var wrapped Wrapped /* test_init.c:47:3: */ func wrMemInit(tls *libc.TLS, pAppData uintptr) int32 { /* test_init.c:49:12: */ var rc int32 if wrapped.Fmem_fail != 0 { rc = SQLITE_ERROR } else { rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 40 /* &.xInit */))))(tls, wrapped.Fmem.FpAppData) } if rc == SQLITE_OK { wrapped.Fmem_init = 1 } return rc } func wrMemShutdown(tls *libc.TLS, pAppData uintptr) { /* test_init.c:61:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 48 /* &.xShutdown */))))(tls, wrapped.Fmem.FpAppData) wrapped.Fmem_init = 0 } func wrMemMalloc(tls *libc.TLS, n int32) uintptr { /* test_init.c:65:13: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ /* &.xMalloc */))))(tls, n) } func wrMemFree(tls *libc.TLS, p uintptr) { /* test_init.c:66:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 8 /* &.xFree */))))(tls, p) } func wrMemRealloc(tls *libc.TLS, p uintptr, n int32) uintptr { /* test_init.c:67:13: */ return (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 16 /* &.xRealloc */))))(tls, p, n) } func wrMemSize(tls *libc.TLS, p uintptr) int32 { /* test_init.c:68:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 24 /* &.xSize */))))(tls, p) } func wrMemRoundup(tls *libc.TLS, n int32) int32 { /* test_init.c:69:12: */ return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 104 /* &.mem */ + 32 /* &.xRoundup */))))(tls, n) } func wrMutexInit(tls *libc.TLS) int32 { /* test_init.c:72:12: */ var rc int32 if wrapped.Fmutex_fail != 0 { rc = SQLITE_ERROR } else { rc = (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ /* &.xMutexInit */))))(tls) } if rc == SQLITE_OK { wrapped.Fmutex_init = 1 } return rc } func wrMutexEnd(tls *libc.TLS) int32 { /* test_init.c:84:12: */ (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 8 /* &.xMutexEnd */))))(tls) wrapped.Fmutex_init = 0 return SQLITE_OK } func wrMutexAlloc(tls *libc.TLS, e int32) uintptr { /* test_init.c:89:22: */ return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 16 /* &.xMutexAlloc */))))(tls, e) } func wrMutexFree(tls *libc.TLS, p uintptr) { /* test_init.c:92:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 24 /* &.xMutexFree */))))(tls, p) } func wrMutexEnter(tls *libc.TLS, p uintptr) { /* test_init.c:95:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 32 /* &.xMutexEnter */))))(tls, p) } func wrMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_init.c:98:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 40 /* &.xMutexTry */))))(tls, p) } func wrMutexLeave(tls *libc.TLS, p uintptr) { /* test_init.c:101:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 48 /* &.xMutexLeave */))))(tls, p) } func wrMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:104:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 56 /* &.xMutexHeld */))))(tls, p) } func wrMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_init.c:107:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) + 168 /* &.mutex */ + 64 /* &.xMutexNotheld */))))(tls, p) } func wrPCacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_init.c:113:12: */ var rc int32 if wrapped.Fpcache_fail != 0 { rc = SQLITE_ERROR } else { rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 16 /* &.xInit */))))(tls, wrapped.Fpcache.FpArg) } if rc == SQLITE_OK { wrapped.Fpcache_init = 1 } return rc } func wrPCacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_init.c:125:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 24 /* &.xShutdown */))))(tls, wrapped.Fpcache.FpArg) wrapped.Fpcache_init = 0 } func wrPCacheCreate(tls *libc.TLS, a int32, b int32, c int32) uintptr { /* test_init.c:130:23: */ return (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 32 /* &.xCreate */))))(tls, a, b, c) } func wrPCacheCachesize(tls *libc.TLS, p uintptr, n int32) { /* test_init.c:133:13: */ (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 40 /* &.xCachesize */))))(tls, p, n) } func wrPCachePagecount(tls *libc.TLS, p uintptr) int32 { /* test_init.c:136:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 48 /* &.xPagecount */))))(tls, p) } func wrPCacheFetch(tls *libc.TLS, p uintptr, a uint32, b int32) uintptr { /* test_init.c:139:28: */ return (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 56 /* &.xFetch */))))(tls, p, a, b) } func wrPCacheUnpin(tls *libc.TLS, p uintptr, a uintptr, b int32) { /* test_init.c:142:13: */ (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 64 /* &.xUnpin */))))(tls, p, a, b) } func wrPCacheRekey(tls *libc.TLS, p uintptr, a uintptr, b uint32, c uint32) { /* test_init.c:145:13: */ (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 72 /* &.xRekey */))))(tls, p, a, b, c) } func wrPCacheTruncate(tls *libc.TLS, p uintptr, a uint32) { /* test_init.c:153:13: */ (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 80 /* &.xTruncate */))))(tls, p, a) } func wrPCacheDestroy(tls *libc.TLS, p uintptr) { /* test_init.c:156:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */ + 88 /* &.xDestroy */))))(tls, p) } func installInitWrappers(tls *libc.TLS) { /* test_init.c:160:13: */ bp := tls.Alloc(336) defer tls.Free(336) *(*sqlite3_mutex_methods)(unsafe.Pointer(bp + 96 /* mutexmethods */)) = sqlite3_mutex_methods{ FxMutexInit: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{wrMutexInit})), FxMutexEnd: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{wrMutexEnd})), FxMutexAlloc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32) uintptr }{wrMutexAlloc})), FxMutexFree: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrMutexFree})), FxMutexEnter: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrMutexEnter})), FxMutexTry: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrMutexTry})), FxMutexLeave: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrMutexLeave})), FxMutexHeld: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrMutexHeld})), FxMutexNotheld: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrMutexNotheld})), } *(*sqlite3_pcache_methods2)(unsafe.Pointer(bp + 232 /* pcachemethods */)) = sqlite3_pcache_methods2{ FiVersion: 1, FxInit: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrPCacheInit})), FxShutdown: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrPCacheShutdown})), FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, int32) uintptr }{wrPCacheCreate})), FxCachesize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) }{wrPCacheCachesize})), FxPagecount: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrPCachePagecount})), FxFetch: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uint32, int32) uintptr }{wrPCacheFetch})), FxUnpin: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32) }{wrPCacheUnpin})), FxRekey: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uint32, uint32) }{wrPCacheRekey})), FxTruncate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uint32) }{wrPCacheTruncate})), FxDestroy: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrPCacheDestroy})), } *(*sqlite3_mem_methods)(unsafe.Pointer(bp + 168 /* memmethods */)) = sqlite3_mem_methods{ FxMalloc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32) uintptr }{wrMemMalloc})), FxFree: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrMemFree})), FxRealloc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{wrMemRealloc})), FxSize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrMemSize})), FxRoundup: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{wrMemRoundup})), FxInit: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{wrMemInit})), FxShutdown: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{wrMemShutdown})), } libc.Xmemset(tls, uintptr(unsafe.Pointer(&wrapped)), 0, uint64(unsafe.Sizeof(wrapped))) sqlite3.Xsqlite3_shutdown(tls) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETMUTEX, libc.VaList(bp, (uintptr(unsafe.Pointer(&wrapped))+168 /* &.mutex */))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETMALLOC, libc.VaList(bp+16, (uintptr(unsafe.Pointer(&wrapped))+104 /* &.mem */))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETPCACHE2, libc.VaList(bp+32, (uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MUTEX, libc.VaList(bp+48, bp+96 /* &mutexmethods */)) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp+64, bp+168 /* &memmethods */)) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp+80, bp+232 /* &pcachemethods */)) } func init_wrapper_install(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_init.c:191:26: */ bp := tls.Alloc(32) defer tls.Free(32) var i int32 installInitWrappers(tls) for i = 1; i < objc; i++ { var z uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) if libc.Xstrcmp(tls, z, ts+31626 /* "mem" */) == 0 { wrapped.Fmem_fail = 1 } else if libc.Xstrcmp(tls, z, ts+28188 /* "mutex" */) == 0 { wrapped.Fmutex_fail = 1 } else if libc.Xstrcmp(tls, z, ts+31630 /* "pcache" */) == 0 { wrapped.Fpcache_fail = 1 } else { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31637 /* "Unknown argument..." */, z, ts+11636 /* "\"" */)) return TCL_ERROR } } return TCL_OK } func init_wrapper_uninstall(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_init.c:215:26: */ bp := tls.Alloc(48) defer tls.Free(48) if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } sqlite3.Xsqlite3_shutdown(tls) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MUTEX, libc.VaList(bp, (uintptr(unsafe.Pointer(&wrapped))+168 /* &.mutex */))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp+16, (uintptr(unsafe.Pointer(&wrapped))+104 /* &.mem */))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp+32, (uintptr(unsafe.Pointer(&wrapped)) /* &.pcache */))) return TCL_OK } func init_wrapper_clear(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_init.c:233:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } wrapped.Fmem_fail = 0 wrapped.Fmutex_fail = 0 wrapped.Fpcache_fail = 0 return TCL_OK } func init_wrapper_query(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_init.c:250:26: */ var pRet uintptr if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } pRet = tcl.XTcl_NewObj(tls) if wrapped.Fmutex_init != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+28188 /* "mutex" */, -1)) } if wrapped.Fmem_init != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+31626 /* "mem" */, -1)) } if wrapped.Fpcache_init != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+31630 /* "pcache" */, -1)) } tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } func Sqlitetest_init_Init(tls *libc.TLS, interp uintptr) int32 { /* test_init.c:278:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd9)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd9[i].FzName, aObjCmd9[i].FxProc, uintptr(0), uintptr(0)) } return TCL_OK } var aObjCmd9 = [4]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 31657 /* "init_wrapper_ins..." */, FxProc: 0}, {FzName: ts + 31678 /* "init_wrapper_que..." */, FxProc: 0}, {FzName: ts + 31697 /* "init_wrapper_uni..." */, FxProc: 0}, {FzName: ts + 31720 /* "init_wrapper_cle..." */, FxProc: 0}, } /* test_init.c:282:5 */ // // END OF REGISTRATION API // //******* End of fts5.h ******** // Make sure we can call this stuff from C++. // An sqlite3_intarray is an abstract type to stores an instance of // an integer array. type sqlite3_intarray1 = struct { Fn int32 _ [4]byte Fa uintptr FxFree uintptr } /* test_intarray.h:99:9 */ // // END OF REGISTRATION API // //******* End of fts5.h ******** // Make sure we can call this stuff from C++. // An sqlite3_intarray is an abstract type to stores an instance of // an integer array. type sqlite3_intarray = sqlite3_intarray1 /* test_intarray.h:99:33 */ // Objects used internally by the virtual table implementation type intarray_vtab1 = struct { Fbase sqlite3_vtab FpContent uintptr } /* test_intarray.c:41:9 */ // Objects used internally by the virtual table implementation type intarray_vtab = intarray_vtab1 /* test_intarray.c:41:30 */ type intarray_cursor1 = struct { Fbase sqlite3_vtab_cursor Fi int32 _ [4]byte } /* test_intarray.c:42:9 */ type intarray_cursor = intarray_cursor1 /* test_intarray.c:42:32 */ // None of this works unless we have virtual tables. // Free an sqlite3_intarray object. func intarrayFree(tls *libc.TLS, p uintptr) { /* test_intarray.c:64:13: */ if (*sqlite3_intarray)(unsafe.Pointer(p)).FxFree != 0 { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((p + 16 /* &.xFree */))))(tls, (*sqlite3_intarray)(unsafe.Pointer(p)).Fa) } sqlite3.Xsqlite3_free(tls, p) } // Table destructor for the intarray module. func intarrayDestroy(tls *libc.TLS, p uintptr) int32 { /* test_intarray.c:74:12: */ var pVtab uintptr = p sqlite3.Xsqlite3_free(tls, pVtab) return 0 } // Table constructor for the intarray module. func intarrayCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_intarray.c:83:12: */ var rc int32 = SQLITE_NOMEM var pVtab uintptr = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(intarray_vtab{}))) if pVtab != 0 { libc.Xmemset(tls, pVtab, 0, uint64(unsafe.Sizeof(intarray_vtab{}))) (*intarray_vtab)(unsafe.Pointer(pVtab)).FpContent = pAux rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+31739 /* "CREATE TABLE x(v..." */) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pVtab return rc } // Open a new cursor on the intarray table. func intarrayOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_intarray.c:106:12: */ var rc int32 = SQLITE_NOMEM var pCur uintptr pCur = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(intarray_cursor{}))) if pCur != 0 { libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(intarray_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = pCur rc = SQLITE_OK } return rc } // Close a intarray table cursor. func intarrayClose(tls *libc.TLS, cur uintptr) int32 { /* test_intarray.c:121:12: */ var pCur uintptr = cur sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Retrieve a column of data. func intarrayColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test_intarray.c:130:12: */ var pCur uintptr = cur var pVtab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab if ((*intarray_cursor)(unsafe.Pointer(pCur)).Fi >= 0) && ((*intarray_cursor)(unsafe.Pointer(pCur)).Fi < (*sqlite3_intarray)(unsafe.Pointer((*intarray_vtab)(unsafe.Pointer(pVtab)).FpContent)).Fn) { sqlite3.Xsqlite3_result_int64(tls, ctx, *(*sqlite3_int64)(unsafe.Pointer((*sqlite3_intarray)(unsafe.Pointer((*intarray_vtab)(unsafe.Pointer(pVtab)).FpContent)).Fa + uintptr((*intarray_cursor)(unsafe.Pointer(pCur)).Fi)*8))) } return SQLITE_OK } // Retrieve the current rowid. func intarrayRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test_intarray.c:142:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite_int64((*intarray_cursor)(unsafe.Pointer(pCur)).Fi) return SQLITE_OK } func intarrayEof(tls *libc.TLS, cur uintptr) int32 { /* test_intarray.c:148:12: */ var pCur uintptr = cur var pVtab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab return (libc.Bool32((*intarray_cursor)(unsafe.Pointer(pCur)).Fi >= (*sqlite3_intarray)(unsafe.Pointer((*intarray_vtab)(unsafe.Pointer(pVtab)).FpContent)).Fn)) } // Advance the cursor to the next row. func intarrayNext(tls *libc.TLS, cur uintptr) int32 { /* test_intarray.c:157:12: */ var pCur uintptr = cur (*intarray_cursor)(unsafe.Pointer(pCur)).Fi++ return SQLITE_OK } // Reset a intarray table cursor. func intarrayFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_intarray.c:166:12: */ var pCur uintptr = pVtabCursor (*intarray_cursor)(unsafe.Pointer(pCur)).Fi = 0 return SQLITE_OK } // Analyse the WHERE condition. func intarrayBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_intarray.c:179:12: */ return SQLITE_OK } // A virtual table module that merely echos method calls into TCL // variables. var intarrayModule = sqlite3_module{ // iVersion FxCreate: 0, // xCreate - create a new virtual table FxConnect: 0, // xConnect - connect to an existing vtab FxBestIndex: 0, // xBestIndex - find the best query index FxDisconnect: 0, // xDisconnect - disconnect a vtab FxDestroy: 0, // xDestroy - destroy a vtab FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_intarray.c:187:23 */ // Invoke this routine to create a specific instance of an intarray object. // The new intarray object is returned by the 3rd parameter. // // Each intarray object corresponds to a virtual table in the TEMP table // with a name of zName. // // Destroy the intarray object by dropping the virtual table. If not done // explicitly by the application, the virtual table will be dropped implicitly // by the system when the database connection is closed. func sqlite3_intarray_create(tls *libc.TLS, db uintptr, zName uintptr, ppReturn uintptr) int32 { /* test_intarray.c:223:16: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 = SQLITE_OK var p uintptr *(*uintptr)(unsafe.Pointer(ppReturn)) = libc.AssignUintptr(&p, sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(sqlite3_intarray{})))) if p == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(sqlite3_intarray{}))) rc = sqlite3.Xsqlite3_create_module_v2(tls, db, zName, uintptr(unsafe.Pointer(&intarrayModule)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{intarrayFree}))) if rc == SQLITE_OK { var zSql uintptr zSql = sqlite3.Xsqlite3_mprintf(tls, ts+31781, /* "CREATE VIRTUAL T..." */ libc.VaList(bp, zName, zName)) rc = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) } return rc } // Bind a new array array of integers to a specific intarray object. // // The array of integers bound must be unchanged for the duration of // any query against the corresponding virtual table. If the integer // array does change or is deallocated undefined behavior will result. func sqlite3_intarray_bind(tls *libc.TLS, pIntArray uintptr, nElements int32, aElements uintptr, xFree uintptr) int32 { /* test_intarray.c:257:16: */ if (*sqlite3_intarray)(unsafe.Pointer(pIntArray)).FxFree != 0 { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pIntArray + 16 /* &.xFree */))))(tls, (*sqlite3_intarray)(unsafe.Pointer(pIntArray)).Fa) } (*sqlite3_intarray)(unsafe.Pointer(pIntArray)).Fn = nElements (*sqlite3_intarray)(unsafe.Pointer(pIntArray)).Fa = aElements (*sqlite3_intarray)(unsafe.Pointer(pIntArray)).FxFree = xFree return SQLITE_OK } // sqlite3_intarray_create DB NAME // // Invoke the sqlite3_intarray_create interface. A string that becomes // the first parameter to sqlite3_intarray_bind. func test_intarray_create(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_intarray.c:300:26: */ bp := tls.Alloc(164) defer tls.Free(164) // var db uintptr at bp+48, 8 var zName uintptr // var pArray uintptr at bp+56, 8 var rc int32 = SQLITE_OK // var zPtr [100]int8 at bp+64, 100 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+48 /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = sqlite3_intarray_create(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), zName, bp+56 /* &pArray */) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0))) return TCL_ERROR } sqlite3TestMakePointerStr(tls, interp, bp+64 /* &zPtr[0] */, *(*uintptr)(unsafe.Pointer(bp + 56 /* pArray */))) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, bp+64 /* &zPtr[0] */, uintptr(0))) return TCL_OK } // sqlite3_intarray_bind INTARRAY ?VALUE ...? // // Invoke the sqlite3_intarray_bind interface on the given array of integers. func test_intarray_bind(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_intarray.c:335:26: */ bp := tls.Alloc(56) defer tls.Free(56) var pArray uintptr var rc int32 = SQLITE_OK var i int32 var n int32 var a uintptr if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31819 /* "INTARRAY" */) return TCL_ERROR } pArray = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) n = (objc - 2) a = sqlite3.Xsqlite3_malloc64(tls, (uint64(unsafe.Sizeof(sqlite3_int64(0))) * uint64(n))) if a == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31828 /* "SQLITE_NOMEM" */, uintptr(0))) return TCL_ERROR } for i = 0; i < n; i++ { *(*Tcl_WideInt)(unsafe.Pointer(bp + 48 /* x */)) = int64(0) tcl.XTcl_GetWideIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr((i+2))*8)), bp+48 /* &x */) *(*sqlite3_int64)(unsafe.Pointer(a + uintptr(i)*8)) = *(*Tcl_WideInt)(unsafe.Pointer(bp + 48 /* x */)) } rc = sqlite3_intarray_bind(tls, pArray, n, a, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0))) return TCL_ERROR } return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetestintarray_Init(tls *libc.TLS, interp uintptr) int32 { /* test_intarray.c:375:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd10)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd10[i].FzName, aObjCmd10[i].FxProc, aObjCmd10[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd10 = [2]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 31841 /* "sqlite3_intarray..." */, FxProc: 0}, {FzName: ts + 31865 /* "sqlite3_intarray..." */, FxProc: 0}, } /* test_intarray.c:380:5 */ // Maximum pathname length supported by the jt backend. // Name used to identify this VFS. type jt_file1 = struct { Fbase sqlite3_file FzName uintptr Fflags int32 FeLock int32 FnPage u32 FnPagesize u32 FpWritable uintptr FaCksum uintptr FnSync int32 _ [4]byte FiMaxOff sqlite3_int64 FpNext uintptr FpReal uintptr } /* test_journal.c:111:9 */ // Maximum pathname length supported by the jt backend. // Name used to identify this VFS. type jt_file = jt_file1 /* test_journal.c:111:24 */ var jt_vfs = sqlite3_vfs{ FiVersion: 2, // iVersion FszOsFile: int32(unsafe.Sizeof(jt_file{})), // szOsFile FmxPathname: JT_MAX_PATHNAME, // pNext FzName: ts + 31887, /* "jt" */ // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xCurrentTimeInt64 } /* test_journal.c:165:20 */ var jt_io_methods = sqlite3_io_methods{ FiVersion: 1, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics } /* test_journal.c:187:27 */ type JtGlobal = struct { FpVfs uintptr FpList uintptr } /* test_journal.c:203:1 */ var g2 = JtGlobal{} /* test_journal.c:207:24 */ // Functions to obtain and relinquish a mutex to protect g.pList. The // STATIC_PRNG mutex is reused, purely for the sake of convenience. func enterJtMutex(tls *libc.TLS) { /* test_journal.c:213:13: */ sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_STATIC_PRNG)) } func leaveJtMutex(tls *libc.TLS) { /* test_journal.c:216:13: */ sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_STATIC_PRNG)) } func stop_ioerr_simulation(tls *libc.TLS, piSave uintptr, piSave2 uintptr) { /* test_journal.c:222:13: */ *(*int32)(unsafe.Pointer(piSave)) = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) *(*int32)(unsafe.Pointer(piSave2)) = sqlite3.Xsqlite3_io_error_hit libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(-1)) sqlite3.Xsqlite3_io_error_hit = 0 } func start_ioerr_simulation(tls *libc.TLS, iSave int32, iSave2 int32) { /* test_journal.c:228:13: */ libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(iSave)) sqlite3.Xsqlite3_io_error_hit = iSave2 } // The jt_file pointed to by the argument may or may not be a file-handle // open on a main database file. If it is, and a transaction is currently // opened on the file, then discard all transaction related data. func closeTransaction(tls *libc.TLS, p uintptr) { /* test_journal.c:238:13: */ sqlite3.Xsqlite3BitvecDestroy(tls, (*jt_file)(unsafe.Pointer(p)).FpWritable) sqlite3.Xsqlite3_free(tls, (*jt_file)(unsafe.Pointer(p)).FaCksum) (*jt_file)(unsafe.Pointer(p)).FpWritable = uintptr(0) (*jt_file)(unsafe.Pointer(p)).FaCksum = uintptr(0) (*jt_file)(unsafe.Pointer(p)).FnSync = 0 } // Close an jt-file. func jtClose(tls *libc.TLS, pFile uintptr) int32 { /* test_journal.c:249:12: */ var pp uintptr var p uintptr = pFile closeTransaction(tls, p) enterJtMutex(tls) if (*jt_file)(unsafe.Pointer(p)).FzName != 0 { for pp = (uintptr(unsafe.Pointer(&g2)) + 8 /* &.pList */); *(*uintptr)(unsafe.Pointer(pp)) != p; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 64 /* &.pNext */) { } *(*uintptr)(unsafe.Pointer(pp)) = (*jt_file)(unsafe.Pointer(p)).FpNext } leaveJtMutex(tls) sqlite3.Xsqlite3OsClose(tls, (*jt_file)(unsafe.Pointer(p)).FpReal) return SQLITE_OK } // Read data from an jt-file. func jtRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_journal.c:267:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsRead(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) } // // Parameter zJournal is the name of a journal file that is currently // open. This function locates and returns the handle opened on the // corresponding database file by the pager that currently has the // journal file opened. This file-handle is identified by the // following properties: // // a) SQLITE_OPEN_MAIN_DB was specified when the file was opened. // // b) The file-name specified when the file was opened matches // all but the final 8 characters of the journal file name. // // c) There is currently a reserved lock on the file. This // condition is waived if the noLock argument is non-zero. // func locateDatabaseHandle(tls *libc.TLS, zJournal uintptr, noLock int32) uintptr { /* test_journal.c:292:16: */ var pMain uintptr = uintptr(0) enterJtMutex(tls) for pMain = g2.FpList; pMain != 0; pMain = (*jt_file)(unsafe.Pointer(pMain)).FpNext { var nName int32 = (int32(libc.Xstrlen(tls, zJournal) - libc.Xstrlen(tls, ts+31890 /* "-journal" */))) if (((((*jt_file)(unsafe.Pointer(pMain)).Fflags & SQLITE_OPEN_MAIN_DB) != 0) && (int32(libc.Xstrlen(tls, (*jt_file)(unsafe.Pointer(pMain)).FzName)) == nName)) && (0 == libc.Xmemcmp(tls, (*jt_file)(unsafe.Pointer(pMain)).FzName, zJournal, uint64(nName)))) && (((*jt_file)(unsafe.Pointer(pMain)).FeLock >= SQLITE_LOCK_RESERVED) || (noLock != 0)) { break } } leaveJtMutex(tls) return pMain } // Parameter z points to a buffer of 4 bytes in size containing a // unsigned 32-bit integer stored in big-endian format. Decode the // integer and return its value. func decodeUint32(tls *libc.TLS, z uintptr) u32 { /* test_journal.c:314:12: */ return (u32((((int32(*(*uint8)(unsafe.Pointer(z))) << 24) + (int32(*(*uint8)(unsafe.Pointer(z + 1))) << 16)) + (int32(*(*uint8)(unsafe.Pointer(z + 2))) << 8)) + int32(*(*uint8)(unsafe.Pointer(z + 3))))) } // Calculate a checksum from the buffer of length n bytes pointed to // by parameter z. func genCksum(tls *libc.TLS, z uintptr, n int32) u32 { /* test_journal.c:322:12: */ var i int32 var cksum u32 = u32(0) for i = 0; i < n; i++ { cksum = ((cksum + u32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) + (cksum << 3)) } return cksum } // The first argument, zBuf, points to a buffer containing a 28 byte // serialized journal header. This function deserializes four of the // integer fields contained in the journal header and writes their // values to the output variables. // // SQLITE_OK is returned if the journal-header is successfully // decoded. Otherwise, SQLITE_ERROR. func decodeJournalHdr(tls *libc.TLS, zBuf uintptr, pnRec uintptr, pnPage uintptr, pnSector uintptr, pnPagesize uintptr) int32 { /* test_journal.c:340:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*[8]uint8)(unsafe.Pointer(bp /* aMagic */)) = [8]uint8{uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7)} if libc.Xmemcmp(tls, bp /* &aMagic[0] */, zBuf, uint64(8)) != 0 { return SQLITE_ERROR } if pnRec != 0 { *(*u32)(unsafe.Pointer(pnRec)) = decodeUint32(tls, (zBuf + 8)) } if pnPage != 0 { *(*u32)(unsafe.Pointer(pnPage)) = decodeUint32(tls, (zBuf + 16)) } if pnSector != 0 { *(*u32)(unsafe.Pointer(pnSector)) = decodeUint32(tls, (zBuf + 20)) } if pnPagesize != 0 { *(*u32)(unsafe.Pointer(pnPagesize)) = decodeUint32(tls, (zBuf + 24)) } return SQLITE_OK } // This function is called when a new transaction is opened, just after // the first journal-header is written to the journal file. func openTransaction(tls *libc.TLS, pMain uintptr, pJournal uintptr) int32 { /* test_journal.c:360:12: */ bp := tls.Alloc(8) defer tls.Free(8) var aData uintptr var p uintptr = (*jt_file)(unsafe.Pointer(pMain)).FpReal var rc int32 = SQLITE_OK closeTransaction(tls, pMain) aData = sqlite3.Xsqlite3_malloc(tls, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) (*jt_file)(unsafe.Pointer(pMain)).FpWritable = sqlite3.Xsqlite3BitvecCreate(tls, (*jt_file)(unsafe.Pointer(pMain)).FnPage) (*jt_file)(unsafe.Pointer(pMain)).FaCksum = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(u32(0))) * (uint64((*jt_file)(unsafe.Pointer(pMain)).FnPage + u32(1)))))) (*jt_file)(unsafe.Pointer(pJournal)).FiMaxOff = int64(0) if (!(int32((*jt_file)(unsafe.Pointer(pMain)).FpWritable) != 0) || !(int32((*jt_file)(unsafe.Pointer(pMain)).FaCksum) != 0)) || !(aData != 0) { rc = (SQLITE_IOERR | (int32(12) << 8)) } else if (*jt_file)(unsafe.Pointer(pMain)).FnPage > u32(0) { var iTrunk u32 // var iSave int32 at bp, 4 // var iSave2 int32 at bp+4, 4 stop_ioerr_simulation(tls, bp /* &iSave */, bp+4 /* &iSave2 */) // Read the database free-list. Add the page-number for each free-list // leaf to the jt_file.pWritable bitvec. rc = sqlite3.Xsqlite3OsRead(tls, p, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), int64(0)) if rc == SQLITE_OK { var nDbsize u32 = decodeUint32(tls, (aData + 28)) if (nDbsize > u32(0)) && (libc.Xmemcmp(tls, (aData+24), (aData+92), uint64(4)) == 0) { var iPg u32 for iPg = (nDbsize + u32(1)); iPg <= (*jt_file)(unsafe.Pointer(pMain)).FnPage; iPg++ { sqlite3.Xsqlite3BitvecSet(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, iPg) } } } iTrunk = decodeUint32(tls, (aData + 32)) for (rc == SQLITE_OK) && (iTrunk > u32(0)) { var nLeaf u32 var iLeaf u32 var iOff sqlite3_int64 = ((i64(iTrunk - u32(1))) * i64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) rc = sqlite3.Xsqlite3OsRead(tls, p, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), iOff) nLeaf = decodeUint32(tls, (aData + 4)) for iLeaf = u32(0); (rc == SQLITE_OK) && (iLeaf < nLeaf); iLeaf++ { var pgno u32 = decodeUint32(tls, (aData + uintptr((u32(8) + (u32(4) * iLeaf))))) sqlite3.Xsqlite3BitvecSet(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, pgno) } iTrunk = decodeUint32(tls, aData) } // Calculate and store a checksum for each page in the database file. if rc == SQLITE_OK { var ii int32 for ii = 0; (rc == SQLITE_OK) && (ii < int32((*jt_file)(unsafe.Pointer(pMain)).FnPage)); ii++ { var iOff i64 = ((i64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) * i64(ii)) if iOff == i64(sqlite3.Xsqlite3PendingByte) { continue } rc = sqlite3.Xsqlite3OsRead(tls, (*jt_file)(unsafe.Pointer(pMain)).FpReal, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), iOff) *(*u32)(unsafe.Pointer((*jt_file)(unsafe.Pointer(pMain)).FaCksum + uintptr(ii)*4)) = genCksum(tls, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) if ((ii + 1) == int32((*jt_file)(unsafe.Pointer(pMain)).FnPage)) && (rc == (SQLITE_IOERR | (int32(2) << 8))) { rc = SQLITE_OK } } } start_ioerr_simulation(tls, *(*int32)(unsafe.Pointer(bp /* iSave */)), *(*int32)(unsafe.Pointer(bp + 4 /* iSave2 */))) } sqlite3.Xsqlite3_free(tls, aData) return rc } // The first argument to this function is a handle open on a journal file. // This function reads the journal file and adds the page number for each // page in the journal to the Bitvec object passed as the second argument. func readJournalFile(tls *libc.TLS, p uintptr, pMain uintptr) int32 { /* test_journal.c:433:12: */ bp := tls.Alloc(52) defer tls.Free(52) var rc int32 // var zBuf [28]uint8 at bp+8, 28 var pReal uintptr var iOff sqlite3_int64 var iSize sqlite3_int64 var aPage uintptr // var iSave int32 at bp, 4 // var iSave2 int32 at bp+4, 4 var cksum u32 _ = cksum var pgno u32 // var nRec u32 at bp+36, 4 // var nPage u32 at bp+40, 4 // var nSector u32 at bp+44, 4 // var nPagesize u32 at bp+48, 4 var ii u32 rc = SQLITE_OK pReal = (*jt_file)(unsafe.Pointer(p)).FpReal iOff = int64(0) iSize = (*jt_file)(unsafe.Pointer(p)).FiMaxOff aPage = sqlite3.Xsqlite3_malloc(tls, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) if !(!(aPage != 0)) { goto __1 } return (SQLITE_IOERR | (int32(12) << 8)) __1: ; stop_ioerr_simulation(tls, bp /* &iSave */, bp+4 /* &iSave2 */) __2: if !((rc == SQLITE_OK) && (iOff < iSize)) { goto __3 } // Read and decode the next journal-header from the journal file. rc = sqlite3.Xsqlite3OsRead(tls, pReal, bp+8 /* &zBuf[0] */, 28, iOff) if !((rc != SQLITE_OK) || (decodeJournalHdr(tls, bp+8 /* &zBuf[0] */, bp+36 /* &nRec */, bp+40 /* &nPage */, bp+44 /* &nSector */, bp+48 /* &nPagesize */) != 0)) { goto __4 } goto finish_rjf __4: ; iOff = iOff + (sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)))) if !(*(*u32)(unsafe.Pointer(bp + 36 /* nRec */)) == u32(0)) { goto __5 } // A trick. There might be another journal-header immediately // following this one. In this case, 0 records means 0 records, // not "read until the end of the file". See also ticket #2565. if !(iSize >= (iOff + sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */))))) { goto __6 } rc = sqlite3.Xsqlite3OsRead(tls, pReal, bp+8 /* &zBuf[0] */, 28, iOff) if !((rc != SQLITE_OK) || (0 == decodeJournalHdr(tls, bp+8 /* &zBuf[0] */, uintptr(0), uintptr(0), uintptr(0), uintptr(0)))) { goto __7 } goto __2 __7: ; __6: ; *(*u32)(unsafe.Pointer(bp + 36 /* nRec */)) = (u32((iSize - iOff) / (sqlite3_int64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize + u32(8))))) __5: ; // Read all the records that follow the journal-header just read. ii = u32(0) __8: if !(((rc == SQLITE_OK) && (ii < *(*u32)(unsafe.Pointer(bp + 36 /* nRec */)))) && (iOff < iSize)) { goto __10 } rc = sqlite3.Xsqlite3OsRead(tls, pReal, bp+8 /* &zBuf[0] */, 4, iOff) if !(rc == SQLITE_OK) { goto __11 } pgno = decodeUint32(tls, bp+8 /* &zBuf[0] */) if !((pgno > u32(0)) && (pgno <= (*jt_file)(unsafe.Pointer(pMain)).FnPage)) { goto __12 } if !(0 == sqlite3.Xsqlite3BitvecTest(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, pgno)) { goto __13 } rc = sqlite3.Xsqlite3OsRead(tls, pReal, aPage, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), (iOff + int64(4))) if !(rc == SQLITE_OK) { goto __14 } cksum = genCksum(tls, aPage, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) __14: ; __13: ; sqlite3.Xsqlite3BitvecSet(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, pgno) __12: ; iOff = iOff + (sqlite3_int64(u32(8) + (*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) __11: ; goto __9 __9: ii++ goto __8 goto __10 __10: ; iOff = (((iOff + (sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)) - u32(1)))) / sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)))) * sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)))) goto __2 __3: ; finish_rjf: start_ioerr_simulation(tls, *(*int32)(unsafe.Pointer(bp /* iSave */)), *(*int32)(unsafe.Pointer(bp + 4 /* iSave2 */))) sqlite3.Xsqlite3_free(tls, aPage) if !(rc == (SQLITE_IOERR | (int32(2) << 8))) { goto __15 } rc = SQLITE_OK __15: ; return rc } // Write data to an jt-file. func jtWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_journal.c:512:12: */ var rc int32 var p uintptr = pFile if ((*jt_file)(unsafe.Pointer(p)).Fflags & SQLITE_OPEN_MAIN_JOURNAL) != 0 { if iOfst == int64(0) { var pMain uintptr = locateDatabaseHandle(tls, (*jt_file)(unsafe.Pointer(p)).FzName, 0) if iAmt == 28 { // Zeroing the first journal-file header. This is the end of a // transaction. closeTransaction(tls, pMain) } else if iAmt != 12 { // Writing the first journal header to a journal file. This happens // when a transaction is first started. var z uintptr = zBuf (*jt_file)(unsafe.Pointer(pMain)).FnPage = decodeUint32(tls, (z + 16)) (*jt_file)(unsafe.Pointer(pMain)).FnPagesize = decodeUint32(tls, (z + 24)) if SQLITE_OK != (libc.AssignInt32(&rc, openTransaction(tls, pMain, p))) { return rc } } } if (*jt_file)(unsafe.Pointer(p)).FiMaxOff < (iOfst + sqlite_int64(iAmt)) { (*jt_file)(unsafe.Pointer(p)).FiMaxOff = (iOfst + sqlite_int64(iAmt)) } } if (((*jt_file)(unsafe.Pointer(p)).Fflags & SQLITE_OPEN_MAIN_DB) != 0) && ((*jt_file)(unsafe.Pointer(p)).FpWritable != 0) { if (((iAmt < int32((*jt_file)(unsafe.Pointer(p)).FnPagesize)) && (((*jt_file)(unsafe.Pointer(p)).FnPagesize % u32(iAmt)) == u32(0))) && (iOfst >= (sqlite_int64(sqlite3.Xsqlite3PendingByte + 512)))) && ((iOfst + sqlite_int64(iAmt)) <= (sqlite_int64(u32(sqlite3.Xsqlite3PendingByte) + (*jt_file)(unsafe.Pointer(p)).FnPagesize))) { // No-op. This special case is hit when the backup code is copying a // to a database with a larger page-size than the source database and // it needs to fill in the non-locking-region part of the original // pending-byte page. } else { var pgno u32 = (u32((iOfst / sqlite_int64((*jt_file)(unsafe.Pointer(p)).FnPagesize)) + int64(1))) _ = pgno // The following assert() statements may fail if this layer is used // with a connection in "PRAGMA synchronous=off" mode. If they // fail with sync=normal or sync=full, this may indicate problem. } } rc = sqlite3.Xsqlite3OsWrite(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) if (((*jt_file)(unsafe.Pointer(p)).Fflags & SQLITE_OPEN_MAIN_JOURNAL) != 0) && (iAmt == 12) { var pMain uintptr = locateDatabaseHandle(tls, (*jt_file)(unsafe.Pointer(p)).FzName, 0) var rc2 int32 = readJournalFile(tls, p, pMain) if rc == SQLITE_OK { rc = rc2 } } return rc } // Truncate an jt-file. func jtTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_journal.c:580:12: */ var p uintptr = pFile if (((*jt_file)(unsafe.Pointer(p)).Fflags & SQLITE_OPEN_MAIN_JOURNAL) != 0) && (size == int64(0)) { // Truncating a journal file. This is the end of a transaction. var pMain uintptr = locateDatabaseHandle(tls, (*jt_file)(unsafe.Pointer(p)).FzName, 0) closeTransaction(tls, pMain) } if (((*jt_file)(unsafe.Pointer(p)).Fflags & SQLITE_OPEN_MAIN_DB) != 0) && ((*jt_file)(unsafe.Pointer(p)).FpWritable != 0) { var pgno u32 var locking_page u32 = ((u32(sqlite3.Xsqlite3PendingByte) / (*jt_file)(unsafe.Pointer(p)).FnPagesize) + u32(1)) _ = locking_page for pgno = (u32((size / sqlite_int64((*jt_file)(unsafe.Pointer(p)).FnPagesize)) + int64(1))); pgno <= (*jt_file)(unsafe.Pointer(p)).FnPage; pgno++ { } } return sqlite3.Xsqlite3OsTruncate(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, size) } // Sync an jt-file. func jtSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test_journal.c:600:12: */ var p uintptr = pFile if ((*jt_file)(unsafe.Pointer(p)).Fflags & SQLITE_OPEN_MAIN_JOURNAL) != 0 { var rc int32 var pMain uintptr // The associated database file // The journal file is being synced. At this point, we inspect the // contents of the file up to this point and set each bit in the // jt_file.pWritable bitvec of the main database file associated with // this journal file. pMain = locateDatabaseHandle(tls, (*jt_file)(unsafe.Pointer(p)).FzName, 0) // Set the bitvec values if (pMain != 0) && ((*jt_file)(unsafe.Pointer(pMain)).FpWritable != 0) { (*jt_file)(unsafe.Pointer(pMain)).FnSync++ rc = readJournalFile(tls, p, pMain) if rc != SQLITE_OK { return rc } } } return sqlite3.Xsqlite3OsSync(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, flags) } // Return the current file-size of an jt-file. func jtFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_journal.c:630:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsFileSize(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, pSize) } // Lock an jt-file. func jtLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_journal.c:638:12: */ var rc int32 var p uintptr = pFile rc = sqlite3.Xsqlite3OsLock(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, eLock) if (rc == SQLITE_OK) && (eLock > (*jt_file)(unsafe.Pointer(p)).FeLock) { (*jt_file)(unsafe.Pointer(p)).FeLock = eLock } return rc } // Unlock an jt-file. func jtUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_journal.c:651:12: */ var rc int32 var p uintptr = pFile rc = sqlite3.Xsqlite3OsUnlock(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, eLock) if (rc == SQLITE_OK) && (eLock < (*jt_file)(unsafe.Pointer(p)).FeLock) { (*jt_file)(unsafe.Pointer(p)).FeLock = eLock } return rc } // Check if another file-handle holds a RESERVED lock on an jt-file. func jtCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_journal.c:664:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, pResOut) } // File control method. For custom operations on an jt-file. func jtFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_journal.c:672:12: */ var p uintptr = pFile return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*jt_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 80 /* &.xFileControl */))))(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, op, pArg) } // Return the sector-size in bytes for an jt-file. func jtSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_journal.c:680:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsSectorSize(tls, (*jt_file)(unsafe.Pointer(p)).FpReal) } // Return the device characteristic flags supported by an jt-file. func jtDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_journal.c:688:12: */ var p uintptr = pFile return sqlite3.Xsqlite3OsDeviceCharacteristics(tls, (*jt_file)(unsafe.Pointer(p)).FpReal) } // Open an jt file handle. func jtOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_journal.c:696:12: */ var rc int32 var p uintptr = pFile (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(0) (*jt_file)(unsafe.Pointer(p)).FpReal = (p + 1*80) (*sqlite3_file)(unsafe.Pointer((*jt_file)(unsafe.Pointer(p)).FpReal)).FpMethods = uintptr(0) rc = sqlite3.Xsqlite3OsOpen(tls, g2.FpVfs, zName, (*jt_file)(unsafe.Pointer(p)).FpReal, flags, pOutFlags) if rc == SQLITE_OK { (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&jt_io_methods)) (*jt_file)(unsafe.Pointer(p)).FeLock = 0 (*jt_file)(unsafe.Pointer(p)).FzName = zName (*jt_file)(unsafe.Pointer(p)).Fflags = flags (*jt_file)(unsafe.Pointer(p)).FpNext = uintptr(0) (*jt_file)(unsafe.Pointer(p)).FpWritable = uintptr(0) (*jt_file)(unsafe.Pointer(p)).FaCksum = uintptr(0) enterJtMutex(tls) if zName != 0 { (*jt_file)(unsafe.Pointer(p)).FpNext = g2.FpList g2.FpList = p } leaveJtMutex(tls) } return rc } // Delete the file located at zPath. If the dirSync argument is true, // ensure the file-system modifications are synced to disk before // returning. func jtDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_journal.c:733:12: */ var nPath int32 = int32(libc.Xstrlen(tls, zPath)) if (nPath > 8) && (0 == libc.Xstrcmp(tls, ts+31890 /* "-journal" */, (zPath+uintptr((nPath-8))))) { // Deleting a journal file. The end of a transaction. var pMain uintptr = locateDatabaseHandle(tls, zPath, 0) if pMain != 0 { closeTransaction(tls, pMain) } } return sqlite3.Xsqlite3OsDelete(tls, g2.FpVfs, zPath, dirSync) } // Test for access permissions. Return true if the requested permission // is available, or false otherwise. func jtAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_journal.c:750:12: */ return sqlite3.Xsqlite3OsAccess(tls, g2.FpVfs, zPath, flags, pResOut) } // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (JT_MAX_PATHNAME+1) bytes. func jtFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* test_journal.c:764:12: */ return sqlite3.Xsqlite3OsFullPathname(tls, g2.FpVfs, zPath, nOut, zOut) } // Open the dynamic library located at zPath and return a handle. func jtDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_journal.c:776:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((g2.FpVfs + 72 /* &.xDlOpen */))))(tls, g2.FpVfs, zPath) } // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. func jtDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_journal.c:785:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((g2.FpVfs + 80 /* &.xDlError */))))(tls, g2.FpVfs, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. func jtDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* test_journal.c:792:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((g2.FpVfs + 88 /* &.xDlSym */))))(tls, g2.FpVfs, p, zSym) } // Close the dynamic library handle pHandle. func jtDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_journal.c:799:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((g2.FpVfs + 96 /* &.xDlClose */))))(tls, g2.FpVfs, pHandle) } // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. func jtRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test_journal.c:807:12: */ return sqlite3.Xsqlite3OsRandomness(tls, g2.FpVfs, nByte, zBufOut) } // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. func jtSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* test_journal.c:815:12: */ return sqlite3.Xsqlite3OsSleep(tls, g2.FpVfs, nMicro) } // Return the current time as a Julian Day number in *pTimeOut. func jtCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* test_journal.c:822:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((g2.FpVfs + 120 /* &.xCurrentTime */))))(tls, g2.FpVfs, pTimeOut) } // Return the current time as a Julian Day number in *pTimeOut. func jtCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* test_journal.c:828:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((g2.FpVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, g2.FpVfs, pTimeOut) } func jtGetLastError(tls *libc.TLS, pVfs uintptr, n int32, z uintptr) int32 { /* test_journal.c:832:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((g2.FpVfs + 128 /* &.xGetLastError */))))(tls, g2.FpVfs, n, z) } // ************************************************************************* // // Start of public API. // Configure the jt VFS as a wrapper around the VFS named by parameter // zWrap. If the isDefault parameter is true, then the jt VFS is installed // as the new default VFS for SQLite connections. If isDefault is not // true, then the jt VFS is installed as non-default. In this case it // is available via its name, "jt". func jt_register(tls *libc.TLS, zWrap uintptr, isDefault int32) int32 { /* test_journal.c:847:5: */ g2.FpVfs = sqlite3.Xsqlite3_vfs_find(tls, zWrap) if g2.FpVfs == uintptr(0) { return SQLITE_ERROR } jt_vfs.FszOsFile = (int32(uint64(unsafe.Sizeof(jt_file{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(g2.FpVfs)).FszOsFile))) if (*sqlite3_vfs)(unsafe.Pointer(g2.FpVfs)).FiVersion == 1 { jt_vfs.FiVersion = 1 } else if (*sqlite3_vfs)(unsafe.Pointer(g2.FpVfs)).FxCurrentTimeInt64 == uintptr(0) { jt_vfs.FxCurrentTimeInt64 = uintptr(0) } sqlite3.Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&jt_vfs)), isDefault) return SQLITE_OK } // Uninstall the jt VFS, if it is installed. func jt_unregister(tls *libc.TLS) { /* test_journal.c:865:6: */ sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(unsafe.Pointer(&jt_vfs))) } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. // This structure is used to encapsulate the global state variables used // by malloc() fault simulation. type MemFault = struct { FiCountdown int32 FnRepeat int32 FnBenign int32 FnFail int32 FnOkBefore int32 FnOkAfter int32 Fenable u8 _ [3]byte FisInstalled int32 FisBenignMode int32 _ [4]byte Fm sqlite3_mem_methods } /* test_malloc.c:30:8 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. // This structure is used to encapsulate the global state variables used // by malloc() fault simulation. var memfault MemFault /* test_malloc.c:41:3: */ // This routine exists as a place to set a breakpoint that will // fire on any simulated malloc() failure. func sqlite3Fault(tls *libc.TLS) { /* test_malloc.c:47:13: */ cnt1++ } var cnt1 int32 = 0 /* test_malloc.c:48:14 */ // This routine exists as a place to set a breakpoint that will // fire the first time any malloc() fails on a single test case. // The sqlite3Fault() routine above runs on every malloc() failure. // This routine only runs on the first such failure. func sqlite3FirstFault(tls *libc.TLS) { /* test_malloc.c:58:13: */ cnt2++ } var cnt2 int32 = 0 /* test_malloc.c:59:14 */ // Check to see if a fault should be simulated. Return true to simulate // the fault. Return false if the fault should not be simulated. func faultsimStep(tls *libc.TLS) int32 { /* test_malloc.c:67:12: */ if !(int32(memfault.Fenable) != 0) { memfault.FnOkAfter++ return 0 } if memfault.FiCountdown > 0 { memfault.FiCountdown-- memfault.FnOkBefore++ return 0 } if memfault.FnFail == 0 { sqlite3FirstFault(tls) } sqlite3Fault(tls) memfault.FnFail++ if memfault.FisBenignMode > 0 { memfault.FnBenign++ } memfault.FnRepeat-- if memfault.FnRepeat <= 0 { memfault.Fenable = u8(0) } return 1 } // A version of sqlite3_mem_methods.xMalloc() that includes fault simulation // logic. func faultsimMalloc(tls *libc.TLS, n int32) uintptr { /* test_malloc.c:94:13: */ var p uintptr = uintptr(0) if !(faultsimStep(tls) != 0) { p = (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&memfault)) + 40 /* &.m */ /* &.xMalloc */))))(tls, n) } return p } // A version of sqlite3_mem_methods.xRealloc() that includes fault simulation // logic. func faultsimRealloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* test_malloc.c:107:13: */ var p uintptr = uintptr(0) if !(faultsimStep(tls) != 0) { p = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&memfault)) + 40 /* &.m */ + 16 /* &.xRealloc */))))(tls, pOld, n) } return p } // This routine configures the malloc failure simulation. After // calling this routine, the next nDelay mallocs will succeed, followed // by a block of nRepeat failures, after which malloc() calls will begin // to succeed again. func faultsimConfig(tls *libc.TLS, nDelay int32, nRepeat int32) { /* test_malloc.c:121:13: */ memfault.FiCountdown = nDelay memfault.FnRepeat = nRepeat memfault.FnBenign = 0 memfault.FnFail = 0 memfault.FnOkBefore = 0 memfault.FnOkAfter = 0 memfault.Fenable = (u8(libc.Bool32(nDelay >= 0))) // Sometimes, when running multi-threaded tests, the isBenignMode // variable is not properly incremented/decremented so that it is // 0 when not inside a benign malloc block. This doesn't affect // the multi-threaded tests, as they do not use this system. But // it does affect OOM tests run later in the same process. So // zero the variable here, just to be sure. memfault.FisBenignMode = 0 } // Return the number of faults (both hard and benign faults) that have // occurred since the injector was last configured. func faultsimFailures(tls *libc.TLS) int32 { /* test_malloc.c:144:12: */ return memfault.FnFail } // Return the number of benign faults that have occurred since the // injector was last configured. func faultsimBenignFailures(tls *libc.TLS) int32 { /* test_malloc.c:152:12: */ return memfault.FnBenign } // Return the number of successes that will occur before the next failure. // If no failures are scheduled, return -1. func faultsimPending(tls *libc.TLS) int32 { /* test_malloc.c:160:12: */ if memfault.Fenable != 0 { return memfault.FiCountdown } else { return -1 } return int32(0) } func faultsimBeginBenign(tls *libc.TLS) { /* test_malloc.c:169:13: */ memfault.FisBenignMode++ } func faultsimEndBenign(tls *libc.TLS) { /* test_malloc.c:172:13: */ memfault.FisBenignMode-- } // Add or remove the fault-simulation layer using sqlite3_config(). If // the argument is non-zero, the func faultsimInstall(tls *libc.TLS, install int32) int32 { /* test_malloc.c:180:12: */ bp := tls.Alloc(256) defer tls.Free(256) var rc int32 install = func() int32 { if install != 0 { return 1 } return 0 }() if install == memfault.FisInstalled { return SQLITE_ERROR } if install != 0 { rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETMALLOC, libc.VaList(bp, (uintptr(unsafe.Pointer(&memfault))+40 /* &.m */))) if rc == SQLITE_OK { *(*sqlite3_mem_methods)(unsafe.Pointer(bp + 128 /* m */)) = memfault.Fm (*sqlite3_mem_methods)(unsafe.Pointer(bp + 128 /* &m */)).FxMalloc = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32) uintptr }{faultsimMalloc})) (*sqlite3_mem_methods)(unsafe.Pointer(bp + 128 /* &m */)).FxRealloc = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{faultsimRealloc})) rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp+16, bp+128 /* &m */)) } sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) }{faultsimBeginBenign})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) }{faultsimEndBenign})))) } else { // var m2 sqlite3_mem_methods at bp+192, 64 // One should be able to reset the default memory allocator by storing // a zeroed allocator then calling GETMALLOC. libc.Xmemset(tls, bp+192 /* &m2 */, 0, uint64(unsafe.Sizeof(sqlite3_mem_methods{}))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp+56, bp+192 /* &m2 */)) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETMALLOC, libc.VaList(bp+72, bp+192 /* &m2 */)) rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp+88, (uintptr(unsafe.Pointer(&memfault))+40 /* &.m */))) sqlite3.Xsqlite3_test_control(tls, SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS, libc.VaList(bp+104, uintptr(0), uintptr(0))) } if rc == SQLITE_OK { memfault.FisInstalled = 1 } return rc } // Transform pointers to text and back again func pointerToText(tls *libc.TLS, p uintptr, z uintptr) { /* test_malloc.c:239:13: */ bp := tls.Alloc(20) defer tls.Free(20) *(*uintptr)(unsafe.Pointer(bp + 8)) = p var i int32 var k int32 // var u uint32 at bp+16, 4 // var n sqlite3_uint64 at bp, 8 if *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)) == uintptr(0) { libc.Xstrcpy(tls, z, ts+13875 /* "0" */) return } if uint64(unsafe.Sizeof(sqlite3_uint64(0))) == uint64(unsafe.Sizeof(uintptr(0))) { libc.Xmemcpy(tls, bp /* &n */, bp+8 /* &p */, uint64(unsafe.Sizeof(uintptr(0)))) } else if uint64(unsafe.Sizeof(uint32(0))) == uint64(unsafe.Sizeof(uintptr(0))) { libc.Xmemcpy(tls, bp+16 /* &u */, bp+8 /* &p */, uint64(unsafe.Sizeof(uint32(0)))) *(*sqlite3_uint64)(unsafe.Pointer(bp /* n */)) = sqlite3_uint64(*(*uint32)(unsafe.Pointer(bp + 16 /* u */))) } else { } i = 0 k = (int32((uint64(unsafe.Sizeof(uintptr(0))) * uint64(2)) - uint64(1))) __1: if !(uint64(i) < (uint64(unsafe.Sizeof(uintptr(0))) * uint64(2))) { goto __3 } { *(*int8)(unsafe.Pointer(z + uintptr(k))) = zHex[(*(*sqlite3_uint64)(unsafe.Pointer(bp /* n */)) & uint64(0xf))] *(*sqlite3_uint64)(unsafe.Pointer(bp /* n */)) >>= 4 } goto __2 __2: i++ k-- goto __1 goto __3 __3: ; *(*int8)(unsafe.Pointer(z + 16)) = int8(0) } var zHex = *(*[17]int8)(unsafe.Pointer(ts + 30273 /* "0123456789abcdef" */)) /* test_malloc.c:240:21 */ func hexToInt(tls *libc.TLS, h int32) int32 { /* test_malloc.c:262:12: */ if (h >= '0') && (h <= '9') { return (h - '0') } else if (h >= 'a') && (h <= 'f') { return ((h - 'a') + 10) } else { return -1 } return int32(0) } func textToPointer(tls *libc.TLS, z uintptr, pp uintptr) int32 { /* test_malloc.c:271:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*sqlite3_uint64)(unsafe.Pointer(bp /* n */)) = uint64(0) var i int32 // var u uint32 at bp+8, 4 for i = 0; (uint64(i) < (uint64(unsafe.Sizeof(uintptr(0))) * uint64(2))) && (*(*int8)(unsafe.Pointer(z)) != 0); i++ { var v int32 v = hexToInt(tls, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) if v < 0 { return TCL_ERROR } *(*sqlite3_uint64)(unsafe.Pointer(bp /* n */)) = ((*(*sqlite3_uint64)(unsafe.Pointer(bp /* n */)) * uint64(16)) + sqlite3_uint64(v)) } if int32(*(*int8)(unsafe.Pointer(z))) != 0 { return TCL_ERROR } if uint64(unsafe.Sizeof(sqlite3_uint64(0))) == uint64(unsafe.Sizeof(uintptr(0))) { libc.Xmemcpy(tls, pp, bp /* &n */, uint64(unsafe.Sizeof(sqlite3_uint64(0)))) } else if uint64(unsafe.Sizeof(uint32(0))) == uint64(unsafe.Sizeof(uintptr(0))) { *(*uint32)(unsafe.Pointer(bp + 8 /* u */)) = uint32(*(*sqlite3_uint64)(unsafe.Pointer(bp /* n */))) libc.Xmemcpy(tls, pp, bp+8 /* &u */, uint64(unsafe.Sizeof(uint32(0)))) } else { } return TCL_OK } // Usage: sqlite3_malloc NBYTES // // Raw test interface for sqlite3_malloc(). func test_malloc(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:298:26: */ bp := tls.Alloc(128) defer tls.Free(128) // var nByte int32 at bp+24, 4 var p uintptr // var zOut [100]int8 at bp+28, 100 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31899 /* "NBYTES" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &nByte */) != 0 { return TCL_ERROR } p = sqlite3.Xsqlite3_malloc(tls, int32(uint32(*(*int32)(unsafe.Pointer(bp + 24 /* nByte */))))) pointerToText(tls, p, bp+28 /* &zOut[0] */) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, bp+28 /* &zOut[0] */, uintptr(0))) return TCL_OK } // Usage: sqlite3_realloc PRIOR NBYTES // // Raw test interface for sqlite3_realloc(). func test_realloc(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:323:26: */ bp := tls.Alloc(172) defer tls.Free(172) // var nByte int32 at bp+56, 4 // var pPrior uintptr at bp+64, 8 var p uintptr // var zOut [100]int8 at bp+72, 100 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31906 /* "PRIOR NBYTES" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+56 /* &nByte */) != 0 { return TCL_ERROR } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+64 /* &pPrior */) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31919 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } p = sqlite3.Xsqlite3_realloc(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pPrior */)), int32(uint32(*(*int32)(unsafe.Pointer(bp + 56 /* nByte */))))) pointerToText(tls, p, bp+72 /* &zOut[0] */) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, bp+72 /* &zOut[0] */, uintptr(0))) return TCL_OK } // Usage: sqlite3_free PRIOR // // Raw test interface for sqlite3_free(). func test_free(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:352:26: */ bp := tls.Alloc(40) defer tls.Free(40) // var pPrior uintptr at bp+32, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31933 /* "PRIOR" */) return TCL_ERROR } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+32 /* &pPrior */) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31919 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pPrior */))) return TCL_OK } // Usage: memset ADDRESS SIZE HEX // // Set a chunk of memory (obtained from malloc, probably) to a // specified hex pattern. func test_memset(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:383:26: */ bp := tls.Alloc(196) defer tls.Free(196) // var p uintptr at bp+80, 8 // var size int32 at bp+88, 4 // var n int32 at bp+92, 4 var i int32 var zHex uintptr var zOut uintptr // var zBin [100]int8 at bp+96, 100 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31939 /* "ADDRESS SIZE HEX" */) return TCL_ERROR } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+80 /* &p */) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31919 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+88 /* &size */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 88 /* size */)) <= 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+31956 /* "size must be pos..." */, uintptr(0))) return TCL_ERROR } zHex = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+92 /* &n */) if uint64(*(*int32)(unsafe.Pointer(bp + 92 /* n */))) > (uint64(unsafe.Sizeof([100]int8{})) * uint64(2)) { *(*int32)(unsafe.Pointer(bp + 92 /* n */)) = (int32(uint64(unsafe.Sizeof([100]int8{})) * uint64(2))) } *(*int32)(unsafe.Pointer(bp + 92 /* n */)) = sqlite3TestHexToBin(tls, zHex, *(*int32)(unsafe.Pointer(bp + 92 /* n */)), bp+96 /* &zBin[0] */) if *(*int32)(unsafe.Pointer(bp + 92 /* n */)) == 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, ts+31978 /* "no data" */, uintptr(0))) return TCL_ERROR } zOut = *(*uintptr)(unsafe.Pointer(bp + 80 /* p */)) for i = 0; i < *(*int32)(unsafe.Pointer(bp + 88 /* size */)); i++ { *(*int8)(unsafe.Pointer(zOut + uintptr(i))) = *(*int8)(unsafe.Pointer(bp + 96 /* &zBin[0] */ + uintptr((i % *(*int32)(unsafe.Pointer(bp + 92 /* n */)))))) } return TCL_OK } // Usage: memget ADDRESS SIZE // // Return memory as hexadecimal text. func test_memget(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:429:26: */ bp := tls.Alloc(192) defer tls.Free(192) // var p uintptr at bp+80, 8 // var size int32 at bp+88, 4 var n int32 var zBin uintptr // var zHex [100]int8 at bp+92, 100 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31986 /* "ADDRESS SIZE" */) return TCL_ERROR } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+80 /* &p */) != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+31919 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0))) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+88 /* &size */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 88 /* size */)) <= 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+31956 /* "size must be pos..." */, uintptr(0))) return TCL_ERROR } zBin = *(*uintptr)(unsafe.Pointer(bp + 80 /* p */)) for *(*int32)(unsafe.Pointer(bp + 88 /* size */)) > 0 { if uint64(*(*int32)(unsafe.Pointer(bp + 88 /* size */))) > ((uint64(unsafe.Sizeof([100]int8{})) - uint64(1)) / uint64(2)) { n = (int32((uint64(unsafe.Sizeof([100]int8{})) - uint64(1)) / uint64(2))) } else { n = *(*int32)(unsafe.Pointer(bp + 88 /* size */)) } libc.Xmemcpy(tls, bp+92 /* &zHex[0] */, zBin, uint64(n)) zBin += uintptr(n) *(*int32)(unsafe.Pointer(bp + 88 /* size */)) -= n sqlite3TestBinToHex(tls, bp+92 /* &zHex[0] */, n) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+56, bp+92 /* &zHex[0] */, uintptr(0))) } return TCL_OK } // Usage: sqlite3_memory_used // // Raw test interface for sqlite3_memory_used(). func test_memory_used(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:476:26: */ tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, sqlite3.Xsqlite3_memory_used(tls))) return TCL_OK } // Usage: sqlite3_memory_highwater ?RESETFLAG? // // Raw test interface for sqlite3_memory_highwater(). func test_memory_highwater(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:491:26: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* resetFlag */)) = 0 if (objc != 1) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31999 /* "?RESET?" */) return TCL_ERROR } if objc == 2 { if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &resetFlag */) != 0 { return TCL_ERROR } } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, sqlite3.Xsqlite3_memory_highwater(tls, *(*int32)(unsafe.Pointer(bp /* resetFlag */))))) return TCL_OK } // Usage: sqlite3_memdebug_backtrace DEPTH // // Set the depth of backtracing. If SQLITE_MEMDEBUG is not defined // then this routine is a no-op. func test_memdebug_backtrace(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:516:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var depth int32 at bp, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32007 /* "DEPT" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &depth */) != 0 { return TCL_ERROR } return TCL_OK } // Usage: sqlite3_memdebug_dump FILENAME // // Write a summary of unfreed memory to FILENAME. func test_memdebug_dump(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:542:26: */ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18381 /* "FILENAME" */) return TCL_ERROR } return TCL_OK } // Usage: sqlite3_memdebug_malloc_count // // Return the total number of times malloc() has been called. func test_memdebug_malloc_count(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:567:26: */ var nMalloc int32 = -1 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nMalloc)) return TCL_OK } // Usage: sqlite3_memdebug_fail COUNTER ?OPTIONS? // // where options are: // // -repeat // -benigncnt // // Arrange for a simulated malloc() failure after COUNTER successes. // If a repeat count is specified, the fault is repeated that many // times. // // Each call to this routine overrides the prior counter value. // This routine returns the number of simulated failures that have // happened since the previous call to this routine. // // To disable simulated failures, use a COUNTER of -1. func test_memdebug_fail(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:607:26: */ bp := tls.Alloc(44) defer tls.Free(44) var ii int32 // var iFail int32 at bp+32, 4 *(*int32)(unsafe.Pointer(bp + 40 /* nRepeat */)) = 1 var pBenignCnt uintptr = uintptr(0) var nBenign int32 var nFail int32 = 0 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32012 /* "COUNTER ?OPTIONS..." */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+32 /* &iFail */) != 0 { return TCL_ERROR } for ii = 2; ii < objc; ii = ii + (2) { // var nOption int32 at bp+36, 4 var zOption uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(ii)*8)), bp+36 /* &nOption */) var zErr uintptr = uintptr(0) if (*(*int32)(unsafe.Pointer(bp + 36 /* nOption */)) > 1) && (libc.Xstrncmp(tls, zOption, ts+32030 /* "-repeat" */, uint64(*(*int32)(unsafe.Pointer(bp + 36 /* nOption */)))) == 0) { if ii == (objc - 1) { zErr = ts + 12329 /* "option requires ..." */ } else { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((ii+1))*8)), bp+40 /* &nRepeat */) != 0 { return TCL_ERROR } } } else if (*(*int32)(unsafe.Pointer(bp + 36 /* nOption */)) > 1) && (libc.Xstrncmp(tls, zOption, ts+32038 /* "-benigncnt" */, uint64(*(*int32)(unsafe.Pointer(bp + 36 /* nOption */)))) == 0) { if ii == (objc - 1) { zErr = ts + 12329 /* "option requires ..." */ } else { pBenignCnt = *(*uintptr)(unsafe.Pointer(objv + uintptr((ii+1))*8)) } } else { zErr = ts + 12135 /* "unknown option: " */ } if zErr != 0 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, zErr, zOption, 0)) return TCL_ERROR } } nBenign = faultsimBenignFailures(tls) nFail = faultsimFailures(tls) faultsimConfig(tls, *(*int32)(unsafe.Pointer(bp + 32 /* iFail */)), *(*int32)(unsafe.Pointer(bp + 40 /* nRepeat */))) if pBenignCnt != 0 { tcl.XTcl_ObjSetVar2(tls, interp, pBenignCnt, uintptr(0), tcl.XTcl_NewIntObj(tls, nBenign), 0) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nFail)) return TCL_OK } // Usage: sqlite3_memdebug_pending // // Return the number of malloc() calls that will succeed before a // simulated failure occurs. A negative return value indicates that // no malloc() failure is scheduled. func test_memdebug_pending(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:673:26: */ var nPending int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } nPending = faultsimPending(tls) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nPending)) return TCL_OK } // The following global variable keeps track of the number of tests // that have run. This variable is only useful when running in the // debugger. var sqlite3_memdebug_title_count int32 = 0 /* test_malloc.c:694:12 */ // Usage: sqlite3_memdebug_settitle TITLE // // Set a title string stored with each allocation. The TITLE is // typically the name of the test that was running when the // allocation occurred. The TITLE is stored with the allocation // and can be used to figure out which tests are leaking memory. // // Each title overwrite the previous. func test_memdebug_settitle(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:706:26: */ sqlite3_memdebug_title_count++ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32049 /* "TITLE" */) return TCL_ERROR } return TCL_OK } var aMallocLog Tcl_HashTable /* test_malloc.c:732:22: */ var mallocLogEnabled int32 = 0 /* test_malloc.c:733:12 */ type MallocLog1 = struct { FnCall int32 FnByte int32 } /* test_malloc.c:735:9 */ type MallocLog = MallocLog1 /* test_malloc.c:735:26 */ func test_memdebug_log_clear(tls *libc.TLS) { /* test_malloc.c:772:13: */ bp := tls.Alloc(24) defer tls.Free(24) // var search Tcl_HashSearch at bp, 24 var pEntry uintptr for pEntry = tcl.XTcl_FirstHashEntry(tls, uintptr(unsafe.Pointer(&aMallocLog)), bp /* &search */); pEntry != 0; pEntry = tcl.XTcl_NextHashEntry(tls, bp /* &search */) { var pLog uintptr = (*Tcl_HashEntry)(unsafe.Pointer(pEntry)).FclientData tcl.XTcl_Free(tls, pLog) } tcl.XTcl_DeleteHashTable(tls, uintptr(unsafe.Pointer(&aMallocLog))) tcl.XTcl_InitHashTable(tls, uintptr(unsafe.Pointer(&aMallocLog)), (int32(uint64(10) * (func() uint64 { if uint64(unsafe.Sizeof(int32(0))) >= uint64(unsafe.Sizeof(uintptr(0))) { return uint64(1) } return (uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(int32(0)))) }())))) } func test_memdebug_log(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:787:26: */ bp := tls.Alloc(128) defer tls.Free(128) // var iSub int32 at bp, 4 if !(isInit != 0) { tcl.XTcl_InitHashTable(tls, uintptr(unsafe.Pointer(&aMallocLog)), (int32(uint64(10) * (func() uint64 { if uint64(unsafe.Sizeof(int32(0))) >= uint64(unsafe.Sizeof(uintptr(0))) { return uint64(1) } return (uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(int32(0)))) }())))) isInit = 1 } if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32055 /* "SUB-COMMAND ..." */) } if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&MB_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+1875 /* "sub-command" */, 0, bp /* &iSub */) != 0 { return TCL_ERROR } switch uint32(*(*int32)(unsafe.Pointer(bp /* iSub */))) { case uint32(0) /* MB_LOG_START */ : mallocLogEnabled = 1 break case uint32(1) /* MB_LOG_STOP */ : mallocLogEnabled = 0 break case uint32(2) /* MB_LOG_DUMP */ : { // var search Tcl_HashSearch at bp+8, 24 var pEntry uintptr var pRet uintptr = tcl.XTcl_NewObj(tls) for pEntry = tcl.XTcl_FirstHashEntry(tls, uintptr(unsafe.Pointer(&aMallocLog)), bp+8 /* &search */); pEntry != 0; pEntry = tcl.XTcl_NextHashEntry(tls, bp+8 /* &search */) { // var apElem [12]uintptr at bp+32, 96 var pLog uintptr = (*Tcl_HashEntry)(unsafe.Pointer(pEntry)).FclientData var aKey uintptr = func() uintptr { if ((*Tcl_HashTable)(unsafe.Pointer((uintptr(unsafe.Pointer(&aMallocLog))))).FkeyType == (1)) || ((*Tcl_HashTable)(unsafe.Pointer((uintptr(unsafe.Pointer(&aMallocLog))))).FkeyType == (-1)) { return *(*uintptr)(unsafe.Pointer(pEntry + 32 /* &.key */)) } return pEntry + 32 /* &.key */ }() var ii int32 *(*uintptr)(unsafe.Pointer(bp + 32 /* &apElem[0] */)) = tcl.XTcl_NewIntObj(tls, (*MallocLog)(unsafe.Pointer(pLog)).FnCall) *(*uintptr)(unsafe.Pointer(bp + 32 /* &apElem[0] */ + 1*8)) = tcl.XTcl_NewIntObj(tls, (*MallocLog)(unsafe.Pointer(pLog)).FnByte) for ii = 0; ii < MALLOC_LOG_FRAMES; ii++ { *(*uintptr)(unsafe.Pointer(bp + 32 /* &apElem[0] */ + uintptr((ii+2))*8)) = tcl.XTcl_NewWideIntObj(tls, *(*Tcl_WideInt)(unsafe.Pointer(aKey + uintptr(ii)*8))) } tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewListObj(tls, (MALLOC_LOG_FRAMES+2), bp+32 /* &apElem[0] */)) } tcl.XTcl_SetObjResult(tls, interp, pRet) break } case uint32(3) /* MB_LOG_CLEAR */ : { test_memdebug_log_clear(tls) break } case uint32(4) /* MB_LOG_SYNC */ : { break } } return TCL_OK } var isInit int32 = 0 /* test_malloc.c:793:14 */ var MB_strs = [5]uintptr{ts + 32071 /* "start" */, ts + 32077 /* "stop" */, ts + 32082 /* "dump" */, ts + 32087 /* "clear" */, ts + 32093 /* "sync" */} /* test_malloc.c:796:21 */ // Usage: sqlite3_config_pagecache SIZE N // // Set the page-cache memory buffer using SQLITE_CONFIG_PAGECACHE. // The buffer is static and is of limited size. N might be // adjusted downward as needed to accommodate the requested size. // The revised value of N is returned. // // A negative SIZE causes the buffer pointer to be NULL. func test_config_pagecache(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:885:26: */ bp := tls.Alloc(72) defer tls.Free(72) // var sz int32 at bp+64, 4 // var N int32 at bp+68, 4 var pRes uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32098 /* "SIZE N" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+64 /* &sz */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+68 /* &N */) != 0 { return TCL_ERROR } libc.Xfree(tls, buf1) buf1 = uintptr(0) // Set the return value pRes = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRes, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3Config.FszPage)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pRes, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3Config.FnPage)) tcl.XTcl_SetObjResult(tls, interp, pRes) if *(*int32)(unsafe.Pointer(bp + 64 /* sz */)) < 0 { sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PAGECACHE, libc.VaList(bp, uintptr(0), 0, 0)) } else { buf1 = libc.Xmalloc(tls, (uint64(*(*int32)(unsafe.Pointer(bp + 64 /* sz */)) * *(*int32)(unsafe.Pointer(bp + 68 /* N */))))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PAGECACHE, libc.VaList(bp+32, buf1, *(*int32)(unsafe.Pointer(bp + 64 /* sz */)), *(*int32)(unsafe.Pointer(bp + 68 /* N */)))) } return TCL_OK } var buf1 uintptr = uintptr(0) /* test_malloc.c:893:15 */ // Usage: sqlite3_config_alt_pcache INSTALL_FLAG DISCARD_CHANCE PRNG_SEED // // Set up the alternative test page cache. Install if INSTALL_FLAG is // true and uninstall (reverting to the default page cache) if INSTALL_FLAG // is false. DISCARD_CHANGE is an integer between 0 and 100 inclusive // which determines the chance of discarding a page when unpinned. 100 // is certainty. 0 is never. PRNG_SEED is the pseudo-random number generator // seed. func test_alt_pcache(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:928:26: */ bp := tls.Alloc(40) defer tls.Free(40) // var installFlag int32 at bp+24, 4 *(*int32)(unsafe.Pointer(bp + 28 /* discardChance */)) = 0 *(*int32)(unsafe.Pointer(bp + 32 /* prngSeed */)) = 0 *(*int32)(unsafe.Pointer(bp + 36 /* highStress */)) = 0 if (objc < 2) || (objc > 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32105 /* "INSTALLFLAG DISC..." */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &installFlag */) != 0 { return TCL_ERROR } if (objc >= 3) && (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+28 /* &discardChance */) != 0) { return TCL_ERROR } if (objc >= 4) && (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+32 /* &prngSeed */) != 0) { return TCL_ERROR } if (objc >= 5) && (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+36 /* &highStress */) != 0) { return TCL_ERROR } if (*(*int32)(unsafe.Pointer(bp + 28 /* discardChance */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 28 /* discardChance */)) > 100) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+32152, /* "discard-chance s..." */ uintptr(0))) return TCL_ERROR } installTestPCache(tls, *(*int32)(unsafe.Pointer(bp + 24 /* installFlag */)), uint32(*(*int32)(unsafe.Pointer(bp + 28 /* discardChance */))), uint32(*(*int32)(unsafe.Pointer(bp + 32 /* prngSeed */))), uint32(*(*int32)(unsafe.Pointer(bp + 36 /* highStress */)))) return TCL_OK } // Usage: sqlite3_config_memstatus BOOLEAN // // Enable or disable memory status reporting using SQLITE_CONFIG_MEMSTATUS. func test_config_memstatus(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:969:26: */ bp := tls.Alloc(20) defer tls.Free(20) // var enable int32 at bp+16, 4 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17931 /* "BOOLEAN" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16 /* &enable */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MEMSTATUS, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* enable */)))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // Usage: sqlite3_config_lookaside SIZE COUNT // func test_config_lookaside(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:990:26: */ bp := tls.Alloc(32) defer tls.Free(32) // var sz int32 at bp+24, 4 // var cnt int32 at bp+28, 4 var pRet uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32195 /* "SIZE COUNT" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+24 /* &sz */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+28 /* &cnt */) != 0 { return TCL_ERROR } pRet = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3Config.FszLookaside)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3Config.FnLookaside)) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_LOOKASIDE, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 24 /* sz */)), *(*int32)(unsafe.Pointer(bp + 28 /* cnt */)))) tcl.XTcl_SetObjResult(tls, interp, pRet) return TCL_OK } // Usage: sqlite3_db_config_lookaside CONNECTION BUFID SIZE COUNT // // There are two static buffers with BUFID 1 and 2. Each static buffer // is 10KB in size. A BUFID of 0 indicates that the buffer should be NULL // which will cause sqlite3_db_config() to allocate space on its own. func test_db_config_lookaside(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1024:26: */ bp := tls.Alloc(108) defer tls.Free(108) var rc int32 // var sz int32 at bp+100, 4 // var cnt int32 at bp+104, 4 // var db uintptr at bp+88, 8 // var bufid int32 at bp+96, 4 if objc != 5 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32206 /* "BUFID SIZE COUNT" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+88 /* &db */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+96 /* &bufid */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+100 /* &sz */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+104 /* &cnt */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 96 /* bufid */)) == 0 { rc = sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* db */)), SQLITE_DBCONFIG_LOOKASIDE, libc.VaList(bp, uintptr(0), *(*int32)(unsafe.Pointer(bp + 100 /* sz */)), *(*int32)(unsafe.Pointer(bp + 104 /* cnt */)))) } else if ((*(*int32)(unsafe.Pointer(bp + 96 /* bufid */)) >= 1) && (*(*int32)(unsafe.Pointer(bp + 96 /* bufid */)) <= 2)) && ((uint64(*(*int32)(unsafe.Pointer(bp + 100 /* sz */)) * *(*int32)(unsafe.Pointer(bp + 104 /* cnt */)))) <= uint64(unsafe.Sizeof([10000]int8{}))) { rc = sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* db */)), SQLITE_DBCONFIG_LOOKASIDE, libc.VaList(bp+32, (uintptr(unsafe.Pointer(&azBuf))+uintptr(*(*int32)(unsafe.Pointer(bp + 96 /* bufid */)))*10000), *(*int32)(unsafe.Pointer(bp + 100 /* sz */)), *(*int32)(unsafe.Pointer(bp + 104 /* cnt */)))) } else { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, ts+32223 /* "illegal argument..." */, uintptr(0))) return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } var azBuf [2][10000]int8 /* test_malloc.c:1034:15: */ // Usage: sqlite3_config_heap NBYTE NMINALLOC func test_config_heap(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1059:26: */ bp := tls.Alloc(72) defer tls.Free(72) // Use this memory // var nByte int32 at bp+64, 4 // Size of buffer to pass to sqlite3_config() // var nMinAlloc int32 at bp+68, 4 // Size of minimum allocation var rc int32 // Return code of sqlite3_config() var aArg uintptr = (objv + 1*8) var nArg int32 = (objc - 1) if nArg != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32261 /* "NBYTE NMINALLOC" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(aArg)), bp+64 /* &nByte */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(aArg + 1*8)), bp+68 /* &nMinAlloc */) != 0 { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 64 /* nByte */)) == 0 { libc.Xfree(tls, zBuf) zBuf = uintptr(0) rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_HEAP, libc.VaList(bp, uintptr(0), 0, 0)) } else { zBuf = libc.Xrealloc(tls, zBuf, uint64(*(*int32)(unsafe.Pointer(bp + 64 /* nByte */)))) rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_HEAP, libc.VaList(bp+32, zBuf, *(*int32)(unsafe.Pointer(bp + 64 /* nByte */)), *(*int32)(unsafe.Pointer(bp + 68 /* nMinAlloc */)))) } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } var zBuf uintptr /* test_malloc.c:1065:15: */ // Usage: sqlite3_config_heap_size NBYTE func test_config_heap_size(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1096:26: */ bp := tls.Alloc(20) defer tls.Free(20) // var nByte int32 at bp+16, 4 // Size to pass to sqlite3_config() var rc int32 // Return code of sqlite3_config() var aArg uintptr = (objv + 1*8) var nArg int32 = (objc - 1) if nArg != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15902 /* "NBYTE" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(aArg)), bp+16 /* &nByte */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_WIN32_HEAPSIZE, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* nByte */)))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // Usage: sqlite3_config_error [DB] // // Invoke sqlite3_config() or sqlite3_db_config() with invalid // opcodes and verify that they return errors. func test_config_error(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1126:26: */ bp := tls.Alloc(56) defer tls.Free(56) // var db uintptr at bp+48, 8 if (objc != 2) && (objc != 1) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32277 /* "[DB]" */) return TCL_ERROR } if objc == 2 { if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+48 /* &db */) != 0 { return TCL_ERROR } if sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), 99999, 0) != SQLITE_ERROR { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+32282, /* "sqlite3_db_confi..." */ uintptr(0))) return TCL_ERROR } } else { if sqlite3.Xsqlite3_config(tls, 99999, 0) != SQLITE_ERROR { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+32340, /* "sqlite3_config(9..." */ uintptr(0))) return TCL_ERROR } } return TCL_OK } // Usage: sqlite3_config_uri BOOLEAN // // Enables or disables interpretation of URI parameters by default using // SQLITE_CONFIG_URI. func test_config_uri(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1164:26: */ bp := tls.Alloc(20) defer tls.Free(20) var rc int32 // var bOpenUri int32 at bp+16, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18735 /* "BOOL" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16 /* &bOpenUri */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_URI, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* bOpenUri */)))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // Usage: sqlite3_config_cis BOOLEAN // // Enables or disables the use of the covering-index scan optimization. // SQLITE_CONFIG_COVERING_INDEX_SCAN. func test_config_cis(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1193:26: */ bp := tls.Alloc(20) defer tls.Free(20) var rc int32 // var bUseCis int32 at bp+16, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18735 /* "BOOL" */) return TCL_ERROR } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16 /* &bUseCis */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_COVERING_INDEX_SCAN, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* bUseCis */)))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // Usage: sqlite3_config_pmasz INTEGER // // Set the minimum PMA size. func test_config_pmasz(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1221:26: */ bp := tls.Alloc(20) defer tls.Free(20) var rc int32 // var iPmaSz int32 at bp+16, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18735 /* "BOOL" */) return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16 /* &iPmaSz */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PMASZ, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* iPmaSz */)))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // Usage: sqlite3_dump_memsys3 FILENAME // sqlite3_dump_memsys5 FILENAME // // Write a summary of unfreed memsys3 allocations to FILENAME. func test_dump_memsys3(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1251:26: */ if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18381 /* "FILENAME" */) return TCL_ERROR } switch int32(clientData) { case 3: { } fallthrough case 5: { } } return TCL_OK } // Usage: sqlite3_status OPCODE RESETFLAG // // Return a list of three elements which are the sqlite3_status() return // code, the current value, and the high-water mark value. func test_status(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1287:26: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // var iValue int32 at bp+8, 4 // var mxValue int32 at bp+12, 4 var i int32 *(*int32)(unsafe.Pointer(bp /* op */)) = 0 // var resetFlag int32 at bp+4, 4 var zOpName uintptr var pResult uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32391 /* "PARAMETER RESETF..." */) return TCL_ERROR } zOpName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) for i = 0; i < (int32(uint64(unsafe.Sizeof(aOp1)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fop int32 _ [4]byte }{})))); i++ { if libc.Xstrcmp(tls, aOp1[i].FzName, zOpName) == 0 { *(*int32)(unsafe.Pointer(bp /* op */)) = aOp1[i].Fop break } } if i >= (int32(uint64(unsafe.Sizeof(aOp1)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fop int32 _ [4]byte }{})))) { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &op */) != 0 { return TCL_ERROR } } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4 /* &resetFlag */) != 0 { return TCL_ERROR } *(*int32)(unsafe.Pointer(bp + 8 /* iValue */)) = 0 *(*int32)(unsafe.Pointer(bp + 12 /* mxValue */)) = 0 rc = sqlite3.Xsqlite3_status(tls, *(*int32)(unsafe.Pointer(bp /* op */)), bp+8 /* &iValue */, bp+12 /* &mxValue */, *(*int32)(unsafe.Pointer(bp + 4 /* resetFlag */))) pResult = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, rc)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 8 /* iValue */)))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 12 /* mxValue */)))) tcl.XTcl_SetObjResult(tls, interp, pResult) return TCL_OK } var aOp1 = [10]struct { FzName uintptr Fop int32 _ [4]byte }{ {FzName: ts + 32411 /* "SQLITE_STATUS_ME..." */}, {FzName: ts + 32437 /* "SQLITE_STATUS_MA..." */, Fop: SQLITE_STATUS_MALLOC_SIZE}, {FzName: ts + 32463 /* "SQLITE_STATUS_PA..." */, Fop: SQLITE_STATUS_PAGECACHE_USED}, {FzName: ts + 32492 /* "SQLITE_STATUS_PA..." */, Fop: SQLITE_STATUS_PAGECACHE_OVERFLOW}, {FzName: ts + 32525 /* "SQLITE_STATUS_PA..." */, Fop: SQLITE_STATUS_PAGECACHE_SIZE}, {FzName: ts + 32554 /* "SQLITE_STATUS_SC..." */, Fop: SQLITE_STATUS_SCRATCH_USED}, {FzName: ts + 32581 /* "SQLITE_STATUS_SC..." */, Fop: SQLITE_STATUS_SCRATCH_OVERFLOW}, {FzName: ts + 32612 /* "SQLITE_STATUS_SC..." */, Fop: SQLITE_STATUS_SCRATCH_SIZE}, {FzName: ts + 32639 /* "SQLITE_STATUS_PA..." */, Fop: SQLITE_STATUS_PARSER_STACK}, {FzName: ts + 32666 /* "SQLITE_STATUS_MA..." */, Fop: SQLITE_STATUS_MALLOC_COUNT}, } /* test_malloc.c:1299:5 */ // Usage: sqlite3_db_status DATABASE OPCODE RESETFLAG // // Return a list of three elements which are the sqlite3_db_status() return // code, the current value, and the high-water mark value. func test_db_status(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1344:26: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // var iValue int32 at bp+16, 4 // var mxValue int32 at bp+20, 4 var i int32 *(*int32)(unsafe.Pointer(bp + 8 /* op */)) = 0 // var resetFlag int32 at bp+12, 4 var zOpName uintptr // var db uintptr at bp, 8 var pResult uintptr if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32693 /* "DB PARAMETER RES..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zOpName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if libc.Xmemcmp(tls, zOpName, ts+32716 /* "SQLITE_" */, uint64(7)) == 0 { zOpName += uintptr(7) } if libc.Xmemcmp(tls, zOpName, ts+32724 /* "DBSTATUS_" */, uint64(9)) == 0 { zOpName += uintptr(9) } for i = 0; i < (int32(uint64(unsafe.Sizeof(aOp2)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fop int32 _ [4]byte }{})))); i++ { if libc.Xstrcmp(tls, aOp2[i].FzName, zOpName) == 0 { *(*int32)(unsafe.Pointer(bp + 8 /* op */)) = aOp2[i].Fop break } } if i >= (int32(uint64(unsafe.Sizeof(aOp2)) / uint64(unsafe.Sizeof(struct { FzName uintptr Fop int32 _ [4]byte }{})))) { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8 /* &op */) != 0 { return TCL_ERROR } } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+12 /* &resetFlag */) != 0 { return TCL_ERROR } *(*int32)(unsafe.Pointer(bp + 16 /* iValue */)) = 0 *(*int32)(unsafe.Pointer(bp + 20 /* mxValue */)) = 0 rc = sqlite3.Xsqlite3_db_status(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), *(*int32)(unsafe.Pointer(bp + 8 /* op */)), bp+16 /* &iValue */, bp+20 /* &mxValue */, *(*int32)(unsafe.Pointer(bp + 12 /* resetFlag */))) pResult = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, rc)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 16 /* iValue */)))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pResult, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 20 /* mxValue */)))) tcl.XTcl_SetObjResult(tls, interp, pResult) return TCL_OK } var aOp2 = [13]struct { FzName uintptr Fop int32 _ [4]byte }{ {FzName: ts + 32734 /* "LOOKASIDE_USED" */}, {FzName: ts + 32749 /* "CACHE_USED" */, Fop: SQLITE_DBSTATUS_CACHE_USED}, {FzName: ts + 32760 /* "SCHEMA_USED" */, Fop: SQLITE_DBSTATUS_SCHEMA_USED}, {FzName: ts + 32772 /* "STMT_USED" */, Fop: SQLITE_DBSTATUS_STMT_USED}, {FzName: ts + 32782 /* "LOOKASIDE_HIT" */, Fop: SQLITE_DBSTATUS_LOOKASIDE_HIT}, {FzName: ts + 32796 /* "LOOKASIDE_MISS_S..." */, Fop: SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE}, {FzName: ts + 32816 /* "LOOKASIDE_MISS_F..." */, Fop: SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL}, {FzName: ts + 32836 /* "CACHE_HIT" */, Fop: SQLITE_DBSTATUS_CACHE_HIT}, {FzName: ts + 32846 /* "CACHE_MISS" */, Fop: SQLITE_DBSTATUS_CACHE_MISS}, {FzName: ts + 32857 /* "CACHE_WRITE" */, Fop: SQLITE_DBSTATUS_CACHE_WRITE}, {FzName: ts + 32869 /* "DEFERRED_FKS" */, Fop: SQLITE_DBSTATUS_DEFERRED_FKS}, {FzName: ts + 32882 /* "CACHE_USED_SHARE..." */, Fop: SQLITE_DBSTATUS_CACHE_USED_SHARED}, {FzName: ts + 32900 /* "CACHE_SPILL" */, Fop: SQLITE_DBSTATUS_CACHE_SPILL}, } /* test_malloc.c:1358:5 */ // install_malloc_faultsim BOOLEAN func test_install_malloc_faultsim(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1406:26: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 // var isInstall int32 at bp, 4 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17931 /* "BOOLEAN" */) return TCL_ERROR } if TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &isInstall */) { return TCL_ERROR } rc = faultsimInstall(tls, *(*int32)(unsafe.Pointer(bp /* isInstall */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // sqlite3_install_memsys3 func test_install_memsys3(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1430:26: */ var rc int32 = SQLITE_MISUSE tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } func test_vfs_oom_test(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1445:26: */ bp := tls.Alloc(4) defer tls.Free(4) if objc > 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32912 /* "?INTEGER?" */) return TCL_ERROR } else if objc == 2 { // var iNew int32 at bp, 4 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &iNew */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_memdebug_vfs_oom_test = *(*int32)(unsafe.Pointer(bp /* iNew */)) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_memdebug_vfs_oom_test)) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetest_malloc_Init(tls *libc.TLS, interp uintptr) int32 { /* test_malloc.c:1467:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd11)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{}))); i++ { var c ClientData = uintptr(intptr_t(aObjCmd11[i].FclientData)) tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd11[i].FzName, aObjCmd11[i].FxProc, c, uintptr(0)) } return TCL_OK } var aObjCmd11 = [32]struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{ {FzName: ts + 27241 /* "sqlite3_malloc" */, FxProc: 0}, {FzName: ts + 27256 /* "sqlite3_realloc" */, FxProc: 0}, {FzName: ts + 32922 /* "sqlite3_free" */, FxProc: 0}, {FzName: ts + 32935 /* "memset" */, FxProc: 0}, {FzName: ts + 32942 /* "memget" */, FxProc: 0}, {FzName: ts + 32949 /* "sqlite3_memory_u..." */, FxProc: 0}, {FzName: ts + 32969 /* "sqlite3_memory_h..." */, FxProc: 0}, {FzName: ts + 32994 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33021 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33043 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33065 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33090 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33116 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33146 /* "sqlite3_memdebug..." */, FxProc: 0}, {FzName: ts + 33167 /* "sqlite3_config_p..." */, FxProc: 0}, {FzName: ts + 33192 /* "sqlite3_config_a..." */, FxProc: 0}, {FzName: ts + 33218 /* "sqlite3_status" */, FxProc: 0}, {FzName: ts + 33233 /* "sqlite3_db_statu..." */, FxProc: 0}, {FzName: ts + 33251 /* "install_malloc_f..." */, FxProc: 0}, {FzName: ts + 33275 /* "sqlite3_config_h..." */, FxProc: 0}, {FzName: ts + 33295 /* "sqlite3_config_h..." */, FxProc: 0}, {FzName: ts + 33320 /* "sqlite3_config_m..." */, FxProc: 0}, {FzName: ts + 33345 /* "sqlite3_config_l..." */, FxProc: 0}, {FzName: ts + 33370 /* "sqlite3_config_e..." */, FxProc: 0}, {FzName: ts + 33391 /* "sqlite3_config_u..." */, FxProc: 0}, {FzName: ts + 33410 /* "sqlite3_config_c..." */, FxProc: 0}, {FzName: ts + 33429 /* "sqlite3_config_p..." */, FxProc: 0}, {FzName: ts + 33450 /* "sqlite3_db_confi..." */, FxProc: 0}, {FzName: ts + 33478 /* "sqlite3_dump_mem..." */, FxProc: 0, FclientData: 3}, {FzName: ts + 33499 /* "sqlite3_dump_mem..." */, FxProc: 0, FclientData: 5}, {FzName: ts + 33520 /* "sqlite3_install_..." */, FxProc: 0}, {FzName: ts + 33544 /* "sqlite3_memdebug..." */, FxProc: 0}, } /* test_malloc.c:1472:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // This code implements the MD5 message-digest algorithm. // The algorithm is due to Ron Rivest. This code was // written by Colin Plumb in 1993, no copyright is claimed. // This code is in the public domain; do with it what you wish. // // Equivalent code is available from RSA Data Security, Inc. // This code has been tested against that, and is equivalent, // except that you don't need to include two pages of legalese // with every copy. // // To compute the message digest of a chunk of bytes, declare an // MD5Context structure, pass it to MD5Init, call MD5Update as // needed on buffers full of bytes, and then call MD5Final, which // will fill a supplied 16-byte array with the digest. // If compiled on a machine that doesn't have a 32-bit integer, // you just set "uint32" to the appropriate datatype for an // unsigned 32-bit integer. For example: // // cc -Duint32='unsigned long' md5.c // type MD5Context1 = struct { FisInit int32 Fbuf [4]uint32 Fbits [2]uint32 Fin [64]uint8 } /* test_md5.c:57:1 */ type MD5Context = MD5Context1 /* test_md5.c:63:27 */ // Note: this code is harmless on little-endian machines. func byteReverse(tls *libc.TLS, buf uintptr, longs uint32) { /* test_md5.c:68:13: */ var t uint32 for ok := true; ok; ok = libc.PreDecUint32(&longs, 1) != 0 { t = ((((uint32(*(*uint8)(unsafe.Pointer(buf + 3))) << 8) | uint32(*(*uint8)(unsafe.Pointer(buf + 2)))) << 16) | ((uint32(*(*uint8)(unsafe.Pointer(buf + 1))) << 8) | uint32(*(*uint8)(unsafe.Pointer(buf))))) *(*uint32)(unsafe.Pointer(buf)) = t buf += uintptr(4) } } // The four core functions - F1 is optimized somewhat // #define F1(x, y, z) (x & y | ~x & z) // This is the central step in the MD5 algorithm. // The core of the MD5 algorithm, this alters an existing MD5 hash to // reflect the addition of 16 longwords of new data. MD5Update blocks // the data and converts bytes into longwords for this routine. func MD5Transform(tls *libc.TLS, buf uintptr, in uintptr) { /* test_md5.c:94:13: */ var a uint32 var b uint32 var c uint32 var d uint32 a = *(*uint32)(unsafe.Pointer(buf)) b = *(*uint32)(unsafe.Pointer(buf + 1*4)) c = *(*uint32)(unsafe.Pointer(buf + 2*4)) d = *(*uint32)(unsafe.Pointer(buf + 3*4)) a = a + (((d ^ (b & (c ^ d))) + *(*uint32)(unsafe.Pointer(in))) + 0xd76aa478) a = ((a << 7) | (a >> (32 - 7))) a = a + (b) d = d + (((c ^ (a & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 1*4))) + 0xe8c7b756) d = ((d << 12) | (d >> (32 - 12))) d = d + (a) c = c + (((b ^ (d & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 2*4))) + uint32(0x242070db)) c = ((c << 17) | (c >> (32 - 17))) c = c + (d) b = b + (((a ^ (c & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 3*4))) + 0xc1bdceee) b = ((b << 22) | (b >> (32 - 22))) b = b + (c) a = a + (((d ^ (b & (c ^ d))) + *(*uint32)(unsafe.Pointer(in + 4*4))) + 0xf57c0faf) a = ((a << 7) | (a >> (32 - 7))) a = a + (b) d = d + (((c ^ (a & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 5*4))) + uint32(0x4787c62a)) d = ((d << 12) | (d >> (32 - 12))) d = d + (a) c = c + (((b ^ (d & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 6*4))) + 0xa8304613) c = ((c << 17) | (c >> (32 - 17))) c = c + (d) b = b + (((a ^ (c & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 7*4))) + 0xfd469501) b = ((b << 22) | (b >> (32 - 22))) b = b + (c) a = a + (((d ^ (b & (c ^ d))) + *(*uint32)(unsafe.Pointer(in + 8*4))) + uint32(0x698098d8)) a = ((a << 7) | (a >> (32 - 7))) a = a + (b) d = d + (((c ^ (a & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 9*4))) + 0x8b44f7af) d = ((d << 12) | (d >> (32 - 12))) d = d + (a) c = c + (((b ^ (d & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 10*4))) + 0xffff5bb1) c = ((c << 17) | (c >> (32 - 17))) c = c + (d) b = b + (((a ^ (c & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 11*4))) + 0x895cd7be) b = ((b << 22) | (b >> (32 - 22))) b = b + (c) a = a + (((d ^ (b & (c ^ d))) + *(*uint32)(unsafe.Pointer(in + 12*4))) + uint32(0x6b901122)) a = ((a << 7) | (a >> (32 - 7))) a = a + (b) d = d + (((c ^ (a & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 13*4))) + 0xfd987193) d = ((d << 12) | (d >> (32 - 12))) d = d + (a) c = c + (((b ^ (d & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 14*4))) + 0xa679438e) c = ((c << 17) | (c >> (32 - 17))) c = c + (d) b = b + (((a ^ (c & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 15*4))) + uint32(0x49b40821)) b = ((b << 22) | (b >> (32 - 22))) b = b + (c) a = a + (((c ^ (d & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 1*4))) + 0xf61e2562) a = ((a << 5) | (a >> (32 - 5))) a = a + (b) d = d + (((b ^ (c & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 6*4))) + 0xc040b340) d = ((d << 9) | (d >> (32 - 9))) d = d + (a) c = c + (((a ^ (b & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 11*4))) + uint32(0x265e5a51)) c = ((c << 14) | (c >> (32 - 14))) c = c + (d) b = b + (((d ^ (a & (c ^ d))) + *(*uint32)(unsafe.Pointer(in))) + 0xe9b6c7aa) b = ((b << 20) | (b >> (32 - 20))) b = b + (c) a = a + (((c ^ (d & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 5*4))) + 0xd62f105d) a = ((a << 5) | (a >> (32 - 5))) a = a + (b) d = d + (((b ^ (c & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 10*4))) + uint32(0x02441453)) d = ((d << 9) | (d >> (32 - 9))) d = d + (a) c = c + (((a ^ (b & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 15*4))) + 0xd8a1e681) c = ((c << 14) | (c >> (32 - 14))) c = c + (d) b = b + (((d ^ (a & (c ^ d))) + *(*uint32)(unsafe.Pointer(in + 4*4))) + 0xe7d3fbc8) b = ((b << 20) | (b >> (32 - 20))) b = b + (c) a = a + (((c ^ (d & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 9*4))) + uint32(0x21e1cde6)) a = ((a << 5) | (a >> (32 - 5))) a = a + (b) d = d + (((b ^ (c & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 14*4))) + 0xc33707d6) d = ((d << 9) | (d >> (32 - 9))) d = d + (a) c = c + (((a ^ (b & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 3*4))) + 0xf4d50d87) c = ((c << 14) | (c >> (32 - 14))) c = c + (d) b = b + (((d ^ (a & (c ^ d))) + *(*uint32)(unsafe.Pointer(in + 8*4))) + uint32(0x455a14ed)) b = ((b << 20) | (b >> (32 - 20))) b = b + (c) a = a + (((c ^ (d & (b ^ c))) + *(*uint32)(unsafe.Pointer(in + 13*4))) + 0xa9e3e905) a = ((a << 5) | (a >> (32 - 5))) a = a + (b) d = d + (((b ^ (c & (a ^ b))) + *(*uint32)(unsafe.Pointer(in + 2*4))) + 0xfcefa3f8) d = ((d << 9) | (d >> (32 - 9))) d = d + (a) c = c + (((a ^ (b & (d ^ a))) + *(*uint32)(unsafe.Pointer(in + 7*4))) + uint32(0x676f02d9)) c = ((c << 14) | (c >> (32 - 14))) c = c + (d) b = b + (((d ^ (a & (c ^ d))) + *(*uint32)(unsafe.Pointer(in + 12*4))) + 0x8d2a4c8a) b = ((b << 20) | (b >> (32 - 20))) b = b + (c) a = a + ((((b ^ c) ^ d) + *(*uint32)(unsafe.Pointer(in + 5*4))) + 0xfffa3942) a = ((a << 4) | (a >> (32 - 4))) a = a + (b) d = d + ((((a ^ b) ^ c) + *(*uint32)(unsafe.Pointer(in + 8*4))) + 0x8771f681) d = ((d << 11) | (d >> (32 - 11))) d = d + (a) c = c + ((((d ^ a) ^ b) + *(*uint32)(unsafe.Pointer(in + 11*4))) + uint32(0x6d9d6122)) c = ((c << 16) | (c >> (32 - 16))) c = c + (d) b = b + ((((c ^ d) ^ a) + *(*uint32)(unsafe.Pointer(in + 14*4))) + 0xfde5380c) b = ((b << 23) | (b >> (32 - 23))) b = b + (c) a = a + ((((b ^ c) ^ d) + *(*uint32)(unsafe.Pointer(in + 1*4))) + 0xa4beea44) a = ((a << 4) | (a >> (32 - 4))) a = a + (b) d = d + ((((a ^ b) ^ c) + *(*uint32)(unsafe.Pointer(in + 4*4))) + uint32(0x4bdecfa9)) d = ((d << 11) | (d >> (32 - 11))) d = d + (a) c = c + ((((d ^ a) ^ b) + *(*uint32)(unsafe.Pointer(in + 7*4))) + 0xf6bb4b60) c = ((c << 16) | (c >> (32 - 16))) c = c + (d) b = b + ((((c ^ d) ^ a) + *(*uint32)(unsafe.Pointer(in + 10*4))) + 0xbebfbc70) b = ((b << 23) | (b >> (32 - 23))) b = b + (c) a = a + ((((b ^ c) ^ d) + *(*uint32)(unsafe.Pointer(in + 13*4))) + uint32(0x289b7ec6)) a = ((a << 4) | (a >> (32 - 4))) a = a + (b) d = d + ((((a ^ b) ^ c) + *(*uint32)(unsafe.Pointer(in))) + 0xeaa127fa) d = ((d << 11) | (d >> (32 - 11))) d = d + (a) c = c + ((((d ^ a) ^ b) + *(*uint32)(unsafe.Pointer(in + 3*4))) + 0xd4ef3085) c = ((c << 16) | (c >> (32 - 16))) c = c + (d) b = b + ((((c ^ d) ^ a) + *(*uint32)(unsafe.Pointer(in + 6*4))) + uint32(0x04881d05)) b = ((b << 23) | (b >> (32 - 23))) b = b + (c) a = a + ((((b ^ c) ^ d) + *(*uint32)(unsafe.Pointer(in + 9*4))) + 0xd9d4d039) a = ((a << 4) | (a >> (32 - 4))) a = a + (b) d = d + ((((a ^ b) ^ c) + *(*uint32)(unsafe.Pointer(in + 12*4))) + 0xe6db99e5) d = ((d << 11) | (d >> (32 - 11))) d = d + (a) c = c + ((((d ^ a) ^ b) + *(*uint32)(unsafe.Pointer(in + 15*4))) + uint32(0x1fa27cf8)) c = ((c << 16) | (c >> (32 - 16))) c = c + (d) b = b + ((((c ^ d) ^ a) + *(*uint32)(unsafe.Pointer(in + 2*4))) + 0xc4ac5665) b = ((b << 23) | (b >> (32 - 23))) b = b + (c) a = a + (((c ^ (b | ^d)) + *(*uint32)(unsafe.Pointer(in))) + 0xf4292244) a = ((a << 6) | (a >> (32 - 6))) a = a + (b) d = d + (((b ^ (a | ^c)) + *(*uint32)(unsafe.Pointer(in + 7*4))) + uint32(0x432aff97)) d = ((d << 10) | (d >> (32 - 10))) d = d + (a) c = c + (((a ^ (d | ^b)) + *(*uint32)(unsafe.Pointer(in + 14*4))) + 0xab9423a7) c = ((c << 15) | (c >> (32 - 15))) c = c + (d) b = b + (((d ^ (c | ^a)) + *(*uint32)(unsafe.Pointer(in + 5*4))) + 0xfc93a039) b = ((b << 21) | (b >> (32 - 21))) b = b + (c) a = a + (((c ^ (b | ^d)) + *(*uint32)(unsafe.Pointer(in + 12*4))) + uint32(0x655b59c3)) a = ((a << 6) | (a >> (32 - 6))) a = a + (b) d = d + (((b ^ (a | ^c)) + *(*uint32)(unsafe.Pointer(in + 3*4))) + 0x8f0ccc92) d = ((d << 10) | (d >> (32 - 10))) d = d + (a) c = c + (((a ^ (d | ^b)) + *(*uint32)(unsafe.Pointer(in + 10*4))) + 0xffeff47d) c = ((c << 15) | (c >> (32 - 15))) c = c + (d) b = b + (((d ^ (c | ^a)) + *(*uint32)(unsafe.Pointer(in + 1*4))) + 0x85845dd1) b = ((b << 21) | (b >> (32 - 21))) b = b + (c) a = a + (((c ^ (b | ^d)) + *(*uint32)(unsafe.Pointer(in + 8*4))) + uint32(0x6fa87e4f)) a = ((a << 6) | (a >> (32 - 6))) a = a + (b) d = d + (((b ^ (a | ^c)) + *(*uint32)(unsafe.Pointer(in + 15*4))) + 0xfe2ce6e0) d = ((d << 10) | (d >> (32 - 10))) d = d + (a) c = c + (((a ^ (d | ^b)) + *(*uint32)(unsafe.Pointer(in + 6*4))) + 0xa3014314) c = ((c << 15) | (c >> (32 - 15))) c = c + (d) b = b + (((d ^ (c | ^a)) + *(*uint32)(unsafe.Pointer(in + 13*4))) + uint32(0x4e0811a1)) b = ((b << 21) | (b >> (32 - 21))) b = b + (c) a = a + (((c ^ (b | ^d)) + *(*uint32)(unsafe.Pointer(in + 4*4))) + 0xf7537e82) a = ((a << 6) | (a >> (32 - 6))) a = a + (b) d = d + (((b ^ (a | ^c)) + *(*uint32)(unsafe.Pointer(in + 11*4))) + 0xbd3af235) d = ((d << 10) | (d >> (32 - 10))) d = d + (a) c = c + (((a ^ (d | ^b)) + *(*uint32)(unsafe.Pointer(in + 2*4))) + uint32(0x2ad7d2bb)) c = ((c << 15) | (c >> (32 - 15))) c = c + (d) b = b + (((d ^ (c | ^a)) + *(*uint32)(unsafe.Pointer(in + 9*4))) + 0xeb86d391) b = ((b << 21) | (b >> (32 - 21))) b = b + (c) *(*uint32)(unsafe.Pointer(buf)) += (a) *(*uint32)(unsafe.Pointer(buf + 1*4)) += (b) *(*uint32)(unsafe.Pointer(buf + 2*4)) += (c) *(*uint32)(unsafe.Pointer(buf + 3*4)) += (d) } // Start MD5 accumulation. Set bit count to 0 and buffer to mysterious // initialization constants. func MD5Init(tls *libc.TLS, ctx uintptr) { /* test_md5.c:180:13: */ (*MD5Context)(unsafe.Pointer(ctx)).FisInit = 1 *(*uint32)(unsafe.Pointer((ctx + 4 /* &.buf */))) = uint32(0x67452301) *(*uint32)(unsafe.Pointer((ctx + 4 /* &.buf */) + 1*4)) = 0xefcdab89 *(*uint32)(unsafe.Pointer((ctx + 4 /* &.buf */) + 2*4)) = 0x98badcfe *(*uint32)(unsafe.Pointer((ctx + 4 /* &.buf */) + 3*4)) = uint32(0x10325476) *(*uint32)(unsafe.Pointer((ctx + 20 /* &.bits */))) = uint32(0) *(*uint32)(unsafe.Pointer((ctx + 20 /* &.bits */) + 1*4)) = uint32(0) } // Update context to reflect the concatenation of another buffer full // of bytes. func MD5Update(tls *libc.TLS, ctx uintptr, buf uintptr, len uint32) { /* test_md5.c:195:6: */ var t uint32 // Update bitcount t = *(*uint32)(unsafe.Pointer((ctx + 20 /* &.bits */))) if (libc.AssignPtrUint32((ctx + 20 /* &.bits */), (t + (len << 3)))) < t { *(*uint32)(unsafe.Pointer((ctx + 20 /* &.bits */) + 1*4))++ } // Carry from low to high *(*uint32)(unsafe.Pointer((ctx + 20 /* &.bits */) + 1*4)) += (len >> 29) t = ((t >> 3) & uint32(0x3f)) // Bytes already in shsInfo->data // Handle any leading odd-sized chunks if t != 0 { var p uintptr = (ctx + 28 /* &.in */ + uintptr(t)) t = (uint32(64) - t) if len < t { libc.Xmemcpy(tls, p, buf, uint64(len)) return } libc.Xmemcpy(tls, p, buf, uint64(t)) byteReverse(tls, ctx+28 /* &.in */, uint32(16)) MD5Transform(tls, ctx+4 /* &.buf */, ctx+28 /* &.in */) buf += uintptr(t) len = len - (t) } // Process data in 64-byte chunks for len >= uint32(64) { libc.Xmemcpy(tls, ctx+28 /* &.in */, buf, uint64(64)) byteReverse(tls, ctx+28 /* &.in */, uint32(16)) MD5Transform(tls, ctx+4 /* &.buf */, ctx+28 /* &.in */) buf += uintptr(64) len = len - (uint32(64)) } // Handle any remaining bytes of data. libc.Xmemcpy(tls, ctx+28 /* &.in */, buf, uint64(len)) } // Final wrapup - pad to 64-byte boundary with the bit pattern // 1 0* (64-bit count of bits processed, MSB-first) func MD5Final(tls *libc.TLS, digest uintptr, ctx uintptr) { /* test_md5.c:243:13: */ var count uint32 var p uintptr // Compute number of bytes mod 64 count = ((*(*uint32)(unsafe.Pointer((ctx + 20 /* &.bits */))) >> 3) & uint32(0x3F)) // Set the first char of padding to 0x80. This is safe since there is // always at least one byte free p = ((ctx + 28 /* &.in */) + uintptr(count)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0x80) // Bytes of padding needed to make 64 bytes count = ((uint32(64 - 1)) - count) // Pad out to 56 mod 64 if count < uint32(8) { // Two lots of padding: Pad the first block to 64 bytes libc.Xmemset(tls, p, 0, uint64(count)) byteReverse(tls, ctx+28 /* &.in */, uint32(16)) MD5Transform(tls, ctx+4 /* &.buf */, ctx+28 /* &.in */) // Now fill the next block with 56 bytes libc.Xmemset(tls, ctx+28 /* &.in */, 0, uint64(56)) } else { // Pad block to 56 bytes libc.Xmemset(tls, p, 0, (uint64(count - uint32(8)))) } byteReverse(tls, ctx+28 /* &.in */, uint32(14)) // Append length in bits and transform libc.Xmemcpy(tls, ((ctx + 28 /* &.in */) + uintptr((14 * 4))), ctx+20 /* &.bits */, uint64(8)) MD5Transform(tls, ctx+4 /* &.buf */, ctx+28 /* &.in */) byteReverse(tls, ctx+4 /* &.buf */, uint32(4)) libc.Xmemcpy(tls, digest, ctx+4 /* &.buf */, uint64(16)) } // Convert a 128-bit MD5 digest into a 32-digit base-16 number. func MD5DigestToBase16(tls *libc.TLS, digest uintptr, zBuf uintptr) { /* test_md5.c:284:13: */ var i int32 var j int32 for j = libc.AssignInt32(&i, 0); i < 16; i++ { var a int32 = int32(*(*uint8)(unsafe.Pointer(digest + uintptr(i)))) *(*int8)(unsafe.Pointer(zBuf + uintptr(libc.PostIncInt32(&j, 1)))) = zEncode[((a >> 4) & 0xf)] *(*int8)(unsafe.Pointer(zBuf + uintptr(libc.PostIncInt32(&j, 1)))) = zEncode[(a & 0xf)] } *(*int8)(unsafe.Pointer(zBuf + uintptr(j))) = int8(0) } var zEncode = *(*[17]int8)(unsafe.Pointer(ts + 30273 /* "0123456789abcdef" */)) /* test_md5.c:285:21 */ // Convert a 128-bit MD5 digest into sequency of eight 5-digit integers // each representing 16 bits of the digest and separated from each // other by a "-" character. func MD5DigestToBase10x8(tls *libc.TLS, digest uintptr, zDigest uintptr) { /* test_md5.c:302:13: */ bp := tls.Alloc(16) defer tls.Free(16) var i int32 var j int32 var x uint32 for i = libc.AssignInt32(&j, 0); i < 16; i = i + (2) { x = (uint32((int32(*(*uint8)(unsafe.Pointer(digest + uintptr(i)))) * 256) + int32(*(*uint8)(unsafe.Pointer(digest + uintptr((i + 1))))))) if i > 0 { *(*int8)(unsafe.Pointer(zDigest + uintptr(libc.PostIncInt32(&j, 1)))) = int8('-') } sqlite3.Xsqlite3_snprintf(tls, (50 - j), (zDigest + uintptr(j)), ts+33574 /* "%05u" */, libc.VaList(bp, x)) j = j + (5) } *(*int8)(unsafe.Pointer(zDigest + uintptr(j))) = int8(0) } // A TCL command for md5. The argument is the text to be hashed. The // Result is the hash in base64. func md5_cmd(tls *libc.TLS, cd uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test_md5.c:318:26: */ bp := tls.Alloc(222) defer tls.Free(222) // var ctx MD5Context at bp+64, 92 // var digest [16]uint8 at bp+156, 16 // var zBuf [50]int8 at bp+172, 50 var converter uintptr if argc != 2 { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+14994 /* " TEXT\"" */, uintptr(0))) return TCL_ERROR } MD5Init(tls, bp+64 /* &ctx */) MD5Update(tls, bp+64 /* &ctx */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) MD5Final(tls, bp+156 /* &digest[0] */, bp+64 /* &ctx */) converter = cd (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(&converter)))(tls, bp+156 /* &digest[0] */, bp+172 /* &zBuf[0] */) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, bp+172 /* &zBuf[0] */, uintptr(0))) return TCL_OK } // A TCL command to take the md5 hash of a file. The argument is the // name of the file. func md5file_cmd(tls *libc.TLS, cd uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test_md5.c:347:26: */ bp := tls.Alloc(10452) defer tls.Free(10452) var in uintptr var ofst int32 var amt int32 // var ctx MD5Context at bp+104, 92 var converter uintptr // var digest [16]uint8 at bp+10436, 16 // var zBuf [10240]int8 at bp+196, 10240 if (argc != 2) && (argc != 4) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+14631 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv)), ts+33579 /* " FILENAME [OFFSE..." */, uintptr(0))) return TCL_ERROR } if argc == 4 { ofst = libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) amt = libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) } else { ofst = 0 amt = 2147483647 } in = libc.Xfopen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), ts+4273 /* "rb" */) if in == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+40, ts+33603 /* "unable to open f..." */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), ts+33625 /* "\" for reading" */, uintptr(0))) return TCL_ERROR } libc.Xfseek(tls, in, int32(ofst), SEEK_SET) MD5Init(tls, bp+104 /* &ctx */) for amt > 0 { var n int32 n = int32(libc.Xfread(tls, bp+196 /* &zBuf[0] */, uint64(1), func() uint64 { if uint64(unsafe.Sizeof([10240]int8{})) <= uint64(amt) { return uint64(unsafe.Sizeof([10240]int8{})) } return uint64(amt) }(), in)) if n <= 0 { break } MD5Update(tls, bp+104 /* &ctx */, bp+196 /* zBuf */, uint32(n)) amt = amt - (n) } libc.Xfclose(tls, in) MD5Final(tls, bp+10436 /* &digest[0] */, bp+104 /* &ctx */) converter = cd (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(&converter)))(tls, bp+10436 /* &digest[0] */, bp+196 /* &zBuf[0] */) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+80, bp+196 /* &zBuf[0] */, uintptr(0))) return TCL_OK } // Register the four new TCL commands for generating MD5 checksums // with the TCL interpreter. func Md5_Init(tls *libc.TLS, interp uintptr) int32 { /* test_md5.c:400:5: */ tcl.XTcl_CreateCommand(tls, interp, ts+33639 /* "md5" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{MD5DigestToBase16})), uintptr(0)) tcl.XTcl_CreateCommand(tls, interp, ts+33643 /* "md5-10x8" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{MD5DigestToBase10x8})), uintptr(0)) tcl.XTcl_CreateCommand(tls, interp, ts+33652 /* "md5file" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5file_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{MD5DigestToBase16})), uintptr(0)) tcl.XTcl_CreateCommand(tls, interp, ts+33660 /* "md5file-10x8" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5file_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{MD5DigestToBase10x8})), uintptr(0)) return TCL_OK } // During testing, the special md5sum() aggregate function is available. // inside SQLite. The following routines implement that function. func md5step(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_md5.c:416:13: */ var p uintptr var i int32 if argc < 1 { return } p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(MD5Context{}))) if p == uintptr(0) { return } if !((*MD5Context)(unsafe.Pointer(p)).FisInit != 0) { MD5Init(tls, p) } for i = 0; i < argc; i++ { var zData uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if zData != 0 { MD5Update(tls, p, zData, uint32(int32(libc.Xstrlen(tls, zData)))) } } } func md5finalize(tls *libc.TLS, context uintptr) { /* test_md5.c:432:13: */ bp := tls.Alloc(49) defer tls.Free(49) var p uintptr // var digest [16]uint8 at bp, 16 // var zBuf [33]int8 at bp+16, 33 p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(MD5Context{}))) MD5Final(tls, bp /* &digest[0] */, p) MD5DigestToBase16(tls, bp /* &digest[0] */, bp+16 /* &zBuf[0] */) sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } func Md5_Register(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+33673 /* "md5sum" */, -1, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{md5step})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{md5finalize}))) sqlite3.Xsqlite3_overload_function(tls, db, ts+33673 /* "md5sum" */, -1) // To exercise this API return rc } // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. // // This header file is also used by the loadext.c source file // (part of the main SQLite library - not an extension) so that // it can get access to the sqlite3_api_routines structure // definition. But the main library does not want to redefine // the API. So the redefinition macros are only valid if the // SQLITE_CORE macros is undefined. // This case when the file is being statically linked into the // application // These should be defined to be the same as the values in // sqliteInt.h. They are defined separately here so that // the multiplex VFS shim can be built as a loadable // module. // Maximum chunk number // First chunk for rollback journal files //*********************** Shim Definitions ***************************** // This is the limit on the chunk size. It may be changed by calling // the xFileControl() interface. It will be rounded up to a // multiple of MAX_PAGE_SIZE. We default it here to 2GiB less 64KiB. // This used to be the default limit on number of chunks, but // it is no longer enforced. There is currently no limit to the // number of chunks. // // May be changed by calling the xFileControl() interface. //*********************** Object Definitions ***************************** // Forward declaration of all object types type multiplexGroup1 = struct { FaReal uintptr FnReal int32 _ [4]byte FzName uintptr FnName int32 Fflags int32 FszChunk uint32 FbEnabled uint8 FbTruncate uint8 _ [2]byte } /* test_multiplex.c:106:9 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. // // This header file is also used by the loadext.c source file // (part of the main SQLite library - not an extension) so that // it can get access to the sqlite3_api_routines structure // definition. But the main library does not want to redefine // the API. So the redefinition macros are only valid if the // SQLITE_CORE macros is undefined. // This case when the file is being statically linked into the // application // These should be defined to be the same as the values in // sqliteInt.h. They are defined separately here so that // the multiplex VFS shim can be built as a loadable // module. // Maximum chunk number // First chunk for rollback journal files //*********************** Shim Definitions ***************************** // This is the limit on the chunk size. It may be changed by calling // the xFileControl() interface. It will be rounded up to a // multiple of MAX_PAGE_SIZE. We default it here to 2GiB less 64KiB. // This used to be the default limit on number of chunks, but // it is no longer enforced. There is currently no limit to the // number of chunks. // // May be changed by calling the xFileControl() interface. //*********************** Object Definitions ***************************** // Forward declaration of all object types type multiplexGroup = multiplexGroup1 /* test_multiplex.c:106:31 */ type multiplexConn1 = struct { Fbase sqlite3_file FpGroup uintptr } /* test_multiplex.c:107:9 */ type multiplexConn = multiplexConn1 /* test_multiplex.c:107:30 */ // A "multiplex group" is a collection of files that collectively // makeup a single SQLite DB file. This allows the size of the DB // to exceed the limits imposed by the file system. // // There is an instance of the following object for each defined multiplex // group. type multiplexReal = struct { Fp uintptr Fz uintptr } /* test_multiplex.c:106:9 */ //************************ Global Variables ********************************* // All global variables used by this file are containing within the following // gMultiplex structure. var gMultiplex struct { FpOrigVfs uintptr FsThisVfs sqlite3_vfs FsIoMethodsV1 sqlite3_io_methods FsIoMethodsV2 sqlite3_io_methods FisInitialized int32 _ [4]byte } /* test_multiplex.c:176:3: */ //************************ Utility Routines ******************************** // Compute a string length that is limited to what can be stored in // lower 30 bits of a 32-bit signed integer. // // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. func multiplexStrlen30(tls *libc.TLS, z uintptr) int32 { /* test_multiplex.c:187:12: */ var z2 uintptr = z if z == uintptr(0) { return 0 } for *(*int8)(unsafe.Pointer(z2)) != 0 { z2++ } return (0x3fffffff & (int32((int64(z2) - int64(z)) / 1))) } // Generate the file-name for chunk iChunk of the group with base name // zBase. The file-name is written to buffer zOut before returning. Buffer // zOut must be allocated by the caller so that it is at least (nBase+5) // bytes in size, where nBase is the length of zBase, not including the // nul-terminator. // // If iChunk is 0 (or 400 - the number for the first journal file chunk), // the output is a copy of the input string. Otherwise, if // SQLITE_ENABLE_8_3_NAMES is not defined or the input buffer does not contain // a "." character, then the output is a copy of the input string with the // three-digit zero-padded decimal representation if iChunk appended to it. // For example: // // zBase="test.db", iChunk=4 -> zOut="test.db004" // // Or, if SQLITE_ENABLE_8_3_NAMES is defined and the input buffer contains // a "." character, then everything after the "." is replaced by the // three-digit representation of iChunk. // // zBase="test.db", iChunk=4 -> zOut="test.004" // // The output buffer string is terminated by 2 0x00 bytes. This makes it safe // to pass to sqlite3_uri_parameter() and similar. func multiplexFilename(tls *libc.TLS, zBase uintptr, nBase int32, flags int32, iChunk int32, zOut uintptr) { /* test_multiplex.c:219:13: */ bp := tls.Alloc(16) defer tls.Free(16) var n int32 = nBase libc.Xmemcpy(tls, zOut, zBase, (uint64(n + 1))) if (iChunk != 0) && (iChunk <= MX_CHUNK_NUMBER) { sqlite3.Xsqlite3_snprintf(tls, 4, (zOut + uintptr(n)), ts+33680 /* "%03d" */, libc.VaList(bp, iChunk)) n = n + (3) } *(*int8)(unsafe.Pointer(zOut + uintptr((n + 1)))) = int8(0) } // Compute the filename for the iChunk-th chunk func multiplexSubFilename(tls *libc.TLS, pGroup uintptr, iChunk int32) int32 { /* test_multiplex.c:256:12: */ if iChunk >= (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal { var p uintptr p = sqlite3.Xsqlite3_realloc64(tls, (*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal, ((uint64(iChunk + 1)) * uint64(unsafe.Sizeof(multiplexReal{})))) if p == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, (p + uintptr((*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal)*16), 0, (uint64(unsafe.Sizeof(multiplexReal{})) * (uint64((iChunk + 1) - (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal)))) (*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal = p (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal = (iChunk + 1) } if ((*multiplexGroup)(unsafe.Pointer(pGroup)).FzName != 0) && ((*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz == uintptr(0)) { var z uintptr var n int32 = (*multiplexGroup)(unsafe.Pointer(pGroup)).FnName z = sqlite3.Xsqlite3_malloc64(tls, (uint64(n + 5))) if z == uintptr(0) { return SQLITE_NOMEM } multiplexFilename(tls, (*multiplexGroup)(unsafe.Pointer(pGroup)).FzName, (*multiplexGroup)(unsafe.Pointer(pGroup)).FnName, (*multiplexGroup)(unsafe.Pointer(pGroup)).Fflags, iChunk, z) (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fz = sqlite3.Xsqlite3_create_filename(tls, z, ts+489 /* "" */, ts+489 /* "" */, 0, uintptr(0)) sqlite3.Xsqlite3_free(tls, z) if (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz == uintptr(0) { return SQLITE_NOMEM } } return SQLITE_OK } // Translate an sqlite3_file* that is really a multiplexGroup* into // the sqlite3_file* for the underlying original VFS. // // For chunk 0, the pGroup->flags determines whether or not a new file // is created if it does not already exist. For chunks 1 and higher, the // file is created only if createFlag is 1. func multiplexSubOpen(tls *libc.TLS, pGroup uintptr, iChunk int32, rc uintptr, pOutFlags uintptr, createFlag int32) uintptr { /* test_multiplex.c:289:21: */ bp := tls.Alloc(36) defer tls.Free(36) var pSubOpen uintptr = uintptr(0) var pOrigVfs uintptr = gMultiplex.FpOrigVfs // Real VFS *(*int32)(unsafe.Pointer(rc)) = multiplexSubFilename(tls, pGroup, iChunk) if ((*(*int32)(unsafe.Pointer(rc))) == SQLITE_OK) && ((libc.AssignUintptr(&pSubOpen, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fp)) == uintptr(0)) { var flags int32 // var bExists int32 at bp+32, 4 flags = (*multiplexGroup)(unsafe.Pointer(pGroup)).Fflags if createFlag != 0 { flags = flags | (SQLITE_OPEN_CREATE) } else if iChunk == 0 { // Fall through } else if (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz == uintptr(0) { return uintptr(0) } else { *(*int32)(unsafe.Pointer(rc)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 56 /* &.xAccess */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz, SQLITE_ACCESS_EXISTS, bp+32 /* &bExists */) if (*(*int32)(unsafe.Pointer(rc)) != 0) || !(*(*int32)(unsafe.Pointer(bp + 32 /* bExists */)) != 0) { if *(*int32)(unsafe.Pointer(rc)) != 0 { sqlite3.Xsqlite3_log(tls, *(*int32)(unsafe.Pointer(rc)), ts+33685, /* "multiplexor.xAcc..." */ libc.VaList(bp, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz)) } return uintptr(0) } flags = flags & (libc.CplInt32(SQLITE_OPEN_CREATE)) } pSubOpen = sqlite3.Xsqlite3_malloc64(tls, uint64((*sqlite3_vfs)(unsafe.Pointer(pOrigVfs)).FszOsFile)) if pSubOpen == uintptr(0) { *(*int32)(unsafe.Pointer(rc)) = (SQLITE_IOERR | (int32(12) << 8)) return uintptr(0) } (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fp = pSubOpen *(*int32)(unsafe.Pointer(rc)) = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 40 /* &.xOpen */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz, pSubOpen, flags, pOutFlags) if (*(*int32)(unsafe.Pointer(rc))) != SQLITE_OK { sqlite3.Xsqlite3_log(tls, *(*int32)(unsafe.Pointer(rc)), ts+33719, /* "multiplexor.xOpe..." */ libc.VaList(bp+16, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz)) sqlite3.Xsqlite3_free(tls, pSubOpen) (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fp = uintptr(0) return uintptr(0) } } return pSubOpen } // Return the size, in bytes, of chunk number iChunk. If that chunk // does not exist, then return 0. This function does not distingish between // non-existant files and zero-length files. func multiplexSubSize(tls *libc.TLS, pGroup uintptr, iChunk int32, rc uintptr) sqlite3_int64 { /* test_multiplex.c:357:22: */ bp := tls.Alloc(8) defer tls.Free(8) var pSub uintptr *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0) if *(*int32)(unsafe.Pointer(rc)) != 0 { return int64(0) } pSub = multiplexSubOpen(tls, pGroup, iChunk, rc, uintptr(0), 0) if pSub == uintptr(0) { return int64(0) } *(*int32)(unsafe.Pointer(rc)) = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSub)).FpMethods + 48 /* &.xFileSize */))))(tls, pSub, bp /* &sz */) return *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) } // This is the implementation of the multiplex_control() SQL function. func multiplexControlFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* test_multiplex.c:375:13: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_OK var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, context) var op int32 = 0 // var iVal int32 at bp, 4 if !(db != 0) || (argc != 2) { rc = SQLITE_ERROR } else { // extract params op = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) *(*int32)(unsafe.Pointer(bp /* iVal */)) = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) // map function op to file_control op switch op { case 1: op = MULTIPLEX_CTRL_ENABLE break fallthrough case 2: op = MULTIPLEX_CTRL_SET_CHUNK_SIZE break fallthrough case 3: op = MULTIPLEX_CTRL_SET_MAX_CHUNKS break fallthrough default: rc = SQLITE_NOTFOUND break } } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_file_control(tls, db, uintptr(0), op, bp /* &iVal */) } sqlite3.Xsqlite3_result_error_code(tls, context, rc) } // This is the entry point to register the auto-extension for the // multiplex_control() function. func multiplexFuncInit(tls *libc.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* test_multiplex.c:417:12: */ var rc int32 rc = sqlite3.Xsqlite3_create_function(tls, db, ts+33751 /* "multiplex_contro..." */, 2, SQLITE_ANY, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{multiplexControlFunc})), uintptr(0), uintptr(0)) return rc } // Close a single sub-file in the connection group. func multiplexSubClose(tls *libc.TLS, pGroup uintptr, iChunk int32, pOrigVfs uintptr) { /* test_multiplex.c:431:13: */ var pSubOpen uintptr = (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fp if pSubOpen != 0 { (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 8 /* &.xClose */))))(tls, pSubOpen) if (pOrigVfs != 0) && ((*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz != 0) { (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pOrigVfs + 48 /* &.xDelete */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz, 0) } sqlite3.Xsqlite3_free(tls, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fp) } sqlite3.Xsqlite3_free_filename(tls, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz) libc.Xmemset(tls, ((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16), 0, uint64(unsafe.Sizeof(multiplexReal{}))) } // Deallocate memory held by a multiplexGroup func multiplexFreeComponents(tls *libc.TLS, pGroup uintptr) { /* test_multiplex.c:451:13: */ var i int32 for i = 0; i < (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal; i++ { multiplexSubClose(tls, pGroup, i, uintptr(0)) } sqlite3.Xsqlite3_free(tls, (*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal) (*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal = uintptr(0) (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal = 0 } //************************ VFS Method Wrappers **************************** // This is the xOpen method used for the "multiplex" VFS. // // Most of the work is done by the underlying original VFS. This method // simply links the new file into the appropriate multiplex group if it is a // file that needs to be tracked. func multiplexOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pConn uintptr, flags int32, pOutFlags uintptr) int32 { /* test_multiplex.c:469:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK // Result code var pMultiplexOpen uintptr // The new multiplex file descriptor var pGroup uintptr = uintptr(0) // Corresponding multiplexGroup object var pSubOpen uintptr = uintptr(0) // Real file descriptor var pOrigVfs uintptr = gMultiplex.FpOrigVfs // Real VFS var nName int32 = 0 var sz int32 = 0 var zToFree uintptr = uintptr(0) _ = pVfs libc.Xmemset(tls, pConn, 0, uint64((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) // We need to create a group structure and manage // access to this group of files. pMultiplexOpen = pConn if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { // allocate space for group if zName != 0 { nName = multiplexStrlen30(tls, zName) } else { nName = 0 } sz = (int32((uint64(unsafe.Sizeof(multiplexGroup{})) + // multiplexGroup uint64(nName)) + uint64(1))) // zName pGroup = sqlite3.Xsqlite3_malloc64(tls, uint64(sz)) if pGroup == uintptr(0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_NOMEM } } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { var zUri uintptr if (flags & SQLITE_OPEN_URI) != 0 { zUri = zName } else { zUri = uintptr(0) } // assign pointers to extra space allocated libc.Xmemset(tls, pGroup, 0, uint64(sz)) (*multiplexConn)(unsafe.Pointer(pMultiplexOpen)).FpGroup = pGroup (*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled = libc.Uint8(libc.Uint8FromInt32(-1)) (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(sqlite3.Xsqlite3_uri_boolean(tls, zUri, ts+17997, /* "truncate" */ (libc.Bool32((flags & SQLITE_OPEN_MAIN_DB) == 0)))) (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = uint32(int32(sqlite3.Xsqlite3_uri_int64(tls, zUri, ts+33769, /* "chunksize" */ int64(SQLITE_MULTIPLEX_CHUNK_SIZE)))) (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = (((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk + uint32(0xffff)) & libc.Uint32FromInt32(libc.CplInt32(0xffff))) if zName != 0 { var p uintptr = (pGroup + 1*40) (*multiplexGroup)(unsafe.Pointer(pGroup)).FzName = p libc.Xmemcpy(tls, (*multiplexGroup)(unsafe.Pointer(pGroup)).FzName, zName, (uint64(nName + 1))) (*multiplexGroup)(unsafe.Pointer(pGroup)).FnName = nName } if (*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled != 0 { for (uint32(sqlite3.Xsqlite3PendingByte) % (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk) >= ((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk - uint32(65536)) { *(*uint32)(unsafe.Pointer(pGroup + 32 /* &.szChunk */)) += (uint32(65536)) } } (*multiplexGroup)(unsafe.Pointer(pGroup)).Fflags = (flags & libc.CplInt32(SQLITE_OPEN_URI)) *(*int32)(unsafe.Pointer(bp /* rc */)) = multiplexSubFilename(tls, pGroup, 1) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { pSubOpen = multiplexSubOpen(tls, pGroup, 0, bp /* &rc */, pOutFlags, 0) if (pSubOpen == uintptr(0)) && (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_CANTOPEN } } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { // var sz64 sqlite3_int64 at bp+8, 8 *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 48 /* &.xFileSize */))))(tls, pSubOpen, bp+8 /* &sz64 */) if (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (zName != 0) { // var bExists int32 at bp+16, 4 if (flags & SQLITE_OPEN_SUPER_JOURNAL) != 0 { (*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled = uint8(0) } else if *(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)) == int64(0) { if (flags & SQLITE_OPEN_MAIN_JOURNAL) != 0 { // If opening a main journal file and the first chunk is zero // bytes in size, delete any subsequent chunks from the // file-system. var iChunk int32 = 1 for ok := true; ok; ok = ((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 16 /* bExists */)) != 0)) { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 56 /* &.xAccess */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz, SQLITE_ACCESS_EXISTS, bp+16 /* &bExists */) if (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 16 /* bExists */)) != 0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pOrigVfs + 48 /* &.xDelete */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz, 0) if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = multiplexSubFilename(tls, pGroup, libc.PreIncInt32(&iChunk, 1)) } } } } } else { // If the first overflow file exists and if the size of the main file // is different from the chunk size, that means the chunk size is set // set incorrectly. So fix it. // // Or, if the first overflow file does not exist and the main file is // larger than the chunk size, that means the chunk size is too small. // But we have no way of determining the intended chunk size, so // just disable the multiplexor all togethre. *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 56 /* &.xAccess */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+1*16)).Fz, SQLITE_ACCESS_EXISTS, bp+16 /* &bExists */) *(*int32)(unsafe.Pointer(bp + 16 /* bExists */)) = (libc.Bool32(multiplexSubSize(tls, pGroup, 1, bp /* &rc */) > int64(0))) if ((((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 16 /* bExists */)) != 0)) && (*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)) == (*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)) & int64(0xffff0000)))) && (*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)) > int64(0))) && (*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)) != sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk)) { (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = uint32(int32(*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)))) } else if ((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && !(*(*int32)(unsafe.Pointer(bp + 16 /* bExists */)) != 0)) && (*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* sz64 */)) > sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk)) { (*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled = uint8(0) } } } } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { if (*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods)).FiVersion == 1 { (*sqlite3_file)(unsafe.Pointer(pConn)).FpMethods = (uintptr(unsafe.Pointer(&gMultiplex)) + 176 /* &.sIoMethodsV1 */) } else { (*sqlite3_file)(unsafe.Pointer(pConn)).FpMethods = (uintptr(unsafe.Pointer(&gMultiplex)) + 328 /* &.sIoMethodsV2 */) } } else { multiplexFreeComponents(tls, pGroup) sqlite3.Xsqlite3_free(tls, pGroup) } } sqlite3.Xsqlite3_free(tls, zToFree) return *(*int32)(unsafe.Pointer(bp /* rc */)) } // This is the xDelete method used for the "multiplex" VFS. // It attempts to delete the filename specified. func multiplexDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) int32 { /* test_multiplex.c:611:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 var pOrigVfs uintptr = gMultiplex.FpOrigVfs // Real VFS rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pOrigVfs + 48 /* &.xDelete */))))(tls, pOrigVfs, zName, syncDir) if rc == SQLITE_OK { // If the main chunk was deleted successfully, also delete any subsequent // chunks - starting with the last (highest numbered). var nName int32 = int32(libc.Xstrlen(tls, zName)) var z uintptr z = sqlite3.Xsqlite3_malloc64(tls, (uint64(nName + 5))) if z == uintptr(0) { rc = (SQLITE_IOERR | (int32(12) << 8)) } else { var iChunk int32 = 0 // var bExists int32 at bp, 4 for ok := true; ok; ok = ((rc == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp /* bExists */)) != 0)) { multiplexFilename(tls, zName, nName, SQLITE_OPEN_MAIN_JOURNAL, libc.PreIncInt32(&iChunk, 1), z) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 56 /* &.xAccess */))))(tls, pOrigVfs, z, SQLITE_ACCESS_EXISTS, bp /* &bExists */) } for (rc == SQLITE_OK) && (iChunk > 1) { multiplexFilename(tls, zName, nName, SQLITE_OPEN_MAIN_JOURNAL, libc.PreDecInt32(&iChunk, 1), z) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pOrigVfs + 48 /* &.xDelete */))))(tls, pOrigVfs, z, syncDir) } if rc == SQLITE_OK { iChunk = 0 for ok1 := true; ok1; ok1 = ((rc == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp /* bExists */)) != 0)) { multiplexFilename(tls, zName, nName, SQLITE_OPEN_WAL, libc.PreIncInt32(&iChunk, 1), z) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 56 /* &.xAccess */))))(tls, pOrigVfs, z, SQLITE_ACCESS_EXISTS, bp /* &bExists */) } for (rc == SQLITE_OK) && (iChunk > 1) { multiplexFilename(tls, zName, nName, SQLITE_OPEN_WAL, libc.PreDecInt32(&iChunk, 1), z) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pOrigVfs + 48 /* &.xDelete */))))(tls, pOrigVfs, z, syncDir) } } } sqlite3.Xsqlite3_free(tls, z) } return rc } func multiplexAccess(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:656:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 56 /* &.xAccess */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } func multiplexFullPathname(tls *libc.TLS, a uintptr, b uintptr, c int32, d uintptr) int32 { /* test_multiplex.c:659:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gMultiplex.FpOrigVfs, b, c, d) } func multiplexDlOpen(tls *libc.TLS, a uintptr, b uintptr) uintptr { /* test_multiplex.c:662:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 72 /* &.xDlOpen */))))(tls, gMultiplex.FpOrigVfs, b) } func multiplexDlError(tls *libc.TLS, a uintptr, b int32, c uintptr) { /* test_multiplex.c:665:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 80 /* &.xDlError */))))(tls, gMultiplex.FpOrigVfs, b, c) } func multiplexDlSym(tls *libc.TLS, a uintptr, b uintptr, c uintptr) uintptr { /* test_multiplex.c:668:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((gMultiplex.FpOrigVfs + 88 /* &.xDlSym */))))(tls, gMultiplex.FpOrigVfs, b, c) } func multiplexDlClose(tls *libc.TLS, a uintptr, b uintptr) { /* test_multiplex.c:671:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((gMultiplex.FpOrigVfs + 96 /* &.xDlClose */))))(tls, gMultiplex.FpOrigVfs, b) } func multiplexRandomness(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:674:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 104 /* &.xRandomness */))))(tls, gMultiplex.FpOrigVfs, b, c) } func multiplexSleep(tls *libc.TLS, a uintptr, b int32) int32 { /* test_multiplex.c:677:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 112 /* &.xSleep */))))(tls, gMultiplex.FpOrigVfs, b) } func multiplexCurrentTime(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:680:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 120 /* &.xCurrentTime */))))(tls, gMultiplex.FpOrigVfs, b) } func multiplexGetLastError(tls *libc.TLS, a uintptr, b int32, c uintptr) int32 { /* test_multiplex.c:683:12: */ if (*sqlite3_vfs)(unsafe.Pointer(gMultiplex.FpOrigVfs)).FxGetLastError != 0 { return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 128 /* &.xGetLastError */))))(tls, gMultiplex.FpOrigVfs, b, c) } else { return 0 } return int32(0) } func multiplexCurrentTimeInt64(tls *libc.TLS, a uintptr, b uintptr) int32 { /* test_multiplex.c:690:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((gMultiplex.FpOrigVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, gMultiplex.FpOrigVfs, b) } //*********************** I/O Method Wrappers ****************************** // xClose requests get passed through to the original VFS. // We loop over all open chunk handles and close them. // The group structure for this file is unlinked from // our list of groups and freed. func multiplexClose(tls *libc.TLS, pConn uintptr) int32 { /* test_multiplex.c:701:12: */ var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup var rc int32 = SQLITE_OK multiplexFreeComponents(tls, pGroup) sqlite3.Xsqlite3_free(tls, pGroup) return rc } // Pass xRead requests thru to the original VFS after // determining the correct chunk to operate on. // Break up reads across chunk boundaries. func multiplexRead(tls *libc.TLS, pConn uintptr, pBuf uintptr, iAmt int32, iOfst sqlite3_int64) int32 { /* test_multiplex.c:714:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK if !(int32((*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled) != 0) { var pSubOpen uintptr = multiplexSubOpen(tls, pGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen == uintptr(0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = (SQLITE_IOERR | (int32(1) << 8)) } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 16 /* &.xRead */))))(tls, pSubOpen, pBuf, iAmt, iOfst) } } else { for iAmt > 0 { var i int32 = (int32(iOfst / sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) var pSubOpen uintptr pSubOpen = multiplexSubOpen(tls, pGroup, i, bp /* &rc */, uintptr(0), 1) if pSubOpen != 0 { var extra int32 = (int32((uint32((int32(iOfst % sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) + iAmt)) - (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk)) if extra < 0 { extra = 0 } iAmt = iAmt - (extra) *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 16 /* &.xRead */))))(tls, pSubOpen, pBuf, iAmt, (iOfst % sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) if *(*int32)(unsafe.Pointer(bp /* rc */)) != SQLITE_OK { break } pBuf = (pBuf + uintptr(iAmt)) iOfst = iOfst + (sqlite3_int64(iAmt)) iAmt = extra } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = (SQLITE_IOERR | (int32(1) << 8)) break } } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Pass xWrite requests thru to the original VFS after // determining the correct chunk to operate on. // Break up writes across chunk boundaries. func multiplexWrite(tls *libc.TLS, pConn uintptr, pBuf uintptr, iAmt int32, iOfst sqlite3_int64) int32 { /* test_multiplex.c:759:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK if !(int32((*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled) != 0) { var pSubOpen uintptr = multiplexSubOpen(tls, pGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen == uintptr(0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = (SQLITE_IOERR | (int32(3) << 8)) } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 24 /* &.xWrite */))))(tls, pSubOpen, pBuf, iAmt, iOfst) } } else { for (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (iAmt > 0) { var i int32 = (int32(iOfst / sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) var pSubOpen uintptr = multiplexSubOpen(tls, pGroup, i, bp /* &rc */, uintptr(0), 1) if pSubOpen != 0 { var extra int32 = (int32((uint32((int32(iOfst % sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) + iAmt)) - (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk)) if extra < 0 { extra = 0 } iAmt = iAmt - (extra) *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 24 /* &.xWrite */))))(tls, pSubOpen, pBuf, iAmt, (iOfst % sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) pBuf = (pBuf + uintptr(iAmt)) iOfst = iOfst + (sqlite3_int64(iAmt)) iAmt = extra } } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Pass xTruncate requests thru to the original VFS after // determining the correct chunk to operate on. Delete any // chunks above the truncate mark. func multiplexTruncate(tls *libc.TLS, pConn uintptr, size sqlite3_int64) int32 { /* test_multiplex.c:799:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK if !(int32((*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled) != 0) { var pSubOpen uintptr = multiplexSubOpen(tls, pGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen == uintptr(0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = (SQLITE_IOERR | (int32(6) << 8)) } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 32 /* &.xTruncate */))))(tls, pSubOpen, size) } } else { var i int32 var iBaseGroup int32 = (int32(size / sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) var pSubOpen uintptr var pOrigVfs uintptr = gMultiplex.FpOrigVfs // Real VFS // delete the chunks above the truncate limit for i = ((*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal - 1); (i > iBaseGroup) && (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK); i-- { if (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate != 0 { multiplexSubClose(tls, pGroup, i, pOrigVfs) } else { pSubOpen = multiplexSubOpen(tls, pGroup, i, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 32 /* &.xTruncate */))))(tls, pSubOpen, int64(0)) } } } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { pSubOpen = multiplexSubOpen(tls, pGroup, iBaseGroup, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 32 /* &.xTruncate */))))(tls, pSubOpen, (size % sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk))) } } if *(*int32)(unsafe.Pointer(bp /* rc */)) != 0 { *(*int32)(unsafe.Pointer(bp /* rc */)) = (SQLITE_IOERR | (int32(6) << 8)) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Pass xSync requests through to the original VFS without change func multiplexSync(tls *libc.TLS, pConn uintptr, flags int32) int32 { /* test_multiplex.c:839:12: */ var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal; i++ { var pSubOpen uintptr = (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(i)*16)).Fp if pSubOpen != 0 { var rc2 int32 = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 40 /* &.xSync */))))(tls, pSubOpen, flags) if rc2 != SQLITE_OK { rc = rc2 } } } return rc } // Pass xFileSize requests through to the original VFS. // Aggregate the size of all the chunks before returning. func multiplexFileSize(tls *libc.TLS, pConn uintptr, pSize uintptr) int32 { /* test_multiplex.c:857:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var i int32 if !(int32((*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled) != 0) { var pSubOpen uintptr = multiplexSubOpen(tls, pGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen == uintptr(0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = (SQLITE_IOERR | (int32(7) << 8)) } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 48 /* &.xFileSize */))))(tls, pSubOpen, pSize) } } else { *(*sqlite3_int64)(unsafe.Pointer(pSize)) = int64(0) for i = 0; *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK; i++ { var sz sqlite3_int64 = multiplexSubSize(tls, pGroup, i, bp /* &rc */) if sz == int64(0) { break } *(*sqlite3_int64)(unsafe.Pointer(pSize)) = ((sqlite3_int64(i) * sqlite3_int64((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk)) + sz) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Pass xLock requests through to the original VFS unchanged. func multiplexLock(tls *libc.TLS, pConn uintptr, lock int32) int32 { /* test_multiplex.c:882:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 56 /* &.xLock */))))(tls, pSubOpen, lock) } return SQLITE_BUSY } // Pass xUnlock requests through to the original VFS unchanged. func multiplexUnlock(tls *libc.TLS, pConn uintptr, lock int32) int32 { /* test_multiplex.c:894:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 64 /* &.xUnlock */))))(tls, pSubOpen, lock) } return (SQLITE_IOERR | (int32(8) << 8)) } // Pass xCheckReservedLock requests through to the original VFS unchanged. func multiplexCheckReservedLock(tls *libc.TLS, pConn uintptr, pResOut uintptr) int32 { /* test_multiplex.c:906:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, pSubOpen, pResOut) } return (SQLITE_IOERR | (int32(14) << 8)) } // Pass xFileControl requests through to the original VFS unchanged, // except for any MULTIPLEX_CTRL_* requests here. func multiplexFileControl(tls *libc.TLS, pConn uintptr, op int32, pArg uintptr) int32 { /* test_multiplex.c:919:12: */ bp := tls.Alloc(20) defer tls.Free(20) var p uintptr = pConn var pGroup uintptr = (*multiplexConn)(unsafe.Pointer(p)).FpGroup *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR var pSubOpen uintptr if !(gMultiplex.FisInitialized != 0) { return SQLITE_MISUSE } switch op { case MULTIPLEX_CTRL_ENABLE: if pArg != 0 { var bEnabled int32 = *(*int32)(unsafe.Pointer(pArg)) (*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled = uint8(bEnabled) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK } break case MULTIPLEX_CTRL_SET_CHUNK_SIZE: if pArg != 0 { var szChunk uint32 = *(*uint32)(unsafe.Pointer(pArg)) if szChunk < uint32(1) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISUSE } else { // Round up to nearest multiple of MAX_PAGE_SIZE. szChunk = (szChunk + (uint32(MAX_PAGE_SIZE - 1))) szChunk = szChunk & (libc.Uint32FromInt32(libc.CplInt32((MAX_PAGE_SIZE - 1)))) (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = szChunk *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK } } break case MULTIPLEX_CTRL_SET_MAX_CHUNKS: *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK break case SQLITE_FCNTL_SIZE_HINT: fallthrough case SQLITE_FCNTL_CHUNK_SIZE: // no-op these *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK break case SQLITE_FCNTL_PRAGMA: { var aFcntl uintptr = pArg // EVIDENCE-OF: R-29875-31678 The argument to the SQLITE_FCNTL_PRAGMA // file control is an array of pointers to strings (char**) in which the // second element of the array is the name of the pragma and the third // element is the argument to the pragma or NULL if the pragma has no // argument. if (*(*uintptr)(unsafe.Pointer(aFcntl + 1*8)) != 0) && (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + 1*8)), ts+33779 /* "multiplex_trunca..." */) == 0) { if (*(*uintptr)(unsafe.Pointer(aFcntl + 2*8)) != 0) && (*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aFcntl + 2*8)))) != 0) { if (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + 2*8)), ts+4049 /* "on" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + 2*8)), ts+27987 /* "1" */) == 0) { (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(1) } else if (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + 2*8)), ts+4413 /* "off" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + 2*8)), ts+13875 /* "0" */) == 0) { (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(0) } } // EVIDENCE-OF: R-27806-26076 The handler for an SQLITE_FCNTL_PRAGMA // file control can optionally make the first element of the char** // argument point to a string obtained from sqlite3_mprintf() or the // equivalent and that string will become the result of the pragma // or the error message if the pragma fails. *(*uintptr)(unsafe.Pointer(aFcntl)) = sqlite3.Xsqlite3_mprintf(tls, func() uintptr { if (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate != 0 { return ts + 4049 /* "on" */ } return ts + 4413 /* "off" */ }(), 0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK break } // If the multiplexor does not handle the pragma, pass it through // into the default case. } fallthrough default: pSubOpen = multiplexSubOpen(tls, pGroup, 0, bp+16 /* &rc */, uintptr(0), 0) if pSubOpen != 0 { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 80 /* &.xFileControl */))))(tls, pSubOpen, op, pArg) if (op == SQLITE_FCNTL_VFSNAME) && (*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK) { *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+33798 /* "multiplex/%z" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) } } break } return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } // Pass xSectorSize requests through to the original VFS unchanged. func multiplexSectorSize(tls *libc.TLS, pConn uintptr) int32 { /* test_multiplex.c:1004:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if (pSubOpen != 0) && ((*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods)).FxSectorSize != 0) { return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 88 /* &.xSectorSize */))))(tls, pSubOpen) } return DEFAULT_SECTOR_SIZE } // Pass xDeviceCharacteristics requests through to the original VFS unchanged. func multiplexDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_multiplex.c:1016:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, pSubOpen) } return 0 } // Pass xShmMap requests through to the original VFS unchanged. func multiplexShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_multiplex.c:1028:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } return SQLITE_IOERR } // Pass xShmLock requests through to the original VFS unchanged. func multiplexShmLock(tls *libc.TLS, pConn uintptr, ofst int32, n int32, flags int32) int32 { /* test_multiplex.c:1046:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 112 /* &.xShmLock */))))(tls, pSubOpen, ofst, n, flags) } return SQLITE_BUSY } // Pass xShmBarrier requests through to the original VFS unchanged. func multiplexShmBarrier(tls *libc.TLS, pConn uintptr) { /* test_multiplex.c:1063:13: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 120 /* &.xShmBarrier */))))(tls, pSubOpen) } } // Pass xShmUnmap requests through to the original VFS unchanged. func multiplexShmUnmap(tls *libc.TLS, pConn uintptr, deleteFlag int32) int32 { /* test_multiplex.c:1074:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pConn // var rc int32 at bp, 4 var pSubOpen uintptr = multiplexSubOpen(tls, (*multiplexConn)(unsafe.Pointer(p)).FpGroup, 0, bp /* &rc */, uintptr(0), 0) if pSubOpen != 0 { return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 128 /* &.xShmUnmap */))))(tls, pSubOpen, deleteFlag) } return SQLITE_OK } //************************* Public Interfaces **************************** // CAPI: Initialize the multiplex VFS shim - sqlite3_multiplex_initialize() // // Use the VFS named zOrigVfsName as the VFS that does the actual work. // Use the default if zOrigVfsName==NULL. // // The multiplex VFS shim is named "multiplex". It will become the default // VFS if makeDefault is non-zero. // // THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once // during start-up. func sqlite3_multiplex_initialize(tls *libc.TLS, zOrigVfsName uintptr, makeDefault int32) int32 { /* test_multiplex.c:1097:5: */ var pOrigVfs uintptr if gMultiplex.FisInitialized != 0 { return SQLITE_MISUSE } pOrigVfs = sqlite3.Xsqlite3_vfs_find(tls, zOrigVfsName) if pOrigVfs == uintptr(0) { return SQLITE_ERROR } gMultiplex.FisInitialized = 1 gMultiplex.FpOrigVfs = pOrigVfs gMultiplex.FsThisVfs = *(*sqlite3_vfs)(unsafe.Pointer(pOrigVfs)) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&gMultiplex)) + 8 /* &.sThisVfs */ + 4 /* &.szOsFile */)) += int32((uint64(unsafe.Sizeof(multiplexConn{})))) gMultiplex.FsThisVfs.FzName = ts + 33811 /* "multiplex" */ gMultiplex.FsThisVfs.FxOpen = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 }{multiplexOpen})) gMultiplex.FsThisVfs.FxDelete = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 }{multiplexDelete})) gMultiplex.FsThisVfs.FxAccess = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{multiplexAccess})) gMultiplex.FsThisVfs.FxFullPathname = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{multiplexFullPathname})) gMultiplex.FsThisVfs.FxDlOpen = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) uintptr }{multiplexDlOpen})) gMultiplex.FsThisVfs.FxDlError = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{multiplexDlError})) gMultiplex.FsThisVfs.FxDlSym = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr }{multiplexDlSym})) gMultiplex.FsThisVfs.FxDlClose = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{multiplexDlClose})) gMultiplex.FsThisVfs.FxRandomness = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 }{multiplexRandomness})) gMultiplex.FsThisVfs.FxSleep = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{multiplexSleep})) gMultiplex.FsThisVfs.FxCurrentTime = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{multiplexCurrentTime})) gMultiplex.FsThisVfs.FxGetLastError = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 }{multiplexGetLastError})) gMultiplex.FsThisVfs.FxCurrentTimeInt64 = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{multiplexCurrentTimeInt64})) gMultiplex.FsIoMethodsV1.FiVersion = 1 gMultiplex.FsIoMethodsV1.FxClose = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{multiplexClose})) gMultiplex.FsIoMethodsV1.FxRead = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32 }{multiplexRead})) gMultiplex.FsIoMethodsV1.FxWrite = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32 }{multiplexWrite})) gMultiplex.FsIoMethodsV1.FxTruncate = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, sqlite3_int64) int32 }{multiplexTruncate})) gMultiplex.FsIoMethodsV1.FxSync = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{multiplexSync})) gMultiplex.FsIoMethodsV1.FxFileSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{multiplexFileSize})) gMultiplex.FsIoMethodsV1.FxLock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{multiplexLock})) gMultiplex.FsIoMethodsV1.FxUnlock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{multiplexUnlock})) gMultiplex.FsIoMethodsV1.FxCheckReservedLock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{multiplexCheckReservedLock})) gMultiplex.FsIoMethodsV1.FxFileControl = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 }{multiplexFileControl})) gMultiplex.FsIoMethodsV1.FxSectorSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{multiplexSectorSize})) gMultiplex.FsIoMethodsV1.FxDeviceCharacteristics = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{multiplexDeviceCharacteristics})) gMultiplex.FsIoMethodsV2 = gMultiplex.FsIoMethodsV1 gMultiplex.FsIoMethodsV2.FiVersion = 2 gMultiplex.FsIoMethodsV2.FxShmMap = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 }{multiplexShmMap})) gMultiplex.FsIoMethodsV2.FxShmLock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 }{multiplexShmLock})) gMultiplex.FsIoMethodsV2.FxShmBarrier = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{multiplexShmBarrier})) gMultiplex.FsIoMethodsV2.FxShmUnmap = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{multiplexShmUnmap})) sqlite3.Xsqlite3_vfs_register(tls, (uintptr(unsafe.Pointer(&gMultiplex)) + 8 /* &.sThisVfs */), makeDefault) sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 }{multiplexFuncInit}))) return SQLITE_OK } // CAPI: Shutdown the multiplex system - sqlite3_multiplex_shutdown() // // All SQLite database connections must be closed before calling this // routine. // // THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once while // shutting down in order to free all remaining multiplex groups. func sqlite3_multiplex_shutdown(tls *libc.TLS, eForce int32) int32 { /* test_multiplex.c:1158:5: */ var rc int32 = SQLITE_OK if gMultiplex.FisInitialized == 0 { return SQLITE_MISUSE } gMultiplex.FisInitialized = 0 sqlite3.Xsqlite3_vfs_unregister(tls, (uintptr(unsafe.Pointer(&gMultiplex)) + 8 /* &.sThisVfs */)) libc.Xmemset(tls, uintptr(unsafe.Pointer(&gMultiplex)), 0, uint64(unsafe.Sizeof(gMultiplex))) return rc } // tclcmd: sqlite3_multiplex_initialize NAME MAKEDEFAULT func test_multiplex_initialize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_multiplex.c:1183:26: */ bp := tls.Alloc(4) defer tls.Free(4) var zName uintptr // Name of new multiplex VFS // var makeDefault int32 at bp, 4 // True to make the new VFS the default var rc int32 // Value returned by multiplex_initialize() _ = clientData // Process arguments if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33821 /* "NAME MAKEDEFAULT" */) return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &makeDefault */) != 0 { return TCL_ERROR } if int32(*(*int8)(unsafe.Pointer(zName))) == 0 { zName = uintptr(0) } // Call sqlite3_multiplex_initialize() rc = sqlite3_multiplex_initialize(tls, zName, *(*int32)(unsafe.Pointer(bp /* makeDefault */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_multiplex_shutdown func test_multiplex_shutdown(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_multiplex.c:1214:26: */ var rc int32 // Value returned by multiplex_shutdown() _ = clientData if (objc == 2) && (libc.Xstrcmp(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), ts+33838 /* "-force" */) != 0) { objc = 3 } if (objc != 1) && (objc != 2) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33845 /* "?-force?" */) return TCL_ERROR } // Call sqlite3_multiplex_shutdown() rc = sqlite3_multiplex_shutdown(tls, (libc.Bool32(objc == 2))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // Tclcmd: test_multiplex_control HANDLE DBNAME SUB-COMMAND ?INT-VALUE? func test_multiplex_control(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_multiplex.c:1242:26: */ bp := tls.Alloc(192) defer tls.Free(192) var rc int32 // Return code from file_control() // var idx int32 at bp+184, 4 // Index in aSub[] // var cmdInfo Tcl_CmdInfo at bp+56, 64 // Command info structure for HANDLE var db uintptr // Underlying db handle for HANDLE *(*int32)(unsafe.Pointer(bp + 188 /* iValue */)) = 0 var pArg uintptr = uintptr(0) *(*[4]struct { FzName uintptr Fop int32 Fargtype int32 })(unsafe.Pointer(bp + 120 /* aSub */)) = [4]struct { FzName uintptr Fop int32 Fargtype int32 }{ {FzName: ts + 33854 /* "enable" */, Fop: MULTIPLEX_CTRL_ENABLE, Fargtype: 1}, {FzName: ts + 33861 /* "chunk_size" */, Fop: MULTIPLEX_CTRL_SET_CHUNK_SIZE, Fargtype: 1}, {FzName: ts + 33872 /* "max_chunks" */, Fop: MULTIPLEX_CTRL_SET_MAX_CHUNKS, Fargtype: 1}, {}, } if objc != 5 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33883 /* "HANDLE DBNAME SU..." */) return TCL_ERROR } if 0 == tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+56 /* &cmdInfo */) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+33919 /* "expected databas..." */, 0)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), ts+11636 /* "\"" */, 0)) return TCL_ERROR } else { db = *(*uintptr)(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 56 /* &cmdInfo */)).FobjClientData)) } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+120 /* &aSub[0] */, int32(unsafe.Sizeof(struct { FzName uintptr Fop int32 Fargtype int32 }{})), ts+1875 /* "sub-command" */, 0, bp+184 /* &idx */) if rc != TCL_OK { return rc } switch (*struct { FzName uintptr Fop int32 Fargtype int32 })(unsafe.Pointer(bp + 120 /* &aSub */ + uintptr(*(*int32)(unsafe.Pointer(bp + 184 /* idx */)))*16)).Fargtype { case 1: if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+188 /* &iValue */) != 0 { return TCL_ERROR } pArg = bp + 188 /* &iValue */ break default: tcl.XTcl_WrongNumArgs(tls, interp, 4, objv, ts+2384 /* "SUB-COMMAND" */) return TCL_ERROR } rc = sqlite3.Xsqlite3_file_control(tls, db, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), (*struct { FzName uintptr Fop int32 Fargtype int32 })(unsafe.Pointer(bp+120 /* &aSub */ +uintptr(*(*int32)(unsafe.Pointer(bp + 184 /* idx */)))*16)).Fop, pArg) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) if rc == SQLITE_OK { return TCL_OK } return TCL_ERROR } // This routine registers the custom TCL commands defined in this // module. This should be the only procedure visible from outside // of this module. func Sqlitemultiplex_Init(tls *libc.TLS, interp uintptr) int32 { /* test_multiplex.c:1306:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd5)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aCmd5[i].FzName, aCmd5[i].FxProc, uintptr(0), uintptr(0)) } return TCL_OK } var aCmd5 = [3]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 33951 /* "sqlite3_multiple..." */, FxProc: 0}, {FzName: ts + 33980 /* "sqlite3_multiple..." */, FxProc: 0}, {FzName: ts + 34007 /* "sqlite3_multiple..." */, FxProc: 0}, } /* test_multiplex.c:1310:5 */ // CAPI3REF: Standard File Control Opcodes // KEYWORDS: {file control opcodes} {file control opcode} // // These integer constants are opcodes for the xFileControl method // of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] // interface. // //
    //
  • [[SQLITE_FCNTL_LOCKSTATE]] // The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This // opcode causes the xFileControl method to write the current state of // the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], // [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) // into an integer that the pArg argument points to. This capability // is used during testing and is only available when the SQLITE_TEST // compile-time option is used. // //
  • [[SQLITE_FCNTL_SIZE_HINT]] // The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS // layer a hint of how large the database file will grow to be during the // current transaction. This hint is not guaranteed to be accurate but it // is often close. The underlying VFS might choose to preallocate database // file space based on this hint in order to help writes to the database // file run faster. // //
  • [[SQLITE_FCNTL_SIZE_LIMIT]] // The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that // implements [sqlite3_deserialize()] to set an upper bound on the size // of the in-memory database. The argument is a pointer to a [sqlite3_int64]. // If the integer pointed to is negative, then it is filled in with the // current limit. Otherwise the limit is set to the larger of the value // of the integer pointed to and the current database size. The integer // pointed to is set to the new limit. // //
  • [[SQLITE_FCNTL_CHUNK_SIZE]] // The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS // extends and truncates the database file in chunks of a size specified // by the user. The fourth argument to [sqlite3_file_control()] should // point to an integer (type int) containing the new chunk-size to use // for the nominated database. Allocating database file space in large // chunks (say 1MB at a time), may reduce file-system fragmentation and // improve performance on some systems. // //
  • [[SQLITE_FCNTL_FILE_POINTER]] // The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer // to the [sqlite3_file] object associated with a particular database // connection. See also [SQLITE_FCNTL_JOURNAL_POINTER]. // //
  • [[SQLITE_FCNTL_JOURNAL_POINTER]] // The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer // to the [sqlite3_file] object associated with the journal file (either // the [rollback journal] or the [write-ahead log]) for a particular database // connection. See also [SQLITE_FCNTL_FILE_POINTER]. // //
  • [[SQLITE_FCNTL_SYNC_OMITTED]] // No longer in use. // //
  • [[SQLITE_FCNTL_SYNC]] // The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and // sent to the VFS immediately before the xSync method is invoked on a // database file descriptor. Or, if the xSync method is not invoked // because the user has configured SQLite with // [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place // of the xSync method. In most cases, the pointer argument passed with // this file-control is NULL. However, if the database file is being synced // as part of a multi-database commit, the argument points to a nul-terminated // string containing the transactions super-journal file name. VFSes that // do not need this signal should silently ignore this opcode. Applications // should not call [sqlite3_file_control()] with this opcode as doing so may // disrupt the operation of the specialized VFSes that do require it. // //
  • [[SQLITE_FCNTL_COMMIT_PHASETWO]] // The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite // and sent to the VFS after a transaction has been committed immediately // but before the database is unlocked. VFSes that do not need this signal // should silently ignore this opcode. Applications should not call // [sqlite3_file_control()] with this opcode as doing so may disrupt the // operation of the specialized VFSes that do require it. // //
  • [[SQLITE_FCNTL_WIN32_AV_RETRY]] // ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic // retry counts and intervals for certain disk I/O operations for the // windows [VFS] in order to provide robustness in the presence of // anti-virus programs. By default, the windows VFS will retry file read, // file write, and file delete operations up to 10 times, with a delay // of 25 milliseconds before the first retry and with the delay increasing // by an additional 25 milliseconds with each subsequent retry. This // opcode allows these two values (10 retries and 25 milliseconds of delay) // to be adjusted. The values are changed for all database connections // within the same process. The argument is a pointer to an array of two // integers where the first integer is the new retry count and the second // integer is the delay. If either integer is negative, then the setting // is not changed but instead the prior value of that setting is written // into the array entry, allowing the current retry settings to be // interrogated. The zDbName parameter is ignored. // //
  • [[SQLITE_FCNTL_PERSIST_WAL]] // ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the // persistent [WAL | Write Ahead Log] setting. By default, the auxiliary // write ahead log ([WAL file]) and shared memory // files used for transaction control // are automatically deleted when the latest connection to the database // closes. Setting persistent WAL mode causes those files to persist after // close. Persisting the files is useful when other processes that do not // have write permission on the directory containing the database file want // to read the database file, as the WAL and shared memory files must exist // in order for the database to be readable. The fourth parameter to // [sqlite3_file_control()] for this opcode should be a pointer to an integer. // That integer is 0 to disable persistent WAL mode or 1 to enable persistent // WAL mode. If the integer is -1, then it is overwritten with the current // WAL persistence setting. // //
  • [[SQLITE_FCNTL_POWERSAFE_OVERWRITE]] // ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the // persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting // determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the // xDeviceCharacteristics methods. The fourth parameter to // [sqlite3_file_control()] for this opcode should be a pointer to an integer. // That integer is 0 to disable zero-damage mode or 1 to enable zero-damage // mode. If the integer is -1, then it is overwritten with the current // zero-damage mode setting. // //
  • [[SQLITE_FCNTL_OVERWRITE]] // ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening // a write transaction to indicate that, unless it is rolled back for some // reason, the entire database file will be overwritten by the current // transaction. This is used by VACUUM operations. // //
  • [[SQLITE_FCNTL_VFSNAME]] // ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of // all [VFSes] in the VFS stack. The names are of all VFS shims and the // final bottom-level VFS are written into memory obtained from // [sqlite3_malloc()] and the result is stored in the char* variable // that the fourth parameter of [sqlite3_file_control()] points to. // The caller is responsible for freeing the memory when done. As with // all file-control actions, there is no guarantee that this will actually // do anything. Callers should initialize the char* variable to a NULL // pointer in case this file-control is not implemented. This file-control // is intended for diagnostic use only. // //
  • [[SQLITE_FCNTL_VFS_POINTER]] // ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level // [VFSes] currently in use. ^(The argument X in // sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be // of type "[sqlite3_vfs] **". This opcodes will set *X // to a pointer to the top-level VFS.)^ // ^When there are multiple VFS shims in the stack, this opcode finds the // upper-most shim only. // //
  • [[SQLITE_FCNTL_PRAGMA]] // ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA] // file control is sent to the open [sqlite3_file] object corresponding // to the database file to which the pragma statement refers. ^The argument // to the [SQLITE_FCNTL_PRAGMA] file control is an array of // pointers to strings (char**) in which the second element of the array // is the name of the pragma and the third element is the argument to the // pragma or NULL if the pragma has no argument. ^The handler for an // [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element // of the char** argument point to a string obtained from [sqlite3_mprintf()] // or the equivalent and that string will become the result of the pragma or // the error message if the pragma fails. ^If the // [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal // [PRAGMA] processing continues. ^If the [SQLITE_FCNTL_PRAGMA] // file control returns [SQLITE_OK], then the parser assumes that the // VFS has handled the PRAGMA itself and the parser generates a no-op // prepared statement if result string is NULL, or that returns a copy // of the result string if the string is non-NULL. // ^If the [SQLITE_FCNTL_PRAGMA] file control returns // any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means // that the VFS encountered an error while handling the [PRAGMA] and the // compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA] // file control occurs at the beginning of pragma statement analysis and so // it is able to override built-in [PRAGMA] statements. // //
  • [[SQLITE_FCNTL_BUSYHANDLER]] // ^The [SQLITE_FCNTL_BUSYHANDLER] // file-control may be invoked by SQLite on the database file handle // shortly after it is opened in order to provide a custom VFS with access // to the connection's busy-handler callback. The argument is of type (void**) // - an array of two (void *) values. The first (void *) actually points // to a function of type (int (*)(void *)). In order to invoke the connection's // busy-handler, this function should be invoked with the second (void *) in // the array as the only argument. If it returns non-zero, then the operation // should be retried. If it returns zero, the custom VFS should abandon the // current operation. // //
  • [[SQLITE_FCNTL_TEMPFILENAME]] // ^Applications can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control // to have SQLite generate a // temporary filename using the same algorithm that is followed to generate // temporary filenames for TEMP tables and other internal uses. The // argument should be a char** which will be filled with the filename // written into memory obtained from [sqlite3_malloc()]. The caller should // invoke [sqlite3_free()] on the result to avoid a memory leak. // //
  • [[SQLITE_FCNTL_MMAP_SIZE]] // The [SQLITE_FCNTL_MMAP_SIZE] file control is used to query or set the // maximum number of bytes that will be used for memory-mapped I/O. // The argument is a pointer to a value of type sqlite3_int64 that // is an advisory maximum number of bytes in the file to memory map. The // pointer is overwritten with the old value. The limit is not changed if // the value originally pointed to is negative, and so the current limit // can be queried by passing in a pointer to a negative number. This // file-control is used internally to implement [PRAGMA mmap_size]. // //
  • [[SQLITE_FCNTL_TRACE]] // The [SQLITE_FCNTL_TRACE] file control provides advisory information // to the VFS about what the higher layers of the SQLite stack are doing. // This file control is used by some VFS activity tracing [shims]. // The argument is a zero-terminated string. Higher layers in the // SQLite stack may generate instances of this file control if // the [SQLITE_USE_FCNTL_TRACE] compile-time option is enabled. // //
  • [[SQLITE_FCNTL_HAS_MOVED]] // The [SQLITE_FCNTL_HAS_MOVED] file control interprets its argument as a // pointer to an integer and it writes a boolean into that integer depending // on whether or not the file has been renamed, moved, or deleted since it // was first opened. // //
  • [[SQLITE_FCNTL_WIN32_GET_HANDLE]] // The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the // underlying native file handle associated with a file handle. This file // control interprets its argument as a pointer to a native file handle and // writes the resulting value there. // //
  • [[SQLITE_FCNTL_WIN32_SET_HANDLE]] // The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This // opcode causes the xFileControl method to swap the file handle with the one // pointed to by the pArg argument. This capability is used during testing // and only needs to be supported when SQLITE_TEST is defined. // //
  • [[SQLITE_FCNTL_WAL_BLOCK]] // The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might // be advantageous to block on the next WAL lock if the lock is not immediately // available. The WAL subsystem issues this signal during rare // circumstances in order to fix a problem with priority inversion. // Applications should not use this file-control. // //
  • [[SQLITE_FCNTL_ZIPVFS]] // The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other // VFS should return SQLITE_NOTFOUND for this opcode. // //
  • [[SQLITE_FCNTL_RBU]] // The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by // the RBU extension only. All other VFS should return SQLITE_NOTFOUND for // this opcode. // //
  • [[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]] // If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then // the file descriptor is placed in "batch write mode", which // means all subsequent write operations will be deferred and done // atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. Systems // that do not support batch atomic writes will return SQLITE_NOTFOUND. // ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to // the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or // [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make // no VFS interface calls on the same [sqlite3_file] file descriptor // except for calls to the xWrite method and the xFileControl method // with [SQLITE_FCNTL_SIZE_HINT]. // //
  • [[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]] // The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write // operations since the previous successful call to // [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically. // This file control returns [SQLITE_OK] if and only if the writes were // all performed successfully and have been committed to persistent storage. // ^Regardless of whether or not it is successful, this file control takes // the file descriptor out of batch write mode so that all subsequent // write operations are independent. // ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without // a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]. // //
  • [[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]] // The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write // operations since the previous successful call to // [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back. // ^This file control takes the file descriptor out of batch write mode // so that all subsequent write operations are independent. // ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without // a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]. // //
  • [[SQLITE_FCNTL_LOCK_TIMEOUT]] // The [SQLITE_FCNTL_LOCK_TIMEOUT] opcode is used to configure a VFS // to block for up to M milliseconds before failing when attempting to // obtain a file lock using the xLock or xShmLock methods of the VFS. // The parameter is a pointer to a 32-bit signed integer that contains // the value that M is to be set to. Before returning, the 32-bit signed // integer is overwritten with the previous value of M. // //
  • [[SQLITE_FCNTL_DATA_VERSION]] // The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to // a database file. The argument is a pointer to a 32-bit unsigned integer. // The "data version" for the pager is written into the pointer. The // "data version" changes whenever any change occurs to the corresponding // database file, either through SQL statements on the same database // connection or through transactions committed by separate database // connections possibly in other processes. The [sqlite3_total_changes()] // interface can be used to find if any database on the connection has changed, // but that interface responds to changes on TEMP as well as MAIN and does // not provide a mechanism to detect changes to MAIN only. Also, the // [sqlite3_total_changes()] interface responds to internal changes only and // omits changes made by other database connections. The // [PRAGMA data_version] command provides a mechanism to detect changes to // a single attached database that occur due to other database connections, // but omits changes implemented by the database connection on which it is // called. This file control is the only mechanism to detect changes that // happen either internally or externally and that are associated with // a particular attached database. // //
  • [[SQLITE_FCNTL_CKPT_START]] // The [SQLITE_FCNTL_CKPT_START] opcode is invoked from within a checkpoint // in wal mode before the client starts to copy pages from the wal // file to the database file. // //
  • [[SQLITE_FCNTL_CKPT_DONE]] // The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint // in wal mode after the client has finished copying pages from the wal // file to the database file, but before the *-shm file is updated to // record the fact that the pages have been checkpointed. //
// deprecated names // CAPI3REF: Mutex Handle // // The mutex module within SQLite defines [sqlite3_mutex] to be an // abstract type for a mutex object. The SQLite core never looks // at the internal representation of an [sqlite3_mutex]. It only // deals with pointers to the [sqlite3_mutex] object. // // Mutexes are created using [sqlite3_mutex_alloc()]. type sqlite3_mutex = sqlite3_mutex1 /* sqlite3.h:1187:30 */ var aName = [15]uintptr{ ts + 34033 /* "fast" */, ts + 34038 /* "recursive" */, ts + 34048 /* "static_main" */, ts + 34060, /* "static_mem" */ ts + 34071 /* "static_open" */, ts + 34083 /* "static_prng" */, ts + 34095 /* "static_lru" */, ts + 34106, /* "static_pmem" */ ts + 34118 /* "static_app1" */, ts + 34130 /* "static_app2" */, ts + 34142 /* "static_app3" */, ts + 34154, /* "static_vfs1" */ ts + 34166 /* "static_vfs2" */, ts + 34178 /* "static_vfs3" */, uintptr(0), } /* test_mutex.c:32:19 */ // State variables type test_mutex_globals = struct { FisInstalled int32 FdisableInit int32 FdisableTry int32 FisInit int32 Fm sqlite3_mutex_methods FaCounter [14]int32 FaStatic [12]sqlite3_mutex } /* test_mutex.c:46:8 */ // State variables var g3 = test_mutex_globals{} /* test_mutex.c:54:3 */ // Return true if the countable mutex is currently held func counterMutexHeld(tls *libc.TLS, p uintptr) int32 { /* test_mutex.c:57:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 56 /* &.xMutexHeld */))))(tls, (*sqlite3_mutex)(unsafe.Pointer(p)).FpReal) } // Return true if the countable mutex is not currently held func counterMutexNotheld(tls *libc.TLS, p uintptr) int32 { /* test_mutex.c:62:12: */ return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 64 /* &.xMutexNotheld */))))(tls, (*sqlite3_mutex)(unsafe.Pointer(p)).FpReal) } // Initialize the countable mutex interface // Or, if g.disableInit is non-zero, then do not initialize but instead // return the value of g.disableInit as the result code. This can be used // to simulate an initialization failure. func counterMutexInit(tls *libc.TLS) int32 { /* test_mutex.c:71:12: */ var rc int32 if g3.FdisableInit != 0 { return g3.FdisableInit } rc = (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ /* &.xMutexInit */))))(tls) g3.FisInit = 1 return rc } // Uninitialize the mutex subsystem func counterMutexEnd(tls *libc.TLS) int32 { /* test_mutex.c:82:12: */ g3.FisInit = 0 return (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 8 /* &.xMutexEnd */))))(tls) } // Allocate a countable mutex func counterMutexAlloc(tls *libc.TLS, eType int32) uintptr { /* test_mutex.c:90:22: */ var pReal uintptr var pRet uintptr = uintptr(0) pReal = (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 16 /* &.xMutexAlloc */))))(tls, eType) if !(pReal != 0) { return uintptr(0) } if (eType == SQLITE_MUTEX_FAST) || (eType == SQLITE_MUTEX_RECURSIVE) { pRet = libc.Xmalloc(tls, uint64(unsafe.Sizeof(sqlite3_mutex{}))) } else { var eStaticType int32 = (eType - ((SQLITE_MUTEX_STATIC_VFS3 + 1) - ((SQLITE_MUTEX_STATIC_VFS3 + 1) - (SQLITE_MUTEX_RECURSIVE + 1)))) pRet = ((uintptr(unsafe.Pointer(&g3)) + 144 /* &.aStatic */) + uintptr(eStaticType)*16) } (*sqlite3_mutex)(unsafe.Pointer(pRet)).FeType = eType (*sqlite3_mutex)(unsafe.Pointer(pRet)).FpReal = pReal return pRet } // Free a countable mutex func counterMutexFree(tls *libc.TLS, p uintptr) { /* test_mutex.c:118:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 24 /* &.xMutexFree */))))(tls, (*sqlite3_mutex)(unsafe.Pointer(p)).FpReal) if ((*sqlite3_mutex)(unsafe.Pointer(p)).FeType == SQLITE_MUTEX_FAST) || ((*sqlite3_mutex)(unsafe.Pointer(p)).FeType == SQLITE_MUTEX_RECURSIVE) { libc.Xfree(tls, p) } } // Enter a countable mutex. Block until entry is safe. func counterMutexEnter(tls *libc.TLS, p uintptr) { /* test_mutex.c:129:13: */ *(*int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 88 /* &.aCounter */) + uintptr((*sqlite3_mutex)(unsafe.Pointer(p)).FeType)*4))++ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 32 /* &.xMutexEnter */))))(tls, (*sqlite3_mutex)(unsafe.Pointer(p)).FpReal) } // Try to enter a mutex. Return true on success. func counterMutexTry(tls *libc.TLS, p uintptr) int32 { /* test_mutex.c:140:12: */ *(*int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 88 /* &.aCounter */) + uintptr((*sqlite3_mutex)(unsafe.Pointer(p)).FeType)*4))++ if g3.FdisableTry != 0 { return SQLITE_BUSY } return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 40 /* &.xMutexTry */))))(tls, (*sqlite3_mutex)(unsafe.Pointer(p)).FpReal) } // Leave a mutex func counterMutexLeave(tls *libc.TLS, p uintptr) { /* test_mutex.c:151:13: */ (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */ + 48 /* &.xMutexLeave */))))(tls, (*sqlite3_mutex)(unsafe.Pointer(p)).FpReal) } // sqlite3_shutdown func test_shutdown(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:159:26: */ var rc int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } rc = sqlite3.Xsqlite3_shutdown(tls) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // sqlite3_initialize func test_initialize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:180:26: */ var rc int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } rc = sqlite3.Xsqlite3_initialize(tls) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // install_mutex_counters BOOLEAN func test_install_mutex_counters(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:201:26: */ bp := tls.Alloc(176) defer tls.Free(176) var rc int32 = SQLITE_OK // var isInstall int32 at bp+96, 4 *(*sqlite3_mutex_methods)(unsafe.Pointer(bp + 104 /* counter_methods */)) = sqlite3_mutex_methods{ FxMutexInit: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{counterMutexInit})), FxMutexEnd: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{counterMutexEnd})), FxMutexAlloc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32) uintptr }{counterMutexAlloc})), FxMutexFree: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{counterMutexFree})), FxMutexEnter: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{counterMutexEnter})), FxMutexTry: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{counterMutexTry})), FxMutexLeave: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{counterMutexLeave})), FxMutexHeld: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{counterMutexHeld})), FxMutexNotheld: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{counterMutexNotheld})), } if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17931 /* "BOOLEAN" */) return TCL_ERROR } if TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+96 /* &isInstall */) { return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 96 /* isInstall */)) == g3.FisInstalled { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+34190 /* "mutex counters a..." */, 0)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, func() uintptr { if *(*int32)(unsafe.Pointer(bp + 96 /* isInstall */)) != 0 { return ts + 34210 /* "already installe..." */ } return ts + 34228 /* "not installed" */ }(), 0)) return TCL_ERROR } if *(*int32)(unsafe.Pointer(bp + 96 /* isInstall */)) != 0 { rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETMUTEX, libc.VaList(bp+48, (uintptr(unsafe.Pointer(&g3))+16 /* &.m */))) if rc == SQLITE_OK { sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MUTEX, libc.VaList(bp+64, bp+104 /* &counter_methods */)) } g3.FdisableTry = 0 } else { rc = sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_MUTEX, libc.VaList(bp+80, (uintptr(unsafe.Pointer(&g3))+16 /* &.m */))) libc.Xmemset(tls, (uintptr(unsafe.Pointer(&g3)) + 16 /* &.m */), 0, uint64(unsafe.Sizeof(sqlite3_mutex_methods{}))) } if rc == SQLITE_OK { g3.FisInstalled = *(*int32)(unsafe.Pointer(bp + 96 /* isInstall */)) } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } // read_mutex_counters func test_read_mutex_counters(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:262:26: */ var pRet uintptr var ii int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } pRet = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pRet)).FrefCount++ for ii = 0; ii < (SQLITE_MUTEX_STATIC_VFS3 + 1); ii++ { tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, aName[ii], -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 88 /* &.aCounter */) + uintptr(ii)*4)))) } tcl.XTcl_SetObjResult(tls, interp, pRet) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pRet if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return TCL_OK } // clear_mutex_counters func test_clear_mutex_counters(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:291:26: */ var ii int32 if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } for ii = 0; ii < (SQLITE_MUTEX_STATIC_VFS3 + 1); ii++ { *(*int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&g3)) + 88 /* &.aCounter */) + uintptr(ii)*4)) = 0 } return TCL_OK } // Create and free a mutex. Return the mutex pointer. The pointer // will be invalid since the mutex has already been freed. The // return pointer just checks to see if the mutex really was allocated. func test_alloc_mutex(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:315:26: */ bp := tls.Alloc(140) defer tls.Free(140) var p uintptr = sqlite3.Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) // var zBuf [100]int8 at bp+40, 100 sqlite3.Xsqlite3_mutex_free(tls, p) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+40 /* &zBuf[0] */, ts+13023 /* "%p" */, libc.VaList(bp, p)) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+16, bp+40 /* &zBuf[0] */, uintptr(0))) return TCL_OK } // sqlite3_config OPTION // // OPTION can be either one of the keywords: // // SQLITE_CONFIG_SINGLETHREAD // SQLITE_CONFIG_MULTITHREAD // SQLITE_CONFIG_SERIALIZED // // Or OPTION can be an raw integer. func test_config(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:342:26: */ bp := tls.Alloc(68) defer tls.Free(68) *(*[4]ConfigOption)(unsafe.Pointer(bp /* aOpt */)) = [4]ConfigOption{ {FzName: ts + 34242 /* "singlethread" */, FiValue: SQLITE_CONFIG_SINGLETHREAD}, {FzName: ts + 34255 /* "multithread" */, FiValue: SQLITE_CONFIG_MULTITHREAD}, {FzName: ts + 34267 /* "serialized" */, FiValue: SQLITE_CONFIG_SERIALIZED}, {}, } var s int32 = int32(unsafe.Sizeof(ConfigOption{})) // var i int32 at bp+64, 4 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &aOpt[0] */, s, ts+17196 /* "flag" */, 0, bp+64 /* &i */) != 0 { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+64 /* &i */) != 0 { return TCL_ERROR } } else { *(*int32)(unsafe.Pointer(bp + 64 /* i */)) = (*ConfigOption)(unsafe.Pointer(bp /* &aOpt */ + uintptr(*(*int32)(unsafe.Pointer(bp + 64 /* i */)))*16)).FiValue } rc = sqlite3.Xsqlite3_config(tls, *(*int32)(unsafe.Pointer(bp + 64 /* i */)), 0) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(1)) return TCL_OK } type ConfigOption = struct { FzName uintptr FiValue int32 _ [4]byte } /* test_mutex.c:348:3 */ func getDbPointer1(tls *libc.TLS, pInterp uintptr, pObj uintptr) uintptr { /* test_mutex.c:379:16: */ bp := tls.Alloc(64) defer tls.Free(64) var db uintptr // var info Tcl_CmdInfo at bp, 64 var zCmd uintptr = tcl.XTcl_GetString(tls, pObj) if tcl.XTcl_GetCommandInfo(tls, pInterp, zCmd, bp /* &info */) != 0 { db = *(*uintptr)(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp /* &info */)).FobjClientData)) } else { db = sqlite3TestTextToPtr(tls, zCmd) } return db } func getStaticMutexPointer(tls *libc.TLS, pInterp uintptr, pObj uintptr) uintptr { /* test_mutex.c:392:22: */ bp := tls.Alloc(4) defer tls.Free(4) // var iMutex int32 at bp, 4 if tcl.XTcl_GetIndexFromObjStruct(tls, pInterp, pObj, uintptr(unsafe.Pointer(&aName)), int32(unsafe.Sizeof(uintptr(0))), ts+34278 /* "mutex name" */, 0, bp /* &iMutex */) != 0 { return uintptr(0) } return counterMutexAlloc(tls, *(*int32)(unsafe.Pointer(bp /* iMutex */))) } func test_enter_static_mutex(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:404:26: */ var pMutex uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10399 /* "NAME" */) return TCL_ERROR } pMutex = getStaticMutexPointer(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if !(pMutex != 0) { return TCL_ERROR } sqlite3.Xsqlite3_mutex_enter(tls, pMutex) return TCL_OK } func test_leave_static_mutex(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:423:26: */ var pMutex uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10399 /* "NAME" */) return TCL_ERROR } pMutex = getStaticMutexPointer(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if !(pMutex != 0) { return TCL_ERROR } sqlite3.Xsqlite3_mutex_leave(tls, pMutex) return TCL_OK } func test_enter_db_mutex(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:442:26: */ var db uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } db = getDbPointer1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if !(db != 0) { return TCL_ERROR } sqlite3.Xsqlite3_mutex_enter(tls, sqlite3.Xsqlite3_db_mutex(tls, db)) return TCL_OK } func test_leave_db_mutex(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:461:26: */ var db uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } db = getDbPointer1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if !(db != 0) { return TCL_ERROR } sqlite3.Xsqlite3_mutex_leave(tls, sqlite3.Xsqlite3_db_mutex(tls, db)) return TCL_OK } func Sqlitetest_mutex_Init(tls *libc.TLS, interp uintptr) int32 { /* test_mutex.c:480:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd6)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aCmd6[i].FzName, aCmd6[i].FxProc, uintptr(0), uintptr(0)) } tcl.XTcl_LinkVar(tls, interp, ts+34289, /* "disable_mutex_in..." */ (uintptr(unsafe.Pointer(&g3)) + 4 /* &.disableInit */), TCL_LINK_INT) tcl.XTcl_LinkVar(tls, interp, ts+34308, /* "disable_mutex_tr..." */ (uintptr(unsafe.Pointer(&g3)) + 8 /* &.disableTry */), TCL_LINK_INT) return SQLITE_OK } var aCmd6 = [11]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 34326 /* "sqlite3_shutdown" */, FxProc: 0}, {FzName: ts + 34343 /* "sqlite3_initiali..." */, FxProc: 0}, {FzName: ts + 34362 /* "sqlite3_config" */, FxProc: 0}, {FzName: ts + 34377 /* "enter_static_mut..." */, FxProc: 0}, {FzName: ts + 34396 /* "leave_static_mut..." */, FxProc: 0}, {FzName: ts + 34415 /* "enter_db_mutex" */, FxProc: 0}, {FzName: ts + 34430 /* "leave_db_mutex" */, FxProc: 0}, {FzName: ts + 34445 /* "alloc_dealloc_mu..." */, FxProc: 0}, {FzName: ts + 34465 /* "install_mutex_co..." */, FxProc: 0}, {FzName: ts + 34488 /* "read_mutex_count..." */, FxProc: 0}, {FzName: ts + 34508 /* "clear_mutex_coun..." */, FxProc: 0}, } /* test_mutex.c:484:5 */ // Maximum pathname length supported by the fs backend. // Name used to identify this VFS. type fs_real_file1 = struct { FpFile uintptr FzName uintptr FnDatabase int32 FnJournal int32 FnBlob int32 FnRef int32 FpNext uintptr FppThis uintptr } /* test_onefile.c:97:9 */ // Maximum pathname length supported by the fs backend. // Name used to identify this VFS. type fs_real_file = fs_real_file1 /* test_onefile.c:97:29 */ type fs_file1 = struct { Fbase sqlite3_file FeType int32 _ [4]byte FpReal uintptr } /* test_onefile.c:109:9 */ type fs_file = fs_file1 /* test_onefile.c:109:24 */ type tmp_file1 = struct { Fbase sqlite3_file FnSize int32 FnAlloc int32 FzAlloc uintptr } /* test_onefile.c:116:9 */ type tmp_file = tmp_file1 /* test_onefile.c:116:25 */ type fs_vfs_t1 = struct { Fbase sqlite3_vfs FpFileList uintptr FpParent uintptr } /* test_onefile.c:176:9 */ type fs_vfs_t = fs_vfs_t1 /* test_onefile.c:176:25 */ var fs_vfs = fs_vfs_t{ Fbase: sqlite3_vfs{ FiVersion: 1, // pNext FzName: ts + 30134, /* "fs" */ // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTimeInt64 }, // pParent } /* test_onefile.c:183:17 */ var fs_io_methods = sqlite3_io_methods{ FiVersion: 1, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xShmUnmap } /* test_onefile.c:208:27 */ var tmp_io_methods = sqlite3_io_methods{ FiVersion: 1, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xShmUnmap } /* test_onefile.c:229:27 */ // Useful macros used in several places // Close a tmp-file. func tmpClose(tls *libc.TLS, pFile uintptr) int32 { /* test_onefile.c:257:12: */ var pTmp uintptr = pFile sqlite3.Xsqlite3_free(tls, (*tmp_file)(unsafe.Pointer(pTmp)).FzAlloc) return SQLITE_OK } // Read data from a tmp-file. func tmpRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_onefile.c:266:12: */ var pTmp uintptr = pFile if (sqlite_int64(iAmt) + iOfst) > sqlite_int64((*tmp_file)(unsafe.Pointer(pTmp)).FnSize) { return (SQLITE_IOERR | (int32(2) << 8)) } libc.Xmemcpy(tls, zBuf, ((*tmp_file)(unsafe.Pointer(pTmp)).FzAlloc + uintptr(iOfst)), uint64(iAmt)) return SQLITE_OK } // Write data to a tmp-file. func tmpWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_onefile.c:283:12: */ var pTmp uintptr = pFile if (sqlite_int64(iAmt) + iOfst) > sqlite_int64((*tmp_file)(unsafe.Pointer(pTmp)).FnAlloc) { var nNew int32 = (int32(int64(2) * ((sqlite_int64(iAmt) + iOfst) + sqlite_int64((*tmp_file)(unsafe.Pointer(pTmp)).FnAlloc)))) var zNew uintptr = sqlite3.Xsqlite3_realloc(tls, (*tmp_file)(unsafe.Pointer(pTmp)).FzAlloc, nNew) if !(zNew != 0) { return SQLITE_NOMEM } (*tmp_file)(unsafe.Pointer(pTmp)).FzAlloc = zNew (*tmp_file)(unsafe.Pointer(pTmp)).FnAlloc = nNew } libc.Xmemcpy(tls, ((*tmp_file)(unsafe.Pointer(pTmp)).FzAlloc + uintptr(iOfst)), zBuf, uint64(iAmt)) (*tmp_file)(unsafe.Pointer(pTmp)).FnSize = func() int32 { if (sqlite_int64((*tmp_file)(unsafe.Pointer(pTmp)).FnSize)) > (iOfst + sqlite_int64(iAmt)) { return (*tmp_file)(unsafe.Pointer(pTmp)).FnSize } return (int32(iOfst + sqlite_int64(iAmt))) }() return SQLITE_OK } // Truncate a tmp-file. func tmpTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_onefile.c:307:12: */ var pTmp uintptr = pFile (*tmp_file)(unsafe.Pointer(pTmp)).FnSize = func() int32 { if (sqlite_int64((*tmp_file)(unsafe.Pointer(pTmp)).FnSize)) < (size) { return (*tmp_file)(unsafe.Pointer(pTmp)).FnSize } return int32(size) }() return SQLITE_OK } // Sync a tmp-file. func tmpSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test_onefile.c:316:12: */ return SQLITE_OK } // Return the current file-size of a tmp-file. func tmpFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_onefile.c:323:12: */ var pTmp uintptr = pFile *(*sqlite_int64)(unsafe.Pointer(pSize)) = sqlite_int64((*tmp_file)(unsafe.Pointer(pTmp)).FnSize) return SQLITE_OK } // Lock a tmp-file. func tmpLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_onefile.c:332:12: */ return SQLITE_OK } // Unlock a tmp-file. func tmpUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_onefile.c:339:12: */ return SQLITE_OK } // Check if another file-handle holds a RESERVED lock on a tmp-file. func tmpCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_onefile.c:346:12: */ *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } // File control method. For custom operations on a tmp-file. func tmpFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_onefile.c:354:12: */ return SQLITE_OK } // Return the sector-size in bytes for a tmp-file. func tmpSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_onefile.c:361:12: */ return 0 } // Return the device characteristic flags supported by a tmp-file. func tmpDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_onefile.c:368:12: */ return 0 } // Close an fs-file. func fsClose1(tls *libc.TLS, pFile uintptr) int32 { /* test_onefile.c:375:12: */ var rc int32 = SQLITE_OK var p uintptr = pFile var pReal uintptr = (*fs_file)(unsafe.Pointer(p)).FpReal // Decrement the real_file ref-count. (*fs_real_file)(unsafe.Pointer(pReal)).FnRef-- // When the ref-count reaches 0, destroy the structure if (*fs_real_file)(unsafe.Pointer(pReal)).FnRef == 0 { *(*uintptr)(unsafe.Pointer((*fs_real_file)(unsafe.Pointer(pReal)).FppThis)) = (*fs_real_file)(unsafe.Pointer(pReal)).FpNext if (*fs_real_file)(unsafe.Pointer(pReal)).FpNext != 0 { (*fs_real_file)(unsafe.Pointer((*fs_real_file)(unsafe.Pointer(pReal)).FpNext)).FppThis = (*fs_real_file)(unsafe.Pointer(pReal)).FppThis } rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*fs_real_file)(unsafe.Pointer(pReal)).FpFile)).FpMethods + 8 /* &.xClose */))))(tls, (*fs_real_file)(unsafe.Pointer(pReal)).FpFile) sqlite3.Xsqlite3_free(tls, pReal) } return rc } // Read data from an fs-file. func fsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_onefile.c:400:12: */ var rc int32 = SQLITE_OK var p uintptr = pFile var pReal uintptr = (*fs_file)(unsafe.Pointer(p)).FpReal var pF uintptr = (*fs_real_file)(unsafe.Pointer(pReal)).FpFile if (((*fs_file)(unsafe.Pointer(p)).FeType == DATABASE_FILE) && ((sqlite_int64(iAmt) + iOfst) > sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase))) || (((*fs_file)(unsafe.Pointer(p)).FeType == JOURNAL_FILE) && ((sqlite_int64(iAmt) + iOfst) > sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnJournal))) { rc = (SQLITE_IOERR | (int32(2) << 8)) } else if (*fs_file)(unsafe.Pointer(p)).FeType == DATABASE_FILE { rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 16 /* &.xRead */))))(tls, pF, zBuf, iAmt, (iOfst + int64(BLOCKSIZE))) } else { // Journal file. var iRem int32 = iAmt var iBuf int32 = 0 var ii int32 = int32(iOfst) for (iRem > 0) && (rc == SQLITE_OK) { var iRealOff int32 = (((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - (BLOCKSIZE * ((ii / BLOCKSIZE) + 1))) + (ii % BLOCKSIZE)) var iRealAmt int32 = func() int32 { if (iRem) < (BLOCKSIZE - (iRealOff % BLOCKSIZE)) { return iRem } return (BLOCKSIZE - (iRealOff % BLOCKSIZE)) }() rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 16 /* &.xRead */))))(tls, pF, ((zBuf) + uintptr(iBuf)), iRealAmt, int64(iRealOff)) ii = ii + (iRealAmt) iBuf = iBuf + (iRealAmt) iRem = iRem - (iRealAmt) } } return rc } // Write data to an fs-file. func fsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_onefile.c:439:12: */ var rc int32 = SQLITE_OK var p uintptr = pFile var pReal uintptr = (*fs_file)(unsafe.Pointer(p)).FpReal var pF uintptr = (*fs_real_file)(unsafe.Pointer(pReal)).FpFile if (*fs_file)(unsafe.Pointer(p)).FeType == DATABASE_FILE { if ((sqlite_int64(iAmt) + iOfst) + int64(BLOCKSIZE)) > (sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal)) { rc = SQLITE_FULL } else { rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 24 /* &.xWrite */))))(tls, pF, zBuf, iAmt, (iOfst + int64(BLOCKSIZE))) if rc == SQLITE_OK { (*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase = func() int32 { if (sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase)) > (sqlite_int64(iAmt) + iOfst) { return (*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase } return (int32(sqlite_int64(iAmt) + iOfst)) }() } } } else { // Journal file. var iRem int32 = iAmt var iBuf int32 = 0 var ii int32 = int32(iOfst) for (iRem > 0) && (rc == SQLITE_OK) { var iRealOff int32 = (((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - (BLOCKSIZE * ((ii / BLOCKSIZE) + 1))) + (ii % BLOCKSIZE)) var iRealAmt int32 = func() int32 { if (iRem) < (BLOCKSIZE - (iRealOff % BLOCKSIZE)) { return iRem } return (BLOCKSIZE - (iRealOff % BLOCKSIZE)) }() if iRealOff < ((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase + BLOCKSIZE) { rc = SQLITE_FULL } else { rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 24 /* &.xWrite */))))(tls, pF, ((zBuf) + uintptr(iBuf)), iRealAmt, int64(iRealOff)) ii = ii + (iRealAmt) iBuf = iBuf + (iRealAmt) iRem = iRem - (iRealAmt) } } if rc == SQLITE_OK { (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal = func() int32 { if (sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnJournal)) > (sqlite_int64(iAmt) + iOfst) { return (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal } return (int32(sqlite_int64(iAmt) + iOfst)) }() } } return rc } // Truncate an fs-file. func fsTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_onefile.c:488:12: */ var p uintptr = pFile var pReal uintptr = (*fs_file)(unsafe.Pointer(p)).FpReal if (*fs_file)(unsafe.Pointer(p)).FeType == DATABASE_FILE { (*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase = func() int32 { if (sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase)) < (size) { return (*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase } return int32(size) }() } else { (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal = func() int32 { if (sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnJournal)) < (size) { return (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal } return int32(size) }() } return SQLITE_OK } // Sync an fs-file. func fsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test_onefile.c:502:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pFile var pReal uintptr = (*fs_file)(unsafe.Pointer(p)).FpReal var pRealFile uintptr = (*fs_real_file)(unsafe.Pointer(pReal)).FpFile var rc int32 = SQLITE_OK if (*fs_file)(unsafe.Pointer(p)).FeType == DATABASE_FILE { // var zSize [4]uint8 at bp, 4 *(*uint8)(unsafe.Pointer(bp /* &zSize[0] */)) = (uint8((uint32((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase) & 0xFF000000) >> 24)) *(*uint8)(unsafe.Pointer(bp /* &zSize[0] */ + 1)) = (uint8(((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase & 0x00FF0000) >> 16)) *(*uint8)(unsafe.Pointer(bp /* &zSize[0] */ + 2)) = (uint8(((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase & 0x0000FF00) >> 8)) *(*uint8)(unsafe.Pointer(bp /* &zSize[0] */ + 3)) = (uint8((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase & 0x000000FF)) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 24 /* &.xWrite */))))(tls, pRealFile, bp /* &zSize[0] */, 4, int64(0)) } if rc == SQLITE_OK { rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 40 /* &.xSync */))))(tls, pRealFile, (flags & (libc.CplInt32(SQLITE_SYNC_DATAONLY)))) } return rc } // Return the current file-size of an fs-file. func fsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_onefile.c:526:12: */ var p uintptr = pFile var pReal uintptr = (*fs_file)(unsafe.Pointer(p)).FpReal if (*fs_file)(unsafe.Pointer(p)).FeType == DATABASE_FILE { *(*sqlite_int64)(unsafe.Pointer(pSize)) = sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase) } else { *(*sqlite_int64)(unsafe.Pointer(pSize)) = sqlite_int64((*fs_real_file)(unsafe.Pointer(pReal)).FnJournal) } return SQLITE_OK } // Lock an fs-file. func fsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_onefile.c:540:12: */ return SQLITE_OK } // Unlock an fs-file. func fsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_onefile.c:547:12: */ return SQLITE_OK } // Check if another file-handle holds a RESERVED lock on an fs-file. func fsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_onefile.c:554:12: */ *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } // File control method. For custom operations on an fs-file. func fsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_onefile.c:562:12: */ if op == SQLITE_FCNTL_PRAGMA { return SQLITE_NOTFOUND } return SQLITE_OK } // Return the sector-size in bytes for an fs-file. func fsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_onefile.c:570:12: */ return BLOCKSIZE } // Return the device characteristic flags supported by an fs-file. func fsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_onefile.c:577:12: */ return 0 } // Open an fs file handle. func fsOpen1(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_onefile.c:584:12: */ bp := tls.Alloc(12) defer tls.Free(12) var pFsVfs uintptr var p uintptr var pReal uintptr var eType int32 var nName int32 var rc int32 var p2 uintptr // var zS [4]uint8 at bp+8, 4 var real_flags int32 // var size sqlite3_int64 at bp, 8 var pRealFile uintptr var pParent uintptr pFsVfs = pVfs p = pFile pReal = uintptr(0) rc = SQLITE_OK if !(0 == (flags & (SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_MAIN_JOURNAL))) { goto __1 } p2 = pFile libc.Xmemset(tls, p2, 0, uint64(unsafe.Sizeof(tmp_file{}))) (*tmp_file)(unsafe.Pointer(p2)).Fbase.FpMethods = uintptr(unsafe.Pointer(&tmp_io_methods)) return SQLITE_OK __1: ; eType = func() int32 { if (flags & (SQLITE_OPEN_MAIN_DB)) != 0 { return DATABASE_FILE } return JOURNAL_FILE }() (*fs_file)(unsafe.Pointer(p)).Fbase.FpMethods = uintptr(unsafe.Pointer(&fs_io_methods)) (*fs_file)(unsafe.Pointer(p)).FeType = eType nName = (int32(libc.Xstrlen(tls, zName)) - (func() int32 { if eType == JOURNAL_FILE { return 8 } return 0 }())) pReal = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpFileList __2: if !((pReal != 0) && (libc.Xstrncmp(tls, (*fs_real_file)(unsafe.Pointer(pReal)).FzName, zName, uint64(nName)) != 0)) { goto __4 } goto __3 __3: pReal = (*fs_real_file)(unsafe.Pointer(pReal)).FpNext goto __2 goto __4 __4: ; if !(!(pReal != 0)) { goto __5 } real_flags = ((flags & libc.CplInt32(SQLITE_OPEN_MAIN_DB)) | SQLITE_OPEN_TEMP_DB) pParent = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpParent pReal = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(fs_real_file{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)))) if !(!(pReal != 0)) { goto __6 } rc = SQLITE_NOMEM goto open_out __6: ; libc.Xmemset(tls, pReal, 0, (uint64(unsafe.Sizeof(fs_real_file{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile))) (*fs_real_file)(unsafe.Pointer(pReal)).FzName = zName (*fs_real_file)(unsafe.Pointer(pReal)).FpFile = (pReal + 1*48) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 40 /* &.xOpen */))))(tls, pParent, zName, (*fs_real_file)(unsafe.Pointer(pReal)).FpFile, real_flags, pOutFlags) if !(rc != SQLITE_OK) { goto __7 } goto open_out __7: ; pRealFile = (*fs_real_file)(unsafe.Pointer(pReal)).FpFile rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 48 /* &.xFileSize */))))(tls, pRealFile, bp /* &size */) if !(rc != SQLITE_OK) { goto __8 } goto open_out __8: ; if !(*(*sqlite3_int64)(unsafe.Pointer(bp /* size */)) == int64(0)) { goto __9 } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 24 /* &.xWrite */))))(tls, pRealFile, ts+34529 /* "\x00" */, 1, (int64(BLOBSIZE - 1))) (*fs_real_file)(unsafe.Pointer(pReal)).FnBlob = BLOBSIZE goto __10 __9: (*fs_real_file)(unsafe.Pointer(pReal)).FnBlob = int32(*(*sqlite3_int64)(unsafe.Pointer(bp /* size */))) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 16 /* &.xRead */))))(tls, pRealFile, bp+8 /* &zS[0] */, 4, int64(0)) (*fs_real_file)(unsafe.Pointer(pReal)).FnDatabase = ((((int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */))) << 24) + (int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */ + 1))) << 16)) + (int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */ + 2))) << 8)) + int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */ + 3)))) if !(rc == SQLITE_OK) { goto __11 } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 16 /* &.xRead */))))(tls, pRealFile, bp+8 /* &zS[0] */, 4, (int64((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - 4))) if !((((*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */)) != 0) || (*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */ + 1)) != 0)) || (*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */ + 2)) != 0)) || (*(*uint8)(unsafe.Pointer(bp + 8 /* &zS[0] */ + 3)) != 0)) { goto __12 } (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal = (*fs_real_file)(unsafe.Pointer(pReal)).FnBlob __12: ; __11: ; __10: ; if !(rc == SQLITE_OK) { goto __13 } (*fs_real_file)(unsafe.Pointer(pReal)).FpNext = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpFileList if !((*fs_real_file)(unsafe.Pointer(pReal)).FpNext != 0) { goto __14 } (*fs_real_file)(unsafe.Pointer((*fs_real_file)(unsafe.Pointer(pReal)).FpNext)).FppThis = (pReal + 32 /* &.pNext */) __14: ; (*fs_real_file)(unsafe.Pointer(pReal)).FppThis = (pFsVfs + 168 /* &.pFileList */) (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpFileList = pReal __13: ; __5: ; open_out: if !(pReal != 0) { goto __15 } if !(rc == SQLITE_OK) { goto __16 } (*fs_file)(unsafe.Pointer(p)).FpReal = pReal (*fs_real_file)(unsafe.Pointer(pReal)).FnRef++ goto __17 __16: if !((*sqlite3_file)(unsafe.Pointer((*fs_real_file)(unsafe.Pointer(pReal)).FpFile)).FpMethods != 0) { goto __18 } (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*fs_real_file)(unsafe.Pointer(pReal)).FpFile)).FpMethods + 8 /* &.xClose */))))(tls, (*fs_real_file)(unsafe.Pointer(pReal)).FpFile) __18: ; sqlite3.Xsqlite3_free(tls, pReal) __17: ; __15: ; return rc } // Delete the file located at zPath. If the dirSync argument is true, // ensure the file-system modifications are synced to disk before // returning. func fsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_onefile.c:686:12: */ var rc int32 = SQLITE_OK var pFsVfs uintptr = pVfs var pReal uintptr var pF uintptr var nName int32 = (int32(libc.Xstrlen(tls, zPath)) - 8) pReal = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpFileList for ; (pReal != 0) && (libc.Xstrncmp(tls, (*fs_real_file)(unsafe.Pointer(pReal)).FzName, zPath, uint64(nName)) != 0); pReal = (*fs_real_file)(unsafe.Pointer(pReal)).FpNext { } if pReal != 0 { pF = (*fs_real_file)(unsafe.Pointer(pReal)).FpFile rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 24 /* &.xWrite */))))(tls, pF, ts+34531 /* "\x00\x00\x00\x00" */, 4, (int64((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - BLOCKSIZE))) if rc == SQLITE_OK { (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal = 0 } } return rc } // Test for access permissions. Return true if the requested permission // is available, or false otherwise. func fsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_onefile.c:712:12: */ var pFsVfs uintptr = pVfs var pReal uintptr var isJournal int32 = 0 var nName int32 = int32(libc.Xstrlen(tls, zPath)) if flags != SQLITE_ACCESS_EXISTS { var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 56 /* &.xAccess */))))(tls, pParent, zPath, flags, pResOut) } if (nName > 8) && (libc.Xstrcmp(tls, ts+31890 /* "-journal" */, (zPath+uintptr((nName-8)))) == 0) { nName = nName - (8) isJournal = 1 } pReal = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpFileList for ; (pReal != 0) && (libc.Xstrncmp(tls, (*fs_real_file)(unsafe.Pointer(pReal)).FzName, zPath, uint64(nName)) != 0); pReal = (*fs_real_file)(unsafe.Pointer(pReal)).FpNext { } *(*int32)(unsafe.Pointer(pResOut)) = (libc.Bool32((pReal != 0) && (!(isJournal != 0) || ((*fs_real_file)(unsafe.Pointer(pReal)).FnJournal > 0)))) return SQLITE_OK } // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (FS_MAX_PATHNAME+1) bytes. func fsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* test_onefile.c:746:12: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 64 /* &.xFullPathname */))))(tls, pParent, zPath, nOut, zOut) } // Open the dynamic library located at zPath and return a handle. func fsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_onefile.c:759:13: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pParent + 72 /* &.xDlOpen */))))(tls, pParent, zPath) } // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. func fsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_onefile.c:769:13: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pParent + 80 /* &.xDlError */))))(tls, pParent, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. func fsDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* test_onefile.c:777:13: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pParent + 88 /* &.xDlSym */))))(tls, pParent, pH, zSym) } // Close the dynamic library handle pHandle. func fsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_onefile.c:785:13: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pParent + 96 /* &.xDlClose */))))(tls, pParent, pHandle) } // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. func fsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test_onefile.c:794:12: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 104 /* &.xRandomness */))))(tls, pParent, nByte, zBufOut) } // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. func fsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* test_onefile.c:803:12: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pParent + 112 /* &.xSleep */))))(tls, pParent, nMicro) } // Return the current time as a Julian Day number in *pTimeOut. func fsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* test_onefile.c:811:12: */ var pParent uintptr = (*fs_vfs_t)(unsafe.Pointer(pVfs)).FpParent return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pParent + 120 /* &.xCurrentTime */))))(tls, pParent, pTimeOut) } // This procedure registers the fs vfs with SQLite. If the argument is // true, the fs vfs becomes the new default vfs. It is the only publicly // available function in this file. func fs_register(tls *libc.TLS) int32 { /* test_onefile.c:821:5: */ if fs_vfs.FpParent != 0 { return SQLITE_OK } fs_vfs.FpParent = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) fs_vfs.Fbase.FmxPathname = (*sqlite3_vfs)(unsafe.Pointer(fs_vfs.FpParent)).FmxPathname fs_vfs.Fbase.FszOsFile = func() int32 { if (uint64(unsafe.Sizeof(tmp_file{}))) > (uint64(unsafe.Sizeof(fs_file{}))) { return int32(unsafe.Sizeof(tmp_file{})) } return int32(unsafe.Sizeof(fs_file{})) }() return sqlite3.Xsqlite3_vfs_register(tls, (uintptr(unsafe.Pointer(&fs_vfs)) /* &.base */), 0) } func SqlitetestOnefile_Init(tls *libc.TLS) int32 { /* test_onefile.c:830:7: */ return fs_register(tls) } // Static assertion. Requires support in the compiler. // Maximum pathname length supported by the vfslog backend. type VfslogVfs1 = struct { Fbase sqlite3_vfs FpVfs uintptr FiNextFileId int32 _ [4]byte FpLog uintptr FiOffset sqlite3_int64 FnBuf int32 FaBuf [8192]int8 _ [4]byte } /* test_osinst.c:117:9 */ // Static assertion. Requires support in the compiler. // Maximum pathname length supported by the vfslog backend. type VfslogVfs = VfslogVfs1 /* test_osinst.c:117:26 */ type VfslogFile1 = struct { Fbase sqlite3_file FpReal uintptr FpVfslog uintptr FiFileId int32 _ [4]byte } /* test_osinst.c:118:9 */ type VfslogFile = VfslogFile1 /* test_osinst.c:118:27 */ var vfslog_vfs = sqlite3_vfs{ FiVersion: 1, // iVersion FszOsFile: int32(unsafe.Sizeof(VfslogFile{})), // szOsFile FmxPathname: INST_MAX_PATHNAME, // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xCurrentTime } /* test_osinst.c:180:20 */ var vfslog_io_methods = sqlite3_io_methods{ FiVersion: 2, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap } /* test_osinst.c:202:27 */ func vfslog_time(tls *libc.TLS) sqlite3_uint64 { /* test_osinst.c:231:23: */ bp := tls.Alloc(8) defer tls.Free(8) // var ft FILETIME at bp, 8 var u64time sqlite3_uint64 = uint64(0) libc.XGetSystemTimeAsFileTime(tls, bp /* &ft */) u64time = u64time | (sqlite3_uint64((*FILETIME)(unsafe.Pointer(bp /* &ft */)).FdwHighDateTime)) u64time <<= 32 u64time = u64time | (sqlite3_uint64((*FILETIME)(unsafe.Pointer(bp /* &ft */)).FdwLowDateTime)) // ft is 100-nanosecond intervals, we want microseconds return (u64time / uint64(10)) } // Close an vfslog-file. func vfslogClose(tls *libc.TLS, pFile uintptr) int32 { /* test_osinst.c:256:12: */ var t sqlite3_uint64 var rc int32 = SQLITE_OK var p uintptr = pFile t = vfslog_time(tls) if (*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods != 0 { rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 8 /* &.xClose */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal) } t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_CLOSE, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } // Read data from an vfslog-file. func vfslogRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_osinst.c:273:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 16 /* &.xRead */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_READ, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, iAmt, int32(iOfst)) return rc } // Write data to an vfslog-file. func vfslogWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_osinst.c:292:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 24 /* &.xWrite */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, z, iAmt, iOfst) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_WRITE, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, iAmt, int32(iOfst)) return rc } // Truncate an vfslog-file. func vfslogTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_osinst.c:311:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 32 /* &.xTruncate */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, size) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_TRUNCATE, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, int32(size)) return rc } // Sync an vfslog-file. func vfslogSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test_osinst.c:325:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 40 /* &.xSync */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, flags) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_SYNC, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, flags, 0) return rc } // Return the current file-size of an vfslog-file. func vfslogFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_osinst.c:339:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 48 /* &.xFileSize */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, pSize) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_FILESIZE, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, int32(*(*sqlite_int64)(unsafe.Pointer(pSize)))) return rc } // Lock an vfslog-file. func vfslogLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_osinst.c:353:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 56 /* &.xLock */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, eLock) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_LOCK, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, eLock, 0) return rc } // Unlock an vfslog-file. func vfslogUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_osinst.c:367:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 64 /* &.xUnlock */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, eLock) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_UNLOCK, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, eLock, 0) return rc } // Check if another file-handle holds a RESERVED lock on an vfslog-file. func vfslogCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_osinst.c:381:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, pResOut) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_CHECKRESERVEDLOCK, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, *(*int32)(unsafe.Pointer(pResOut)), 0) return rc } // File control method. For custom operations on an vfslog-file. func vfslogFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_osinst.c:395:12: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = pFile var rc int32 = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 80 /* &.xFileControl */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, op, pArg) if (op == SQLITE_FCNTL_VFSNAME) && (rc == SQLITE_OK) { *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+34536 /* "vfslog/%z" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) } return rc } // Return the sector-size in bytes for an vfslog-file. func vfslogSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_osinst.c:407:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 88 /* &.xSectorSize */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_SECTORSIZE, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } // Return the device characteristic flags supported by an vfslog-file. func vfslogDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_osinst.c:421:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_DEVCHAR, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } func vfslogShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test_osinst.c:432:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 112 /* &.xShmLock */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, ofst, n, flags) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_SHMLOCK, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } func vfslogShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* test_osinst.c:442:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp)) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_SHMMAP, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } func vfslogShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_osinst.c:458:13: */ var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 120 /* &.xShmBarrier */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_SHMBARRIER, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), SQLITE_OK, 0, 0) } func vfslogShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_osinst.c:466:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, deleteFlag) t = (vfslog_time(tls) - t) vfslog_call(tls, (*VfslogFile)(unsafe.Pointer(p)).FpVfslog, OS_SHMUNMAP, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) return rc } // Open an vfslog file handle. func vfslogOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_osinst.c:481:12: */ var rc int32 var t sqlite3_uint64 var p uintptr = pFile var pLog uintptr = pVfs (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&vfslog_io_methods)) (*VfslogFile)(unsafe.Pointer(p)).FpReal = (p + 1*32) (*VfslogFile)(unsafe.Pointer(p)).FpVfslog = pVfs (*VfslogFile)(unsafe.Pointer(p)).FiFileId = libc.PreIncInt32(&(*VfslogVfs)(unsafe.Pointer(pLog)).FiNextFileId, 1) t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 40 /* &.xOpen */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, zName, (*VfslogFile)(unsafe.Pointer(p)).FpReal, flags, pOutFlags) t = (vfslog_time(tls) - t) vfslog_call(tls, pVfs, OS_OPEN, (*VfslogFile)(unsafe.Pointer(p)).FiFileId, int64(t), rc, 0, 0) vfslog_string(tls, pVfs, zName) return rc } // Delete the file located at zPath. If the dirSync argument is true, // ensure the file-system modifications are synced to disk before // returning. func vfslogDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_osinst.c:512:12: */ var rc int32 var t sqlite3_uint64 t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 48 /* &.xDelete */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, zPath, dirSync) t = (vfslog_time(tls) - t) vfslog_call(tls, pVfs, OS_DELETE, 0, int64(t), rc, dirSync, 0) vfslog_string(tls, pVfs, zPath) return rc } // Test for access permissions. Return true if the requested permission // is available, or false otherwise. func vfslogAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_osinst.c:527:12: */ var rc int32 var t sqlite3_uint64 t = vfslog_time(tls) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 56 /* &.xAccess */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, zPath, flags, pResOut) t = (vfslog_time(tls) - t) vfslog_call(tls, pVfs, OS_ACCESS, 0, int64(t), rc, flags, *(*int32)(unsafe.Pointer(pResOut))) vfslog_string(tls, pVfs, zPath) return rc } // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. func vfslogFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* test_osinst.c:548:12: */ return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 64 /* &.xFullPathname */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, zPath, nOut, zOut) } // Open the dynamic library located at zPath and return a handle. func vfslogDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_osinst.c:560:13: */ return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 72 /* &.xDlOpen */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, zPath) } // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. func vfslogDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_osinst.c:569:13: */ (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 80 /* &.xDlError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. func vfslogDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* test_osinst.c:576:13: */ return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 88 /* &.xDlSym */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p, zSym) } // Close the dynamic library handle pHandle. func vfslogDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* test_osinst.c:583:13: */ (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 96 /* &.xDlClose */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, pHandle) } // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. func vfslogRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test_osinst.c:591:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 104 /* &.xRandomness */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, nByte, zBufOut) } // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. func vfslogSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* test_osinst.c:599:12: */ return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 112 /* &.xSleep */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, nMicro) } // Return the current time as a Julian Day number in *pTimeOut. func vfslogCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* test_osinst.c:606:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 120 /* &.xCurrentTime */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, pTimeOut) } func vfslogGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* test_osinst.c:610:12: */ return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 128 /* &.xGetLastError */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, a, b) } func vfslogCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* test_osinst.c:613:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, (*VfslogVfs)(unsafe.Pointer(pVfs)).FpVfs, p) } func vfslog_flush(tls *libc.TLS, p uintptr) { /* test_osinst.c:617:13: */ var pending int32 = libc.AtomicLoadInt32(&sqlite3.Xsqlite3_io_error_pending) var persist int32 = sqlite3.Xsqlite3_io_error_persist var diskfull int32 = sqlite3.Xsqlite3_diskfull_pending libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(0)) sqlite3.Xsqlite3_io_error_persist = 0 sqlite3.Xsqlite3_diskfull_pending = 0 if (*VfslogVfs)(unsafe.Pointer(p)).FnBuf != 0 { (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVfs)(unsafe.Pointer(p)).FpLog)).FpMethods + 24 /* &.xWrite */))))(tls, (*VfslogVfs)(unsafe.Pointer(p)).FpLog, p+204 /* &.aBuf */, (*VfslogVfs)(unsafe.Pointer(p)).FnBuf, (*VfslogVfs)(unsafe.Pointer(p)).FiOffset) *(*sqlite3_int64)(unsafe.Pointer(p + 192 /* &.iOffset */)) += (sqlite3_int64((*VfslogVfs)(unsafe.Pointer(p)).FnBuf)) (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 0 } libc.AtomicStoreInt32(&sqlite3.Xsqlite3_io_error_pending, int32(pending)) sqlite3.Xsqlite3_io_error_persist = persist sqlite3.Xsqlite3_diskfull_pending = diskfull } func put32bits(tls *libc.TLS, p uintptr, v uint32) { /* test_osinst.c:645:13: */ *(*uint8)(unsafe.Pointer(p)) = (uint8(v >> 24)) *(*uint8)(unsafe.Pointer(p + 1)) = (uint8(v >> 16)) *(*uint8)(unsafe.Pointer(p + 2)) = (uint8(v >> 8)) *(*uint8)(unsafe.Pointer(p + 3)) = uint8(v) } func vfslog_call(tls *libc.TLS, pVfs uintptr, eEvent int32, iFileid int32, nClick sqlite3_int64, return_code int32, size int32, offset int32) { /* test_osinst.c:652:13: */ var p uintptr = pVfs var zRec uintptr if (uint64(24 + (*VfslogVfs)(unsafe.Pointer(p)).FnBuf)) > uint64(unsafe.Sizeof([8192]int8{})) { vfslog_flush(tls, p) } zRec = ((p + 204 /* &.aBuf */) + uintptr((*VfslogVfs)(unsafe.Pointer(p)).FnBuf)) put32bits(tls, (zRec), uint32(eEvent)) put32bits(tls, (zRec + 4), uint32(iFileid)) put32bits(tls, (zRec + 8), (uint32(nClick & int64(0xffff)))) put32bits(tls, (zRec + 12), uint32(return_code)) put32bits(tls, (zRec + 16), uint32(size)) put32bits(tls, (zRec + 20), uint32(offset)) *(*int32)(unsafe.Pointer(p + 200 /* &.nBuf */)) += (24) } func vfslog_string(tls *libc.TLS, pVfs uintptr, zStr uintptr) { /* test_osinst.c:676:13: */ var p uintptr = pVfs var zRec uintptr var nStr int32 if zStr != 0 { nStr = int32(libc.Xstrlen(tls, zStr)) } else { nStr = 0 } if (uint64((4 + nStr) + (*VfslogVfs)(unsafe.Pointer(p)).FnBuf)) > uint64(unsafe.Sizeof([8192]int8{})) { vfslog_flush(tls, p) } zRec = ((p + 204 /* &.aBuf */) + uintptr((*VfslogVfs)(unsafe.Pointer(p)).FnBuf)) put32bits(tls, (zRec), uint32(nStr)) if zStr != 0 { libc.Xmemcpy(tls, (zRec + 4), zStr, uint64(nStr)) } *(*int32)(unsafe.Pointer(p + 200 /* &.nBuf */)) += (4 + nStr) } func vfslog_finalize(tls *libc.TLS, p uintptr) { /* test_osinst.c:691:13: */ if (*sqlite3_file)(unsafe.Pointer((*VfslogVfs)(unsafe.Pointer(p)).FpLog)).FpMethods != 0 { vfslog_flush(tls, p) (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVfs)(unsafe.Pointer(p)).FpLog)).FpMethods + 8 /* &.xClose */))))(tls, (*VfslogVfs)(unsafe.Pointer(p)).FpLog) } sqlite3.Xsqlite3_free(tls, p) } func sqlite3_vfslog_finalize(tls *libc.TLS, zVfs uintptr) int32 { /* test_osinst.c:699:5: */ var pVfs uintptr pVfs = sqlite3.Xsqlite3_vfs_find(tls, zVfs) if !(pVfs != 0) || ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen != *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 }{vfslogOpen}))) { return SQLITE_ERROR } sqlite3.Xsqlite3_vfs_unregister(tls, pVfs) vfslog_finalize(tls, pVfs) return SQLITE_OK } func sqlite3_vfslog_new(tls *libc.TLS, zVfs uintptr, zParentVfs uintptr, zLog uintptr) int32 { /* test_osinst.c:710:5: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr var pParent uintptr var nByte int32 // var flags int32 at bp, 4 var rc int32 var zFile uintptr var nVfs int32 pParent = sqlite3.Xsqlite3_vfs_find(tls, zParentVfs) if !(pParent != 0) { return SQLITE_ERROR } nVfs = int32(libc.Xstrlen(tls, zVfs)) nByte = (int32(((((uint64(unsafe.Sizeof(VfslogVfs{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)) + uint64(nVfs)) + uint64(1)) + uint64((*sqlite3_vfs)(unsafe.Pointer(pParent)).FmxPathname)) + uint64(1))) p = sqlite3.Xsqlite3_malloc(tls, nByte) libc.Xmemset(tls, p, 0, uint64(nByte)) (*VfslogVfs)(unsafe.Pointer(p)).FpVfs = pParent (*VfslogVfs)(unsafe.Pointer(p)).FpLog = (p + 1*8400) libc.Xmemcpy(tls, (p /* &.base */), uintptr(unsafe.Pointer(&vfslog_vfs)), uint64(unsafe.Sizeof(sqlite3_vfs{}))) (*VfslogVfs)(unsafe.Pointer(p)).Fbase.FzName = (((*VfslogVfs)(unsafe.Pointer(p)).FpLog) + uintptr((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)) *(*int32)(unsafe.Pointer(p /* &.base */ + 4 /* &.szOsFile */)) += ((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile) libc.Xmemcpy(tls, (*VfslogVfs)(unsafe.Pointer(p)).Fbase.FzName, zVfs, uint64(nVfs)) zFile = ((*VfslogVfs)(unsafe.Pointer(p)).Fbase.FzName + uintptr((nVfs + 1))) (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 64 /* &.xFullPathname */))))(tls, pParent, zLog, (*sqlite3_vfs)(unsafe.Pointer(pParent)).FmxPathname, zFile) *(*int32)(unsafe.Pointer(bp /* flags */)) = ((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_SUPER_JOURNAL) (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pParent + 48 /* &.xDelete */))))(tls, pParent, zFile, 0) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 40 /* &.xOpen */))))(tls, pParent, zFile, (*VfslogVfs)(unsafe.Pointer(p)).FpLog, *(*int32)(unsafe.Pointer(bp /* flags */)), bp /* &flags */) if rc == SQLITE_OK { libc.Xmemcpy(tls, p+204 /* &.aBuf */, ts+34546 /* "sqlite_ostrace1...." */, uint64(20)) (*VfslogVfs)(unsafe.Pointer(p)).FiOffset = int64(0) (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 20 rc = sqlite3.Xsqlite3_vfs_register(tls, p, 1) } if rc != 0 { vfslog_finalize(tls, p) } return rc } func sqlite3_vfslog_annotate(tls *libc.TLS, zVfs uintptr, zMsg uintptr) int32 { /* test_osinst.c:758:5: */ var pVfs uintptr pVfs = sqlite3.Xsqlite3_vfs_find(tls, zVfs) if !(pVfs != 0) || ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen != *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 }{vfslogOpen}))) { return SQLITE_ERROR } vfslog_call(tls, pVfs, OS_ANNOTATE, 0, int64(0), 0, 0, 0) vfslog_string(tls, pVfs, zMsg) return SQLITE_OK } func vfslog_eventname(tls *libc.TLS, eEvent int32) uintptr { /* test_osinst.c:769:19: */ var zEvent uintptr = uintptr(0) switch eEvent { case OS_CLOSE: zEvent = ts + 34567 /* "xClose" */ break case OS_READ: zEvent = ts + 34574 /* "xRead" */ break case OS_WRITE: zEvent = ts + 34580 /* "xWrite" */ break case OS_TRUNCATE: zEvent = ts + 34587 /* "xTruncate" */ break case OS_SYNC: zEvent = ts + 27020 /* "xSync" */ break case OS_FILESIZE: zEvent = ts + 34597 /* "xFilesize" */ break case OS_LOCK: zEvent = ts + 34607 /* "xLock" */ break case OS_UNLOCK: zEvent = ts + 34613 /* "xUnlock" */ break case OS_CHECKRESERVEDLOCK: zEvent = ts + 34621 /* "xCheckResLock" */ break case OS_FILECONTROL: zEvent = ts + 34635 /* "xFileControl" */ break case OS_SECTORSIZE: zEvent = ts + 34648 /* "xSectorSize" */ break case OS_DEVCHAR: zEvent = ts + 34660 /* "xDeviceChar" */ break case OS_OPEN: zEvent = ts + 26592 /* "xOpen" */ break case OS_DELETE: zEvent = ts + 34672 /* "xDelete" */ break case OS_ACCESS: zEvent = ts + 34680 /* "xAccess" */ break case OS_FULLPATHNAME: zEvent = ts + 34688 /* "xFullPathname" */ break case OS_RANDOMNESS: zEvent = ts + 34702 /* "xRandomness" */ break case OS_SLEEP: zEvent = ts + 34714 /* "xSleep" */ break case OS_CURRENTTIME: zEvent = ts + 34721 /* "xCurrentTime" */ break case OS_SHMUNMAP: zEvent = ts + 34734 /* "xShmUnmap" */ break case OS_SHMLOCK: zEvent = ts + 34744 /* "xShmLock" */ break case OS_SHMBARRIER: zEvent = ts + 34753 /* "xShmBarrier" */ break case OS_SHMMAP: zEvent = ts + 34765 /* "xShmMap" */ break case OS_ANNOTATE: zEvent = ts + 34773 /* "annotation" */ break } return zEvent } type VfslogVtab1 = struct { Fbase sqlite3_vtab FpFd uintptr FnByte sqlite3_int64 FzFile uintptr } /* test_osinst.c:804:9 */ type VfslogVtab = VfslogVtab1 /* test_osinst.c:804:27 */ type VfslogCsr1 = struct { Fbase sqlite3_vtab_cursor FiRowid sqlite3_int64 FiOffset sqlite3_int64 FzTransient uintptr FnFile int32 _ [4]byte FazFile uintptr FaBuf [1024]uint8 } /* test_osinst.c:805:9 */ type VfslogCsr = VfslogCsr1 /* test_osinst.c:805:26 */ func get32bits(tls *libc.TLS, p uintptr) uint32 { /* test_osinst.c:830:21: */ return (uint32((((int32(*(*uint8)(unsafe.Pointer(p))) << 24) + (int32(*(*uint8)(unsafe.Pointer(p + 1))) << 16)) + (int32(*(*uint8)(unsafe.Pointer(p + 2))) << 8)) + int32(*(*uint8)(unsafe.Pointer(p + 3))))) } // The argument must point to a buffer containing a nul-terminated string. // If the string begins with an SQL quote character it is overwritten by // the dequoted version. Otherwise the buffer is left unmodified. func dequote(tls *libc.TLS, z uintptr) { /* test_osinst.c:839:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) if (((int32(quote) == '[') || (int32(quote) == '\'')) || (int32(quote) == '"')) || (int32(quote) == '`') { var iIn int32 = 1 // Index of next byte to read from input var iOut int32 = 0 // Index of next byte to write to output if int32(quote) == '[' { quote = int8(']') } for *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { if int32(*(*int8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(quote) { if int32(*(*int8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(quote) { break } *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = quote iIn = iIn + (2) } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1)))) } } *(*int8)(unsafe.Pointer(z + uintptr(iOut))) = int8(0) } } // Connect to or create a vfslog virtual table. func vlogConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_osinst.c:863:12: */ bp := tls.Alloc(20) defer tls.Free(20) var pVfs uintptr // VFS used to read log file // var flags int32 at bp+16, 4 // flags passed to pVfs->xOpen() var p uintptr var rc int32 var nByte int32 var zFile uintptr *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) pVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) nByte = (int32((uint64(unsafe.Sizeof(VfslogVtab{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) + uint64((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname))) p = sqlite3.Xsqlite3_malloc(tls, nByte) if p == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, p, 0, uint64(nByte)) (*VfslogVtab)(unsafe.Pointer(p)).FpFd = (p + 1*48) (*VfslogVtab)(unsafe.Pointer(p)).FzFile = (((*VfslogVtab)(unsafe.Pointer(p)).FpFd) + uintptr((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) zFile = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) if !(zFile != 0) { sqlite3.Xsqlite3_free(tls, p) return SQLITE_NOMEM } dequote(tls, zFile) (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zFile, (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname, (*VfslogVtab)(unsafe.Pointer(p)).FzFile) sqlite3.Xsqlite3_free(tls, zFile) *(*int32)(unsafe.Pointer(bp + 16 /* flags */)) = (SQLITE_OPEN_READWRITE | SQLITE_OPEN_SUPER_JOURNAL) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 40 /* &.xOpen */))))(tls, pVfs, (*VfslogVtab)(unsafe.Pointer(p)).FzFile, (*VfslogVtab)(unsafe.Pointer(p)).FpFd, *(*int32)(unsafe.Pointer(bp + 16 /* flags */)), bp+16 /* &flags */) if rc == SQLITE_OK { (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods + 48 /* &.xFileSize */))))(tls, (*VfslogVtab)(unsafe.Pointer(p)).FpFd, (p + 32 /* &.nByte */)) sqlite3.Xsqlite3_declare_vtab(tls, db, ts+34784 /* "CREATE TABLE xxx..." */) *(*uintptr)(unsafe.Pointer(ppVtab)) = (p /* &.base */) } else { sqlite3.Xsqlite3_free(tls, p) } return rc } // There is no "best-index". This virtual table always does a linear // scan of the binary VFS log file. func vlogBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_osinst.c:916:12: */ (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 10.0 return SQLITE_OK } // Disconnect from or destroy a vfslog virtual table. func vlogDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* test_osinst.c:924:12: */ var p uintptr = pVtab if (*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods != 0 { (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods + 8 /* &.xClose */))))(tls, (*VfslogVtab)(unsafe.Pointer(p)).FpFd) (*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods = uintptr(0) } sqlite3.Xsqlite3_free(tls, p) return SQLITE_OK } // Open a new vfslog cursor. func vlogOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_osinst.c:937:12: */ var pCsr uintptr // Newly allocated cursor object pCsr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(VfslogCsr{}))) if !(pCsr != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(VfslogCsr{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCsr /* &.base */) return SQLITE_OK } // Close a vfslog cursor. func vlogClose(tls *libc.TLS, pCursor uintptr) int32 { /* test_osinst.c:950:12: */ var p uintptr = pCursor var i int32 for i = 0; i < (*VfslogCsr)(unsafe.Pointer(p)).FnFile; i++ { sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*VfslogCsr)(unsafe.Pointer(p)).FazFile + uintptr(i)*8))) } sqlite3.Xsqlite3_free(tls, (*VfslogCsr)(unsafe.Pointer(p)).FazFile) sqlite3.Xsqlite3_free(tls, (*VfslogCsr)(unsafe.Pointer(p)).FzTransient) sqlite3.Xsqlite3_free(tls, p) return SQLITE_OK } // Move a vfslog cursor to the next entry in the file. func vlogNext(tls *libc.TLS, pCursor uintptr) int32 { /* test_osinst.c:965:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pCsr uintptr = pCursor var p uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var rc int32 = SQLITE_OK var nRead int32 sqlite3.Xsqlite3_free(tls, (*VfslogCsr)(unsafe.Pointer(pCsr)).FzTransient) (*VfslogCsr)(unsafe.Pointer(pCsr)).FzTransient = uintptr(0) nRead = 24 if ((*VfslogCsr)(unsafe.Pointer(pCsr)).FiOffset + sqlite3_int64(nRead)) <= (*VfslogVtab)(unsafe.Pointer(p)).FnByte { var eEvent int32 rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods + 16 /* &.xRead */))))(tls, (*VfslogVtab)(unsafe.Pointer(p)).FpFd, pCsr+48 /* &.aBuf */, nRead, (*VfslogCsr)(unsafe.Pointer(pCsr)).FiOffset) eEvent = int32(get32bits(tls, pCsr+48 /* &.aBuf */)) if (rc == SQLITE_OK) && (((eEvent == OS_OPEN) || (eEvent == OS_DELETE)) || (eEvent == OS_ACCESS)) { // var buf [4]int8 at bp, 4 rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods + 16 /* &.xRead */))))(tls, (*VfslogVtab)(unsafe.Pointer(p)).FpFd, bp /* &buf[0] */, 4, ((*VfslogCsr)(unsafe.Pointer(pCsr)).FiOffset + sqlite3_int64(nRead))) nRead = nRead + (4) if rc == SQLITE_OK { var nStr int32 = int32(get32bits(tls, bp /* buf */)) var zStr uintptr = sqlite3.Xsqlite3_malloc(tls, (nStr + 1)) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods + 16 /* &.xRead */))))(tls, (*VfslogVtab)(unsafe.Pointer(p)).FpFd, zStr, nStr, ((*VfslogCsr)(unsafe.Pointer(pCsr)).FiOffset + sqlite3_int64(nRead))) *(*int8)(unsafe.Pointer(zStr + uintptr(nStr))) = int8(0) nRead = nRead + (nStr) if eEvent == OS_OPEN { var iFileid int32 = int32(get32bits(tls, ((pCsr + 48 /* &.aBuf */) + 4))) if iFileid >= (*VfslogCsr)(unsafe.Pointer(pCsr)).FnFile { var nNew int32 = (int32(uint64(unsafe.Sizeof(uintptr(0))) * (uint64(iFileid + 1)))) (*VfslogCsr)(unsafe.Pointer(pCsr)).FazFile = sqlite3.Xsqlite3_realloc(tls, (*VfslogCsr)(unsafe.Pointer(pCsr)).FazFile, nNew) nNew = int32(uint64(nNew) - (uint64(unsafe.Sizeof(uintptr(0))) * uint64((*VfslogCsr)(unsafe.Pointer(pCsr)).FnFile))) libc.Xmemset(tls, ((*VfslogCsr)(unsafe.Pointer(pCsr)).FazFile + uintptr((*VfslogCsr)(unsafe.Pointer(pCsr)).FnFile)*8), 0, uint64(nNew)) (*VfslogCsr)(unsafe.Pointer(pCsr)).FnFile = (iFileid + 1) } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*VfslogCsr)(unsafe.Pointer(pCsr)).FazFile + uintptr(iFileid)*8))) *(*uintptr)(unsafe.Pointer((*VfslogCsr)(unsafe.Pointer(pCsr)).FazFile + uintptr(iFileid)*8)) = zStr } else { (*VfslogCsr)(unsafe.Pointer(pCsr)).FzTransient = zStr } } } } *(*sqlite3_int64)(unsafe.Pointer(pCsr + 8 /* &.iRowid */)) += (int64(1)) *(*sqlite3_int64)(unsafe.Pointer(pCsr + 16 /* &.iOffset */)) += (sqlite3_int64(nRead)) return rc } func vlogEof(tls *libc.TLS, pCursor uintptr) int32 { /* test_osinst.c:1016:12: */ var pCsr uintptr = pCursor var p uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab return (libc.Bool32((*VfslogCsr)(unsafe.Pointer(pCsr)).FiOffset >= (*VfslogVtab)(unsafe.Pointer(p)).FnByte)) } func vlogFilter(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_osinst.c:1022:12: */ var pCsr uintptr = pCursor (*VfslogCsr)(unsafe.Pointer(pCsr)).FiRowid = int64(0) (*VfslogCsr)(unsafe.Pointer(pCsr)).FiOffset = int64(20) return vlogNext(tls, pCursor) } func vlogColumn(tls *libc.TLS, pCursor uintptr, ctx uintptr, i int32) int32 { /* test_osinst.c:1033:12: */ var val uint32 var pCsr uintptr = pCursor val = get32bits(tls, ((pCsr + 48 /* &.aBuf */) + uintptr((4 * i)))) switch i { case 0: { sqlite3.Xsqlite3_result_text(tls, ctx, vfslog_eventname(tls, int32(val)), -1, uintptr(0)) break } case 1: { var zStr uintptr = (*VfslogCsr)(unsafe.Pointer(pCsr)).FzTransient if (val != uint32(0)) && (val < uint32((*VfslogCsr)(unsafe.Pointer(pCsr)).FnFile)) { zStr = *(*uintptr)(unsafe.Pointer((*VfslogCsr)(unsafe.Pointer(pCsr)).FazFile + uintptr(val)*8)) } sqlite3.Xsqlite3_result_text(tls, ctx, zStr, -1, libc.UintptrFromInt32(-1)) break } default: sqlite3.Xsqlite3_result_int(tls, ctx, int32(val)) break } return SQLITE_OK } func vlogRowid(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* test_osinst.c:1065:12: */ var pCsr uintptr = pCursor *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*VfslogCsr)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK } func sqlite3_vfslog_register(tls *libc.TLS, db uintptr) int32 { /* test_osinst.c:1071:5: */ sqlite3.Xsqlite3_create_module(tls, db, ts+34839 /* "vfslog" */, uintptr(unsafe.Pointer(&vfslog_module)), uintptr(0)) return SQLITE_OK } var vfslog_module = sqlite3_module{ // iVersion FxCreate: 0, // xCreate FxConnect: 0, // xConnect FxBestIndex: 0, // xBestIndex FxDisconnect: 0, // xDisconnect FxDestroy: 0, // xDestroy FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_osinst.c:1072:25 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: func test_vfslog(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_osinst.c:1116:26: */ bp := tls.Alloc(176) defer tls.Free(176) var db uintptr // var cmdInfo Tcl_CmdInfo at bp+112, 64 var rc int32 = SQLITE_ERROR // var iSub int32 at bp+104, 4 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32055 /* "SUB-COMMAND ..." */) return TCL_ERROR } if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&strs)), int32(unsafe.Sizeof(uintptr(0))), ts+1875 /* "sub-command" */, 0, bp+104 /* &iSub */) != 0 { return TCL_ERROR } switch uint32(*(*int32)(unsafe.Pointer(bp + 104 /* iSub */))) { case uint32(0) /* VL_ANNOTATE */ : { var zVfs uintptr var zMsg uintptr if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 3, objv, ts+34846 /* "VFS" */) return TCL_ERROR } zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zMsg = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) rc = sqlite3_vfslog_annotate(tls, zVfs, zMsg) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+34850 /* "failed" */, 0)) return TCL_ERROR } break } case uint32(1) /* VL_FINALIZE */ : { var zVfs uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+34846 /* "VFS" */) return TCL_ERROR } zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = sqlite3_vfslog_finalize(tls, zVfs) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+24, ts+34850 /* "failed" */, 0)) return TCL_ERROR } break } case uint32(2) /* VL_NEW */ : { var zVfs uintptr var zParent uintptr var zLog uintptr if objc != 5 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+34857 /* "VFS PARENT LOGFI..." */) return TCL_ERROR } zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) zLog = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) if int32(*(*int8)(unsafe.Pointer(zParent))) == 0 { zParent = uintptr(0) } rc = sqlite3_vfslog_new(tls, zVfs, zParent, zLog) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+48, ts+34850 /* "failed" */, 0)) return TCL_ERROR } break } case uint32(3) /* VL_REGISTER */ : { var zDb uintptr if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+1911 /* "DB" */) return TCL_ERROR } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if tcl.XTcl_GetCommandInfo(tls, interp, zDb, bp+112 /* &cmdInfo */) != 0 { db = (*struct{ Fdb uintptr })(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 112 /* &cmdInfo */)).FobjClientData)).Fdb rc = sqlite3_vfslog_register(tls, db) } if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+72, ts+34876 /* "bad sqlite3 hand..." */, zDb, uintptr(0))) return TCL_ERROR } break } } return TCL_OK } var strs = [5]uintptr{ts + 34897 /* "annotate" */, ts + 34906 /* "finalize" */, ts + 13691 /* "new" */, ts + 34915 /* "register" */, uintptr(0)} /* test_osinst.c:1127:21 */ func SqlitetestOsinst_Init(tls *libc.TLS, interp uintptr) int32 { /* test_osinst.c:1219:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+34839 /* "vfslog" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_vfslog})), uintptr(0), uintptr(0)) return TCL_OK } // Static assertion. Requires support in the compiler. // Global data used by this test implementation. There is no // mutexing, which means this page cache will not work in a // multi-threaded test. type testpcacheGlobalType1 = struct { FpDummy uintptr FnInstance int32 FdiscardChance uint32 FprngSeed uint32 FhighStress uint32 } /* test_pcache.c:33:9 */ // Static assertion. Requires support in the compiler. // Global data used by this test implementation. There is no // mutexing, which means this page cache will not work in a // multi-threaded test. type testpcacheGlobalType = testpcacheGlobalType1 /* test_pcache.c:33:37 */ var testpcacheGlobal testpcacheGlobalType /* test_pcache.c:41:29: */ // Initializer. // // Verify that the initializer is only called when the system is // uninitialized. Allocate some memory and report SQLITE_NOMEM if // the allocation fails. This provides a means to test the recovery // from a failed initialization attempt. It also verifies that the // the destructor always gets call - otherwise there would be a // memory leak. func testpcacheInit(tls *libc.TLS, pArg uintptr) int32 { /* test_pcache.c:53:12: */ testpcacheGlobal.FpDummy = sqlite3.Xsqlite3_malloc(tls, 10) if testpcacheGlobal.FpDummy == uintptr(0) { return SQLITE_NOMEM } return SQLITE_OK } // Destructor // // Verify that this is only called after initialization. // Free the memory allocated by the initializer. func testpcacheShutdown(tls *libc.TLS, pArg uintptr) { /* test_pcache.c:67:13: */ sqlite3.Xsqlite3_free(tls, testpcacheGlobal.FpDummy) testpcacheGlobal.FpDummy = uintptr(0) } // Number of pages in a cache. // // The number of pages is a hard upper bound in this test module. // If more pages are requested, sqlite3PcacheFetch() returns NULL. // // If testing with in-memory temp tables, provide a larger pcache. // Some of the test cases need this. // Magic numbers used to determine validity of the page cache. // Private implementation of a page cache. type testpcache1 = struct { FszPage int32 FszExtra int32 FbPurgeable int32 FnFree int32 FnPinned int32 FiRand uint32 FiMagic uint32 _ [4]byte Fa [217]struct { Fpage sqlite3_pcache_page Fkey uint32 FisPinned int32 } } /* test_pcache.c:100:9 */ // Number of pages in a cache. // // The number of pages is a hard upper bound in this test module. // If more pages are requested, sqlite3PcacheFetch() returns NULL. // // If testing with in-memory temp tables, provide a larger pcache. // Some of the test cases need this. // Magic numbers used to determine validity of the page cache. // Private implementation of a page cache. type testpcache = testpcache1 /* test_pcache.c:100:27 */ type testpcachePage = struct { Fpage sqlite3_pcache_page Fkey uint32 FisPinned int32 } /* test_pcache.c:100:9 */ // Get a random number using the PRNG in the given page cache. func testpcacheRandom(tls *libc.TLS, p uintptr) uint32 { /* test_pcache.c:119:17: */ var x uint32 = uint32(0) var i int32 for i = 0; i < 4; i++ { (*testpcache)(unsafe.Pointer(p)).FiRand = (((*testpcache)(unsafe.Pointer(p)).FiRand * uint32(69069)) + uint32(5)) x = ((x << 8) | (((*testpcache)(unsafe.Pointer(p)).FiRand >> 16) & uint32(0xff))) } return x } // Allocate a new page cache instance. func testpcacheCreate(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* test_pcache.c:133:23: */ var nMem int32 var x uintptr var p uintptr var i int32 szPage = ((szPage + 7) & libc.CplInt32(7)) nMem = (int32(uint64(unsafe.Sizeof(testpcache{})) + (uint64(TESTPCACHE_NPAGE * (szPage + szExtra))))) p = sqlite3.Xsqlite3_malloc(tls, nMem) if p == uintptr(0) { return uintptr(0) } x = (p + 1*5240) (*testpcache)(unsafe.Pointer(p)).FszPage = szPage (*testpcache)(unsafe.Pointer(p)).FszExtra = szExtra (*testpcache)(unsafe.Pointer(p)).FnFree = TESTPCACHE_NPAGE (*testpcache)(unsafe.Pointer(p)).FnPinned = 0 (*testpcache)(unsafe.Pointer(p)).FiRand = testpcacheGlobal.FprngSeed (*testpcache)(unsafe.Pointer(p)).FbPurgeable = bPurgeable (*testpcache)(unsafe.Pointer(p)).FiMagic = uint32(TESTPCACHE_VALID) i = 0 __1: if !(i < TESTPCACHE_NPAGE) { goto __3 } { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).FisPinned = 0 (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fpage.FpBuf = x (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fpage.FpExtra = (x + uintptr(szPage)) } goto __2 __2: i++ x += (uintptr(szPage + szExtra)) goto __1 goto __3 __3: ; testpcacheGlobal.FnInstance++ return p } // Set the cache size func testpcacheCachesize(tls *libc.TLS, pCache uintptr, newSize int32) { /* test_pcache.c:168:13: */ var p uintptr = pCache _ = p } // Return the number of pages in the cache that are being used. // This includes both pinned and unpinned pages. func testpcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* test_pcache.c:179:12: */ var p uintptr = pCache return (TESTPCACHE_NPAGE - (*testpcache)(unsafe.Pointer(p)).FnFree) } // Fetch a page. func testpcacheFetch(tls *libc.TLS, pCache uintptr, key uint32, createFlag int32) uintptr { /* test_pcache.c:190:28: */ var p uintptr = pCache var i int32 var j int32 // See if the page is already in cache. Return immediately if it is for i = 0; i < TESTPCACHE_NPAGE; i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey == key { if !((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned != 0) { (*testpcache)(unsafe.Pointer(p)).FnPinned++ (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).FisPinned = 1 } return ((p + 32 /* &.a */) + uintptr(i)*24 /* &.page */) } } // If createFlag is 0, never allocate a new page if createFlag == 0 { return uintptr(0) } // If no pages are available, always fail if (*testpcache)(unsafe.Pointer(p)).FnPinned == TESTPCACHE_NPAGE { return uintptr(0) } // Do not allocate the last TESTPCACHE_RESERVE pages unless createFlag is 2 if ((*testpcache)(unsafe.Pointer(p)).FnPinned >= (TESTPCACHE_NPAGE - TESTPCACHE_RESERVE)) && (createFlag < 2) { return uintptr(0) } // Do not allocate if highStress is enabled and createFlag is not 2. // // The highStress setting causes pagerStress() to be called much more // often, which exercises the pager logic more intensely. if (testpcacheGlobal.FhighStress != 0) && (createFlag < 2) { return uintptr(0) } // Find a free page to allocate if there are any free pages. // Withhold TESTPCACHE_RESERVE free pages until createFlag is 2. if ((*testpcache)(unsafe.Pointer(p)).FnFree > TESTPCACHE_RESERVE) || ((createFlag == 2) && ((*testpcache)(unsafe.Pointer(p)).FnFree > 0)) { j = (int32(testpcacheRandom(tls, p) % uint32(TESTPCACHE_NPAGE))) i = 0 __1: if !(i < TESTPCACHE_NPAGE) { goto __3 } { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fkey == uint32(0) { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(j)*24)).Fkey = key (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(j)*24)).FisPinned = 1 libc.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpBuf, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszPage)) libc.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpExtra, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszExtra)) (*testpcache)(unsafe.Pointer(p)).FnPinned++ (*testpcache)(unsafe.Pointer(p)).FnFree-- return ((p + 32 /* &.a */) + uintptr(j)*24 /* &.page */) } } goto __2 __2: i++ j = ((j + 1) % TESTPCACHE_NPAGE) goto __1 goto __3 __3: // The prior loop always finds a freepage to allocate } // If this cache is not purgeable then we have to fail. if (*testpcache)(unsafe.Pointer(p)).FbPurgeable == 0 { return uintptr(0) } // If there are no free pages, recycle a page. The page to // recycle is selected at random from all unpinned pages. j = (int32(testpcacheRandom(tls, p) % uint32(TESTPCACHE_NPAGE))) i = 0 __4: if !(i < TESTPCACHE_NPAGE) { goto __6 } { if ((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fkey > uint32(0)) && ((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).FisPinned == 0) { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(j)*24)).Fkey = key (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(j)*24)).FisPinned = 1 libc.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpBuf, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszPage)) libc.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpExtra, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszExtra)) (*testpcache)(unsafe.Pointer(p)).FnPinned++ return ((p + 32 /* &.a */) + uintptr(j)*24 /* &.page */) } } goto __5 __5: i++ j = ((j + 1) % TESTPCACHE_NPAGE) goto __4 goto __6 __6: ; // The previous loop always finds a page to recycle. return uintptr(0) } // Unpin a page. func testpcacheUnpin(tls *libc.TLS, pCache uintptr, pOldPage uintptr, discard int32) { /* test_pcache.c:289:13: */ var p uintptr = pCache var i int32 // Randomly discard pages as they are unpinned according to the // discardChance setting. If discardChance is 0, the random discard // never happens. If discardChance is 100, it always happens. if ((*testpcache)(unsafe.Pointer(p)).FbPurgeable != 0) && ((uint32(100) - testpcacheGlobal.FdiscardChance) <= (testpcacheRandom(tls, p) % uint32(100))) { discard = 1 } for i = 0; i < TESTPCACHE_NPAGE; i++ { if ((p + 32 /* &.a */) + uintptr(i)*24 /* &.page */) == pOldPage { // The pOldPage pointer always points to a pinned page (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).FisPinned = 0 (*testpcache)(unsafe.Pointer(p)).FnPinned-- if discard != 0 { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) (*testpcache)(unsafe.Pointer(p)).FnFree++ } return } } // The pOldPage pointer always points to a valid page } // Rekey a single page. func testpcacheRekey(tls *libc.TLS, pCache uintptr, pOldPage uintptr, oldKey uint32, newKey uint32) { /* test_pcache.c:334:13: */ var p uintptr = pCache var i int32 // If there already exists another page at newKey, verify that // the other page is unpinned and discard it. for i = 0; i < TESTPCACHE_NPAGE; i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey == newKey { // The new key is never a page that is already pinned (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) (*testpcache)(unsafe.Pointer(p)).FnFree++ break } } // Find the page to be rekeyed and rekey it. for i = 0; i < TESTPCACHE_NPAGE; i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey == oldKey { // The oldKey and pOldPage parameters match // Page to be rekeyed must be pinned (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = newKey return } } // Rekey is always given a valid page to work with } // Truncate the page cache. Every page with a key of iLimit or larger // is discarded. func testpcacheTruncate(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* test_pcache.c:382:13: */ var p uintptr = pCache var i uint32 for i = uint32(0); i < uint32(TESTPCACHE_NPAGE); i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey >= iLimit { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned != 0 { (*testpcache)(unsafe.Pointer(p)).FnPinned-- } (*testpcache)(unsafe.Pointer(p)).FnFree++ } } } // Destroy a page cache. func testpcacheDestroy(tls *libc.TLS, pCache uintptr) { /* test_pcache.c:404:13: */ var p uintptr = pCache (*testpcache)(unsafe.Pointer(p)).FiMagic = TESTPCACHE_CLEAR sqlite3.Xsqlite3_free(tls, p) testpcacheGlobal.FnInstance-- } // Invoke this routine to register or unregister the testing pager cache // implemented by this file. // // Install the test pager cache if installFlag is 1 and uninstall it if // installFlag is 0. // // When installing, discardChance is a number between 0 and 100 that // indicates the probability of discarding a page when unpinning the // page. 0 means never discard (unless the discard flag is set). // 100 means always discard. func installTestPCache(tls *libc.TLS, installFlag int32, discardChance uint32, prngSeed uint32, highStress uint32) { /* test_pcache.c:427:6: */ bp := tls.Alloc(48) defer tls.Free(48) testpcacheGlobal.FdiscardChance = discardChance testpcacheGlobal.FprngSeed = (prngSeed ^ (prngSeed << 16)) testpcacheGlobal.FhighStress = highStress if installFlag != isInstalled { if installFlag != 0 { sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_GETPCACHE2, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultPcache)))) sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp+16, uintptr(unsafe.Pointer(&testPcache)))) } else { sqlite3.Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp+32, uintptr(unsafe.Pointer(&defaultPcache)))) } isInstalled = installFlag } } var testPcache = sqlite3_pcache_methods2{ FiVersion: 1, FpArg: 0, FxInit: 0, FxShutdown: 0, FxCreate: 0, FxCachesize: 0, FxPagecount: 0, FxFetch: 0, FxUnpin: 0, FxRekey: 0, FxTruncate: 0, FxDestroy: 0, } /* test_pcache.c:433:40 */ var defaultPcache sqlite3_pcache_methods2 /* test_pcache.c:447:34: */ var isInstalled int32 = 0 /* test_pcache.c:448:14 */ // The following object serves the same role as FILE in the standard C // library. It represents an open connection to a file on disk for I/O. // // A single quota_FILE should not be used by two or more threads at the // same time. Multiple threads can be using different quota_FILE objects // simultaneously, but not the same quota_FILE object. type quota_FILE1 = struct { Ff uintptr FiOfst sqlite3_int64 FpFile uintptr FzMbcsName uintptr } /* test_quota.h:145:9 */ // The following object serves the same role as FILE in the standard C // library. It represents an open connection to a file on disk for I/O. // // A single quota_FILE should not be used by two or more threads at the // same time. Multiple threads can be using different quota_FILE objects // simultaneously, but not the same quota_FILE object. type quota_FILE = quota_FILE1 /* test_quota.h:145:27 */ // Restore old value of interface for Obj-C. See above. // Determine if we are dealing with Windows NT. // // We ought to be able to determine if we are compiling for Windows 9x or // Windows NT using the _WIN32_WINNT macro as follows: // // #if defined(_WIN32_WINNT) // # define SQLITE_OS_WINNT 1 // #else // # define SQLITE_OS_WINNT 0 // #endif // // However, Visual Studio 2005 does not set _WIN32_WINNT by default, as // it ought to, so the above test does not work. We'll just assume that // everything is Windows NT unless the programmer explicitly says otherwise // by setting SQLITE_OS_WINNT to 0. // Determine if we are dealing with Windows CE - which has a much reduced // API. // Determine if we are dealing with WinRT, which provides only a subset of // the full Win32 API. // For WinCE, some API function parameters do not appear to be declared as // volatile. // For some Windows sub-platforms, the _beginthreadex() / _endthreadex() // functions are not available (e.g. those not using MSVC, Cygwin, etc). // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. //*********************** Object Definitions ***************************** // Forward declaration of all object types type quotaGroup1 = struct { FzPattern uintptr FiLimit sqlite3_int64 FiSize sqlite3_int64 FxCallback uintptr FpArg uintptr FxDestroy uintptr FpNext uintptr FppPrev uintptr FpFiles uintptr } /* test_quota.h:145:9 */ // Restore old value of interface for Obj-C. See above. // Determine if we are dealing with Windows NT. // // We ought to be able to determine if we are compiling for Windows 9x or // Windows NT using the _WIN32_WINNT macro as follows: // // #if defined(_WIN32_WINNT) // # define SQLITE_OS_WINNT 1 // #else // # define SQLITE_OS_WINNT 0 // #endif // // However, Visual Studio 2005 does not set _WIN32_WINNT by default, as // it ought to, so the above test does not work. We'll just assume that // everything is Windows NT unless the programmer explicitly says otherwise // by setting SQLITE_OS_WINNT to 0. // Determine if we are dealing with Windows CE - which has a much reduced // API. // Determine if we are dealing with WinRT, which provides only a subset of // the full Win32 API. // For WinCE, some API function parameters do not appear to be declared as // volatile. // For some Windows sub-platforms, the _beginthreadex() / _endthreadex() // functions are not available (e.g. those not using MSVC, Cygwin, etc). // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. //*********************** Object Definitions ***************************** // Forward declaration of all object types type quotaGroup = quotaGroup1 /* test_quota.c:61:27 */ type quotaConn1 = struct { Fbase sqlite3_file FpFile uintptr } /* test_quota.c:62:9 */ type quotaConn = quotaConn1 /* test_quota.c:62:26 */ type quotaFile1 = struct { FzFilename uintptr FpGroup uintptr FiSize sqlite3_int64 FnRef int32 FdeleteOnClose int32 FpNext uintptr FppPrev uintptr } /* test_quota.h:145:9 */ type quotaFile = quotaFile1 /* test_quota.c:63:26 */ //************************ Global Variables ********************************* // All global variables used by this file are containing within the following // gQuota structure. var gQuota struct { FpOrigVfs uintptr FsThisVfs sqlite3_vfs FsIoMethodsV1 sqlite3_io_methods FsIoMethodsV2 sqlite3_io_methods FisInitialized int32 _ [4]byte FpMutex uintptr FpGroup uintptr } /* test_quota.c:183:3: */ //************************ Utility Routines ******************************** // Acquire and release the mutex used to serialize access to the // list of quotaGroups. func quotaEnter(tls *libc.TLS) { /* test_quota.c:190:13: */ sqlite3.Xsqlite3_mutex_enter(tls, gQuota.FpMutex) } func quotaLeave(tls *libc.TLS) { /* test_quota.c:191:13: */ sqlite3.Xsqlite3_mutex_leave(tls, gQuota.FpMutex) } // Count the number of open files in a quotaGroup func quotaGroupOpenFileCount(tls *libc.TLS, pGroup uintptr) int32 { /* test_quota.c:195:12: */ var N int32 = 0 var pFile uintptr = (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles for pFile != 0 { if (*quotaFile)(unsafe.Pointer(pFile)).FnRef != 0 { N++ } pFile = (*quotaFile)(unsafe.Pointer(pFile)).FpNext } return N } // Remove a file from a quota group. func quotaRemoveFile(tls *libc.TLS, pFile uintptr) { /* test_quota.c:207:13: */ var pGroup uintptr = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) -= ((*quotaFile)(unsafe.Pointer(pFile)).FiSize) *(*uintptr)(unsafe.Pointer((*quotaFile)(unsafe.Pointer(pFile)).FppPrev)) = (*quotaFile)(unsafe.Pointer(pFile)).FpNext if (*quotaFile)(unsafe.Pointer(pFile)).FpNext != 0 { (*quotaFile)(unsafe.Pointer((*quotaFile)(unsafe.Pointer(pFile)).FpNext)).FppPrev = (*quotaFile)(unsafe.Pointer(pFile)).FppPrev } sqlite3.Xsqlite3_free(tls, pFile) } // Remove all files from a quota group. It is always the case that // all files will be closed when this routine is called. func quotaRemoveAllFiles(tls *libc.TLS, pGroup uintptr) { /* test_quota.c:218:13: */ for (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles != 0 { quotaRemoveFile(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles) } } // If the reference count and threshold for a quotaGroup are both // zero, then destroy the quotaGroup. func quotaGroupDeref(tls *libc.TLS, pGroup uintptr) { /* test_quota.c:229:13: */ if ((*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit == int64(0)) && (quotaGroupOpenFileCount(tls, pGroup) == 0) { quotaRemoveAllFiles(tls, pGroup) *(*uintptr)(unsafe.Pointer((*quotaGroup)(unsafe.Pointer(pGroup)).FppPrev)) = (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext if (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext != 0 { (*quotaGroup)(unsafe.Pointer((*quotaGroup)(unsafe.Pointer(pGroup)).FpNext)).FppPrev = (*quotaGroup)(unsafe.Pointer(pGroup)).FppPrev } if (*quotaGroup)(unsafe.Pointer(pGroup)).FxDestroy != 0 { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pGroup + 40 /* &.xDestroy */))))(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FpArg) } sqlite3.Xsqlite3_free(tls, pGroup) } } // Return TRUE if string z matches glob pattern zGlob. // // Globbing rules: // // '*' Matches any sequence of zero or more characters. // // '?' Matches exactly one character. // // [...] Matches one character from the enclosed list of // characters. // // [^...] Matches one character not in the enclosed list. // // / Matches "/" or "\\" // func quotaStrglob(tls *libc.TLS, zGlob uintptr, z uintptr) int32 { /* test_quota.c:256:12: */ var c int32 var c2 int32 var cx int32 var invert int32 var seen int32 for (libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))))) != 0 { if c == '*' { for ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))))) == '*') || (c == '?') { if (c == '?') && ((int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) == 0) { return 0 } } if c == 0 { return 1 } else if c == '[' { for (*(*int8)(unsafe.Pointer(z)) != 0) && (quotaStrglob(tls, (zGlob-uintptr(1)), z) == 0) { z++ } return (libc.Bool32((int32(*(*int8)(unsafe.Pointer(z)))) != 0)) } if c == '/' { cx = '\\' } else { cx = c } for (libc.AssignInt32(&c2, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { for (c2 != c) && (c2 != cx) { c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) if c2 == 0 { return 0 } } if quotaStrglob(tls, zGlob, z) != 0 { return 1 } } return 0 } else if c == '?' { if (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) == 0 { return 0 } } else if c == '[' { var prior_c int32 = 0 seen = 0 invert = 0 c = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) if c == 0 { return 0 } c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))) if c2 == '^' { invert = 1 c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))) } if c2 == ']' { if c == ']' { seen = 1 } c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))) } for (c2 != 0) && (c2 != ']') { if (((c2 == '-') && (int32(*(*int8)(unsafe.Pointer(zGlob))) != ']')) && (int32(*(*int8)(unsafe.Pointer(zGlob))) != 0)) && (prior_c > 0) { c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))) if (c >= prior_c) && (c <= c2) { seen = 1 } prior_c = 0 } else { if c == c2 { seen = 1 } prior_c = c2 } c2 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zGlob, 1)))) } if (c2 == 0) || ((seen ^ invert) == 0) { return 0 } } else if c == '/' { if (int32(*(*int8)(unsafe.Pointer(z))) != '/') && (int32(*(*int8)(unsafe.Pointer(z))) != '\\') { return 0 } z++ } else { if c != (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))) { return 0 } } } return (libc.Bool32(int32(*(*int8)(unsafe.Pointer(z))) == 0)) } // Find a quotaGroup given the filename. // // Return a pointer to the quotaGroup object. Return NULL if not found. func quotaGroupFind(tls *libc.TLS, zFilename uintptr) uintptr { /* test_quota.c:329:19: */ var p uintptr for p = gQuota.FpGroup; (p != 0) && (quotaStrglob(tls, (*quotaGroup)(unsafe.Pointer(p)).FzPattern, zFilename) == 0); p = (*quotaGroup)(unsafe.Pointer(p)).FpNext { } return p } // Translate an sqlite3_file* that is really a quotaConn* into // the sqlite3_file* for the underlying original VFS. func quotaSubOpen(tls *libc.TLS, pConn uintptr) uintptr { /* test_quota.c:339:21: */ var p uintptr = pConn return (p + 1*16) } // Find a file in a quota group and return a pointer to that file. // Return NULL if the file is not in the group. func quotaFindFile(tls *libc.TLS, pGroup uintptr, zName uintptr, createFlag int32) uintptr { /* test_quota.c:347:18: */ var pFile uintptr = (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles for (pFile != 0) && (libc.Xstrcmp(tls, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, zName) != 0) { pFile = (*quotaFile)(unsafe.Pointer(pFile)).FpNext } if (pFile == uintptr(0)) && (createFlag != 0) { var nName int32 = (int32(libc.Xstrlen(tls, zName) & uint64(0x3fffffff))) pFile = sqlite3.Xsqlite3_malloc(tls, (int32((uint64(unsafe.Sizeof(quotaFile{})) + uint64(nName)) + uint64(1)))) if pFile != 0 { libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(quotaFile{}))) (*quotaFile)(unsafe.Pointer(pFile)).FzFilename = (pFile + 1*48) libc.Xmemcpy(tls, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, zName, (uint64(nName + 1))) (*quotaFile)(unsafe.Pointer(pFile)).FpNext = (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles if (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles != 0 { (*quotaFile)(unsafe.Pointer((*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles)).FppPrev = (pFile + 32 /* &.pNext */) } (*quotaFile)(unsafe.Pointer(pFile)).FppPrev = (pGroup + 64 /* &.pFiles */) (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles = pFile (*quotaFile)(unsafe.Pointer(pFile)).FpGroup = pGroup } } return pFile } // Translate UTF8 to MBCS for use in fopen() calls. Return a pointer to the // translated text.. Call quota_mbcs_free() to deallocate any memory // used to store the returned pointer when done. func quota_utf8_to_mbcs(tls *libc.TLS, zUtf8 uintptr) uintptr { /* test_quota.c:377:13: */ var n size_t _ = n // Bytes in zUtf8 var nWide int32 // number of UTF-16 characters var nMbcs int32 // Bytes of MBCS var zTmpWide LPWSTR // The UTF16 text var zMbcs uintptr // The MBCS text var codepage int32 // Code page used by fopen() n = libc.Xstrlen(tls, zUtf8) nWide = libc.XMultiByteToWideChar(tls, uint32(CP_UTF8), uint32(0), zUtf8, -1, uintptr(0), 0) if nWide == 0 { return uintptr(0) } zTmpWide = sqlite3.Xsqlite3_malloc(tls, (int32((uint64(nWide + 1)) * uint64(unsafe.Sizeof(WCHAR(0)))))) if zTmpWide == uintptr(0) { return uintptr(0) } libc.XMultiByteToWideChar(tls, uint32(CP_UTF8), uint32(0), zUtf8, -1, zTmpWide, nWide) if libc.XAreFileApisANSI(tls) != 0 { codepage = CP_ACP } else { codepage = CP_OEMCP } nMbcs = libc.XWideCharToMultiByte(tls, uint32(codepage), uint32(0), zTmpWide, nWide, uintptr(0), 0, uintptr(0), uintptr(0)) if nMbcs != 0 { zMbcs = sqlite3.Xsqlite3_malloc(tls, (nMbcs + 1)) } else { zMbcs = uintptr(0) } if zMbcs != 0 { libc.XWideCharToMultiByte(tls, uint32(codepage), uint32(0), zTmpWide, nWide, zMbcs, nMbcs, uintptr(0), uintptr(0)) } sqlite3.Xsqlite3_free(tls, zTmpWide) return zMbcs } // Deallocate any memory allocated by quota_utf8_to_mbcs(). func quota_mbcs_free(tls *libc.TLS, zOld uintptr) { /* test_quota.c:408:13: */ sqlite3.Xsqlite3_free(tls, zOld) } //************************ VFS Method Wrappers **************************** // This is the xOpen method used for the "quota" VFS. // // Most of the work is done by the underlying original VFS. This method // simply links the new file into the appropriate quota group if it is a // file that needs to be tracked. func quotaOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pConn uintptr, flags int32, pOutFlags uintptr) int32 { /* test_quota.c:424:12: */ var rc int32 // Result code var pQuotaOpen uintptr // The new quota file descriptor var pFile uintptr // Corresponding quotaFile obj var pGroup uintptr // The group file belongs to var pSubOpen uintptr // Real file descriptor var pOrigVfs uintptr = gQuota.FpOrigVfs // Real VFS // If the file is not a main database file or a WAL, then use the // normal xOpen method. if (flags & (SQLITE_OPEN_MAIN_DB | SQLITE_OPEN_WAL)) == 0 { return (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 40 /* &.xOpen */))))(tls, pOrigVfs, zName, pConn, flags, pOutFlags) } // If the name of the file does not match any quota group, then // use the normal xOpen method. quotaEnter(tls) pGroup = quotaGroupFind(tls, zName) if pGroup == uintptr(0) { rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 40 /* &.xOpen */))))(tls, pOrigVfs, zName, pConn, flags, pOutFlags) } else { // If we get to this point, it means the file needs to be quota tracked. pQuotaOpen = pConn pSubOpen = quotaSubOpen(tls, pConn) rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 40 /* &.xOpen */))))(tls, pOrigVfs, zName, pSubOpen, flags, pOutFlags) if rc == SQLITE_OK { pFile = quotaFindFile(tls, pGroup, zName, 1) if pFile == uintptr(0) { quotaLeave(tls) (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 8 /* &.xClose */))))(tls, pSubOpen) return SQLITE_NOMEM } (*quotaFile)(unsafe.Pointer(pFile)).FdeleteOnClose = (libc.Bool32((flags & SQLITE_OPEN_DELETEONCLOSE) != 0)) (*quotaFile)(unsafe.Pointer(pFile)).FnRef++ (*quotaConn)(unsafe.Pointer(pQuotaOpen)).FpFile = pFile if (*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods)).FiVersion == 1 { (*quotaConn)(unsafe.Pointer(pQuotaOpen)).Fbase.FpMethods = (uintptr(unsafe.Pointer(&gQuota)) + 176 /* &.sIoMethodsV1 */) } else { (*quotaConn)(unsafe.Pointer(pQuotaOpen)).Fbase.FpMethods = (uintptr(unsafe.Pointer(&gQuota)) + 328 /* &.sIoMethodsV2 */) } } } quotaLeave(tls) return rc } // This is the xDelete method used for the "quota" VFS. // // If the file being deleted is part of the quota group, then reduce // the size of the quota group accordingly. And remove the file from // the set of files in the quota group. func quotaDelete(tls *libc.TLS, pVfs uintptr, zName uintptr, syncDir int32) int32 { /* test_quota.c:486:12: */ var rc int32 // Result code var pFile uintptr // Files in the quota var pGroup uintptr // The group file belongs to var pOrigVfs uintptr = gQuota.FpOrigVfs // Real VFS // Do the actual file delete rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pOrigVfs + 48 /* &.xDelete */))))(tls, pOrigVfs, zName, syncDir) // If the file just deleted is a member of a quota group, then remove // it from that quota group. if rc == SQLITE_OK { quotaEnter(tls) pGroup = quotaGroupFind(tls, zName) if pGroup != 0 { pFile = quotaFindFile(tls, pGroup, zName, 0) if pFile != 0 { if (*quotaFile)(unsafe.Pointer(pFile)).FnRef != 0 { (*quotaFile)(unsafe.Pointer(pFile)).FdeleteOnClose = 1 } else { quotaRemoveFile(tls, pFile) quotaGroupDeref(tls, pGroup) } } } quotaLeave(tls) } return rc } //*********************** I/O Method Wrappers ****************************** // xClose requests get passed through to the original VFS. But we // also have to unlink the quotaConn from the quotaFile and quotaGroup. // The quotaFile and/or quotaGroup are freed if they are no longer in use. func quotaClose(tls *libc.TLS, pConn uintptr) int32 { /* test_quota.c:528:12: */ var p uintptr = pConn var pFile uintptr = (*quotaConn)(unsafe.Pointer(p)).FpFile var pSubOpen uintptr = quotaSubOpen(tls, pConn) var rc int32 rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 8 /* &.xClose */))))(tls, pSubOpen) quotaEnter(tls) (*quotaFile)(unsafe.Pointer(pFile)).FnRef-- if (*quotaFile)(unsafe.Pointer(pFile)).FnRef == 0 { var pGroup uintptr = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup if (*quotaFile)(unsafe.Pointer(pFile)).FdeleteOnClose != 0 { (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((gQuota.FpOrigVfs + 48 /* &.xDelete */))))(tls, gQuota.FpOrigVfs, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, 0) quotaRemoveFile(tls, pFile) } quotaGroupDeref(tls, pGroup) } quotaLeave(tls) return rc } // Pass xRead requests directory thru to the original VFS without // further processing. func quotaRead(tls *libc.TLS, pConn uintptr, pBuf uintptr, iAmt int32, iOfst sqlite3_int64) int32 { /* test_quota.c:551:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 16 /* &.xRead */))))(tls, pSubOpen, pBuf, iAmt, iOfst) } // Check xWrite requests to see if they expand the file. If they do, // the perform a quota check before passing them through to the // original VFS. func quotaWrite(tls *libc.TLS, pConn uintptr, pBuf uintptr, iAmt int32, iOfst sqlite3_int64) int32 { /* test_quota.c:565:12: */ var p uintptr = pConn var pSubOpen uintptr = quotaSubOpen(tls, pConn) var iEnd sqlite3_int64 = (iOfst + sqlite3_int64(iAmt)) var pGroup uintptr var pFile uintptr = (*quotaConn)(unsafe.Pointer(p)).FpFile var szNew sqlite3_int64 if (*quotaFile)(unsafe.Pointer(pFile)).FiSize < iEnd { pGroup = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup quotaEnter(tls) szNew = (((*quotaGroup)(unsafe.Pointer(pGroup)).FiSize - (*quotaFile)(unsafe.Pointer(pFile)).FiSize) + iEnd) if (szNew > (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit) && ((*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit > int64(0)) { if (*quotaGroup)(unsafe.Pointer(pGroup)).FxCallback != 0 { (*(*func(*libc.TLS, uintptr, uintptr, sqlite3_int64, uintptr))(unsafe.Pointer((pGroup + 24 /* &.xCallback */))))(tls, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, (pGroup + 8 /* &.iLimit */), szNew, (*quotaGroup)(unsafe.Pointer(pGroup)).FpArg) } if (szNew > (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit) && ((*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit > int64(0)) { quotaLeave(tls) return SQLITE_FULL } } (*quotaGroup)(unsafe.Pointer(pGroup)).FiSize = szNew (*quotaFile)(unsafe.Pointer(pFile)).FiSize = iEnd quotaLeave(tls) } return (*(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 24 /* &.xWrite */))))(tls, pSubOpen, pBuf, iAmt, iOfst) } // Pass xTruncate requests thru to the original VFS. If the // success, update the file size. func quotaTruncate(tls *libc.TLS, pConn uintptr, size sqlite3_int64) int32 { /* test_quota.c:602:12: */ var p uintptr = pConn var pSubOpen uintptr = quotaSubOpen(tls, pConn) var rc int32 = (*(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 32 /* &.xTruncate */))))(tls, pSubOpen, size) var pFile uintptr = (*quotaConn)(unsafe.Pointer(p)).FpFile var pGroup uintptr if rc == SQLITE_OK { quotaEnter(tls) pGroup = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) -= ((*quotaFile)(unsafe.Pointer(pFile)).FiSize) (*quotaFile)(unsafe.Pointer(pFile)).FiSize = size *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) += (size) quotaLeave(tls) } return rc } // Pass xSync requests through to the original VFS without change func quotaSync(tls *libc.TLS, pConn uintptr, flags int32) int32 { /* test_quota.c:621:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 40 /* &.xSync */))))(tls, pSubOpen, flags) } // Pass xFileSize requests through to the original VFS but then // update the quotaGroup with the new size before returning. func quotaFileSize(tls *libc.TLS, pConn uintptr, pSize uintptr) int32 { /* test_quota.c:629:12: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr = pConn var pSubOpen uintptr = quotaSubOpen(tls, pConn) var pFile uintptr = (*quotaConn)(unsafe.Pointer(p)).FpFile var pGroup uintptr // var sz sqlite3_int64 at bp, 8 var rc int32 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 48 /* &.xFileSize */))))(tls, pSubOpen, bp /* &sz */) if rc == SQLITE_OK { quotaEnter(tls) pGroup = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) -= ((*quotaFile)(unsafe.Pointer(pFile)).FiSize) (*quotaFile)(unsafe.Pointer(pFile)).FiSize = *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) += (*(*sqlite3_int64)(unsafe.Pointer(bp /* sz */))) quotaLeave(tls) *(*sqlite3_int64)(unsafe.Pointer(pSize)) = *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) } return rc } // Pass xLock requests through to the original VFS unchanged. func quotaLock(tls *libc.TLS, pConn uintptr, lock int32) int32 { /* test_quota.c:652:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 56 /* &.xLock */))))(tls, pSubOpen, lock) } // Pass xUnlock requests through to the original VFS unchanged. func quotaUnlock(tls *libc.TLS, pConn uintptr, lock int32) int32 { /* test_quota.c:659:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 64 /* &.xUnlock */))))(tls, pSubOpen, lock) } // Pass xCheckReservedLock requests through to the original VFS unchanged. func quotaCheckReservedLock(tls *libc.TLS, pConn uintptr, pResOut uintptr) int32 { /* test_quota.c:666:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, pSubOpen, pResOut) } // Pass xFileControl requests through to the original VFS unchanged. func quotaFileControl(tls *libc.TLS, pConn uintptr, op int32, pArg uintptr) int32 { /* test_quota.c:673:12: */ bp := tls.Alloc(16) defer tls.Free(16) var pSubOpen uintptr = quotaSubOpen(tls, pConn) var rc int32 = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 80 /* &.xFileControl */))))(tls, pSubOpen, op, pArg) if (op == SQLITE_FCNTL_VFSNAME) && (rc == SQLITE_OK) { *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+34924 /* "quota/%z" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) } return rc } // Pass xSectorSize requests through to the original VFS unchanged. func quotaSectorSize(tls *libc.TLS, pConn uintptr) int32 { /* test_quota.c:686:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 88 /* &.xSectorSize */))))(tls, pSubOpen) } // Pass xDeviceCharacteristics requests through to the original VFS unchanged. func quotaDeviceCharacteristics(tls *libc.TLS, pConn uintptr) int32 { /* test_quota.c:693:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, pSubOpen) } // Pass xShmMap requests through to the original VFS unchanged. func quotaShmMap(tls *libc.TLS, pConn uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* test_quota.c:700:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 104 /* &.xShmMap */))))(tls, pSubOpen, iRegion, szRegion, bExtend, libc.AtomicLoadUintptr(&pp)) } // Pass xShmLock requests through to the original VFS unchanged. func quotaShmLock(tls *libc.TLS, pConn uintptr, ofst int32, n int32, flags int32) int32 { /* test_quota.c:713:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 112 /* &.xShmLock */))))(tls, pSubOpen, ofst, n, flags) } // Pass xShmBarrier requests through to the original VFS unchanged. func quotaShmBarrier(tls *libc.TLS, pConn uintptr) { /* test_quota.c:725:13: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 120 /* &.xShmBarrier */))))(tls, pSubOpen) } // Pass xShmUnmap requests through to the original VFS unchanged. func quotaShmUnmap(tls *libc.TLS, pConn uintptr, deleteFlag int32) int32 { /* test_quota.c:732:12: */ var pSubOpen uintptr = quotaSubOpen(tls, pConn) return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 128 /* &.xShmUnmap */))))(tls, pSubOpen, deleteFlag) } //************************* Public Interfaces **************************** // Initialize the quota VFS shim. Use the VFS named zOrigVfsName // as the VFS that does the actual work. Use the default if // zOrigVfsName==NULL. // // The quota VFS shim is named "quota". It will become the default // VFS if makeDefault is non-zero. // // THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once // during start-up. func sqlite3_quota_initialize(tls *libc.TLS, zOrigVfsName uintptr, makeDefault int32) int32 { /* test_quota.c:749:5: */ var pOrigVfs uintptr if gQuota.FisInitialized != 0 { return SQLITE_MISUSE } pOrigVfs = sqlite3.Xsqlite3_vfs_find(tls, zOrigVfsName) if pOrigVfs == uintptr(0) { return SQLITE_ERROR } gQuota.FpMutex = sqlite3.Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) if !(int32(gQuota.FpMutex) != 0) { return SQLITE_NOMEM } gQuota.FisInitialized = 1 gQuota.FpOrigVfs = pOrigVfs gQuota.FsThisVfs = *(*sqlite3_vfs)(unsafe.Pointer(pOrigVfs)) gQuota.FsThisVfs.FxOpen = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 }{quotaOpen})) gQuota.FsThisVfs.FxDelete = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 }{quotaDelete})) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&gQuota)) + 8 /* &.sThisVfs */ + 4 /* &.szOsFile */)) += int32((uint64(unsafe.Sizeof(quotaConn{})))) gQuota.FsThisVfs.FzName = ts + 34933 /* "quota" */ gQuota.FsIoMethodsV1.FiVersion = 1 gQuota.FsIoMethodsV1.FxClose = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{quotaClose})) gQuota.FsIoMethodsV1.FxRead = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32 }{quotaRead})) gQuota.FsIoMethodsV1.FxWrite = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32 }{quotaWrite})) gQuota.FsIoMethodsV1.FxTruncate = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, sqlite3_int64) int32 }{quotaTruncate})) gQuota.FsIoMethodsV1.FxSync = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{quotaSync})) gQuota.FsIoMethodsV1.FxFileSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{quotaFileSize})) gQuota.FsIoMethodsV1.FxLock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{quotaLock})) gQuota.FsIoMethodsV1.FxUnlock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{quotaUnlock})) gQuota.FsIoMethodsV1.FxCheckReservedLock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{quotaCheckReservedLock})) gQuota.FsIoMethodsV1.FxFileControl = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 }{quotaFileControl})) gQuota.FsIoMethodsV1.FxSectorSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{quotaSectorSize})) gQuota.FsIoMethodsV1.FxDeviceCharacteristics = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{quotaDeviceCharacteristics})) gQuota.FsIoMethodsV2 = gQuota.FsIoMethodsV1 gQuota.FsIoMethodsV2.FiVersion = 2 gQuota.FsIoMethodsV2.FxShmMap = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 }{quotaShmMap})) gQuota.FsIoMethodsV2.FxShmLock = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 }{quotaShmLock})) gQuota.FsIoMethodsV2.FxShmBarrier = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{quotaShmBarrier})) gQuota.FsIoMethodsV2.FxShmUnmap = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{quotaShmUnmap})) sqlite3.Xsqlite3_vfs_register(tls, (uintptr(unsafe.Pointer(&gQuota)) + 8 /* &.sThisVfs */), makeDefault) return SQLITE_OK } // Shutdown the quota system. // // All SQLite database connections must be closed before calling this // routine. // // THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once while // shutting down in order to free all remaining quota groups. func sqlite3_quota_shutdown(tls *libc.TLS) int32 { /* test_quota.c:798:5: */ var pGroup uintptr if gQuota.FisInitialized == 0 { return SQLITE_MISUSE } for pGroup = gQuota.FpGroup; pGroup != 0; pGroup = (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext { if quotaGroupOpenFileCount(tls, pGroup) > 0 { return SQLITE_MISUSE } } for gQuota.FpGroup != 0 { pGroup = gQuota.FpGroup gQuota.FpGroup = (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit = int64(0) quotaGroupDeref(tls, pGroup) } gQuota.FisInitialized = 0 sqlite3.Xsqlite3_mutex_free(tls, gQuota.FpMutex) sqlite3.Xsqlite3_vfs_unregister(tls, (uintptr(unsafe.Pointer(&gQuota)) + 8 /* &.sThisVfs */)) libc.Xmemset(tls, uintptr(unsafe.Pointer(&gQuota)), 0, uint64(unsafe.Sizeof(gQuota))) return SQLITE_OK } // Create or destroy a quota group. // // The quota group is defined by the zPattern. When calling this routine // with a zPattern for a quota group that already exists, this routine // merely updates the iLimit, xCallback, and pArg values for that quota // group. If zPattern is new, then a new quota group is created. // // If the iLimit for a quota group is set to zero, then the quota group // is disabled and will be deleted when the last database connection using // the quota group is closed. // // Calling this routine on a zPattern that does not exist and with a // zero iLimit is a no-op. // // A quota group must exist with a non-zero iLimit prior to opening // database connections if those connections are to participate in the // quota group. Creating a quota group does not affect database connections // that are already open. func sqlite3_quota_set(tls *libc.TLS, zPattern uintptr, iLimit sqlite3_int64, xCallback uintptr, pArg uintptr, xDestroy uintptr) int32 { /* test_quota.c:838:5: */ var pGroup uintptr quotaEnter(tls) pGroup = gQuota.FpGroup for (pGroup != 0) && (libc.Xstrcmp(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FzPattern, zPattern) != 0) { pGroup = (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext } if pGroup == uintptr(0) { var nPattern int32 = (int32(libc.Xstrlen(tls, zPattern) & uint64(0x3fffffff))) if iLimit <= int64(0) { quotaLeave(tls) return SQLITE_OK } pGroup = sqlite3.Xsqlite3_malloc(tls, (int32((uint64(unsafe.Sizeof(quotaGroup{})) + uint64(nPattern)) + uint64(1)))) if pGroup == uintptr(0) { quotaLeave(tls) return SQLITE_NOMEM } libc.Xmemset(tls, pGroup, 0, uint64(unsafe.Sizeof(quotaGroup{}))) (*quotaGroup)(unsafe.Pointer(pGroup)).FzPattern = (pGroup + 1*72) libc.Xmemcpy(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FzPattern, zPattern, (uint64(nPattern + 1))) if gQuota.FpGroup != 0 { (*quotaGroup)(unsafe.Pointer(gQuota.FpGroup)).FppPrev = (pGroup + 48 /* &.pNext */) } (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext = gQuota.FpGroup (*quotaGroup)(unsafe.Pointer(pGroup)).FppPrev = (uintptr(unsafe.Pointer(&gQuota)) + 496 /* &.pGroup */) gQuota.FpGroup = pGroup } (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit = iLimit (*quotaGroup)(unsafe.Pointer(pGroup)).FxCallback = xCallback if ((*quotaGroup)(unsafe.Pointer(pGroup)).FxDestroy != 0) && ((*quotaGroup)(unsafe.Pointer(pGroup)).FpArg != pArg) { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pGroup + 40 /* &.xDestroy */))))(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FpArg) } (*quotaGroup)(unsafe.Pointer(pGroup)).FpArg = pArg (*quotaGroup)(unsafe.Pointer(pGroup)).FxDestroy = xDestroy quotaGroupDeref(tls, pGroup) quotaLeave(tls) return SQLITE_OK } // Bring the named file under quota management. Or if it is already under // management, update its size. func sqlite3_quota_file(tls *libc.TLS, zFilename uintptr) int32 { /* test_quota.c:891:5: */ bp := tls.Alloc(16) defer tls.Free(16) var zFull uintptr = uintptr(0) var fd uintptr var rc int32 *(*int32)(unsafe.Pointer(bp /* outFlags */)) = 0 // var iSize sqlite3_int64 at bp+8, 8 var nAlloc int32 = ((gQuota.FsThisVfs.FszOsFile + gQuota.FsThisVfs.FmxPathname) + 2) // Allocate space for a file-handle and the full path for file zFilename fd = sqlite3.Xsqlite3_malloc(tls, nAlloc) if fd == uintptr(0) { rc = SQLITE_NOMEM } else { zFull = ((fd) + uintptr(gQuota.FsThisVfs.FszOsFile)) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gQuota.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gQuota.FpOrigVfs, zFilename, (gQuota.FsThisVfs.FmxPathname + 1), zFull) } if rc == SQLITE_OK { *(*int8)(unsafe.Pointer(zFull + uintptr((libc.Xstrlen(tls, zFull) + uint64(1))))) = int8(0) rc = quotaOpen(tls, (uintptr(unsafe.Pointer(&gQuota)) + 8 /* &.sThisVfs */), zFull, fd, (SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_DB), bp /* &outFlags */) if rc == SQLITE_OK { (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(fd)).FpMethods + 48 /* &.xFileSize */))))(tls, fd, bp+8 /* &iSize */) (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(fd)).FpMethods + 8 /* &.xClose */))))(tls, fd) } else if rc == SQLITE_CANTOPEN { var pGroup uintptr var pFile uintptr quotaEnter(tls) pGroup = quotaGroupFind(tls, zFull) if pGroup != 0 { pFile = quotaFindFile(tls, pGroup, zFull, 0) if pFile != 0 { quotaRemoveFile(tls, pFile) } } quotaLeave(tls) } } sqlite3.Xsqlite3_free(tls, fd) return rc } // Open a potentially quotaed file for I/O. func sqlite3_quota_fopen(tls *libc.TLS, zFilename uintptr, zMode uintptr) uintptr { /* test_quota.c:936:12: */ var p uintptr var zFull uintptr var zFullTranslated uintptr var rc int32 var pGroup uintptr var pFile uintptr p = uintptr(0) zFull = uintptr(0) zFullTranslated = uintptr(0) zFull = sqlite3.Xsqlite3_malloc(tls, (gQuota.FsThisVfs.FmxPathname + 1)) if !(zFull == uintptr(0)) { goto __1 } return uintptr(0) __1: ; rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gQuota.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gQuota.FpOrigVfs, zFilename, (gQuota.FsThisVfs.FmxPathname + 1), zFull) if !(rc != 0) { goto __2 } goto quota_fopen_error __2: ; p = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(quota_FILE{}))) if !(p == uintptr(0)) { goto __3 } goto quota_fopen_error __3: ; libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(quota_FILE{}))) zFullTranslated = quota_utf8_to_mbcs(tls, zFull) if !(zFullTranslated == uintptr(0)) { goto __4 } goto quota_fopen_error __4: ; (*quota_FILE)(unsafe.Pointer(p)).Ff = libc.Xfopen(tls, zFullTranslated, zMode) if !((*quota_FILE)(unsafe.Pointer(p)).Ff == uintptr(0)) { goto __5 } goto quota_fopen_error __5: ; quotaEnter(tls) pGroup = quotaGroupFind(tls, zFull) if !(pGroup != 0) { goto __6 } pFile = quotaFindFile(tls, pGroup, zFull, 1) if !(pFile == uintptr(0)) { goto __7 } quotaLeave(tls) goto quota_fopen_error __7: ; (*quotaFile)(unsafe.Pointer(pFile)).FnRef++ (*quota_FILE)(unsafe.Pointer(p)).FpFile = pFile __6: ; quotaLeave(tls) sqlite3.Xsqlite3_free(tls, zFull) (*quota_FILE)(unsafe.Pointer(p)).FzMbcsName = zFullTranslated return p quota_fopen_error: quota_mbcs_free(tls, zFullTranslated) sqlite3.Xsqlite3_free(tls, zFull) if !((p != 0) && ((*quota_FILE)(unsafe.Pointer(p)).Ff != 0)) { goto __8 } libc.Xfclose(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff) __8: ; sqlite3.Xsqlite3_free(tls, p) return uintptr(0) } // Read content from a quota_FILE func sqlite3_quota_fread(tls *libc.TLS, pBuf uintptr, size size_t, nmemb size_t, p uintptr) size_t { /* test_quota.c:985:8: */ return libc.Xfread(tls, pBuf, size, nmemb, (*quota_FILE)(unsafe.Pointer(p)).Ff) } // Write content into a quota_FILE. Invoke the quota callback and block // the write if we exceed quota. func sqlite3_quota_fwrite(tls *libc.TLS, pBuf uintptr, size size_t, nmemb size_t, p uintptr) size_t { /* test_quota.c:998:8: */ var iOfst sqlite3_int64 var iEnd sqlite3_int64 var szNew sqlite3_int64 var pFile uintptr var rc size_t iOfst = sqlite3_int64(libc.Xftell(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff)) iEnd = (sqlite3_int64(size_t(iOfst) + (size * nmemb))) pFile = (*quota_FILE)(unsafe.Pointer(p)).FpFile if (pFile != 0) && ((*quotaFile)(unsafe.Pointer(pFile)).FiSize < iEnd) { var pGroup uintptr = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup quotaEnter(tls) szNew = (((*quotaGroup)(unsafe.Pointer(pGroup)).FiSize - (*quotaFile)(unsafe.Pointer(pFile)).FiSize) + iEnd) if (szNew > (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit) && ((*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit > int64(0)) { if (*quotaGroup)(unsafe.Pointer(pGroup)).FxCallback != 0 { (*(*func(*libc.TLS, uintptr, uintptr, sqlite3_int64, uintptr))(unsafe.Pointer((pGroup + 24 /* &.xCallback */))))(tls, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, (pGroup + 8 /* &.iLimit */), szNew, (*quotaGroup)(unsafe.Pointer(pGroup)).FpArg) } if (szNew > (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit) && ((*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit > int64(0)) { iEnd = (((*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit - (*quotaGroup)(unsafe.Pointer(pGroup)).FiSize) + (*quotaFile)(unsafe.Pointer(pFile)).FiSize) nmemb = ((size_t(iEnd - iOfst)) / size) iEnd = (sqlite3_int64(size_t(iOfst) + (size * nmemb))) szNew = (((*quotaGroup)(unsafe.Pointer(pGroup)).FiSize - (*quotaFile)(unsafe.Pointer(pFile)).FiSize) + iEnd) } } (*quotaGroup)(unsafe.Pointer(pGroup)).FiSize = szNew (*quotaFile)(unsafe.Pointer(pFile)).FiSize = iEnd quotaLeave(tls) } else { pFile = uintptr(0) } rc = libc.Xfwrite(tls, pBuf, size, nmemb, (*quota_FILE)(unsafe.Pointer(p)).Ff) // If the write was incomplete, adjust the file size and group size // downward if (rc < nmemb) && (pFile != 0) { var nWritten size_t = rc var iNewEnd sqlite3_int64 = (sqlite3_int64(size_t(iOfst) + (size * nWritten))) if iNewEnd < iEnd { iNewEnd = iEnd } quotaEnter(tls) *(*sqlite3_int64)(unsafe.Pointer((*quotaFile)(unsafe.Pointer(pFile)).FpGroup + 16 /* &.iSize */)) += (iNewEnd - (*quotaFile)(unsafe.Pointer(pFile)).FiSize) (*quotaFile)(unsafe.Pointer(pFile)).FiSize = iNewEnd quotaLeave(tls) } return rc } // Close an open quota_FILE stream. func sqlite3_quota_fclose(tls *libc.TLS, p uintptr) int32 { /* test_quota.c:1054:5: */ var rc int32 var pFile uintptr rc = libc.Xfclose(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff) pFile = (*quota_FILE)(unsafe.Pointer(p)).FpFile if pFile != 0 { quotaEnter(tls) (*quotaFile)(unsafe.Pointer(pFile)).FnRef-- if (*quotaFile)(unsafe.Pointer(pFile)).FnRef == 0 { var pGroup uintptr = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup if (*quotaFile)(unsafe.Pointer(pFile)).FdeleteOnClose != 0 { (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((gQuota.FpOrigVfs + 48 /* &.xDelete */))))(tls, gQuota.FpOrigVfs, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, 0) quotaRemoveFile(tls, pFile) } quotaGroupDeref(tls, pGroup) } quotaLeave(tls) } quota_mbcs_free(tls, (*quota_FILE)(unsafe.Pointer(p)).FzMbcsName) sqlite3.Xsqlite3_free(tls, p) return rc } // Flush memory buffers for a quota_FILE to disk. func sqlite3_quota_fflush(tls *libc.TLS, p uintptr, doFsync int32) int32 { /* test_quota.c:1082:5: */ var rc int32 rc = libc.Xfflush(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff) if (rc == 0) && (doFsync != 0) { rc = libc.X_commit(tls, libc.X_fileno(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff)) } return (libc.Bool32(rc != 0)) } // Seek on a quota_FILE stream. func sqlite3_quota_fseek(tls *libc.TLS, p uintptr, offset int32, whence int32) int32 { /* test_quota.c:1099:5: */ return libc.Xfseek(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff, offset, whence) } // rewind a quota_FILE stream. func sqlite3_quota_rewind(tls *libc.TLS, p uintptr) { /* test_quota.c:1106:6: */ libc.Xrewind(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff) } // Tell the current location of a quota_FILE stream. func sqlite3_quota_ftell(tls *libc.TLS, p uintptr) int32 { /* test_quota.c:1113:6: */ return libc.Xftell(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff) } // Test the error indicator for the given file. func sqlite3_quota_ferror(tls *libc.TLS, p uintptr) int32 { /* test_quota.c:1120:5: */ return libc.Xferror(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff) } // Truncate a file to szNew bytes. func sqlite3_quota_ftruncate(tls *libc.TLS, p uintptr, szNew sqlite3_int64) int32 { /* test_quota.c:1127:5: */ var pFile uintptr = (*quota_FILE)(unsafe.Pointer(p)).FpFile var rc int32 if ((libc.AssignUintptr(&pFile, (*quota_FILE)(unsafe.Pointer(p)).FpFile)) != uintptr(0)) && ((*quotaFile)(unsafe.Pointer(pFile)).FiSize < szNew) { var pGroup uintptr if (*quotaFile)(unsafe.Pointer(pFile)).FiSize < szNew { // This routine cannot be used to extend a file that is under // quota management. Only true truncation is allowed. return -1 } pGroup = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup quotaEnter(tls) *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) += (szNew - (*quotaFile)(unsafe.Pointer(pFile)).FiSize) quotaLeave(tls) } // _chsize_s() is missing from MingW (as of 2012-11-06). Use // _chsize() as a work-around for testing purposes. rc = libc.X_chsize(tls, libc.X_fileno(tls, (*quota_FILE)(unsafe.Pointer(p)).Ff), int32(szNew)) if (pFile != 0) && (rc == 0) { var pGroup uintptr = (*quotaFile)(unsafe.Pointer(pFile)).FpGroup quotaEnter(tls) *(*sqlite3_int64)(unsafe.Pointer(pGroup + 16 /* &.iSize */)) += (szNew - (*quotaFile)(unsafe.Pointer(pFile)).FiSize) (*quotaFile)(unsafe.Pointer(pFile)).FiSize = szNew quotaLeave(tls) } return rc } // Determine the time that the given file was last modified, in // seconds size 1970. Write the result into *pTime. Return 0 on // success and non-zero on any kind of error. func sqlite3_quota_file_mtime(tls *libc.TLS, p uintptr, pTime uintptr) int32 { /* test_quota.c:1169:5: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 // var buf _stat64 at bp, 56 rc = libc.X_stat64(tls, (*quota_FILE)(unsafe.Pointer(p)).FzMbcsName, bp /* &buf */) if rc == 0 { *(*time_t)(unsafe.Pointer(pTime)) = (*_stat64)(unsafe.Pointer(bp /* &buf */)).Fst_mtime } return rc } // Return the true size of the file, as reported by the operating // system. func sqlite3_quota_file_truesize(tls *libc.TLS, p uintptr) sqlite3_int64 { /* test_quota.c:1187:15: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 // var buf _stat64 at bp, 56 rc = libc.X_stat64(tls, (*quota_FILE)(unsafe.Pointer(p)).FzMbcsName, bp /* &buf */) if rc == 0 { return (*_stat64)(unsafe.Pointer(bp /* &buf */)).Fst_size } return int64(-1) } // Return the size of the file, as it is known to the quota subsystem. func sqlite3_quota_file_size(tls *libc.TLS, p uintptr) sqlite3_int64 { /* test_quota.c:1203:15: */ if (*quota_FILE)(unsafe.Pointer(p)).FpFile != 0 { return (*quotaFile)(unsafe.Pointer((*quota_FILE)(unsafe.Pointer(p)).FpFile)).FiSize } return int64(-1) } // Determine the amount of data in bytes available for reading // in the given file. func sqlite3_quota_file_available(tls *libc.TLS, p uintptr) int32 { /* test_quota.c:1211:6: */ var f uintptr = (*quota_FILE)(unsafe.Pointer(p)).Ff var pos1 int32 var pos2 int32 var rc int32 pos1 = libc.Xftell(tls, f) if pos1 < 0 { return -1 } rc = libc.Xfseek(tls, f, 0, SEEK_END) if rc != 0 { return -1 } pos2 = libc.Xftell(tls, f) if pos2 < 0 { return -1 } rc = libc.Xfseek(tls, f, pos1, SEEK_SET) if rc != 0 { return -1 } return (pos2 - pos1) } // Remove a managed file. Update quotas accordingly. func sqlite3_quota_remove(tls *libc.TLS, zFilename uintptr) int32 { /* test_quota.c:1229:5: */ var zFull uintptr // Full pathname for zFilename var nFull size_t // Number of bytes in zFilename var rc int32 // Result code var pGroup uintptr // Group containing zFilename var pFile uintptr // A file in the group var pNextFile uintptr // next file in the group var diff int32 // Difference between filenames var c int8 // First character past end of pattern zFull = sqlite3.Xsqlite3_malloc(tls, (gQuota.FsThisVfs.FmxPathname + 1)) if zFull == uintptr(0) { return SQLITE_NOMEM } rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((gQuota.FpOrigVfs + 64 /* &.xFullPathname */))))(tls, gQuota.FpOrigVfs, zFilename, (gQuota.FsThisVfs.FmxPathname + 1), zFull) if rc != 0 { sqlite3.Xsqlite3_free(tls, zFull) return rc } // Figure out the length of the full pathname. If the name ends with // / (or \ on windows) then remove the trailing /. nFull = libc.Xstrlen(tls, zFull) if (nFull > uint64(0)) && ((int32(*(*int8)(unsafe.Pointer(zFull + uintptr((nFull - uint64(1)))))) == '/') || (int32(*(*int8)(unsafe.Pointer(zFull + uintptr((nFull - uint64(1)))))) == '\\')) { nFull-- *(*int8)(unsafe.Pointer(zFull + uintptr(nFull))) = int8(0) } quotaEnter(tls) pGroup = quotaGroupFind(tls, zFull) if pGroup != 0 { for pFile = (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles; (pFile != 0) && (rc == SQLITE_OK); pFile = pNextFile { pNextFile = (*quotaFile)(unsafe.Pointer(pFile)).FpNext diff = libc.Xstrncmp(tls, zFull, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, nFull) if (diff == 0) && ((((int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer((*quotaFile)(unsafe.Pointer(pFile)).FzFilename + uintptr(nFull)))))) == 0) || (int32(c) == '/')) || (int32(c) == '\\')) { if (*quotaFile)(unsafe.Pointer(pFile)).FnRef != 0 { (*quotaFile)(unsafe.Pointer(pFile)).FdeleteOnClose = 1 } else { rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((gQuota.FpOrigVfs + 48 /* &.xDelete */))))(tls, gQuota.FpOrigVfs, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename, 0) quotaRemoveFile(tls, pFile) quotaGroupDeref(tls, pGroup) } } } } quotaLeave(tls) sqlite3.Xsqlite3_free(tls, zFull) return rc } // The next short section of defines are only done when not running on Windows // or some other strange platform. type Tcl_StatBuf = _stat64 /* tcl.h:444:26 */ type Tcl_OldStat_1 = uintptr /* tcl.h:645:21 */ type TclStubs1 = struct { Fmagic int32 _ [4]byte Fhooks uintptr Ftcl_PkgProvideEx uintptr Ftcl_PkgRequireEx uintptr Ftcl_Panic uintptr Ftcl_Alloc uintptr Ftcl_Free uintptr Ftcl_Realloc uintptr Ftcl_DbCkalloc uintptr Ftcl_DbCkfree uintptr Ftcl_DbCkrealloc uintptr Freserved9 uintptr Freserved10 uintptr Ftcl_SetTimer uintptr Ftcl_Sleep uintptr Ftcl_WaitForEvent uintptr Ftcl_AppendAllObjTypes uintptr Ftcl_AppendStringsToObj uintptr Ftcl_AppendToObj uintptr Ftcl_ConcatObj uintptr Ftcl_ConvertToType uintptr Ftcl_DbDecrRefCount uintptr Ftcl_DbIncrRefCount uintptr Ftcl_DbIsShared uintptr Ftcl_DbNewBooleanObj uintptr Ftcl_DbNewByteArrayObj uintptr Ftcl_DbNewDoubleObj uintptr Ftcl_DbNewListObj uintptr Ftcl_DbNewLongObj uintptr Ftcl_DbNewObj uintptr Ftcl_DbNewStringObj uintptr Ftcl_DuplicateObj uintptr FtclFreeObj uintptr Ftcl_GetBoolean uintptr Ftcl_GetBooleanFromObj uintptr Ftcl_GetByteArrayFromObj uintptr Ftcl_GetDouble uintptr Ftcl_GetDoubleFromObj uintptr Ftcl_GetIndexFromObj uintptr Ftcl_GetInt uintptr Ftcl_GetIntFromObj uintptr Ftcl_GetLongFromObj uintptr Ftcl_GetObjType uintptr Ftcl_GetStringFromObj uintptr Ftcl_InvalidateStringRep uintptr Ftcl_ListObjAppendList uintptr Ftcl_ListObjAppendElement uintptr Ftcl_ListObjGetElements uintptr Ftcl_ListObjIndex uintptr Ftcl_ListObjLength uintptr Ftcl_ListObjReplace uintptr Ftcl_NewBooleanObj uintptr Ftcl_NewByteArrayObj uintptr Ftcl_NewDoubleObj uintptr Ftcl_NewIntObj uintptr Ftcl_NewListObj uintptr Ftcl_NewLongObj uintptr Ftcl_NewObj uintptr Ftcl_NewStringObj uintptr Ftcl_SetBooleanObj uintptr Ftcl_SetByteArrayLength uintptr Ftcl_SetByteArrayObj uintptr Ftcl_SetDoubleObj uintptr Ftcl_SetIntObj uintptr Ftcl_SetListObj uintptr Ftcl_SetLongObj uintptr Ftcl_SetObjLength uintptr Ftcl_SetStringObj uintptr Ftcl_AddErrorInfo uintptr Ftcl_AddObjErrorInfo uintptr Ftcl_AllowExceptions uintptr Ftcl_AppendElement uintptr Ftcl_AppendResult uintptr Ftcl_AsyncCreate uintptr Ftcl_AsyncDelete uintptr Ftcl_AsyncInvoke uintptr Ftcl_AsyncMark uintptr Ftcl_AsyncReady uintptr Ftcl_BackgroundError uintptr Ftcl_Backslash uintptr Ftcl_BadChannelOption uintptr Ftcl_CallWhenDeleted uintptr Ftcl_CancelIdleCall uintptr Ftcl_Close uintptr Ftcl_CommandComplete uintptr Ftcl_Concat uintptr Ftcl_ConvertElement uintptr Ftcl_ConvertCountedElement uintptr Ftcl_CreateAlias uintptr Ftcl_CreateAliasObj uintptr Ftcl_CreateChannel uintptr Ftcl_CreateChannelHandler uintptr Ftcl_CreateCloseHandler uintptr Ftcl_CreateCommand uintptr Ftcl_CreateEventSource uintptr Ftcl_CreateExitHandler uintptr Ftcl_CreateInterp uintptr Ftcl_CreateMathFunc uintptr Ftcl_CreateObjCommand uintptr Ftcl_CreateSlave uintptr Ftcl_CreateTimerHandler uintptr Ftcl_CreateTrace uintptr Ftcl_DeleteAssocData uintptr Ftcl_DeleteChannelHandler uintptr Ftcl_DeleteCloseHandler uintptr Ftcl_DeleteCommand uintptr Ftcl_DeleteCommandFromToken uintptr Ftcl_DeleteEvents uintptr Ftcl_DeleteEventSource uintptr Ftcl_DeleteExitHandler uintptr Ftcl_DeleteHashEntry uintptr Ftcl_DeleteHashTable uintptr Ftcl_DeleteInterp uintptr Ftcl_DetachPids uintptr Ftcl_DeleteTimerHandler uintptr Ftcl_DeleteTrace uintptr Ftcl_DontCallWhenDeleted uintptr Ftcl_DoOneEvent uintptr Ftcl_DoWhenIdle uintptr Ftcl_DStringAppend uintptr Ftcl_DStringAppendElement uintptr Ftcl_DStringEndSublist uintptr Ftcl_DStringFree uintptr Ftcl_DStringGetResult uintptr Ftcl_DStringInit uintptr Ftcl_DStringResult uintptr Ftcl_DStringSetLength uintptr Ftcl_DStringStartSublist uintptr Ftcl_Eof uintptr Ftcl_ErrnoId uintptr Ftcl_ErrnoMsg uintptr Ftcl_Eval uintptr Ftcl_EvalFile uintptr Ftcl_EvalObj uintptr Ftcl_EventuallyFree uintptr Ftcl_Exit uintptr Ftcl_ExposeCommand uintptr Ftcl_ExprBoolean uintptr Ftcl_ExprBooleanObj uintptr Ftcl_ExprDouble uintptr Ftcl_ExprDoubleObj uintptr Ftcl_ExprLong uintptr Ftcl_ExprLongObj uintptr Ftcl_ExprObj uintptr Ftcl_ExprString uintptr Ftcl_Finalize uintptr Ftcl_FindExecutable uintptr Ftcl_FirstHashEntry uintptr Ftcl_Flush uintptr Ftcl_FreeResult uintptr Ftcl_GetAlias uintptr Ftcl_GetAliasObj uintptr Ftcl_GetAssocData uintptr Ftcl_GetChannel uintptr Ftcl_GetChannelBufferSize uintptr Ftcl_GetChannelHandle uintptr Ftcl_GetChannelInstanceData uintptr Ftcl_GetChannelMode uintptr Ftcl_GetChannelName uintptr Ftcl_GetChannelOption uintptr Ftcl_GetChannelType uintptr Ftcl_GetCommandInfo uintptr Ftcl_GetCommandName uintptr Ftcl_GetErrno uintptr Ftcl_GetHostName uintptr Ftcl_GetInterpPath uintptr Ftcl_GetMaster uintptr Ftcl_GetNameOfExecutable uintptr Ftcl_GetObjResult uintptr Freserved167 uintptr Ftcl_GetPathType uintptr Ftcl_Gets uintptr Ftcl_GetsObj uintptr Ftcl_GetServiceMode uintptr Ftcl_GetSlave uintptr Ftcl_GetStdChannel uintptr Ftcl_GetStringResult uintptr Ftcl_GetVar uintptr Ftcl_GetVar2 uintptr Ftcl_GlobalEval uintptr Ftcl_GlobalEvalObj uintptr Ftcl_HideCommand uintptr Ftcl_Init uintptr Ftcl_InitHashTable uintptr Ftcl_InputBlocked uintptr Ftcl_InputBuffered uintptr Ftcl_InterpDeleted uintptr Ftcl_IsSafe uintptr Ftcl_JoinPath uintptr Ftcl_LinkVar uintptr Freserved188 uintptr Ftcl_MakeFileChannel uintptr Ftcl_MakeSafe uintptr Ftcl_MakeTcpClientChannel uintptr Ftcl_Merge uintptr Ftcl_NextHashEntry uintptr Ftcl_NotifyChannel uintptr Ftcl_ObjGetVar2 uintptr Ftcl_ObjSetVar2 uintptr Ftcl_OpenCommandChannel uintptr Ftcl_OpenFileChannel uintptr Ftcl_OpenTcpClient uintptr Ftcl_OpenTcpServer uintptr Ftcl_Preserve uintptr Ftcl_PrintDouble uintptr Ftcl_PutEnv uintptr Ftcl_PosixError uintptr Ftcl_QueueEvent uintptr Ftcl_Read uintptr Ftcl_ReapDetachedProcs uintptr Ftcl_RecordAndEval uintptr Ftcl_RecordAndEvalObj uintptr Ftcl_RegisterChannel uintptr Ftcl_RegisterObjType uintptr Ftcl_RegExpCompile uintptr Ftcl_RegExpExec uintptr Ftcl_RegExpMatch uintptr Ftcl_RegExpRange uintptr Ftcl_Release uintptr Ftcl_ResetResult uintptr Ftcl_ScanElement uintptr Ftcl_ScanCountedElement uintptr Ftcl_SeekOld uintptr Ftcl_ServiceAll uintptr Ftcl_ServiceEvent uintptr Ftcl_SetAssocData uintptr Ftcl_SetChannelBufferSize uintptr Ftcl_SetChannelOption uintptr Ftcl_SetCommandInfo uintptr Ftcl_SetErrno uintptr Ftcl_SetErrorCode uintptr Ftcl_SetMaxBlockTime uintptr Ftcl_SetPanicProc uintptr Ftcl_SetRecursionLimit uintptr Ftcl_SetResult uintptr Ftcl_SetServiceMode uintptr Ftcl_SetObjErrorCode uintptr Ftcl_SetObjResult uintptr Ftcl_SetStdChannel uintptr Ftcl_SetVar uintptr Ftcl_SetVar2 uintptr Ftcl_SignalId uintptr Ftcl_SignalMsg uintptr Ftcl_SourceRCFile uintptr Ftcl_SplitList uintptr Ftcl_SplitPath uintptr Ftcl_StaticPackage uintptr Ftcl_StringMatch uintptr Ftcl_TellOld uintptr Ftcl_TraceVar uintptr Ftcl_TraceVar2 uintptr Ftcl_TranslateFileName uintptr Ftcl_Ungets uintptr Ftcl_UnlinkVar uintptr Ftcl_UnregisterChannel uintptr Ftcl_UnsetVar uintptr Ftcl_UnsetVar2 uintptr Ftcl_UntraceVar uintptr Ftcl_UntraceVar2 uintptr Ftcl_UpdateLinkedVar uintptr Ftcl_UpVar uintptr Ftcl_UpVar2 uintptr Ftcl_VarEval uintptr Ftcl_VarTraceInfo uintptr Ftcl_VarTraceInfo2 uintptr Ftcl_Write uintptr Ftcl_WrongNumArgs uintptr Ftcl_DumpActiveMemory uintptr Ftcl_ValidateAllMemory uintptr Ftcl_AppendResultVA uintptr Ftcl_AppendStringsToObjVA uintptr Ftcl_HashStats uintptr Ftcl_ParseVar uintptr Ftcl_PkgPresent uintptr Ftcl_PkgPresentEx uintptr Ftcl_PkgProvide uintptr Ftcl_PkgRequire uintptr Ftcl_SetErrorCodeVA uintptr Ftcl_VarEvalVA uintptr Ftcl_WaitPid uintptr Ftcl_PanicVA uintptr Ftcl_GetVersion uintptr Ftcl_InitMemory uintptr Ftcl_StackChannel uintptr Ftcl_UnstackChannel uintptr Ftcl_GetStackedChannel uintptr Ftcl_SetMainLoop uintptr Freserved285 uintptr Ftcl_AppendObjToObj uintptr Ftcl_CreateEncoding uintptr Ftcl_CreateThreadExitHandler uintptr Ftcl_DeleteThreadExitHandler uintptr Ftcl_DiscardResult uintptr Ftcl_EvalEx uintptr Ftcl_EvalObjv uintptr Ftcl_EvalObjEx uintptr Ftcl_ExitThread uintptr Ftcl_ExternalToUtf uintptr Ftcl_ExternalToUtfDString uintptr Ftcl_FinalizeThread uintptr Ftcl_FinalizeNotifier uintptr Ftcl_FreeEncoding uintptr Ftcl_GetCurrentThread uintptr Ftcl_GetEncoding uintptr Ftcl_GetEncodingName uintptr Ftcl_GetEncodingNames uintptr Ftcl_GetIndexFromObjStruct uintptr Ftcl_GetThreadData uintptr Ftcl_GetVar2Ex uintptr Ftcl_InitNotifier uintptr Ftcl_MutexLock uintptr Ftcl_MutexUnlock uintptr Ftcl_ConditionNotify uintptr Ftcl_ConditionWait uintptr Ftcl_NumUtfChars uintptr Ftcl_ReadChars uintptr Ftcl_RestoreResult uintptr Ftcl_SaveResult uintptr Ftcl_SetSystemEncoding uintptr Ftcl_SetVar2Ex uintptr Ftcl_ThreadAlert uintptr Ftcl_ThreadQueueEvent uintptr Ftcl_UniCharAtIndex uintptr Ftcl_UniCharToLower uintptr Ftcl_UniCharToTitle uintptr Ftcl_UniCharToUpper uintptr Ftcl_UniCharToUtf uintptr Ftcl_UtfAtIndex uintptr Ftcl_UtfCharComplete uintptr Ftcl_UtfBackslash uintptr Ftcl_UtfFindFirst uintptr Ftcl_UtfFindLast uintptr Ftcl_UtfNext uintptr Ftcl_UtfPrev uintptr Ftcl_UtfToExternal uintptr Ftcl_UtfToExternalDString uintptr Ftcl_UtfToLower uintptr Ftcl_UtfToTitle uintptr Ftcl_UtfToUniChar uintptr Ftcl_UtfToUpper uintptr Ftcl_WriteChars uintptr Ftcl_WriteObj uintptr Ftcl_GetString uintptr Ftcl_GetDefaultEncodingDir uintptr Ftcl_SetDefaultEncodingDir uintptr Ftcl_AlertNotifier uintptr Ftcl_ServiceModeHook uintptr Ftcl_UniCharIsAlnum uintptr Ftcl_UniCharIsAlpha uintptr Ftcl_UniCharIsDigit uintptr Ftcl_UniCharIsLower uintptr Ftcl_UniCharIsSpace uintptr Ftcl_UniCharIsUpper uintptr Ftcl_UniCharIsWordChar uintptr Ftcl_UniCharLen uintptr Ftcl_UniCharNcmp uintptr Ftcl_UniCharToUtfDString uintptr Ftcl_UtfToUniCharDString uintptr Ftcl_GetRegExpFromObj uintptr Ftcl_EvalTokens uintptr Ftcl_FreeParse uintptr Ftcl_LogCommandInfo uintptr Ftcl_ParseBraces uintptr Ftcl_ParseCommand uintptr Ftcl_ParseExpr uintptr Ftcl_ParseQuotedString uintptr Ftcl_ParseVarName uintptr Ftcl_GetCwd uintptr Ftcl_Chdir uintptr Ftcl_Access uintptr Ftcl_Stat uintptr Ftcl_UtfNcmp uintptr Ftcl_UtfNcasecmp uintptr Ftcl_StringCaseMatch uintptr Ftcl_UniCharIsControl uintptr Ftcl_UniCharIsGraph uintptr Ftcl_UniCharIsPrint uintptr Ftcl_UniCharIsPunct uintptr Ftcl_RegExpExecObj uintptr Ftcl_RegExpGetInfo uintptr Ftcl_NewUnicodeObj uintptr Ftcl_SetUnicodeObj uintptr Ftcl_GetCharLength uintptr Ftcl_GetUniChar uintptr Ftcl_GetUnicode uintptr Ftcl_GetRange uintptr Ftcl_AppendUnicodeToObj uintptr Ftcl_RegExpMatchObj uintptr Ftcl_SetNotifier uintptr Ftcl_GetAllocMutex uintptr Ftcl_GetChannelNames uintptr Ftcl_GetChannelNamesEx uintptr Ftcl_ProcObjCmd uintptr Ftcl_ConditionFinalize uintptr Ftcl_MutexFinalize uintptr Ftcl_CreateThread uintptr Ftcl_ReadRaw uintptr Ftcl_WriteRaw uintptr Ftcl_GetTopChannel uintptr Ftcl_ChannelBuffered uintptr Ftcl_ChannelName uintptr Ftcl_ChannelVersion uintptr Ftcl_ChannelBlockModeProc uintptr Ftcl_ChannelCloseProc uintptr Ftcl_ChannelClose2Proc uintptr Ftcl_ChannelInputProc uintptr Ftcl_ChannelOutputProc uintptr Ftcl_ChannelSeekProc uintptr Ftcl_ChannelSetOptionProc uintptr Ftcl_ChannelGetOptionProc uintptr Ftcl_ChannelWatchProc uintptr Ftcl_ChannelGetHandleProc uintptr Ftcl_ChannelFlushProc uintptr Ftcl_ChannelHandlerProc uintptr Ftcl_JoinThread uintptr Ftcl_IsChannelShared uintptr Ftcl_IsChannelRegistered uintptr Ftcl_CutChannel uintptr Ftcl_SpliceChannel uintptr Ftcl_ClearChannelHandlers uintptr Ftcl_IsChannelExisting uintptr Ftcl_UniCharNcasecmp uintptr Ftcl_UniCharCaseMatch uintptr Ftcl_FindHashEntry uintptr Ftcl_CreateHashEntry uintptr Ftcl_InitCustomHashTable uintptr Ftcl_InitObjHashTable uintptr Ftcl_CommandTraceInfo uintptr Ftcl_TraceCommand uintptr Ftcl_UntraceCommand uintptr Ftcl_AttemptAlloc uintptr Ftcl_AttemptDbCkalloc uintptr Ftcl_AttemptRealloc uintptr Ftcl_AttemptDbCkrealloc uintptr Ftcl_AttemptSetObjLength uintptr Ftcl_GetChannelThread uintptr Ftcl_GetUnicodeFromObj uintptr Ftcl_GetMathFuncInfo uintptr Ftcl_ListMathFuncs uintptr Ftcl_SubstObj uintptr Ftcl_DetachChannel uintptr Ftcl_IsStandardChannel uintptr Ftcl_FSCopyFile uintptr Ftcl_FSCopyDirectory uintptr Ftcl_FSCreateDirectory uintptr Ftcl_FSDeleteFile uintptr Ftcl_FSLoadFile uintptr Ftcl_FSMatchInDirectory uintptr Ftcl_FSLink uintptr Ftcl_FSRemoveDirectory uintptr Ftcl_FSRenameFile uintptr Ftcl_FSLstat uintptr Ftcl_FSUtime uintptr Ftcl_FSFileAttrsGet uintptr Ftcl_FSFileAttrsSet uintptr Ftcl_FSFileAttrStrings uintptr Ftcl_FSStat uintptr Ftcl_FSAccess uintptr Ftcl_FSOpenFileChannel uintptr Ftcl_FSGetCwd uintptr Ftcl_FSChdir uintptr Ftcl_FSConvertToPathType uintptr Ftcl_FSJoinPath uintptr Ftcl_FSSplitPath uintptr Ftcl_FSEqualPaths uintptr Ftcl_FSGetNormalizedPath uintptr Ftcl_FSJoinToPath uintptr Ftcl_FSGetInternalRep uintptr Ftcl_FSGetTranslatedPath uintptr Ftcl_FSEvalFile uintptr Ftcl_FSNewNativePath uintptr Ftcl_FSGetNativePath uintptr Ftcl_FSFileSystemInfo uintptr Ftcl_FSPathSeparator uintptr Ftcl_FSListVolumes uintptr Ftcl_FSRegister uintptr Ftcl_FSUnregister uintptr Ftcl_FSData uintptr Ftcl_FSGetTranslatedStringPath uintptr Ftcl_FSGetFileSystemForPath uintptr Ftcl_FSGetPathType uintptr Ftcl_OutputBuffered uintptr Ftcl_FSMountsChanged uintptr Ftcl_EvalTokensStandard uintptr Ftcl_GetTime uintptr Ftcl_CreateObjTrace uintptr Ftcl_GetCommandInfoFromToken uintptr Ftcl_SetCommandInfoFromToken uintptr Ftcl_DbNewWideIntObj uintptr Ftcl_GetWideIntFromObj uintptr Ftcl_NewWideIntObj uintptr Ftcl_SetWideIntObj uintptr Ftcl_AllocStatBuf uintptr Ftcl_Seek uintptr Ftcl_Tell uintptr Ftcl_ChannelWideSeekProc uintptr Ftcl_DictObjPut uintptr Ftcl_DictObjGet uintptr Ftcl_DictObjRemove uintptr Ftcl_DictObjSize uintptr Ftcl_DictObjFirst uintptr Ftcl_DictObjNext uintptr Ftcl_DictObjDone uintptr Ftcl_DictObjPutKeyList uintptr Ftcl_DictObjRemoveKeyList uintptr Ftcl_NewDictObj uintptr Ftcl_DbNewDictObj uintptr Ftcl_RegisterConfig uintptr Ftcl_CreateNamespace uintptr Ftcl_DeleteNamespace uintptr Ftcl_AppendExportList uintptr Ftcl_Export uintptr Ftcl_Import uintptr Ftcl_ForgetImport uintptr Ftcl_GetCurrentNamespace uintptr Ftcl_GetGlobalNamespace uintptr Ftcl_FindNamespace uintptr Ftcl_FindCommand uintptr Ftcl_GetCommandFromObj uintptr Ftcl_GetCommandFullName uintptr Ftcl_FSEvalFileEx uintptr Ftcl_SetExitProc uintptr Ftcl_LimitAddHandler uintptr Ftcl_LimitRemoveHandler uintptr Ftcl_LimitReady uintptr Ftcl_LimitCheck uintptr Ftcl_LimitExceeded uintptr Ftcl_LimitSetCommands uintptr Ftcl_LimitSetTime uintptr Ftcl_LimitSetGranularity uintptr Ftcl_LimitTypeEnabled uintptr Ftcl_LimitTypeExceeded uintptr Ftcl_LimitTypeSet uintptr Ftcl_LimitTypeReset uintptr Ftcl_LimitGetCommands uintptr Ftcl_LimitGetTime uintptr Ftcl_LimitGetGranularity uintptr Ftcl_SaveInterpState uintptr Ftcl_RestoreInterpState uintptr Ftcl_DiscardInterpState uintptr Ftcl_SetReturnOptions uintptr Ftcl_GetReturnOptions uintptr Ftcl_IsEnsemble uintptr Ftcl_CreateEnsemble uintptr Ftcl_FindEnsemble uintptr Ftcl_SetEnsembleSubcommandList uintptr Ftcl_SetEnsembleMappingDict uintptr Ftcl_SetEnsembleUnknownHandler uintptr Ftcl_SetEnsembleFlags uintptr Ftcl_GetEnsembleSubcommandList uintptr Ftcl_GetEnsembleMappingDict uintptr Ftcl_GetEnsembleUnknownHandler uintptr Ftcl_GetEnsembleFlags uintptr Ftcl_GetEnsembleNamespace uintptr Ftcl_SetTimeProc uintptr Ftcl_QueryTimeProc uintptr Ftcl_ChannelThreadActionProc uintptr Ftcl_NewBignumObj uintptr Ftcl_DbNewBignumObj uintptr Ftcl_SetBignumObj uintptr Ftcl_GetBignumFromObj uintptr Ftcl_TakeBignumFromObj uintptr Ftcl_TruncateChannel uintptr Ftcl_ChannelTruncateProc uintptr Ftcl_SetChannelErrorInterp uintptr Ftcl_GetChannelErrorInterp uintptr Ftcl_SetChannelError uintptr Ftcl_GetChannelError uintptr Ftcl_InitBignumFromDouble uintptr Ftcl_GetNamespaceUnknownHandler uintptr Ftcl_SetNamespaceUnknownHandler uintptr Ftcl_GetEncodingFromObj uintptr Ftcl_GetEncodingSearchPath uintptr Ftcl_SetEncodingSearchPath uintptr Ftcl_GetEncodingNameFromEnvironment uintptr Ftcl_PkgRequireProc uintptr Ftcl_AppendObjToErrorInfo uintptr Ftcl_AppendLimitedToObj uintptr Ftcl_Format uintptr Ftcl_AppendFormatToObj uintptr Ftcl_ObjPrintf uintptr Ftcl_AppendPrintfToObj uintptr Ftcl_CancelEval uintptr Ftcl_Canceled uintptr Ftcl_CreatePipe uintptr Ftcl_NRCreateCommand uintptr Ftcl_NREvalObj uintptr Ftcl_NREvalObjv uintptr Ftcl_NRCmdSwap uintptr Ftcl_NRAddCallback uintptr Ftcl_NRCallObjProc uintptr Ftcl_GetFSDeviceFromStat uintptr Ftcl_GetFSInodeFromStat uintptr Ftcl_GetModeFromStat uintptr Ftcl_GetLinkCountFromStat uintptr Ftcl_GetUserIdFromStat uintptr Ftcl_GetGroupIdFromStat uintptr Ftcl_GetDeviceTypeFromStat uintptr Ftcl_GetAccessTimeFromStat uintptr Ftcl_GetModificationTimeFromStat uintptr Ftcl_GetChangeTimeFromStat uintptr Ftcl_GetSizeFromStat uintptr Ftcl_GetBlocksFromStat uintptr Ftcl_GetBlockSizeFromStat uintptr Ftcl_SetEnsembleParameterList uintptr Ftcl_GetEnsembleParameterList uintptr Ftcl_ParseArgsObjv uintptr Ftcl_GetErrorLine uintptr Ftcl_SetErrorLine uintptr Ftcl_TransferResult uintptr Ftcl_InterpActive uintptr Ftcl_BackgroundException uintptr Ftcl_ZlibDeflate uintptr Ftcl_ZlibInflate uintptr Ftcl_ZlibCRC32 uintptr Ftcl_ZlibAdler32 uintptr Ftcl_ZlibStreamInit uintptr Ftcl_ZlibStreamGetCommandName uintptr Ftcl_ZlibStreamEof uintptr Ftcl_ZlibStreamChecksum uintptr Ftcl_ZlibStreamPut uintptr Ftcl_ZlibStreamGet uintptr Ftcl_ZlibStreamClose uintptr Ftcl_ZlibStreamReset uintptr Ftcl_SetStartupScript uintptr Ftcl_GetStartupScript uintptr Ftcl_CloseEx uintptr Ftcl_NRExprObj uintptr Ftcl_NRSubstObj uintptr Ftcl_LoadFile uintptr Ftcl_FindSymbol uintptr Ftcl_FSUnloadFile uintptr Ftcl_ZlibStreamSetCompressionDictionary uintptr } /* tclDecls.h:2485:3 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // Argument passed to a TCL quota-over-limit callback. type TclQuotaCallback1 = struct { Finterp uintptr FpScript uintptr } /* test_quota.c:1293:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // Argument passed to a TCL quota-over-limit callback. type TclQuotaCallback = TclQuotaCallback1 /* test_quota.c:1293:33 */ // This is the callback from a quota-over-limit. func tclQuotaCallback(tls *libc.TLS, zFilename uintptr, piLimit uintptr, iSize sqlite3_int64, pArg uintptr) { /* test_quota.c:1305:13: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr // Callback script object var pEval uintptr // Script to evaluate var pVarname uintptr // Name of variable to pass as 2nd arg // var rnd uint32 at bp, 4 // Random part of pVarname var rc int32 // Tcl error code p = pArg if p == uintptr(0) { return } pVarname = tcl.XTcl_NewStringObj(tls, ts+34939 /* "::piLimit_" */, -1) (*Tcl_Obj)(unsafe.Pointer(pVarname)).FrefCount++ sqlite3.Xsqlite3_randomness(tls, int32(unsafe.Sizeof(uint32(0))), bp /* &rnd */) tcl.XTcl_AppendObjToObj(tls, pVarname, tcl.XTcl_NewIntObj(tls, (int32(*(*uint32)(unsafe.Pointer(bp /* rnd */))&uint32(0x7FFFFFFF))))) tcl.XTcl_ObjSetVar2(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp, pVarname, uintptr(0), tcl.XTcl_NewWideIntObj(tls, *(*sqlite3_int64)(unsafe.Pointer(piLimit))), 0) pEval = tcl.XTcl_DuplicateObj(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).FpScript) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pEval, tcl.XTcl_NewStringObj(tls, zFilename, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pEval, pVarname) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pEval, tcl.XTcl_NewWideIntObj(tls, iSize)) rc = tcl.XTcl_EvalObjEx(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp, pEval, TCL_EVAL_GLOBAL) if rc == TCL_OK { // var x Tcl_WideInt at bp+8, 8 var pLimit uintptr = tcl.XTcl_ObjGetVar2(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp, pVarname, uintptr(0), 0) rc = tcl.XTcl_GetWideIntFromObj(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp, pLimit, bp+8 /* &x */) *(*sqlite3_int64)(unsafe.Pointer(piLimit)) = *(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* x */)) tcl.XTcl_UnsetVar2(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp, tcl.XTcl_GetString(tls, pVarname), uintptr(0), 0) } for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pVarname if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if rc != TCL_OK { tcl.XTcl_BackgroundError(tls, (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp) } } // Destructor for a TCL quota-over-limit callback. func tclCallbackDestructor(tls *libc.TLS, pObj uintptr) { /* test_quota.c:1349:13: */ var p uintptr = pObj if p != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*TclQuotaCallback)(unsafe.Pointer(p)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } sqlite3.Xsqlite3_free(tls, p) } } // tclcmd: sqlite3_quota_initialize NAME MAKEDEFAULT func test_quota_initialize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1360:26: */ bp := tls.Alloc(4) defer tls.Free(4) var zName uintptr // Name of new quota VFS // var makeDefault int32 at bp, 4 // True to make the new VFS the default var rc int32 // Value returned by quota_initialize() // Process arguments if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33821 /* "NAME MAKEDEFAULT" */) return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &makeDefault */) != 0 { return TCL_ERROR } if int32(*(*int8)(unsafe.Pointer(zName))) == 0 { zName = uintptr(0) } // Call sqlite3_quota_initialize() rc = sqlite3_quota_initialize(tls, zName, *(*int32)(unsafe.Pointer(bp /* makeDefault */))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_quota_shutdown func test_quota_shutdown(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1389:26: */ var rc int32 // Value returned by quota_shutdown() if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } // Call sqlite3_quota_shutdown() rc = sqlite3_quota_shutdown(tls) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_quota_set PATTERN LIMIT SCRIPT func test_quota_set(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1412:26: */ bp := tls.Alloc(12) defer tls.Free(12) var zPattern uintptr // File pattern to configure // var iLimit Tcl_WideInt at bp, 8 // Initial quota in bytes var pScript uintptr // Tcl script to invoke to increase quota var rc int32 // Value returned by quota_set() var p uintptr // Callback object // var nScript int32 at bp+8, 4 // Length of callback script var xDestroy uintptr // Optional destructor for pArg var xCallback uintptr // Process arguments if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+34950 /* "PATTERN LIMIT SC..." */) return TCL_ERROR } zPattern = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &iLimit */) != 0 { return TCL_ERROR } pScript = *(*uintptr)(unsafe.Pointer(objv + 3*8)) tcl.XTcl_GetStringFromObj(tls, pScript, bp+8 /* &nScript */) if *(*int32)(unsafe.Pointer(bp + 8 /* nScript */)) > 0 { // Allocate a TclQuotaCallback object p = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TclQuotaCallback{}))) if !(p != 0) { tcl.XTcl_SetResult(tls, interp, ts+31828 /* "SQLITE_NOMEM" */, uintptr(0)) return TCL_OK } libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(TclQuotaCallback{}))) (*TclQuotaCallback)(unsafe.Pointer(p)).Finterp = interp (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ (*TclQuotaCallback)(unsafe.Pointer(p)).FpScript = pScript xDestroy = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{tclCallbackDestructor})) xCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, sqlite3_int64, uintptr) }{tclQuotaCallback})) } else { p = uintptr(0) xDestroy = uintptr(0) xCallback = uintptr(0) } // Invoke sqlite3_quota_set() rc = sqlite3_quota_set(tls, zPattern, *(*Tcl_WideInt)(unsafe.Pointer(bp /* iLimit */)), xCallback, p, xDestroy) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_quota_file FILENAME func test_quota_file(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1466:26: */ var zFilename uintptr // File pattern to configure var rc int32 // Value returned by quota_file() // Process arguments if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18381 /* "FILENAME" */) return TCL_ERROR } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) // Invoke sqlite3_quota_file() rc = sqlite3_quota_file(tls, zFilename) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } // tclcmd: sqlite3_quota_dump func test_quota_dump(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1492:26: */ bp := tls.Alloc(1016) defer tls.Free(1016) var pResult uintptr var pGroupTerm uintptr var pFileTerm uintptr var pGroup uintptr var pFile uintptr pResult = tcl.XTcl_NewObj(tls) quotaEnter(tls) for pGroup = gQuota.FpGroup; pGroup != 0; pGroup = (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext { pGroupTerm = tcl.XTcl_NewObj(tls) tcl.XTcl_ListObjAppendElement(tls, interp, pGroupTerm, tcl.XTcl_NewStringObj(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FzPattern, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pGroupTerm, tcl.XTcl_NewWideIntObj(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit)) tcl.XTcl_ListObjAppendElement(tls, interp, pGroupTerm, tcl.XTcl_NewWideIntObj(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FiSize)) for pFile = (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles; pFile != 0; pFile = (*quotaFile)(unsafe.Pointer(pFile)).FpNext { var i int32 // var zTemp [1000]int8 at bp+16, 1000 pFileTerm = tcl.XTcl_NewObj(tls) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+16 /* &zTemp[0] */, ts /* "%s" */, libc.VaList(bp, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename)) for i = 0; *(*int8)(unsafe.Pointer(bp + 16 /* &zTemp[0] */ + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(bp + 16 /* &zTemp[0] */ + uintptr(i)))) == '\\' { *(*int8)(unsafe.Pointer(bp + 16 /* &zTemp[0] */ + uintptr(i))) = int8('/') } } tcl.XTcl_ListObjAppendElement(tls, interp, pFileTerm, tcl.XTcl_NewStringObj(tls, bp+16 /* &zTemp[0] */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pFileTerm, tcl.XTcl_NewWideIntObj(tls, (*quotaFile)(unsafe.Pointer(pFile)).FiSize)) tcl.XTcl_ListObjAppendElement(tls, interp, pFileTerm, tcl.XTcl_NewWideIntObj(tls, int64((*quotaFile)(unsafe.Pointer(pFile)).FnRef))) tcl.XTcl_ListObjAppendElement(tls, interp, pFileTerm, tcl.XTcl_NewWideIntObj(tls, int64((*quotaFile)(unsafe.Pointer(pFile)).FdeleteOnClose))) tcl.XTcl_ListObjAppendElement(tls, interp, pGroupTerm, pFileTerm) } tcl.XTcl_ListObjAppendElement(tls, interp, pResult, pGroupTerm) } quotaLeave(tls) tcl.XTcl_SetObjResult(tls, interp, pResult) return TCL_OK } // tclcmd: sqlite3_quota_fopen FILENAME MODE func test_quota_fopen(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1540:26: */ bp := tls.Alloc(66) defer tls.Free(66) var zFilename uintptr // File pattern to configure var zMode uintptr // Mode string var p uintptr // Open string object // var zReturn [50]int8 at bp+16, 50 // Name of pointer to return // Process arguments if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+34971 /* "FILENAME MODE" */) return TCL_ERROR } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zMode = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) p = sqlite3_quota_fopen(tls, zFilename, zMode) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zReturn[0] */, ts+13023 /* "%p" */, libc.VaList(bp, p)) tcl.XTcl_SetResult(tls, interp, bp+16 /* &zReturn[0] */, uintptr(1)) return TCL_OK } // tclcmd: sqlite3_quota_fread HANDLE SIZE NELEM func test_quota_fread(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1570:26: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr var zBuf uintptr // var sz int32 at bp, 4 // var nElem int32 at bp+4, 4 var got size_t if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+34985 /* "HANDLE SIZE NELE..." */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &sz */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+4 /* &nElem */) != 0 { return TCL_ERROR } zBuf = sqlite3.Xsqlite3_malloc(tls, ((*(*int32)(unsafe.Pointer(bp /* sz */)) * *(*int32)(unsafe.Pointer(bp + 4 /* nElem */))) + 1)) if zBuf == uintptr(0) { tcl.XTcl_SetResult(tls, interp, ts+1930 /* "out of memory" */, uintptr(0)) return TCL_ERROR } got = sqlite3_quota_fread(tls, zBuf, uint64(*(*int32)(unsafe.Pointer(bp /* sz */))), uint64(*(*int32)(unsafe.Pointer(bp + 4 /* nElem */))), p) *(*int8)(unsafe.Pointer(zBuf + uintptr((got * size_t(*(*int32)(unsafe.Pointer(bp /* sz */))))))) = int8(0) tcl.XTcl_SetResult(tls, interp, zBuf, uintptr(1)) sqlite3.Xsqlite3_free(tls, zBuf) return TCL_OK } // tclcmd: sqlite3_quota_fwrite HANDLE SIZE NELEM CONTENT func test_quota_fwrite(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1604:26: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr var zBuf uintptr // var sz int32 at bp, 4 // var nElem int32 at bp+4, 4 var got size_t if objc != 5 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35003 /* "HANDLE SIZE NELE..." */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &sz */) != 0 { return TCL_ERROR } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+4 /* &nElem */) != 0 { return TCL_ERROR } zBuf = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) got = sqlite3_quota_fwrite(tls, zBuf, uint64(*(*int32)(unsafe.Pointer(bp /* sz */))), uint64(*(*int32)(unsafe.Pointer(bp + 4 /* nElem */))), p) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(got))) return TCL_OK } // tclcmd: sqlite3_quota_fclose HANDLE func test_quota_fclose(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1632:26: */ var p uintptr var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) rc = sqlite3_quota_fclose(tls, p) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // tclcmd: sqlite3_quota_fflush HANDLE ?HARDSYNC? func test_quota_fflush(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1654:26: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr var rc int32 *(*int32)(unsafe.Pointer(bp /* doSync */)) = 0 if (objc != 2) && (objc != 3) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35029 /* "HANDLE ?HARDSYNC..." */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) if objc == 3 { if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &doSync */) != 0 { return TCL_ERROR } } rc = sqlite3_quota_fflush(tls, p, *(*int32)(unsafe.Pointer(bp /* doSync */))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // tclcmd: sqlite3_quota_fseek HANDLE OFFSET WHENCE func test_quota_fseek(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1680:26: */ bp := tls.Alloc(28) defer tls.Free(28) var p uintptr // var ofst int32 at bp+24, 4 var zWhence uintptr var whence int32 var rc int32 if objc != 4 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35047 /* "HANDLE OFFSET WH..." */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+24 /* &ofst */) != 0 { return TCL_ERROR } zWhence = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if libc.Xstrcmp(tls, zWhence, ts+35068 /* "SEEK_SET" */) == 0 { whence = SEEK_SET } else if libc.Xstrcmp(tls, zWhence, ts+35077 /* "SEEK_CUR" */) == 0 { whence = SEEK_CUR } else if libc.Xstrcmp(tls, zWhence, ts+35086 /* "SEEK_END" */) == 0 { whence = SEEK_END } else { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+35095 /* "WHENCE should be..." */, uintptr(0))) return TCL_ERROR } rc = sqlite3_quota_fseek(tls, p, int32(*(*int32)(unsafe.Pointer(bp + 24 /* ofst */))), whence) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // tclcmd: sqlite3_quota_rewind HANDLE func test_quota_rewind(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1718:26: */ var p uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) sqlite3_quota_rewind(tls, p) return TCL_OK } // tclcmd: sqlite3_quota_ftell HANDLE func test_quota_ftell(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1737:26: */ var p uintptr var x sqlite3_int64 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) x = sqlite3_int64(sqlite3_quota_ftell(tls, p)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, x)) return TCL_OK } // tclcmd: sqlite3_quota_ftruncate HANDLE SIZE func test_quota_ftruncate(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1758:26: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr var x sqlite3_int64 // var w Tcl_WideInt at bp, 8 var rc int32 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35144 /* "HANDLE SIZE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp /* &w */) != 0 { return TCL_ERROR } x = *(*Tcl_WideInt)(unsafe.Pointer(bp /* w */)) rc = sqlite3_quota_ftruncate(tls, p, x) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // tclcmd: sqlite3_quota_file_size HANDLE func test_quota_file_size(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1783:26: */ var p uintptr var x sqlite3_int64 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) x = sqlite3_quota_file_size(tls, p) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, x)) return TCL_OK } // tclcmd: sqlite3_quota_file_truesize HANDLE func test_quota_file_truesize(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1804:26: */ var p uintptr var x sqlite3_int64 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) x = sqlite3_quota_file_truesize(tls, p) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, x)) return TCL_OK } // tclcmd: sqlite3_quota_file_mtime HANDLE func test_quota_file_mtime(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1825:26: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr // var t time_t at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) *(*time_t)(unsafe.Pointer(bp /* t */)) = int64(0) sqlite3_quota_file_mtime(tls, p, bp /* &t */) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, *(*time_t)(unsafe.Pointer(bp /* t */)))) return TCL_OK } // tclcmd: sqlite3_quota_remove FILENAME func test_quota_remove(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1848:26: */ var zFilename uintptr // File pattern to configure var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18381 /* "FILENAME" */) return TCL_ERROR } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) rc = sqlite3_quota_remove(tls, zFilename) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // tclcmd: sqlite3_quota_glob PATTERN TEXT // // Test the glob pattern matching. Return 1 if TEXT matches PATTERN // and return 0 if it does not. func test_quota_glob(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1872:26: */ var zPattern uintptr // The glob pattern var zText uintptr // Text to compare agains the pattern var rc int32 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35156 /* "PATTERN TEXT" */) return TCL_ERROR } zPattern = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) zText = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) rc = quotaStrglob(tls, zPattern, zText) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return TCL_OK } // tclcmd: sqlite3_quota_file_available HANDLE // // Return the number of bytes from the current file point to the end of // the file. func test_quota_file_available(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1898:26: */ var p uintptr var x sqlite3_int64 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) x = sqlite3_int64(sqlite3_quota_file_available(tls, p)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, x)) return TCL_OK } // tclcmd: sqlite3_quota_ferror HANDLE // // Return true if the file handle is in the error state. func test_quota_ferror(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1921:26: */ var p uintptr var x int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27715 /* "HANDLE" */) return TCL_ERROR } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) x = sqlite3_quota_ferror(tls, p) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, x)) return TCL_OK } // This routine registers the custom TCL commands defined in this // module. This should be the only procedure visible from outside // of this module. func Sqlitequota_Init(tls *libc.TLS, interp uintptr) int32 { /* test_quota.c:1944:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd7)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aCmd7[i].FzName, aCmd7[i].FxProc, uintptr(0), uintptr(0)) } return TCL_OK } var aCmd7 = [21]struct { FzName uintptr FxProc uintptr }{ {FzName: ts + 35169 /* "sqlite3_quota_in..." */, FxProc: 0}, {FzName: ts + 35194 /* "sqlite3_quota_sh..." */, FxProc: 0}, {FzName: ts + 35217 /* "sqlite3_quota_se..." */, FxProc: 0}, {FzName: ts + 35235 /* "sqlite3_quota_fi..." */, FxProc: 0}, {FzName: ts + 35254 /* "sqlite3_quota_du..." */, FxProc: 0}, {FzName: ts + 35273 /* "sqlite3_quota_fo..." */, FxProc: 0}, {FzName: ts + 35293 /* "sqlite3_quota_fr..." */, FxProc: 0}, {FzName: ts + 35313 /* "sqlite3_quota_fw..." */, FxProc: 0}, {FzName: ts + 35334 /* "sqlite3_quota_fc..." */, FxProc: 0}, {FzName: ts + 35355 /* "sqlite3_quota_ff..." */, FxProc: 0}, {FzName: ts + 35376 /* "sqlite3_quota_fs..." */, FxProc: 0}, {FzName: ts + 35396 /* "sqlite3_quota_re..." */, FxProc: 0}, {FzName: ts + 35417 /* "sqlite3_quota_ft..." */, FxProc: 0}, {FzName: ts + 35437 /* "sqlite3_quota_ft..." */, FxProc: 0}, {FzName: ts + 35461 /* "sqlite3_quota_fi..." */, FxProc: 0}, {FzName: ts + 35485 /* "sqlite3_quota_fi..." */, FxProc: 0}, {FzName: ts + 35513 /* "sqlite3_quota_fi..." */, FxProc: 0}, {FzName: ts + 35538 /* "sqlite3_quota_re..." */, FxProc: 0}, {FzName: ts + 35559 /* "sqlite3_quota_gl..." */, FxProc: 0}, {FzName: ts + 35578 /* "sqlite3_quota_fi..." */, FxProc: 0}, {FzName: ts + 35607 /* "sqlite3_quota_fe..." */, FxProc: 0}, } /* test_quota.c:1948:5 */ type Tcl_OldStat_2 = uintptr /* tcl.h:645:21 */ type TclStubs2 = struct { Fmagic int32 _ [4]byte Fhooks uintptr Ftcl_PkgProvideEx uintptr Ftcl_PkgRequireEx uintptr Ftcl_Panic uintptr Ftcl_Alloc uintptr Ftcl_Free uintptr Ftcl_Realloc uintptr Ftcl_DbCkalloc uintptr Ftcl_DbCkfree uintptr Ftcl_DbCkrealloc uintptr Freserved9 uintptr Freserved10 uintptr Ftcl_SetTimer uintptr Ftcl_Sleep uintptr Ftcl_WaitForEvent uintptr Ftcl_AppendAllObjTypes uintptr Ftcl_AppendStringsToObj uintptr Ftcl_AppendToObj uintptr Ftcl_ConcatObj uintptr Ftcl_ConvertToType uintptr Ftcl_DbDecrRefCount uintptr Ftcl_DbIncrRefCount uintptr Ftcl_DbIsShared uintptr Ftcl_DbNewBooleanObj uintptr Ftcl_DbNewByteArrayObj uintptr Ftcl_DbNewDoubleObj uintptr Ftcl_DbNewListObj uintptr Ftcl_DbNewLongObj uintptr Ftcl_DbNewObj uintptr Ftcl_DbNewStringObj uintptr Ftcl_DuplicateObj uintptr FtclFreeObj uintptr Ftcl_GetBoolean uintptr Ftcl_GetBooleanFromObj uintptr Ftcl_GetByteArrayFromObj uintptr Ftcl_GetDouble uintptr Ftcl_GetDoubleFromObj uintptr Ftcl_GetIndexFromObj uintptr Ftcl_GetInt uintptr Ftcl_GetIntFromObj uintptr Ftcl_GetLongFromObj uintptr Ftcl_GetObjType uintptr Ftcl_GetStringFromObj uintptr Ftcl_InvalidateStringRep uintptr Ftcl_ListObjAppendList uintptr Ftcl_ListObjAppendElement uintptr Ftcl_ListObjGetElements uintptr Ftcl_ListObjIndex uintptr Ftcl_ListObjLength uintptr Ftcl_ListObjReplace uintptr Ftcl_NewBooleanObj uintptr Ftcl_NewByteArrayObj uintptr Ftcl_NewDoubleObj uintptr Ftcl_NewIntObj uintptr Ftcl_NewListObj uintptr Ftcl_NewLongObj uintptr Ftcl_NewObj uintptr Ftcl_NewStringObj uintptr Ftcl_SetBooleanObj uintptr Ftcl_SetByteArrayLength uintptr Ftcl_SetByteArrayObj uintptr Ftcl_SetDoubleObj uintptr Ftcl_SetIntObj uintptr Ftcl_SetListObj uintptr Ftcl_SetLongObj uintptr Ftcl_SetObjLength uintptr Ftcl_SetStringObj uintptr Ftcl_AddErrorInfo uintptr Ftcl_AddObjErrorInfo uintptr Ftcl_AllowExceptions uintptr Ftcl_AppendElement uintptr Ftcl_AppendResult uintptr Ftcl_AsyncCreate uintptr Ftcl_AsyncDelete uintptr Ftcl_AsyncInvoke uintptr Ftcl_AsyncMark uintptr Ftcl_AsyncReady uintptr Ftcl_BackgroundError uintptr Ftcl_Backslash uintptr Ftcl_BadChannelOption uintptr Ftcl_CallWhenDeleted uintptr Ftcl_CancelIdleCall uintptr Ftcl_Close uintptr Ftcl_CommandComplete uintptr Ftcl_Concat uintptr Ftcl_ConvertElement uintptr Ftcl_ConvertCountedElement uintptr Ftcl_CreateAlias uintptr Ftcl_CreateAliasObj uintptr Ftcl_CreateChannel uintptr Ftcl_CreateChannelHandler uintptr Ftcl_CreateCloseHandler uintptr Ftcl_CreateCommand uintptr Ftcl_CreateEventSource uintptr Ftcl_CreateExitHandler uintptr Ftcl_CreateInterp uintptr Ftcl_CreateMathFunc uintptr Ftcl_CreateObjCommand uintptr Ftcl_CreateSlave uintptr Ftcl_CreateTimerHandler uintptr Ftcl_CreateTrace uintptr Ftcl_DeleteAssocData uintptr Ftcl_DeleteChannelHandler uintptr Ftcl_DeleteCloseHandler uintptr Ftcl_DeleteCommand uintptr Ftcl_DeleteCommandFromToken uintptr Ftcl_DeleteEvents uintptr Ftcl_DeleteEventSource uintptr Ftcl_DeleteExitHandler uintptr Ftcl_DeleteHashEntry uintptr Ftcl_DeleteHashTable uintptr Ftcl_DeleteInterp uintptr Ftcl_DetachPids uintptr Ftcl_DeleteTimerHandler uintptr Ftcl_DeleteTrace uintptr Ftcl_DontCallWhenDeleted uintptr Ftcl_DoOneEvent uintptr Ftcl_DoWhenIdle uintptr Ftcl_DStringAppend uintptr Ftcl_DStringAppendElement uintptr Ftcl_DStringEndSublist uintptr Ftcl_DStringFree uintptr Ftcl_DStringGetResult uintptr Ftcl_DStringInit uintptr Ftcl_DStringResult uintptr Ftcl_DStringSetLength uintptr Ftcl_DStringStartSublist uintptr Ftcl_Eof uintptr Ftcl_ErrnoId uintptr Ftcl_ErrnoMsg uintptr Ftcl_Eval uintptr Ftcl_EvalFile uintptr Ftcl_EvalObj uintptr Ftcl_EventuallyFree uintptr Ftcl_Exit uintptr Ftcl_ExposeCommand uintptr Ftcl_ExprBoolean uintptr Ftcl_ExprBooleanObj uintptr Ftcl_ExprDouble uintptr Ftcl_ExprDoubleObj uintptr Ftcl_ExprLong uintptr Ftcl_ExprLongObj uintptr Ftcl_ExprObj uintptr Ftcl_ExprString uintptr Ftcl_Finalize uintptr Ftcl_FindExecutable uintptr Ftcl_FirstHashEntry uintptr Ftcl_Flush uintptr Ftcl_FreeResult uintptr Ftcl_GetAlias uintptr Ftcl_GetAliasObj uintptr Ftcl_GetAssocData uintptr Ftcl_GetChannel uintptr Ftcl_GetChannelBufferSize uintptr Ftcl_GetChannelHandle uintptr Ftcl_GetChannelInstanceData uintptr Ftcl_GetChannelMode uintptr Ftcl_GetChannelName uintptr Ftcl_GetChannelOption uintptr Ftcl_GetChannelType uintptr Ftcl_GetCommandInfo uintptr Ftcl_GetCommandName uintptr Ftcl_GetErrno uintptr Ftcl_GetHostName uintptr Ftcl_GetInterpPath uintptr Ftcl_GetMaster uintptr Ftcl_GetNameOfExecutable uintptr Ftcl_GetObjResult uintptr Freserved167 uintptr Ftcl_GetPathType uintptr Ftcl_Gets uintptr Ftcl_GetsObj uintptr Ftcl_GetServiceMode uintptr Ftcl_GetSlave uintptr Ftcl_GetStdChannel uintptr Ftcl_GetStringResult uintptr Ftcl_GetVar uintptr Ftcl_GetVar2 uintptr Ftcl_GlobalEval uintptr Ftcl_GlobalEvalObj uintptr Ftcl_HideCommand uintptr Ftcl_Init uintptr Ftcl_InitHashTable uintptr Ftcl_InputBlocked uintptr Ftcl_InputBuffered uintptr Ftcl_InterpDeleted uintptr Ftcl_IsSafe uintptr Ftcl_JoinPath uintptr Ftcl_LinkVar uintptr Freserved188 uintptr Ftcl_MakeFileChannel uintptr Ftcl_MakeSafe uintptr Ftcl_MakeTcpClientChannel uintptr Ftcl_Merge uintptr Ftcl_NextHashEntry uintptr Ftcl_NotifyChannel uintptr Ftcl_ObjGetVar2 uintptr Ftcl_ObjSetVar2 uintptr Ftcl_OpenCommandChannel uintptr Ftcl_OpenFileChannel uintptr Ftcl_OpenTcpClient uintptr Ftcl_OpenTcpServer uintptr Ftcl_Preserve uintptr Ftcl_PrintDouble uintptr Ftcl_PutEnv uintptr Ftcl_PosixError uintptr Ftcl_QueueEvent uintptr Ftcl_Read uintptr Ftcl_ReapDetachedProcs uintptr Ftcl_RecordAndEval uintptr Ftcl_RecordAndEvalObj uintptr Ftcl_RegisterChannel uintptr Ftcl_RegisterObjType uintptr Ftcl_RegExpCompile uintptr Ftcl_RegExpExec uintptr Ftcl_RegExpMatch uintptr Ftcl_RegExpRange uintptr Ftcl_Release uintptr Ftcl_ResetResult uintptr Ftcl_ScanElement uintptr Ftcl_ScanCountedElement uintptr Ftcl_SeekOld uintptr Ftcl_ServiceAll uintptr Ftcl_ServiceEvent uintptr Ftcl_SetAssocData uintptr Ftcl_SetChannelBufferSize uintptr Ftcl_SetChannelOption uintptr Ftcl_SetCommandInfo uintptr Ftcl_SetErrno uintptr Ftcl_SetErrorCode uintptr Ftcl_SetMaxBlockTime uintptr Ftcl_SetPanicProc uintptr Ftcl_SetRecursionLimit uintptr Ftcl_SetResult uintptr Ftcl_SetServiceMode uintptr Ftcl_SetObjErrorCode uintptr Ftcl_SetObjResult uintptr Ftcl_SetStdChannel uintptr Ftcl_SetVar uintptr Ftcl_SetVar2 uintptr Ftcl_SignalId uintptr Ftcl_SignalMsg uintptr Ftcl_SourceRCFile uintptr Ftcl_SplitList uintptr Ftcl_SplitPath uintptr Ftcl_StaticPackage uintptr Ftcl_StringMatch uintptr Ftcl_TellOld uintptr Ftcl_TraceVar uintptr Ftcl_TraceVar2 uintptr Ftcl_TranslateFileName uintptr Ftcl_Ungets uintptr Ftcl_UnlinkVar uintptr Ftcl_UnregisterChannel uintptr Ftcl_UnsetVar uintptr Ftcl_UnsetVar2 uintptr Ftcl_UntraceVar uintptr Ftcl_UntraceVar2 uintptr Ftcl_UpdateLinkedVar uintptr Ftcl_UpVar uintptr Ftcl_UpVar2 uintptr Ftcl_VarEval uintptr Ftcl_VarTraceInfo uintptr Ftcl_VarTraceInfo2 uintptr Ftcl_Write uintptr Ftcl_WrongNumArgs uintptr Ftcl_DumpActiveMemory uintptr Ftcl_ValidateAllMemory uintptr Ftcl_AppendResultVA uintptr Ftcl_AppendStringsToObjVA uintptr Ftcl_HashStats uintptr Ftcl_ParseVar uintptr Ftcl_PkgPresent uintptr Ftcl_PkgPresentEx uintptr Ftcl_PkgProvide uintptr Ftcl_PkgRequire uintptr Ftcl_SetErrorCodeVA uintptr Ftcl_VarEvalVA uintptr Ftcl_WaitPid uintptr Ftcl_PanicVA uintptr Ftcl_GetVersion uintptr Ftcl_InitMemory uintptr Ftcl_StackChannel uintptr Ftcl_UnstackChannel uintptr Ftcl_GetStackedChannel uintptr Ftcl_SetMainLoop uintptr Freserved285 uintptr Ftcl_AppendObjToObj uintptr Ftcl_CreateEncoding uintptr Ftcl_CreateThreadExitHandler uintptr Ftcl_DeleteThreadExitHandler uintptr Ftcl_DiscardResult uintptr Ftcl_EvalEx uintptr Ftcl_EvalObjv uintptr Ftcl_EvalObjEx uintptr Ftcl_ExitThread uintptr Ftcl_ExternalToUtf uintptr Ftcl_ExternalToUtfDString uintptr Ftcl_FinalizeThread uintptr Ftcl_FinalizeNotifier uintptr Ftcl_FreeEncoding uintptr Ftcl_GetCurrentThread uintptr Ftcl_GetEncoding uintptr Ftcl_GetEncodingName uintptr Ftcl_GetEncodingNames uintptr Ftcl_GetIndexFromObjStruct uintptr Ftcl_GetThreadData uintptr Ftcl_GetVar2Ex uintptr Ftcl_InitNotifier uintptr Ftcl_MutexLock uintptr Ftcl_MutexUnlock uintptr Ftcl_ConditionNotify uintptr Ftcl_ConditionWait uintptr Ftcl_NumUtfChars uintptr Ftcl_ReadChars uintptr Ftcl_RestoreResult uintptr Ftcl_SaveResult uintptr Ftcl_SetSystemEncoding uintptr Ftcl_SetVar2Ex uintptr Ftcl_ThreadAlert uintptr Ftcl_ThreadQueueEvent uintptr Ftcl_UniCharAtIndex uintptr Ftcl_UniCharToLower uintptr Ftcl_UniCharToTitle uintptr Ftcl_UniCharToUpper uintptr Ftcl_UniCharToUtf uintptr Ftcl_UtfAtIndex uintptr Ftcl_UtfCharComplete uintptr Ftcl_UtfBackslash uintptr Ftcl_UtfFindFirst uintptr Ftcl_UtfFindLast uintptr Ftcl_UtfNext uintptr Ftcl_UtfPrev uintptr Ftcl_UtfToExternal uintptr Ftcl_UtfToExternalDString uintptr Ftcl_UtfToLower uintptr Ftcl_UtfToTitle uintptr Ftcl_UtfToUniChar uintptr Ftcl_UtfToUpper uintptr Ftcl_WriteChars uintptr Ftcl_WriteObj uintptr Ftcl_GetString uintptr Ftcl_GetDefaultEncodingDir uintptr Ftcl_SetDefaultEncodingDir uintptr Ftcl_AlertNotifier uintptr Ftcl_ServiceModeHook uintptr Ftcl_UniCharIsAlnum uintptr Ftcl_UniCharIsAlpha uintptr Ftcl_UniCharIsDigit uintptr Ftcl_UniCharIsLower uintptr Ftcl_UniCharIsSpace uintptr Ftcl_UniCharIsUpper uintptr Ftcl_UniCharIsWordChar uintptr Ftcl_UniCharLen uintptr Ftcl_UniCharNcmp uintptr Ftcl_UniCharToUtfDString uintptr Ftcl_UtfToUniCharDString uintptr Ftcl_GetRegExpFromObj uintptr Ftcl_EvalTokens uintptr Ftcl_FreeParse uintptr Ftcl_LogCommandInfo uintptr Ftcl_ParseBraces uintptr Ftcl_ParseCommand uintptr Ftcl_ParseExpr uintptr Ftcl_ParseQuotedString uintptr Ftcl_ParseVarName uintptr Ftcl_GetCwd uintptr Ftcl_Chdir uintptr Ftcl_Access uintptr Ftcl_Stat uintptr Ftcl_UtfNcmp uintptr Ftcl_UtfNcasecmp uintptr Ftcl_StringCaseMatch uintptr Ftcl_UniCharIsControl uintptr Ftcl_UniCharIsGraph uintptr Ftcl_UniCharIsPrint uintptr Ftcl_UniCharIsPunct uintptr Ftcl_RegExpExecObj uintptr Ftcl_RegExpGetInfo uintptr Ftcl_NewUnicodeObj uintptr Ftcl_SetUnicodeObj uintptr Ftcl_GetCharLength uintptr Ftcl_GetUniChar uintptr Ftcl_GetUnicode uintptr Ftcl_GetRange uintptr Ftcl_AppendUnicodeToObj uintptr Ftcl_RegExpMatchObj uintptr Ftcl_SetNotifier uintptr Ftcl_GetAllocMutex uintptr Ftcl_GetChannelNames uintptr Ftcl_GetChannelNamesEx uintptr Ftcl_ProcObjCmd uintptr Ftcl_ConditionFinalize uintptr Ftcl_MutexFinalize uintptr Ftcl_CreateThread uintptr Ftcl_ReadRaw uintptr Ftcl_WriteRaw uintptr Ftcl_GetTopChannel uintptr Ftcl_ChannelBuffered uintptr Ftcl_ChannelName uintptr Ftcl_ChannelVersion uintptr Ftcl_ChannelBlockModeProc uintptr Ftcl_ChannelCloseProc uintptr Ftcl_ChannelClose2Proc uintptr Ftcl_ChannelInputProc uintptr Ftcl_ChannelOutputProc uintptr Ftcl_ChannelSeekProc uintptr Ftcl_ChannelSetOptionProc uintptr Ftcl_ChannelGetOptionProc uintptr Ftcl_ChannelWatchProc uintptr Ftcl_ChannelGetHandleProc uintptr Ftcl_ChannelFlushProc uintptr Ftcl_ChannelHandlerProc uintptr Ftcl_JoinThread uintptr Ftcl_IsChannelShared uintptr Ftcl_IsChannelRegistered uintptr Ftcl_CutChannel uintptr Ftcl_SpliceChannel uintptr Ftcl_ClearChannelHandlers uintptr Ftcl_IsChannelExisting uintptr Ftcl_UniCharNcasecmp uintptr Ftcl_UniCharCaseMatch uintptr Ftcl_FindHashEntry uintptr Ftcl_CreateHashEntry uintptr Ftcl_InitCustomHashTable uintptr Ftcl_InitObjHashTable uintptr Ftcl_CommandTraceInfo uintptr Ftcl_TraceCommand uintptr Ftcl_UntraceCommand uintptr Ftcl_AttemptAlloc uintptr Ftcl_AttemptDbCkalloc uintptr Ftcl_AttemptRealloc uintptr Ftcl_AttemptDbCkrealloc uintptr Ftcl_AttemptSetObjLength uintptr Ftcl_GetChannelThread uintptr Ftcl_GetUnicodeFromObj uintptr Ftcl_GetMathFuncInfo uintptr Ftcl_ListMathFuncs uintptr Ftcl_SubstObj uintptr Ftcl_DetachChannel uintptr Ftcl_IsStandardChannel uintptr Ftcl_FSCopyFile uintptr Ftcl_FSCopyDirectory uintptr Ftcl_FSCreateDirectory uintptr Ftcl_FSDeleteFile uintptr Ftcl_FSLoadFile uintptr Ftcl_FSMatchInDirectory uintptr Ftcl_FSLink uintptr Ftcl_FSRemoveDirectory uintptr Ftcl_FSRenameFile uintptr Ftcl_FSLstat uintptr Ftcl_FSUtime uintptr Ftcl_FSFileAttrsGet uintptr Ftcl_FSFileAttrsSet uintptr Ftcl_FSFileAttrStrings uintptr Ftcl_FSStat uintptr Ftcl_FSAccess uintptr Ftcl_FSOpenFileChannel uintptr Ftcl_FSGetCwd uintptr Ftcl_FSChdir uintptr Ftcl_FSConvertToPathType uintptr Ftcl_FSJoinPath uintptr Ftcl_FSSplitPath uintptr Ftcl_FSEqualPaths uintptr Ftcl_FSGetNormalizedPath uintptr Ftcl_FSJoinToPath uintptr Ftcl_FSGetInternalRep uintptr Ftcl_FSGetTranslatedPath uintptr Ftcl_FSEvalFile uintptr Ftcl_FSNewNativePath uintptr Ftcl_FSGetNativePath uintptr Ftcl_FSFileSystemInfo uintptr Ftcl_FSPathSeparator uintptr Ftcl_FSListVolumes uintptr Ftcl_FSRegister uintptr Ftcl_FSUnregister uintptr Ftcl_FSData uintptr Ftcl_FSGetTranslatedStringPath uintptr Ftcl_FSGetFileSystemForPath uintptr Ftcl_FSGetPathType uintptr Ftcl_OutputBuffered uintptr Ftcl_FSMountsChanged uintptr Ftcl_EvalTokensStandard uintptr Ftcl_GetTime uintptr Ftcl_CreateObjTrace uintptr Ftcl_GetCommandInfoFromToken uintptr Ftcl_SetCommandInfoFromToken uintptr Ftcl_DbNewWideIntObj uintptr Ftcl_GetWideIntFromObj uintptr Ftcl_NewWideIntObj uintptr Ftcl_SetWideIntObj uintptr Ftcl_AllocStatBuf uintptr Ftcl_Seek uintptr Ftcl_Tell uintptr Ftcl_ChannelWideSeekProc uintptr Ftcl_DictObjPut uintptr Ftcl_DictObjGet uintptr Ftcl_DictObjRemove uintptr Ftcl_DictObjSize uintptr Ftcl_DictObjFirst uintptr Ftcl_DictObjNext uintptr Ftcl_DictObjDone uintptr Ftcl_DictObjPutKeyList uintptr Ftcl_DictObjRemoveKeyList uintptr Ftcl_NewDictObj uintptr Ftcl_DbNewDictObj uintptr Ftcl_RegisterConfig uintptr Ftcl_CreateNamespace uintptr Ftcl_DeleteNamespace uintptr Ftcl_AppendExportList uintptr Ftcl_Export uintptr Ftcl_Import uintptr Ftcl_ForgetImport uintptr Ftcl_GetCurrentNamespace uintptr Ftcl_GetGlobalNamespace uintptr Ftcl_FindNamespace uintptr Ftcl_FindCommand uintptr Ftcl_GetCommandFromObj uintptr Ftcl_GetCommandFullName uintptr Ftcl_FSEvalFileEx uintptr Ftcl_SetExitProc uintptr Ftcl_LimitAddHandler uintptr Ftcl_LimitRemoveHandler uintptr Ftcl_LimitReady uintptr Ftcl_LimitCheck uintptr Ftcl_LimitExceeded uintptr Ftcl_LimitSetCommands uintptr Ftcl_LimitSetTime uintptr Ftcl_LimitSetGranularity uintptr Ftcl_LimitTypeEnabled uintptr Ftcl_LimitTypeExceeded uintptr Ftcl_LimitTypeSet uintptr Ftcl_LimitTypeReset uintptr Ftcl_LimitGetCommands uintptr Ftcl_LimitGetTime uintptr Ftcl_LimitGetGranularity uintptr Ftcl_SaveInterpState uintptr Ftcl_RestoreInterpState uintptr Ftcl_DiscardInterpState uintptr Ftcl_SetReturnOptions uintptr Ftcl_GetReturnOptions uintptr Ftcl_IsEnsemble uintptr Ftcl_CreateEnsemble uintptr Ftcl_FindEnsemble uintptr Ftcl_SetEnsembleSubcommandList uintptr Ftcl_SetEnsembleMappingDict uintptr Ftcl_SetEnsembleUnknownHandler uintptr Ftcl_SetEnsembleFlags uintptr Ftcl_GetEnsembleSubcommandList uintptr Ftcl_GetEnsembleMappingDict uintptr Ftcl_GetEnsembleUnknownHandler uintptr Ftcl_GetEnsembleFlags uintptr Ftcl_GetEnsembleNamespace uintptr Ftcl_SetTimeProc uintptr Ftcl_QueryTimeProc uintptr Ftcl_ChannelThreadActionProc uintptr Ftcl_NewBignumObj uintptr Ftcl_DbNewBignumObj uintptr Ftcl_SetBignumObj uintptr Ftcl_GetBignumFromObj uintptr Ftcl_TakeBignumFromObj uintptr Ftcl_TruncateChannel uintptr Ftcl_ChannelTruncateProc uintptr Ftcl_SetChannelErrorInterp uintptr Ftcl_GetChannelErrorInterp uintptr Ftcl_SetChannelError uintptr Ftcl_GetChannelError uintptr Ftcl_InitBignumFromDouble uintptr Ftcl_GetNamespaceUnknownHandler uintptr Ftcl_SetNamespaceUnknownHandler uintptr Ftcl_GetEncodingFromObj uintptr Ftcl_GetEncodingSearchPath uintptr Ftcl_SetEncodingSearchPath uintptr Ftcl_GetEncodingNameFromEnvironment uintptr Ftcl_PkgRequireProc uintptr Ftcl_AppendObjToErrorInfo uintptr Ftcl_AppendLimitedToObj uintptr Ftcl_Format uintptr Ftcl_AppendFormatToObj uintptr Ftcl_ObjPrintf uintptr Ftcl_AppendPrintfToObj uintptr Ftcl_CancelEval uintptr Ftcl_Canceled uintptr Ftcl_CreatePipe uintptr Ftcl_NRCreateCommand uintptr Ftcl_NREvalObj uintptr Ftcl_NREvalObjv uintptr Ftcl_NRCmdSwap uintptr Ftcl_NRAddCallback uintptr Ftcl_NRCallObjProc uintptr Ftcl_GetFSDeviceFromStat uintptr Ftcl_GetFSInodeFromStat uintptr Ftcl_GetModeFromStat uintptr Ftcl_GetLinkCountFromStat uintptr Ftcl_GetUserIdFromStat uintptr Ftcl_GetGroupIdFromStat uintptr Ftcl_GetDeviceTypeFromStat uintptr Ftcl_GetAccessTimeFromStat uintptr Ftcl_GetModificationTimeFromStat uintptr Ftcl_GetChangeTimeFromStat uintptr Ftcl_GetSizeFromStat uintptr Ftcl_GetBlocksFromStat uintptr Ftcl_GetBlockSizeFromStat uintptr Ftcl_SetEnsembleParameterList uintptr Ftcl_GetEnsembleParameterList uintptr Ftcl_ParseArgsObjv uintptr Ftcl_GetErrorLine uintptr Ftcl_SetErrorLine uintptr Ftcl_TransferResult uintptr Ftcl_InterpActive uintptr Ftcl_BackgroundException uintptr Ftcl_ZlibDeflate uintptr Ftcl_ZlibInflate uintptr Ftcl_ZlibCRC32 uintptr Ftcl_ZlibAdler32 uintptr Ftcl_ZlibStreamInit uintptr Ftcl_ZlibStreamGetCommandName uintptr Ftcl_ZlibStreamEof uintptr Ftcl_ZlibStreamChecksum uintptr Ftcl_ZlibStreamPut uintptr Ftcl_ZlibStreamGet uintptr Ftcl_ZlibStreamClose uintptr Ftcl_ZlibStreamReset uintptr Ftcl_SetStartupScript uintptr Ftcl_GetStartupScript uintptr Ftcl_CloseEx uintptr Ftcl_NRExprObj uintptr Ftcl_NRSubstObj uintptr Ftcl_LoadFile uintptr Ftcl_FindSymbol uintptr Ftcl_FSUnloadFile uintptr Ftcl_ZlibStreamSetCompressionDictionary uintptr } /* tclDecls.h:2485:3 */ // Type used to cache parameter information for the "circle" r-tree geometry // callback. type Circle1 = struct { FaBox [2]struct { Fxmin float64 Fxmax float64 Fymin float64 Fymax float64 } Fcenterx float64 Fcentery float64 Fradius float64 FmxArea float64 FeScoreType int32 _ [4]byte } /* test_rtree.c:31:9 */ // Type used to cache parameter information for the "circle" r-tree geometry // callback. type Circle = Circle1 /* test_rtree.c:31:23 */ type Box = struct { Fxmin float64 Fxmax float64 Fymin float64 Fymax float64 } /* test_rtree.c:31:9 */ // Destructor function for Circle objects allocated by circle_geom(). func circle_del(tls *libc.TLS, p uintptr) { /* test_rtree.c:49:13: */ sqlite3.Xsqlite3_free(tls, p) } // Implementation of "circle" r-tree geometry callback. func circle_geom(tls *libc.TLS, p uintptr, nCoord int32, aCoord uintptr, pRes uintptr) int32 { /* test_rtree.c:56:12: */ var i int32 // Iterator variable var pCircle uintptr // Structure defining circular region var xmin float64 var xmax float64 // X dimensions of box being tested var ymin float64 var ymax float64 // X dimensions of box being tested xmin = *(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord)) xmax = *(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 1*8)) ymin = *(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 2*8)) ymax = *(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 3*8)) pCircle = (*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FpUser if pCircle == uintptr(0) { // If pUser is still 0, then the parameter values have not been tested // for correctness or stored into a Circle structure yet. Do this now. // This geometry callback is for use with a 2-dimensional r-tree table. // Return an error if the table does not have exactly 2 dimensions. if nCoord != 4 { return SQLITE_ERROR } // Test that the correct number of parameters (3) have been supplied, // and that the parameters are in range (that the radius of the circle // radius is greater than zero). if ((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FnParam != 3) || (*(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 2*8)) < 0.0) { return SQLITE_ERROR } // Allocate a structure to cache parameter data in. Return SQLITE_NOMEM // if the allocation fails. pCircle = libc.AssignPtrUintptr(p+24 /* &.pUser */, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Circle{})))) if !(pCircle != 0) { return SQLITE_NOMEM } (*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FxDelUser = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{circle_del})) // Record the center and radius of the circular region. One way that // tested bounding boxes that intersect the circular region are detected // is by testing if each corner of the bounding box lies within radius // units of the center of the circle. (*Circle)(unsafe.Pointer(pCircle)).Fcenterx = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam)) (*Circle)(unsafe.Pointer(pCircle)).Fcentery = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 1*8)) (*Circle)(unsafe.Pointer(pCircle)).Fradius = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 2*8)) // Define two bounding box regions. The first, aBox[0], extends to // infinity in the X dimension. It covers the same range of the Y dimension // as the circular region. The second, aBox[1], extends to infinity in // the Y dimension and is constrained to the range of the circle in the // X dimension. // // Then imagine each box is split in half along its short axis by a line // that intersects the center of the circular region. A bounding box // being tested can be said to intersect the circular region if it contains // points from each half of either of the two infinite bounding boxes. (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fxmin = (*Circle)(unsafe.Pointer(pCircle)).Fcenterx (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fxmax = (*Circle)(unsafe.Pointer(pCircle)).Fcenterx (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fymin = ((*Circle)(unsafe.Pointer(pCircle)).Fcentery + (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fymax = ((*Circle)(unsafe.Pointer(pCircle)).Fcentery - (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fxmin = ((*Circle)(unsafe.Pointer(pCircle)).Fcenterx + (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fxmax = ((*Circle)(unsafe.Pointer(pCircle)).Fcenterx - (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fymin = (*Circle)(unsafe.Pointer(pCircle)).Fcentery (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fymax = (*Circle)(unsafe.Pointer(pCircle)).Fcentery (*Circle)(unsafe.Pointer(pCircle)).FmxArea = (((xmax - xmin) * (ymax - ymin)) + 1.0) } // Check if any of the 4 corners of the bounding-box being tested lie // inside the circular region. If they do, then the bounding-box does // intersect the region of interest. Set the output variable to true and // return SQLITE_OK in this case. for i = 0; i < 4; i++ { var x float64 if (i & 0x01) != 0 { x = xmax } else { x = xmin } var y float64 if (i & 0x02) != 0 { y = ymax } else { y = ymin } var d2 float64 d2 = ((x - (*Circle)(unsafe.Pointer(pCircle)).Fcenterx) * (x - (*Circle)(unsafe.Pointer(pCircle)).Fcenterx)) d2 = d2 + ((y - (*Circle)(unsafe.Pointer(pCircle)).Fcentery) * (y - (*Circle)(unsafe.Pointer(pCircle)).Fcentery)) if d2 < ((*Circle)(unsafe.Pointer(pCircle)).Fradius * (*Circle)(unsafe.Pointer(pCircle)).Fradius) { *(*int32)(unsafe.Pointer(pRes)) = 1 return SQLITE_OK } } // Check if the bounding box covers any other part of the circular region. // See comments above for a description of how this test works. If it does // cover part of the circular region, set the output variable to true // and return SQLITE_OK. for i = 0; i < 2; i++ { if (((xmin <= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fxmin) && (xmax >= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fxmax)) && (ymin <= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fymin)) && (ymax >= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fymax) { *(*int32)(unsafe.Pointer(pRes)) = 1 return SQLITE_OK } } // The specified bounding box does not intersect the circular region. Set // the output variable to zero and return SQLITE_OK. *(*int32)(unsafe.Pointer(pRes)) = 0 return SQLITE_OK } // Implementation of "circle" r-tree geometry callback using the // 2nd-generation interface that allows scoring. // // Two calling forms: // // Qcircle(X,Y,Radius,eType) -- All values are doubles // Qcircle('x:X y:Y r:R e:ETYPE') -- Single string parameter func circle_query_func(tls *libc.TLS, p uintptr) int32 { /* test_rtree.c:168:12: */ var i int32 // Iterator variable var pCircle uintptr // Structure defining circular region var xmin float64 var xmax float64 // X dimensions of box being tested var ymin float64 var ymax float64 // X dimensions of box being tested var nWithin int32 = 0 // Number of corners inside the circle xmin = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord)) xmax = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord + 1*8)) ymin = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord + 2*8)) ymax = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord + 3*8)) pCircle = (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FpUser if pCircle == uintptr(0) { // If pUser is still 0, then the parameter values have not been tested // for correctness or stored into a Circle structure yet. Do this now. // This geometry callback is for use with a 2-dimensional r-tree table. // Return an error if the table does not have exactly 2 dimensions. if (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FnCoord != 4 { return SQLITE_ERROR } // Test that the correct number of parameters (1 or 4) have been supplied. if ((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FnParam != 4) && ((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FnParam != 1) { return SQLITE_ERROR } // Allocate a structure to cache parameter data in. Return SQLITE_NOMEM // if the allocation fails. pCircle = libc.AssignPtrUintptr(p+24 /* &.pUser */, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Circle{})))) if !(pCircle != 0) { return SQLITE_NOMEM } (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FxDelUser = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{circle_del})) // Record the center and radius of the circular region. One way that // tested bounding boxes that intersect the circular region are detected // is by testing if each corner of the bounding box lies within radius // units of the center of the circle. if (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FnParam == 4 { (*Circle)(unsafe.Pointer(pCircle)).Fcenterx = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam)) (*Circle)(unsafe.Pointer(pCircle)).Fcentery = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam + 1*8)) (*Circle)(unsafe.Pointer(pCircle)).Fradius = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam + 2*8)) (*Circle)(unsafe.Pointer(pCircle)).FeScoreType = int32(*(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam + 3*8))) } else { var z uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FapSqlParam))) (*Circle)(unsafe.Pointer(pCircle)).Fcenterx = 0.0 (*Circle)(unsafe.Pointer(pCircle)).Fcentery = 0.0 (*Circle)(unsafe.Pointer(pCircle)).Fradius = 0.0 (*Circle)(unsafe.Pointer(pCircle)).FeScoreType = 0 for (z != 0) && (*(*int8)(unsafe.Pointer(z)) != 0) { if (int32(*(*int8)(unsafe.Pointer(z))) == 'r') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == ':') { (*Circle)(unsafe.Pointer(pCircle)).Fradius = libc.Xatof(tls, (z + 2)) } else if (int32(*(*int8)(unsafe.Pointer(z))) == 'x') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == ':') { (*Circle)(unsafe.Pointer(pCircle)).Fcenterx = libc.Xatof(tls, (z + 2)) } else if (int32(*(*int8)(unsafe.Pointer(z))) == 'y') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == ':') { (*Circle)(unsafe.Pointer(pCircle)).Fcentery = libc.Xatof(tls, (z + 2)) } else if (int32(*(*int8)(unsafe.Pointer(z))) == 'e') && (int32(*(*int8)(unsafe.Pointer(z + 1))) == ':') { (*Circle)(unsafe.Pointer(pCircle)).FeScoreType = int32(libc.Xatof(tls, (z + 2))) } else if int32(*(*int8)(unsafe.Pointer(z))) == ' ' { z++ continue } for (int32(*(*int8)(unsafe.Pointer(z))) != 0) && (int32(*(*int8)(unsafe.Pointer(z))) != ' ') { z++ } for int32(*(*int8)(unsafe.Pointer(z))) == ' ' { z++ } } } if (*Circle)(unsafe.Pointer(pCircle)).Fradius < 0.0 { sqlite3.Xsqlite3_free(tls, pCircle) return SQLITE_NOMEM } // Define two bounding box regions. The first, aBox[0], extends to // infinity in the X dimension. It covers the same range of the Y dimension // as the circular region. The second, aBox[1], extends to infinity in // the Y dimension and is constrained to the range of the circle in the // X dimension. // // Then imagine each box is split in half along its short axis by a line // that intersects the center of the circular region. A bounding box // being tested can be said to intersect the circular region if it contains // points from each half of either of the two infinite bounding boxes. (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fxmin = (*Circle)(unsafe.Pointer(pCircle)).Fcenterx (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fxmax = (*Circle)(unsafe.Pointer(pCircle)).Fcenterx (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fymin = ((*Circle)(unsafe.Pointer(pCircle)).Fcentery + (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */))).Fymax = ((*Circle)(unsafe.Pointer(pCircle)).Fcentery - (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fxmin = ((*Circle)(unsafe.Pointer(pCircle)).Fcenterx + (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fxmax = ((*Circle)(unsafe.Pointer(pCircle)).Fcenterx - (*Circle)(unsafe.Pointer(pCircle)).Fradius) (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fymin = (*Circle)(unsafe.Pointer(pCircle)).Fcentery (*Box)(unsafe.Pointer((pCircle /* &.aBox */) + 1*32)).Fymax = (*Circle)(unsafe.Pointer(pCircle)).Fcentery (*Circle)(unsafe.Pointer(pCircle)).FmxArea = (float64(200.0) * 200.0) } // Check if any of the 4 corners of the bounding-box being tested lie // inside the circular region. If they do, then the bounding-box does // intersect the region of interest. Set the output variable to true and // return SQLITE_OK in this case. for i = 0; i < 4; i++ { var x float64 if (i & 0x01) != 0 { x = xmax } else { x = xmin } var y float64 if (i & 0x02) != 0 { y = ymax } else { y = ymin } var d2 float64 d2 = ((x - (*Circle)(unsafe.Pointer(pCircle)).Fcenterx) * (x - (*Circle)(unsafe.Pointer(pCircle)).Fcenterx)) d2 = d2 + ((y - (*Circle)(unsafe.Pointer(pCircle)).Fcentery) * (y - (*Circle)(unsafe.Pointer(pCircle)).Fcentery)) if d2 < ((*Circle)(unsafe.Pointer(pCircle)).Fradius * (*Circle)(unsafe.Pointer(pCircle)).Fradius) { nWithin++ } } // Check if the bounding box covers any other part of the circular region. // See comments above for a description of how this test works. If it does // cover part of the circular region, set the output variable to true // and return SQLITE_OK. if nWithin == 0 { for i = 0; i < 2; i++ { if (((xmin <= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fxmin) && (xmax >= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fxmax)) && (ymin <= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fymin)) && (ymax >= (*Box)(unsafe.Pointer((pCircle /* &.aBox */)+uintptr(i)*32)).Fymax) { nWithin = 1 break } } } if (*Circle)(unsafe.Pointer(pCircle)).FeScoreType == 1 { // Depth first search (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = sqlite3_rtree_dbl((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiLevel) } else if (*Circle)(unsafe.Pointer(pCircle)).FeScoreType == 2 { // Breadth first search (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = (sqlite3_rtree_dbl(100 - (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiLevel)) } else if (*Circle)(unsafe.Pointer(pCircle)).FeScoreType == 3 { // Depth-first search, except sort the leaf nodes by area with // the largest area first if (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiLevel == 1 { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = (1.0 - (((xmax - xmin) * (ymax - ymin)) / (*Circle)(unsafe.Pointer(pCircle)).FmxArea)) if (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore < 0.01 { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = 0.01 } } else { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = 0.0 } } else if (*Circle)(unsafe.Pointer(pCircle)).FeScoreType == 4 { // Depth-first search, except exclude odd rowids (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = sqlite3_rtree_dbl((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiLevel) if ((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiRowid & int64(1)) != 0 { nWithin = 0 } } else { // Breadth-first search, except exclude odd rowids (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = (sqlite3_rtree_dbl(100 - (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiLevel)) if ((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiRowid & int64(1)) != 0 { nWithin = 0 } } if nWithin == 0 { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = NOT_WITHIN } else if nWithin >= 4 { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = FULLY_WITHIN } else { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = PARTLY_WITHIN } return SQLITE_OK } // Implementation of "breadthfirstsearch" r-tree geometry callback using the // 2nd-generation interface that allows scoring. // // ... WHERE id MATCH breadthfirstsearch($x0,$x1,$y0,$y1) ... // // It returns all entries whose bounding boxes overlap with $x0,$x1,$y0,$y1. func bfs_query_func(tls *libc.TLS, p uintptr) int32 { /* test_rtree.c:329:12: */ var x0 float64 var x1 float64 var y0 float64 var y1 float64 // Dimensions of box being tested var bx0 float64 var bx1 float64 var by0 float64 var by1 float64 // Boundary of the query function if (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FnParam != 4 { return SQLITE_ERROR } x0 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord)) x1 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord + 1*8)) y0 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord + 2*8)) y1 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaCoord + 3*8)) bx0 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam)) bx1 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam + 1*8)) by0 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam + 2*8)) by1 = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FaParam + 3*8)) (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FrScore = (sqlite3_rtree_dbl(100 - (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FiLevel)) if (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeParentWithin == FULLY_WITHIN { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = FULLY_WITHIN } else if (((x0 >= bx0) && (x1 <= bx1)) && (y0 >= by0)) && (y1 <= by1) { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = FULLY_WITHIN } else if (((x1 >= bx0) && (x0 <= bx1)) && (y1 >= by0)) && (y0 <= by1) { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = PARTLY_WITHIN } else { (*sqlite3_rtree_query_info)(unsafe.Pointer(p)).FeWithin = NOT_WITHIN } return SQLITE_OK } // END of implementation of "circle" geometry callback. // // // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. // tcl.h -- // // This header file describes the externally-visible facilities of the // Tcl interpreter. // // Copyright (c) 1987-1994 The Regents of the University of California. // Copyright (c) 1993-1996 Lucent Technologies. // Copyright (c) 1994-1998 Sun Microsystems, Inc. // Copyright (c) 1998-2000 by Scriptics Corporation. // Copyright (c) 2002 by Kevin B. Kenny. All rights reserved. // // See the file "license.terms" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type Cube1 = struct { Fx float64 Fy float64 Fz float64 Fwidth float64 Fheight float64 Fdepth float64 } /* test_rtree.c:366:9 */ // END of implementation of "circle" geometry callback. // // // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. // tcl.h -- // // This header file describes the externally-visible facilities of the // Tcl interpreter. // // Copyright (c) 1987-1994 The Regents of the University of California. // Copyright (c) 1993-1996 Lucent Technologies. // Copyright (c) 1994-1998 Sun Microsystems, Inc. // Copyright (c) 1998-2000 by Scriptics Corporation. // Copyright (c) 2002 by Kevin B. Kenny. All rights reserved. // // See the file "license.terms" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type Cube = Cube1 /* test_rtree.c:366:21 */ func cube_context_free(tls *libc.TLS, p uintptr) { /* test_rtree.c:376:13: */ sqlite3.Xsqlite3_free(tls, p) } // The context pointer registered along with the 'cube' callback is // always ((void *)&gHere). This is just to facilitate testing, it is not // actually used for anything. var gHere int32 = 42 /* test_rtree.c:385:12 */ // Implementation of a simple r-tree geom callback to test for intersection // of r-tree rows with a "cube" shape. Cubes are defined by six scalar // coordinates as follows: // // cube(x, y, z, width, height, depth) // // The width, height and depth parameters must all be greater than zero. func cube_geom(tls *libc.TLS, p uintptr, nCoord int32, aCoord uintptr, piRes uintptr) int32 { /* test_rtree.c:396:12: */ var pCube uintptr = (*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FpUser if pCube == uintptr(0) { if (((((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FnParam != 6) || (nCoord != 6)) || (*(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 3*8)) <= 0.0)) || (*(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 4*8)) <= 0.0)) || (*(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 5*8)) <= 0.0) { return SQLITE_ERROR } pCube = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Cube{}))) if !(pCube != 0) { return SQLITE_NOMEM } (*Cube)(unsafe.Pointer(pCube)).Fx = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam)) (*Cube)(unsafe.Pointer(pCube)).Fy = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 1*8)) (*Cube)(unsafe.Pointer(pCube)).Fz = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 2*8)) (*Cube)(unsafe.Pointer(pCube)).Fwidth = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 3*8)) (*Cube)(unsafe.Pointer(pCube)).Fheight = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 4*8)) (*Cube)(unsafe.Pointer(pCube)).Fdepth = *(*sqlite3_rtree_dbl)(unsafe.Pointer((*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FaParam + 5*8)) (*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FpUser = pCube (*sqlite3_rtree_geometry)(unsafe.Pointer(p)).FxDelUser = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{cube_context_free})) } *(*int32)(unsafe.Pointer(piRes)) = 0 if (((((*(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord)) <= ((*Cube)(unsafe.Pointer(pCube)).Fx + (*Cube)(unsafe.Pointer(pCube)).Fwidth)) && (*(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 1*8)) >= (*Cube)(unsafe.Pointer(pCube)).Fx)) && (*(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 2*8)) <= ((*Cube)(unsafe.Pointer(pCube)).Fy + (*Cube)(unsafe.Pointer(pCube)).Fheight))) && (*(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 3*8)) >= (*Cube)(unsafe.Pointer(pCube)).Fy)) && (*(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 4*8)) <= ((*Cube)(unsafe.Pointer(pCube)).Fz + (*Cube)(unsafe.Pointer(pCube)).Fdepth))) && (*(*sqlite3_rtree_dbl)(unsafe.Pointer(aCoord + 5*8)) >= (*Cube)(unsafe.Pointer(pCube)).Fz) { *(*int32)(unsafe.Pointer(piRes)) = 1 } return SQLITE_OK } func register_cube_geom(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_rtree.c:443:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_rtree_geometry_callback(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+35628 /* "cube" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{cube_geom})), uintptr(unsafe.Pointer(&gHere))) tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } func register_circle_geom(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_rtree.c:471:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_rtree_geometry_callback(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+35633 /* "circle" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{circle_geom})), uintptr(0)) if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_rtree_query_callback(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+35640, /* "Qcircle" */ *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{circle_query_func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3.Xsqlite3_rtree_query_callback(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+35648, /* "breadthfirstsear..." */ *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{bfs_query_func})), uintptr(0), uintptr(0)) } tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return TCL_OK } func Sqlitetestrtree_Init(tls *libc.TLS, interp uintptr) int32 { /* test_rtree.c:507:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+35667 /* "register_cube_ge..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{register_cube_geom})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+35686 /* "register_circle_..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{register_circle_geom})), uintptr(0), uintptr(0)) return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. type schema_vtab1 = struct { Fbase sqlite3_vtab Fdb uintptr } /* test_schema.c:53:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. type schema_vtab = schema_vtab1 /* test_schema.c:53:28 */ type schema_cursor1 = struct { Fbase sqlite3_vtab_cursor FpDbList uintptr FpTableList uintptr FpColumnList uintptr Frowid int32 _ [4]byte } /* test_schema.c:54:9 */ type schema_cursor = schema_cursor1 /* test_schema.c:54:30 */ // None of this works unless we have virtual tables. // Table destructor for the schema module. func schemaDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* test_schema.c:79:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return 0 } // Table constructor for the schema module. func schemaCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_schema.c:87:12: */ var rc int32 = SQLITE_NOMEM var pVtab uintptr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(schema_vtab{}))) if pVtab != 0 { libc.Xmemset(tls, pVtab, 0, uint64(unsafe.Sizeof(schema_vtab{}))) (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb = db rc = sqlite3.Xsqlite3_declare_vtab(tls, db /* Name of database (i.e. main, temp etc.) */ /* Name of table */ /* Column number (from left-to-right, 0 upward) */ /* Column name */ /* Specified type (i.e. VARCHAR(32)) */ /* Boolean. True if NOT NULL was specified */ /* Default value for this column */ /* True if this column is part of the primary key */, ts+35707 /* "CREATE TABLE x(d..." */) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pVtab return rc } // Open a new cursor on the schema table. func schemaOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_schema.c:110:12: */ var rc int32 = SQLITE_NOMEM var pCur uintptr pCur = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(schema_cursor{}))) if pCur != 0 { libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(schema_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = pCur rc = SQLITE_OK } return rc } // Close a schema table cursor. func schemaClose(tls *libc.TLS, cur uintptr) int32 { /* test_schema.c:125:12: */ var pCur uintptr = cur sqlite3.Xsqlite3_finalize(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList) sqlite3.Xsqlite3_finalize(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpTableList) sqlite3.Xsqlite3_finalize(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpColumnList) sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Retrieve a column of data. func schemaColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test_schema.c:137:12: */ var pCur uintptr = cur switch i { case 0: sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList, 1)) break case 1: sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpTableList, 0)) break default: sqlite3.Xsqlite3_result_value(tls, ctx, sqlite3.Xsqlite3_column_value(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpColumnList, (i-2))) break } return SQLITE_OK } // Retrieve the current rowid. func schemaRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test_schema.c:156:12: */ var pCur uintptr = cur *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite_int64((*schema_cursor)(unsafe.Pointer(pCur)).Frowid) return SQLITE_OK } func finalize(tls *libc.TLS, ppStmt uintptr) int32 { /* test_schema.c:162:12: */ var rc int32 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(ppStmt))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) return rc } func schemaEof(tls *libc.TLS, cur uintptr) int32 { /* test_schema.c:168:12: */ var pCur uintptr = cur return func() int32 { if (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList != 0 { return 0 } return 1 }() } // Advance the cursor to the next row. func schemaNext(tls *libc.TLS, cur uintptr) int32 { /* test_schema.c:176:12: */ bp := tls.Alloc(40) defer tls.Free(40) var rc int32 var pCur uintptr var pVtab uintptr var zSql uintptr var pDbList uintptr rc = SQLITE_OK pCur = cur pVtab = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab zSql = uintptr(0) __1: if !(!(int32((*schema_cursor)(unsafe.Pointer(pCur)).FpColumnList) != 0) || (SQLITE_ROW != sqlite3.Xsqlite3_step(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpColumnList))) { goto __2 } if !(SQLITE_OK != (libc.AssignInt32(&rc, finalize(tls, (pCur+24 /* &.pColumnList */))))) { goto __3 } goto next_exit __3: ; __4: if !(!(int32((*schema_cursor)(unsafe.Pointer(pCur)).FpTableList) != 0) || (SQLITE_ROW != sqlite3.Xsqlite3_step(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpTableList))) { goto __5 } if !(SQLITE_OK != (libc.AssignInt32(&rc, finalize(tls, (pCur+16 /* &.pTableList */))))) { goto __6 } goto next_exit __6: ; __7: if !(SQLITE_ROW != sqlite3.Xsqlite3_step(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList)) { goto __8 } rc = finalize(tls, (pCur + 8 /* &.pDbList */)) goto next_exit goto __7 __8: ; // Set zSql to the SQL to pull the list of tables from the // sqlite_schema (or sqlite_temp_schema) table of the database // identified by the row pointed to by the SQL statement pCur->pDbList // (iterating through a "PRAGMA database_list;" statement). if !(sqlite3.Xsqlite3_column_int(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList, 0) == 1) { goto __9 } zSql = sqlite3.Xsqlite3_mprintf(tls, ts+35779 /* "SELECT name FROM..." */, 0) goto __10 __9: pDbList = (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList zSql = sqlite3.Xsqlite3_mprintf(tls, ts+35834, /* "SELECT name FROM..." */ libc.VaList(bp, sqlite3.Xsqlite3_column_text(tls, pDbList, 1))) __10: ; if !(!(zSql != 0)) { goto __11 } rc = SQLITE_NOMEM goto next_exit __11: ; rc = sqlite3.Xsqlite3_prepare(tls, (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb, zSql, -1, (pCur + 16 /* &.pTableList */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if !(rc != SQLITE_OK) { goto __12 } goto next_exit __12: ; goto __4 __5: ; // Set zSql to the SQL to the table_info pragma for the table currently // identified by the rows pointed to by statements pCur->pDbList and // pCur->pTableList. zSql = sqlite3.Xsqlite3_mprintf(tls, ts+35887, /* "PRAGMA %Q.table_..." */ libc.VaList(bp+16, sqlite3.Xsqlite3_column_text(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList, 1), sqlite3.Xsqlite3_column_text(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpTableList, 0))) if !(!(zSql != 0)) { goto __13 } rc = SQLITE_NOMEM goto next_exit __13: ; rc = sqlite3.Xsqlite3_prepare(tls, (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb, zSql, -1, (pCur + 24 /* &.pColumnList */), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if !(rc != SQLITE_OK) { goto __14 } goto next_exit __14: ; goto __1 __2: ; (*schema_cursor)(unsafe.Pointer(pCur)).Frowid++ next_exit: // TODO: Handle rc return rc } // Reset a schema table cursor. func schemaFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_schema.c:247:12: */ var rc int32 var pVtab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var pCur uintptr = pVtabCursor (*schema_cursor)(unsafe.Pointer(pCur)).Frowid = 0 finalize(tls, (pCur + 16 /* &.pTableList */)) finalize(tls, (pCur + 24 /* &.pColumnList */)) finalize(tls, (pCur + 8 /* &.pDbList */)) rc = sqlite3.Xsqlite3_prepare(tls, (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb, ts+35912 /* "PRAGMA database_..." */, -1, (pCur + 8 /* &.pDbList */), uintptr(0)) return func() int32 { if rc == SQLITE_OK { return schemaNext(tls, pVtabCursor) } return rc }() } // Analyse the WHERE condition. func schemaBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_schema.c:266:12: */ return SQLITE_OK } // A virtual table module that merely echos method calls into TCL // variables. var schemaModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xRename } /* test_schema.c:274:23 */ // Register the schema virtual table module. func register_schema_module(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_schema.c:309:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+4679 /* "schema" */, uintptr(unsafe.Pointer(&schemaModule)), uintptr(0)) return TCL_OK } // Register commands with the TCL interpreter. func Sqlitetestschema_Init(tls *libc.TLS, interp uintptr) int32 { /* test_schema.c:330:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd12)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd12[i].FzName, aObjCmd12[i].FxProc, aObjCmd12[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd12 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 35933 /* "register_schema_..." */, FxProc: 0}, } /* test_schema.c:335:5 */ // Only compile the code in this file on UNIX with a SQLITE_THREADSAFE build // and only if the SQLITE_SERVER macro is defined. // Static assertion. Requires support in the compiler. // A structure to collect a busy-handler callback and argument and a count // of the number of times it has been invoked. type SuperlockBusy1 = struct { FxBusy uintptr FpBusyArg uintptr FnBusy int32 _ [4]byte } /* test_superlock.c:29:1 */ type SuperlockBusy = SuperlockBusy1 /* test_superlock.c:34:30 */ // An instance of the following structure is allocated for each active // superlock. The opaque handle returned by sqlite3demo_superlock() is // actually a pointer to an instance of this structure. type Superlock1 = struct { Fdb uintptr FbWal int32 _ [4]byte } /* test_superlock.c:41:1 */ type Superlock = Superlock1 /* test_superlock.c:45:26 */ // The pCtx pointer passed to this function is actually a pointer to a // SuperlockBusy structure. Invoke the busy-handler function encapsulated // by the structure and return the result. func superlockBusyHandler(tls *libc.TLS, pCtx uintptr, UNUSED int32) int32 { /* test_superlock.c:52:12: */ var pBusy uintptr = pCtx if (*SuperlockBusy)(unsafe.Pointer(pBusy)).FxBusy == uintptr(0) { return 0 } return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pBusy /* &.xBusy */))))(tls, (*SuperlockBusy)(unsafe.Pointer(pBusy)).FpBusyArg, libc.PostIncInt32(&(*SuperlockBusy)(unsafe.Pointer(pBusy)).FnBusy, 1)) } // This function is used to determine if the main database file for // connection db is open in WAL mode or not. If no error occurs and the // database file is in WAL mode, set *pbWal to true and return SQLITE_OK. // If it is not in WAL mode, set *pbWal to false. // // If an error occurs, return an SQLite error code. The value of *pbWal // is undefined in this case. func superlockIsWal(tls *libc.TLS, pLock uintptr) int32 { /* test_superlock.c:67:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // Return Code // var pStmt uintptr at bp, 8 // Compiled PRAGMA journal_mode statement rc = sqlite3.Xsqlite3_prepare(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+35956 /* "PRAGMA main.jour..." */, -1, bp /* &pStmt */, uintptr(0)) if rc != SQLITE_OK { return rc } (*Superlock)(unsafe.Pointer(pLock)).FbWal = 0 if SQLITE_ROW == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) { var zMode uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) if ((zMode != 0) && (libc.Xstrlen(tls, zMode) == uint64(3))) && (sqlite3.Xsqlite3_strnicmp(tls, ts+28983 /* "wal" */, zMode, 3) == 0) { (*Superlock)(unsafe.Pointer(pLock)).FbWal = 1 } } return sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) } // Obtain an exclusive shm-lock on nByte bytes starting at offset idx // of the file fd. If the lock cannot be obtained immediately, invoke // the busy-handler until either it is obtained or the busy-handler // callback returns 0. func superlockShmLock(tls *libc.TLS, fd uintptr, idx int32, nByte int32, pBusy uintptr) int32 { /* test_superlock.c:91:12: */ var rc int32 var xShmLock uintptr = (*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer(fd)).FpMethods)).FxShmLock for ok := true; ok; ok = ((rc == SQLITE_BUSY) && (superlockBusyHandler(tls, pBusy, 0) != 0)) { rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(&xShmLock)))(tls, fd, idx, nByte, (SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE)) } return rc } // Obtain the extra locks on the database file required for WAL databases. // Invoke the supplied busy-handler as required. func superlockWalLock(tls *libc.TLS, db uintptr, pBusy uintptr) int32 { /* test_superlock.c:109:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // Return code *(*uintptr)(unsafe.Pointer(bp /* fd */)) = uintptr(0) // Main database file handle *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)) = uintptr(0) // Pointer to first page of shared memory // Obtain a pointer to the sqlite3_file object open on the main db file. rc = sqlite3.Xsqlite3_file_control(tls, db, ts+85 /* "main" */, SQLITE_FCNTL_FILE_POINTER, bp /* &fd */) if rc != SQLITE_OK { return rc } // Obtain the "recovery" lock. Normally, this lock is only obtained by // clients running database recovery. rc = superlockShmLock(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 2, 1, pBusy) if rc != SQLITE_OK { return rc } // Zero the start of the first shared-memory page. This means that any // clients that open read or write transactions from this point on will // have to run recovery before proceeding. Since they need the "recovery" // lock that this process is holding to do that, no new read or write // transactions may now be opened. Nor can a checkpoint be run, for the // same reason. rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* fd */)))).FpMethods + 104 /* &.xShmMap */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 0, (32 * 1024), 1, bp+8 /* &p */) if rc != SQLITE_OK { return rc } libc.Xmemset(tls, libc.AtomicLoadPUintptr(bp+8 /* p */), 0, uint64(32)) // Obtain exclusive locks on all the "read-lock" slots. Once these locks // are held, it is guaranteed that there are no active reader, writer or // checkpointer clients. rc = superlockShmLock(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 3, (SQLITE_SHM_NLOCK - 3), pBusy) return rc } // Release a superlock held on a database file. The argument passed to // this function must have been obtained from a successful call to // sqlite3demo_superlock(). func sqlite3demo_superunlock(tls *libc.TLS, pLock uintptr) { /* test_superlock.c:151:6: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr = pLock if (*Superlock)(unsafe.Pointer(p)).FbWal != 0 { var rc int32 // Return code var flags int32 = (SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE) *(*uintptr)(unsafe.Pointer(bp /* fd */)) = uintptr(0) rc = sqlite3.Xsqlite3_file_control(tls, (*Superlock)(unsafe.Pointer(p)).Fdb, ts+85 /* "main" */, SQLITE_FCNTL_FILE_POINTER, bp /* &fd */) if rc == SQLITE_OK { (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* fd */)))).FpMethods + 112 /* &.xShmLock */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 2, 1, flags) (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* fd */)))).FpMethods + 112 /* &.xShmLock */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 3, (SQLITE_SHM_NLOCK - 3), flags) } } sqlite3.Xsqlite3_close(tls, (*Superlock)(unsafe.Pointer(p)).Fdb) sqlite3.Xsqlite3_free(tls, p) } // Obtain a superlock on the database file identified by zPath, using the // locking primitives provided by VFS zVfs. If successful, SQLITE_OK is // returned and output variable *ppLock is populated with an opaque handle // that may be used with sqlite3demo_superunlock() to release the lock. // // If an error occurs, *ppLock is set to 0 and an SQLite error code // (e.g. SQLITE_BUSY) is returned. // // If a required lock cannot be obtained immediately and the xBusy parameter // to this function is not NULL, then xBusy is invoked in the same way // as a busy-handler registered with SQLite (using sqlite3_busy_handler()) // until either the lock can be obtained or the busy-handler function returns // 0 (indicating "give up"). func sqlite3demo_superlock(tls *libc.TLS, zPath uintptr, zVfs uintptr, xBusy uintptr, pBusyArg uintptr, ppLock uintptr) int32 { /* test_superlock.c:182:5: */ bp := tls.Alloc(24) defer tls.Free(24) *(*SuperlockBusy)(unsafe.Pointer(bp /* busy */)) = SuperlockBusy{} // Busy handler wrapper object var rc int32 // Return code var pLock uintptr pLock = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Superlock{}))) if !(pLock != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, pLock, 0, uint64(unsafe.Sizeof(Superlock{}))) // Open a database handle on the file to superlock. rc = sqlite3.Xsqlite3_open_v2(tls, zPath, (pLock /* &.db */), (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE), zVfs) // Install a busy-handler and execute a BEGIN EXCLUSIVE. If this is not // a WAL database, this is all we need to do. // // A wrapper function is used to invoke the busy-handler instead of // registering the busy-handler function supplied by the user directly // with SQLite. This is because the same busy-handler function may be // invoked directly later on when attempting to obtain the extra locks // required in WAL mode. By using the wrapper, we are able to guarantee // that the "nBusy" integer parameter passed to the users busy-handler // represents the total number of busy-handler invocations made within // this call to sqlite3demo_superlock(), including any made during the // "BEGIN EXCLUSIVE". if rc == SQLITE_OK { (*SuperlockBusy)(unsafe.Pointer(bp /* &busy */)).FxBusy = xBusy (*SuperlockBusy)(unsafe.Pointer(bp /* &busy */)).FpBusyArg = pBusyArg sqlite3.Xsqlite3_busy_handler(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{superlockBusyHandler})), bp /* &busy */) rc = sqlite3.Xsqlite3_exec(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+12908 /* "BEGIN EXCLUSIVE" */, uintptr(0), uintptr(0), uintptr(0)) } // If the BEGIN EXCLUSIVE was executed successfully and this is a WAL // database, call superlockWalLock() to obtain the extra locks required // to prevent readers, writers and/or checkpointers from accessing the // db while this process is holding the superlock. // // Before attempting any WAL locks, commit the transaction started above // to drop the WAL read and write locks currently held. Otherwise, the // new WAL locks may conflict with the old. if rc == SQLITE_OK { if (SQLITE_OK == (libc.AssignInt32(&rc, superlockIsWal(tls, pLock)))) && ((*Superlock)(unsafe.Pointer(pLock)).FbWal != 0) { rc = sqlite3.Xsqlite3_exec(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+11312 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = superlockWalLock(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, bp /* &busy */) } } } if rc != SQLITE_OK { sqlite3demo_superunlock(tls, pLock) *(*uintptr)(unsafe.Pointer(ppLock)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(ppLock)) = pLock } return rc } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type InterpAndScript1 = struct { Finterp uintptr FpScript uintptr } /* test_superlock.c:268:1 */ type InterpAndScript = InterpAndScript1 /* test_superlock.c:272:32 */ func superunlock_del(tls *libc.TLS, cd ClientData) { /* test_superlock.c:274:27: */ sqlite3demo_superunlock(tls, cd) } func superunlock_cmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_superlock.c:278:26: */ if objc != 1 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+489 /* "" */) return TCL_ERROR } tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))) return TCL_OK } func superlock_busy(tls *libc.TLS, pCtx uintptr, nBusy int32) int32 { /* test_superlock.c:292:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = pCtx var pEval uintptr // Script to evaluate *(*int32)(unsafe.Pointer(bp /* iVal */)) = 0 // Value to return pEval = tcl.XTcl_DuplicateObj(tls, (*InterpAndScript)(unsafe.Pointer(p)).FpScript) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*InterpAndScript)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewIntObj(tls, nBusy)) tcl.XTcl_EvalObjEx(tls, (*InterpAndScript)(unsafe.Pointer(p)).Finterp, pEval, TCL_EVAL_GLOBAL) tcl.XTcl_GetIntFromObj(tls, (*InterpAndScript)(unsafe.Pointer(p)).Finterp, tcl.XTcl_GetObjResult(tls, (*InterpAndScript)(unsafe.Pointer(p)).Finterp), bp /* &iVal */) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return *(*int32)(unsafe.Pointer(bp /* iVal */)) } // Tclcmd: sqlite3demo_superlock CMDNAME PATH VFS BUSY-HANDLER-SCRIPT func superlock_cmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_superlock.c:310:26: */ bp := tls.Alloc(48) defer tls.Free(48) // var pLock uintptr at bp+40, 8 // Lock context var zPath uintptr var zVfs uintptr = uintptr(0) *(*InterpAndScript)(unsafe.Pointer(bp + 24 /* busy */)) = InterpAndScript{} var xBusy uintptr = uintptr(0) // Busy handler callback var rc int32 // Return code from sqlite3demo_superlock() if (objc < 3) || (objc > 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35981 /* "CMDNAME PATH ?VF..." */) return TCL_ERROR } zPath = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if objc > 3 { zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) if libc.Xstrlen(tls, zVfs) == uint64(0) { zVfs = uintptr(0) } } if objc > 4 { (*InterpAndScript)(unsafe.Pointer(bp + 24 /* &busy */)).Finterp = interp (*InterpAndScript)(unsafe.Pointer(bp + 24 /* &busy */)).FpScript = *(*uintptr)(unsafe.Pointer(objv + 4*8)) xBusy = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{superlock_busy})) } rc = sqlite3demo_superlock(tls, zPath, zVfs, xBusy, bp+24 /* &busy */, bp+40 /* &pLock */) if rc != SQLITE_OK { tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, sqlite3.Xsqlite3ErrStr(tls, rc), 0)) return TCL_ERROR } tcl.XTcl_CreateObjCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{superunlock_cmd})), *(*uintptr)(unsafe.Pointer(bp + 40 /* pLock */)), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{superunlock_del}))) tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) return TCL_OK } func SqliteSuperlock_Init(tls *libc.TLS, interp uintptr) int32 { /* test_superlock.c:359:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+36022 /* "sqlite3demo_supe..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{superlock_cmd})), uintptr(0), uintptr(0)) return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // According to C99 standard (section 7.2) the assert // macro shall be redefined each time assert.h gets // included depending on the status of NDEBUG macro. // Static assertion. Requires support in the compiler. func SqlitetestSyscall_Init(tls *libc.TLS, interp uintptr) int32 { /* test_syscall.c:762:5: */ return TCL_OK } // This routine is the primary export of this file. // // Configure the interpreter passed as the first argument to have access // to the commands and linked variables that make up: // // * the [sqlite3] extension itself, // // * If SQLITE_TCLMD5 or SQLITE_TEST is defined, the Md5 commands, and // // * If SQLITE_TEST is set, the various test interfaces used by the Tcl // test suite. func sqlite3TestInit(tls *libc.TLS, interp uintptr) uintptr { /* test_tclsh.c:58:12: */ bp := tls.Alloc(64) defer tls.Free(64) // var cmdInfo Tcl_CmdInfo at bp, 64 // Since the primary use case for this binary is testing of SQLite, // be sure to generate core files if we crash if tcl.XTcl_GetCommandInfo(tls, interp, ts+13949 /* "sqlite3" */, bp /* &cmdInfo */) == 0 { Sqlite3_Init(tls, interp) } Md5_Init(tls, interp) Sqliteconfig_Init(tls, interp) Sqlitetest1_Init(tls, interp) Sqlitetest2_Init(tls, interp) Sqlitetest3_Init(tls, interp) Sqlitetest4_Init(tls, interp) Sqlitetest5_Init(tls, interp) Sqlitetest6_Init(tls, interp) Sqlitetest7_Init(tls, interp) Sqlitetest8_Init(tls, interp) Sqlitetest9_Init(tls, interp) Sqlitetestasync_Init(tls, interp) Sqlitetest_autoext_Init(tls, interp) Sqlitetest_blob_Init(tls, interp) Sqlitetest_demovfs_Init(tls, interp) Sqlitetest_func_Init(tls, interp) Sqlitetest_hexio_Init(tls, interp) Sqlitetest_init_Init(tls, interp) Sqlitetest_malloc_Init(tls, interp) Sqlitetest_mutex_Init(tls, interp) Sqlitetestschema_Init(tls, interp) Sqlitetesttclvar_Init(tls, interp) Sqlitetestfs_Init(tls, interp) SqlitetestThread_Init(tls, interp) SqlitetestOnefile_Init(tls) SqlitetestOsinst_Init(tls, interp) Sqlitetestbackup_Init(tls, interp) Sqlitetestintarray_Init(tls, interp) Sqlitetestvfs_Init(tls, interp) Sqlitetestrtree_Init(tls, interp) Sqlitequota_Init(tls, interp) Sqlitemultiplex_Init(tls, interp) SqliteSuperlock_Init(tls, interp) SqlitetestSyscall_Init(tls, interp) Fts5tcl_Init(tls, interp) SqliteRbu_Init(tls, interp) Sqlitetesttcl_Init(tls, interp) TestExpert_Init(tls, interp) Sqlitetest_window_Init(tls, interp) Sqlitetestvdbecov_Init(tls, interp) tcl.XTcl_CreateObjCommand(tls, interp, ts+36044 /* "load_testfixture..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{load_testfixture_extensions})), uintptr(0), uintptr(0)) return uintptr(0) } // tclcmd: load_testfixture_extensions func load_testfixture_extensions(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_tclsh.c:185:26: */ var slave uintptr if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+36072 /* "SLAVE" */) return TCL_ERROR } slave = tcl.XTcl_GetSlave(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))) if !(slave != 0) { return TCL_ERROR } sqlite3TestInit(tls, slave) return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Characters that make up the idxStr created by xBestIndex for xFilter. type tclvar_vtab1 = struct { Fbase sqlite3_vtab Finterp uintptr } /* test_tclvar.c:58:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Characters that make up the idxStr created by xBestIndex for xFilter. type tclvar_vtab = tclvar_vtab1 /* test_tclvar.c:58:28 */ type tclvar_cursor1 = struct { Fbase sqlite3_vtab_cursor FpList1 uintptr FpList2 uintptr Fi1 int32 Fi2 int32 } /* test_tclvar.c:59:9 */ type tclvar_cursor = tclvar_cursor1 /* test_tclvar.c:59:30 */ // Methods for the tclvar module func tclvarConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test_tclvar.c:80:12: */ var pVtab uintptr pVtab = sqlite3.Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(tclvar_vtab{}))) if pVtab == uintptr(0) { return SQLITE_NOMEM } *(*uintptr)(unsafe.Pointer(ppVtab)) = (pVtab /* &.base */) (*tclvar_vtab)(unsafe.Pointer(pVtab)).Finterp = pAux sqlite3.Xsqlite3_declare_vtab(tls, db, uintptr(unsafe.Pointer(&zSchema))) return SQLITE_OK } var zSchema = // Base name // Array index // Value // base(index) name *(*[100]int8)(unsafe.Pointer(ts + 36078 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ // Note that for this virtual table, the xCreate and xConnect // methods are identical. func tclvarDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* test_tclvar.c:105:12: */ sqlite3.Xsqlite3_free(tls, pVtab) return SQLITE_OK } // The xDisconnect and xDestroy methods are also the same // Open a new tclvar cursor. func tclvarOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test_tclvar.c:114:12: */ var pCur uintptr pCur = sqlite3.Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(tclvar_cursor{}))) *(*uintptr)(unsafe.Pointer(ppCursor)) = (pCur /* &.base */) return SQLITE_OK } // Close a tclvar cursor. func tclvarClose(tls *libc.TLS, cur uintptr) int32 { /* test_tclvar.c:124:12: */ var pCur uintptr = cur if (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1 != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1 if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 != 0 { for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } sqlite3.Xsqlite3_free(tls, pCur) return SQLITE_OK } // Returns 1 if data is ready, or 0 if not. func next2(tls *libc.TLS, interp uintptr, pCur uintptr, pObj uintptr) int32 { /* test_tclvar.c:139:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr if pObj != 0 { if !(int32((*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2) != 0) { p = tcl.XTcl_NewStringObj(tls, ts+36178 /* "array names" */, -1) (*Tcl_Obj)(unsafe.Pointer(p)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, pObj) tcl.XTcl_EvalObjEx(tls, interp, p, TCL_EVAL_GLOBAL) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = p if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 = tcl.XTcl_GetObjResult(tls, interp) (*Tcl_Obj)(unsafe.Pointer((*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2)).FrefCount++ } else { *(*int32)(unsafe.Pointer(bp /* n */)) = 0 (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi2++ tcl.XTcl_ListObjLength(tls, uintptr(0), (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2, bp /* &n */) if (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi2 >= *(*int32)(unsafe.Pointer(bp /* n */)) { for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 = uintptr(0) (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi2 = 0 return 0 } } } return 1 } func tclvarNext(tls *libc.TLS, cur uintptr) int32 { /* test_tclvar.c:168:12: */ bp := tls.Alloc(16) defer tls.Free(16) // var pObj uintptr at bp+8, 8 *(*int32)(unsafe.Pointer(bp /* n */)) = 0 var ok int32 = 0 var pCur uintptr = cur var interp uintptr = (*tclvar_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).Finterp tcl.XTcl_ListObjLength(tls, uintptr(0), (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1, bp /* &n */) for !(ok != 0) && ((*tclvar_cursor)(unsafe.Pointer(pCur)).Fi1 < *(*int32)(unsafe.Pointer(bp /* n */))) { tcl.XTcl_ListObjIndex(tls, uintptr(0), (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1, (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi1, bp+8 /* &pObj */) ok = next2(tls, interp, pCur, *(*uintptr)(unsafe.Pointer(bp + 8 /* pObj */))) if !(ok != 0) { (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi1++ } } return 0 } func tclvarFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_tclvar.c:188:12: */ var pCur uintptr = pVtabCursor var interp uintptr = (*tclvar_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab)).Finterp var p uintptr = tcl.XTcl_NewStringObj(tls, ts+36190 /* "tclvar_filter_cm..." */, -1) var zEq uintptr = ts + 489 /* "" */ var zMatch uintptr = ts + 489 /* "" */ var zGlob uintptr = ts + 489 /* "" */ var zRegexp uintptr = ts + 489 /* "" */ var zLike uintptr = ts + 489 /* "" */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(idxStr + uintptr(i))) != 0; i++ { switch int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(i)))) { case 'e': zEq = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) break case 'm': zMatch = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) break case 'g': zGlob = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) break case 'r': zRegexp = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) break case 'l': zLike = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) break default: } } (*Tcl_Obj)(unsafe.Pointer(p)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, tcl.XTcl_NewStringObj(tls, zEq, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, tcl.XTcl_NewStringObj(tls, zMatch, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, tcl.XTcl_NewStringObj(tls, zGlob, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, tcl.XTcl_NewStringObj(tls, zRegexp, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, tcl.XTcl_NewStringObj(tls, zLike, -1)) tcl.XTcl_EvalObjEx(tls, interp, p, TCL_EVAL_GLOBAL) if (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1 != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1 if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 != 0 { for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 = uintptr(0) } (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi1 = 0 (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi2 = 0 (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1 = tcl.XTcl_GetObjResult(tls, interp) (*Tcl_Obj)(unsafe.Pointer((*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1)).FrefCount++ for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = p if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } return tclvarNext(tls, pVtabCursor) } func tclvarColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test_tclvar.c:250:12: */ bp := tls.Alloc(40) defer tls.Free(40) // var p1 uintptr at bp+24, 8 // var p2 uintptr at bp+32, 8 var z1 uintptr var z2 uintptr = ts + 489 /* "" */ var pCur uintptr = cur var interp uintptr = (*tclvar_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).Finterp tcl.XTcl_ListObjIndex(tls, interp, (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList1, (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi1, bp+24 /* &p1 */) tcl.XTcl_ListObjIndex(tls, interp, (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2, (*tclvar_cursor)(unsafe.Pointer(pCur)).Fi2, bp+32 /* &p2 */) z1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* p1 */))) if *(*uintptr)(unsafe.Pointer(bp + 32 /* p2 */)) != 0 { z2 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* p2 */))) } switch i { case 0: { sqlite3.Xsqlite3_result_text(tls, ctx, z1, -1, libc.UintptrFromInt32(-1)) break } case 1: { sqlite3.Xsqlite3_result_text(tls, ctx, z2, -1, libc.UintptrFromInt32(-1)) break } case 2: { var pVal uintptr = tcl.XTcl_GetVar2Ex(tls, interp, z1, func() uintptr { if *(*int8)(unsafe.Pointer(z2)) != 0 { return z2 } return uintptr(0) }(), TCL_GLOBAL_ONLY) sqlite3.Xsqlite3_result_text(tls, ctx, tcl.XTcl_GetString(tls, pVal), -1, libc.UintptrFromInt32(-1)) break } case 3: { var z3 uintptr if *(*uintptr)(unsafe.Pointer(bp + 32 /* p2 */)) != 0 { z3 = sqlite3.Xsqlite3_mprintf(tls, ts+36208 /* "%s(%s)" */, libc.VaList(bp, z1, z2)) sqlite3.Xsqlite3_result_text(tls, ctx, z3, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } else { sqlite3.Xsqlite3_result_text(tls, ctx, z1, -1, libc.UintptrFromInt32(-1)) } break } } return SQLITE_OK } func tclvarRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* test_tclvar.c:292:12: */ *(*sqlite_int64)(unsafe.Pointer(pRowid)) = int64(0) return SQLITE_OK } func tclvarEof(tls *libc.TLS, cur uintptr) int32 { /* test_tclvar.c:297:12: */ var pCur uintptr = cur return func() int32 { if (*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2 != 0 { return 0 } return 1 }() } // If nul-terminated string zStr does not already contain the character // passed as the second argument, append it and return 0. Or, if there is // already an instance of x in zStr, do nothing return 1; // // There is guaranteed to be enough room in the buffer pointed to by zStr // for the new character and nul-terminator. func tclvarAddToIdxstr(tls *libc.TLS, zStr uintptr, x int8) int32 { /* test_tclvar.c:310:12: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zStr + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zStr + uintptr(i)))) == int32(x) { return 1 } } *(*int8)(unsafe.Pointer(zStr + uintptr(i))) = x *(*int8)(unsafe.Pointer(zStr + uintptr((i + 1)))) = int8(0) return 0 } // Return true if variable $::tclvar_set_omit exists and is set to true. // False otherwise. func tclvarSetOmit(tls *libc.TLS, interp uintptr) int32 { /* test_tclvar.c:324:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 *(*int32)(unsafe.Pointer(bp /* res */)) = 0 var pRes uintptr rc = tcl.XTcl_Eval(tls, interp, ts+36215 /* "expr {[info exis..." */) if rc == TCL_OK { pRes = tcl.XTcl_GetObjResult(tls, interp) rc = tcl.XTcl_GetBooleanFromObj(tls, uintptr(0), pRes, bp /* &res */) } return (libc.Bool32((rc == TCL_OK) && (*(*int32)(unsafe.Pointer(bp /* res */)) != 0))) } // The xBestIndex() method. This virtual table supports the following // operators: // // name = ? (omit flag clear) // name MATCH ? (omit flag set) // value GLOB ? (omit flag set iff $::tclvar_set_omit) // value REGEXP ? (omit flag set iff $::tclvar_set_omit) // value LIKE ? (omit flag set iff $::tclvar_set_omit) // // For each constraint present, the corresponding TCLVAR_XXX character is // appended to the idxStr value. func tclvarBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_tclvar.c:351:12: */ var pTab uintptr = tab var ii int32 var zStr uintptr = sqlite3.Xsqlite3_malloc(tls, 32) var iStr int32 = 0 if zStr == uintptr(0) { return SQLITE_NOMEM } *(*int8)(unsafe.Pointer(zStr)) = int8(0) for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) var pUsage uintptr pUsage = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8) if (*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable != 0 { // name = ? if (int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn == 0) { if 0 == tclvarAddToIdxstr(tls, zStr, int8('e')) { (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = libc.PreIncInt32(&iStr, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(0) } } // name MATCH ? if (int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_MATCH) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn == 0) { if 0 == tclvarAddToIdxstr(tls, zStr, int8('m')) { (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = libc.PreIncInt32(&iStr, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(1) } } // value GLOB ? if (int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_GLOB) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn == 2) { if 0 == tclvarAddToIdxstr(tls, zStr, int8('g')) { (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = libc.PreIncInt32(&iStr, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(tclvarSetOmit(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp)) } } // value REGEXP ? if (int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_REGEXP) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn == 2) { if 0 == tclvarAddToIdxstr(tls, zStr, int8('r')) { (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = libc.PreIncInt32(&iStr, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(tclvarSetOmit(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp)) } } // value LIKE ? if (int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == SQLITE_INDEX_CONSTRAINT_LIKE) && ((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn == 2) { if 0 == tclvarAddToIdxstr(tls, zStr, int8('l')) { (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = libc.PreIncInt32(&iStr, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(tclvarSetOmit(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp)) } } } } (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = zStr (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 return SQLITE_OK } // Invoked for any UPDATE, INSERT, or DELETE against a tclvar table func tclvarUpdate(tls *libc.TLS, tab uintptr, argc int32, argv uintptr, pRowid uintptr) int32 { /* test_tclvar.c:416:12: */ var pTab uintptr = tab if argc == 1 { // A DELETE operation. The variable to be deleted is stored in argv[0] var zVar uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) tcl.XTcl_UnsetVar2(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp, zVar, uintptr(0), TCL_GLOBAL_ONLY) return SQLITE_OK } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { // An INSERT operation var zValue uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) var zName uintptr if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) != SQLITE_TEXT { (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+36276 /* "the 'fullname' c..." */, 0) return SQLITE_ERROR } zName = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) if zValue != 0 { tcl.XTcl_SetVar2(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp, zName, uintptr(0), zValue, TCL_GLOBAL_ONLY) } else { tcl.XTcl_UnsetVar2(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp, zName, uintptr(0), TCL_GLOBAL_ONLY) } return SQLITE_OK } if (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_TEXT) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == SQLITE_TEXT) { // An UPDATE operation var zOldName uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var zNewName uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var zValue uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) if (libc.Xstrcmp(tls, zOldName, zNewName) != 0) || (zValue == uintptr(0)) { tcl.XTcl_UnsetVar2(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp, zOldName, uintptr(0), TCL_GLOBAL_ONLY) } if zValue != uintptr(0) { tcl.XTcl_SetVar2(tls, (*tclvar_vtab)(unsafe.Pointer(pTab)).Finterp, zNewName, uintptr(0), zValue, TCL_GLOBAL_ONLY) } return SQLITE_OK } (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+36311 /* "prohibited TCL v..." */, 0) return SQLITE_ERROR } // A virtual table module that provides read-only access to a // Tcl global variable namespace. var tclvarModule = sqlite3_module{ // iVersion FxCreate: 0, FxConnect: 0, FxBestIndex: 0, FxDisconnect: 0, FxDestroy: 0, FxOpen: 0, // xOpen - open a cursor FxClose: 0, // xClose - close a cursor FxFilter: 0, // xFilter - configure scan constraints FxNext: 0, // xNext - advance a cursor FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xRowid - read data FxUpdate: 0, // xRename } /* test_tclvar.c:469:23 */ // Register the echo virtual table module. func register_tclvar_module(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_tclvar.c:500:26: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = TCL_OK // var db uintptr at bp, 8 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+28896 /* "tclvar" */, uintptr(unsafe.Pointer(&tclvarModule)), interp) rc = tcl.XTcl_Eval(tls, interp, ts+36342 /* "proc like {patte..." */) return rc } // Register commands with the TCL interpreter. func Sqlitetesttclvar_Init(tls *libc.TLS, interp uintptr) int32 { /* test_tclvar.c:546:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd13)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd13[i].FzName, aObjCmd13[i].FxProc, aObjCmd13[i].FclientData, uintptr(0)) } return TCL_OK } var aObjCmd13 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ {FzName: ts + 36878 /* "register_tclvar_..." */, FxProc: 0}, } /* test_tclvar.c:552:5 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // One of these is allocated for each thread created by [sqlthread spawn]. type SqlThread1 = struct { Fparent Tcl_ThreadId Finterp uintptr FzScript uintptr FzVarname uintptr } /* test_thread.c:36:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // One of these is allocated for each thread created by [sqlthread spawn]. type SqlThread = SqlThread1 /* test_thread.c:36:26 */ // A custom Tcl_Event type used by this module. When the event is // handled, script zScript is evaluated in interpreter interp. If // the evaluation throws an exception (returns TCL_ERROR), then the // error is handled by Tcl_BackgroundError(). If no error occurs, // the result is simply discarded. type EvalEvent1 = struct { Fbase Tcl_Event FzScript uintptr Finterp uintptr } /* test_thread.c:51:9 */ // A custom Tcl_Event type used by this module. When the event is // handled, script zScript is evaluated in interpreter interp. If // the evaluation throws an exception (returns TCL_ERROR), then the // error is handled by Tcl_BackgroundError(). If no error occurs, // the result is simply discarded. type EvalEvent = EvalEvent1 /* test_thread.c:51:26 */ // Handler for events of type EvalEvent. func tclScriptEvent(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* test_thread.c:79:26: */ var rc int32 var p uintptr = evPtr rc = tcl.XTcl_Eval(tls, (*EvalEvent)(unsafe.Pointer(p)).Finterp, (*EvalEvent)(unsafe.Pointer(p)).FzScript) if rc != TCL_OK { tcl.XTcl_BackgroundError(tls, (*EvalEvent)(unsafe.Pointer(p)).Finterp) } _ = flags return 1 } // Register an EvalEvent to evaluate the script pScript in the // parent interpreter/thread of SqlThread p. func postToParent(tls *libc.TLS, p uintptr, pScript uintptr) { /* test_thread.c:94:13: */ bp := tls.Alloc(4) defer tls.Free(4) var pEvent uintptr var zMsg uintptr // var nMsg int32 at bp, 4 zMsg = tcl.XTcl_GetStringFromObj(tls, pScript, bp /* &nMsg */) pEvent = tcl.XTcl_Alloc(tls, (uint32((uint64(unsafe.Sizeof(EvalEvent{})) + uint64(*(*int32)(unsafe.Pointer(bp /* nMsg */)))) + uint64(1)))) (*EvalEvent)(unsafe.Pointer(pEvent)).Fbase.FnextPtr = uintptr(0) (*EvalEvent)(unsafe.Pointer(pEvent)).Fbase.Fproc = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{tclScriptEvent})) (*EvalEvent)(unsafe.Pointer(pEvent)).FzScript = (pEvent + 1*32) libc.Xmemcpy(tls, (*EvalEvent)(unsafe.Pointer(pEvent)).FzScript, zMsg, (uint64(*(*int32)(unsafe.Pointer(bp /* nMsg */)) + 1))) (*EvalEvent)(unsafe.Pointer(pEvent)).Finterp = (*SqlThread)(unsafe.Pointer(p)).Finterp tcl.XTcl_ThreadQueueEvent(tls, (*SqlThread)(unsafe.Pointer(p)).Fparent, pEvent, TCL_QUEUE_TAIL) tcl.XTcl_ThreadAlert(tls, (*SqlThread)(unsafe.Pointer(p)).Fparent) } // The main function for threads created with [sqlthread spawn]. func tclScriptThread(tls *libc.TLS, pSqlThread ClientData) uint32 { /* test_thread.c:114:29: */ var interp uintptr var pRes uintptr var pList uintptr var rc int32 var p uintptr = pSqlThread interp = tcl.XTcl_CreateInterp(tls) tcl.XTcl_CreateObjCommand(tls, interp, ts+36901 /* "clock_seconds" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{clock_seconds_proc})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+36915 /* "sqlthread" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_proc})), pSqlThread, uintptr(0)) Sqlitetest1_Init(tls, interp) Sqlitetest_mutex_Init(tls, interp) Sqlite3_Init(tls, interp) rc = tcl.XTcl_Eval(tls, interp, (*SqlThread)(unsafe.Pointer(p)).FzScript) pRes = tcl.XTcl_GetObjResult(tls, interp) pList = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pList)).FrefCount++ (*Tcl_Obj)(unsafe.Pointer(pRes)).FrefCount++ if rc != TCL_OK { tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, ts+10311 /* "error" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pList, pRes) postToParent(tls, p, pList) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pList if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } pList = tcl.XTcl_NewObj(tls) } tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, ts+36925 /* "set" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, (*SqlThread)(unsafe.Pointer(p)).FzVarname, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pList, pRes) postToParent(tls, p, pList) tcl.XTcl_Free(tls, p) for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pList if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } for ok2 := true; ok2; ok2 = 0 != 0 { var _objPtr uintptr = pRes if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } tcl.XTcl_DeleteInterp(tls, interp) for tcl.XTcl_DoOneEvent(tls, ((libc.CplInt32((int32(1) << 1)))|(int32(1)<<1))) != 0 { } tcl.XTcl_ExitThread(tls, 0) return uint32(0) } // sqlthread spawn VARNAME SCRIPT // // Spawn a new thread with its own Tcl interpreter and run the // specified SCRIPT(s) in it. The thread terminates after running // the script. The result of the script is stored in the variable // VARNAME. // // The caller can wait for the script to terminate using [vwait VARNAME]. func sqlthread_spawn(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_thread.c:174:26: */ bp := tls.Alloc(40) defer tls.Free(40) // var x Tcl_ThreadId at bp+32, 8 var pNew uintptr var rc int32 // var nVarname int32 at bp+24, 4 var zVarname uintptr // var nScript int32 at bp+28, 4 var zScript uintptr // Parameters for thread creation var nStack int32 = 0 var flags int32 = 0000 _ = clientData _ = objc zVarname = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+24 /* &nVarname */) zScript = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+28 /* &nScript */) pNew = tcl.XTcl_Alloc(tls, (uint32(((uint64(unsafe.Sizeof(SqlThread{})) + uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nVarname */)))) + uint64(*(*int32)(unsafe.Pointer(bp + 28 /* nScript */)))) + uint64(2)))) (*SqlThread)(unsafe.Pointer(pNew)).FzVarname = (pNew + 1*32) (*SqlThread)(unsafe.Pointer(pNew)).FzScript = ((*SqlThread)(unsafe.Pointer(pNew)).FzVarname + uintptr((*(*int32)(unsafe.Pointer(bp + 24 /* nVarname */)) + 1))) libc.Xmemcpy(tls, (*SqlThread)(unsafe.Pointer(pNew)).FzVarname, zVarname, (uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nVarname */)) + 1))) libc.Xmemcpy(tls, (*SqlThread)(unsafe.Pointer(pNew)).FzScript, zScript, (uint64(*(*int32)(unsafe.Pointer(bp + 28 /* nScript */)) + 1))) (*SqlThread)(unsafe.Pointer(pNew)).Fparent = tcl.XTcl_GetCurrentThread(tls) (*SqlThread)(unsafe.Pointer(pNew)).Finterp = interp rc = tcl.XTcl_CreateThread(tls, bp+32 /* &x */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData) uint32 }{tclScriptThread})), pNew, nStack, flags) if rc != TCL_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+36929 /* "Error in Tcl_Cre..." */, 0)) tcl.XTcl_Free(tls, pNew) return TCL_ERROR } return TCL_OK } // sqlthread parent SCRIPT // // This can be called by spawned threads only. It sends the specified // script back to the parent thread for execution. The result of // evaluating the SCRIPT is returned. The parent thread must enter // the event loop for this to work - otherwise the caller will // block indefinitely. // // NOTE: At the moment, this doesn't work. FIXME. func sqlthread_parent(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_thread.c:227:26: */ bp := tls.Alloc(28) defer tls.Free(28) var pEvent uintptr var zMsg uintptr // var nMsg int32 at bp+24, 4 var p uintptr = clientData _ = objc if p == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+36957 /* "no parent thread" */, 0)) return TCL_ERROR } zMsg = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+24 /* &nMsg */) pEvent = tcl.XTcl_Alloc(tls, (uint32((uint64(unsafe.Sizeof(EvalEvent{})) + uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nMsg */)))) + uint64(1)))) (*EvalEvent)(unsafe.Pointer(pEvent)).Fbase.FnextPtr = uintptr(0) (*EvalEvent)(unsafe.Pointer(pEvent)).Fbase.Fproc = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{tclScriptEvent})) (*EvalEvent)(unsafe.Pointer(pEvent)).FzScript = (pEvent + 1*32) libc.Xmemcpy(tls, (*EvalEvent)(unsafe.Pointer(pEvent)).FzScript, zMsg, (uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nMsg */)) + 1))) (*EvalEvent)(unsafe.Pointer(pEvent)).Finterp = (*SqlThread)(unsafe.Pointer(p)).Finterp tcl.XTcl_ThreadQueueEvent(tls, (*SqlThread)(unsafe.Pointer(p)).Fparent, pEvent, TCL_QUEUE_TAIL) tcl.XTcl_ThreadAlert(tls, (*SqlThread)(unsafe.Pointer(p)).Fparent) return TCL_OK } func xBusy(tls *libc.TLS, pArg uintptr, nBusy int32) int32 { /* test_thread.c:259:12: */ _ = pArg _ = nBusy sqlite3.Xsqlite3_sleep(tls, 50) return 1 // Try again... } // sqlthread open // // Open a database handle and return the string representation of // the pointer value. func sqlthread_open(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_thread.c:272:26: */ bp := tls.Alloc(132) defer tls.Free(132) var zFilename uintptr // var db uintptr at bp+24, 8 // var zBuf [100]int8 at bp+32, 100 _ = clientData _ = objc zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) sqlite3.Xsqlite3_open(tls, zFilename, bp+24 /* &db */) Md5_Register(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_busy_handler(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{xBusy})), uintptr(0)) if sqlite3TestMakePointerStr(tls, interp, bp+32 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */))) != 0 { return TCL_ERROR } tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, bp+32 /* &zBuf[0] */, 0)) return TCL_OK } // sqlthread open // // Return the current thread-id (Tcl_GetCurrentThread()) cast to // an integer. func sqlthread_id(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_thread.c:306:26: */ var id Tcl_ThreadId = tcl.XTcl_GetCurrentThread(tls) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, int32(id))) _ = clientData _ = objc _ = objv return TCL_OK } // Dispatch routine for the sub-commands of [sqlthread]. func sqlthread_proc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_thread.c:324:26: */ bp := tls.Alloc(164) defer tls.Free(164) *(*[5]struct { FzName uintptr FxProc uintptr FnArg int32 _ [4]byte FzUsage uintptr })(unsafe.Pointer(bp /* aSub */)) = [5]struct { FzName uintptr FxProc uintptr FnArg int32 _ [4]byte FzUsage uintptr }{ {FzName: ts + 36974 /* "parent" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_parent})), FnArg: 1, FzUsage: ts + 11585 /* "SCRIPT" */}, {FzName: ts + 36981 /* "spawn" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_spawn})), FnArg: 2, FzUsage: ts + 36987 /* "VARNAME SCRIPT" */}, {FzName: ts + 37002 /* "open" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_open})), FnArg: 1, FzUsage: ts + 37007 /* "DBNAME" */}, {FzName: ts + 37014 /* "id" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_id})), FzUsage: ts + 489 /* "" */}, {}, } var pSub uintptr var rc int32 // var iIndex int32 at bp+160, 4 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2384 /* "SUB-COMMAND" */) return TCL_ERROR } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FnArg int32 _ [4]byte FzUsage uintptr }{})), ts+1875 /* "sub-command" */, 0, bp+160 /* &iIndex */) if rc != TCL_OK { return rc } pSub = (bp /* &aSub */ + uintptr(*(*int32)(unsafe.Pointer(bp + 160 /* iIndex */)))*32) if objc < ((*struct { FzName uintptr FxProc uintptr FnArg int32 _ [4]byte FzUsage uintptr })(unsafe.Pointer(pSub)).FnArg + 2) { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, (*struct { FzName uintptr FxProc uintptr FnArg int32 _ [4]byte FzUsage uintptr })(unsafe.Pointer(pSub)).FzUsage) return TCL_ERROR } return (*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer((pSub + 8 /* &.xProc */))))(tls, clientData, interp, objc, objv) } /* ** The [clock_seconds] command. This is more or less the same as the ** regular tcl [clock seconds], except that it is available in testfixture ** when linked against both Tcl 8.4 and 8.5. Because [clock seconds] is ** implemented as a script in Tcl 8.5, it is not usually available to ** testfixture. */ func clock_seconds_proc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_thread.c:372:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var now Tcl_Time at bp, 8 tcl.XTcl_GetTime(tls, bp /* &now */) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, int32((*Tcl_Time)(unsafe.Pointer(bp /* &now */)).Fsec))) _ = clientData _ = objc _ = objv return TCL_OK } /************************************************************************* ** This block contains the implementation of the [sqlite3_blocking_step] ** command available to threads created by [sqlthread spawn] commands. It ** is only available on UNIX for now. This is because pthread condition ** variables are used. ** ** The source code for the C functions sqlite3_blocking_step(), ** blocking_step_notify() and the structure UnlockNotification is ** automatically extracted from this file and used as part of the ** documentation for the sqlite3_unlock_notify() API function. This ** should be considered if these functions are to be extended (i.e. to ** support windows) in the future. */ // // End of implementation of [sqlite3_blocking_step]. // // Register commands with the TCL interpreter. func SqlitetestThread_Init(tls *libc.TLS, interp uintptr) int32 { /* test_thread.c:619:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+36915 /* "sqlthread" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_proc})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+36901 /* "clock_seconds" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{clock_seconds_proc})), uintptr(0), uintptr(0)) return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: func Sqlitetestvdbecov_Init(tls *libc.TLS, interp uintptr) int32 { /* test_vdbecov.c:113:5: */ return TCL_OK } // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type Testvfs1 = struct { FzName uintptr FpParent uintptr FpVfs uintptr Finterp uintptr FpScript uintptr FpBuffer uintptr FisNoshm int32 FisFullshm int32 Fmask int32 Fioerr_err TestFaultInject Ffull_err TestFaultInject Fcantopen_err TestFaultInject FiDevchar int32 FiSectorsize int32 } /* test_vfs.c:37:9 */ // end block for C++ // Local Variables: // mode: c // c-basic-offset: 4 // fill-column: 78 // End: type Testvfs = Testvfs1 /* test_vfs.c:37:24 */ type TestvfsBuffer1 = struct { FzFile uintptr Fpgsz int32 _ [4]byte FaPage [1024]uintptr FpFile uintptr FpNext uintptr } /* test_vfs.c:37:9 */ type TestvfsBuffer = TestvfsBuffer1 /* test_vfs.c:39:30 */ type TestvfsFile1 = struct { Fbase sqlite3_file FpFd uintptr } /* test_vfs.c:40:9 */ type TestvfsFile = TestvfsFile1 /* test_vfs.c:40:28 */ type TestvfsFd1 = struct { FpVfs uintptr FzFilename uintptr FpReal uintptr FpShmId uintptr FpShm uintptr Fexcllock u32 Fsharedlock u32 FpNext uintptr } /* test_vfs.c:37:9 */ type TestvfsFd = TestvfsFd1 /* test_vfs.c:41:26 */ type TestFaultInject1 = struct { FiCnt int32 FeFault int32 FnFail int32 } /* test_vfs.c:37:9 */ type TestFaultInject = TestFaultInject1 /* test_vfs.c:69:32 */ var tvfs_io_methods = sqlite3_io_methods{ FiVersion: 3, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xFileSize FxLock: 0, // xLock FxUnlock: 0, // xUnlock FxCheckReservedLock: 0, // xCheckReservedLock FxFileControl: 0, // xFileControl FxSectorSize: 0, // xSectorSize FxDeviceCharacteristics: 0, // xDeviceCharacteristics FxShmMap: 0, // xShmMap FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xShmUnmap FxFetch: 0, FxUnfetch: 0, } /* test_vfs.c:204:27 */ func tvfsResultCode(tls *libc.TLS, p uintptr, pRc uintptr) int32 { /* test_vfs.c:226:12: */ bp := tls.Alloc(144) defer tls.Free(144) *(*[9]errcode)(unsafe.Pointer(bp /* aCode */)) = [9]errcode{ {FzCode: ts + 1988 /* "SQLITE_OK" */}, {FeCode: SQLITE_ERROR, FzCode: ts + 1975 /* "SQLITE_ERROR" */}, {FeCode: SQLITE_IOERR, FzCode: ts + 37017 /* "SQLITE_IOERR" */}, {FeCode: SQLITE_LOCKED, FzCode: ts + 37030 /* "SQLITE_LOCKED" */}, {FeCode: SQLITE_BUSY, FzCode: ts + 37044 /* "SQLITE_BUSY" */}, {FeCode: SQLITE_READONLY, FzCode: ts + 37056 /* "SQLITE_READONLY" */}, {FeCode: (SQLITE_READONLY | (int32(5) << 8)), FzCode: ts + 37072 /* "SQLITE_READONLY_..." */}, {FeCode: SQLITE_NOTFOUND, FzCode: ts + 37097 /* "SQLITE_NOTFOUND" */}, {FeCode: -1, FzCode: ts + 37113 /* "SQLITE_OMIT" */}, } var z uintptr var i int32 z = tcl.XTcl_GetStringResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) for i = 0; i < (int32(uint64(unsafe.Sizeof([9]errcode{})) / uint64(unsafe.Sizeof(errcode{})))); i++ { if 0 == libc.Xstrcmp(tls, z, (*errcode)(unsafe.Pointer(bp /* &aCode */ +uintptr(i)*16)).FzCode) { *(*int32)(unsafe.Pointer(pRc)) = (*errcode)(unsafe.Pointer(bp /* &aCode */ + uintptr(i)*16)).FeCode return 1 } } return 0 } type errcode = struct { FeCode int32 _ [4]byte FzCode uintptr } /* test_vfs.c:227:3 */ func tvfsInjectFault(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:256:12: */ var ret int32 = 0 if (*TestFaultInject)(unsafe.Pointer(p)).FeFault != 0 { (*TestFaultInject)(unsafe.Pointer(p)).FiCnt-- if ((*TestFaultInject)(unsafe.Pointer(p)).FiCnt == 0) || (((*TestFaultInject)(unsafe.Pointer(p)).FiCnt < 0) && ((*TestFaultInject)(unsafe.Pointer(p)).FeFault == FAULT_INJECT_PERSISTENT)) { ret = 1 (*TestFaultInject)(unsafe.Pointer(p)).FnFail++ } } return ret } func tvfsInjectIoerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:269:12: */ return tvfsInjectFault(tls, (p + 60 /* &.ioerr_err */)) } func tvfsInjectFullerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:273:12: */ return tvfsInjectFault(tls, (p + 72 /* &.full_err */)) } func tvfsInjectCantopenerr(tls *libc.TLS, p uintptr) int32 { /* test_vfs.c:276:12: */ return tvfsInjectFault(tls, (p + 84 /* &.cantopen_err */)) } func tvfsExecTcl(tls *libc.TLS, p uintptr, zMethod uintptr, arg1 uintptr, arg2 uintptr, arg3 uintptr, arg4 uintptr) { /* test_vfs.c:281:13: */ var rc int32 // Return code from Tcl_EvalObj() var pEval uintptr pEval = tcl.XTcl_DuplicateObj(tls, (*Testvfs)(unsafe.Pointer(p)).FpScript) (*Tcl_Obj)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpScript)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, zMethod, -1)) if arg1 != 0 { tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pEval, arg1) } if arg2 != 0 { tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pEval, arg2) } if arg3 != 0 { tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pEval, arg3) } if arg4 != 0 { tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pEval, arg4) } rc = tcl.XTcl_EvalObjEx(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pEval, TCL_EVAL_GLOBAL) if rc != TCL_OK { tcl.XTcl_BackgroundError(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) tcl.XTcl_ResetResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) } } // Close an tvfs-file. func tvfsClose(tls *libc.TLS, pFile uintptr) int32 { /* test_vfs.c:317:12: */ var pTestfile uintptr = pFile var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pTestfile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_CLOSE_MASK) != 0) { tvfsExecTcl(tls, p, ts+34567, /* "xClose" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) } if (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId = uintptr(0) } if (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods != 0 { tcl.XTcl_Free(tls, (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods) } sqlite3.Xsqlite3OsClose(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal) tcl.XTcl_Free(tls, pFd) (*TestvfsFile)(unsafe.Pointer(pTestfile)).FpFd = uintptr(0) return SQLITE_OK } // Read data from an tvfs-file. func tvfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_vfs.c:344:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_READ_MASK) != 0) { tvfsExecTcl(tls, p, ts+34574, /* "xRead" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } if ((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_READ_MASK) != 0)) && (tvfsInjectIoerr(tls, p) != 0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_IOERR } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3OsRead(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, zBuf, iAmt, iOfst) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Write data to an tvfs-file. func tvfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_vfs.c:371:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_WRITE_MASK) != 0) { tvfsExecTcl(tls, p, ts+34580, /* "xWrite" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, tcl.XTcl_NewWideIntObj(tls, iOfst), tcl.XTcl_NewIntObj(tls, iAmt)) tvfsResultCode(tls, p, bp /* &rc */) if *(*int32)(unsafe.Pointer(bp /* rc */)) < 0 { return SQLITE_OK } } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (tvfsInjectFullerr(tls, p) != 0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_FULL } if ((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_WRITE_MASK) != 0)) && (tvfsInjectIoerr(tls, p) != 0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_IOERR } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3OsWrite(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, zBuf, iAmt, iOfst) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Truncate an tvfs-file. func tvfsTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_vfs.c:406:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_TRUNCATE_MASK) != 0) { tvfsExecTcl(tls, p, ts+34587, /* "xTruncate" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3OsTruncate(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, size) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Sync an tvfs-file. func tvfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* test_vfs.c:427:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SYNC_MASK) != 0) { var zFlags uintptr = uintptr(0) switch flags { case SQLITE_SYNC_NORMAL: zFlags = ts + 16080 /* "normal" */ break fallthrough case SQLITE_SYNC_FULL: zFlags = ts + 17984 /* "full" */ break fallthrough case (SQLITE_SYNC_NORMAL | SQLITE_SYNC_DATAONLY): zFlags = ts + 37125 /* "normal|dataonly" */ break fallthrough case (SQLITE_SYNC_FULL | SQLITE_SYNC_DATAONLY): zFlags = ts + 37141 /* "full|dataonly" */ break fallthrough default: } tvfsExecTcl(tls, p, ts+27020, /* "xSync" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, tcl.XTcl_NewStringObj(tls, zFlags, -1), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (tvfsInjectFullerr(tls, p) != 0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_FULL } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3OsSync(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, flags) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Return the current file-size of an tvfs-file. func tvfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* test_vfs.c:471:12: */ var p uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd return sqlite3.Xsqlite3OsFileSize(tls, (*TestvfsFd)(unsafe.Pointer(p)).FpReal, pSize) } // Lock an tvfs-file. func tvfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_vfs.c:479:12: */ bp := tls.Alloc(46) defer tls.Free(46) var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_LOCK_MASK) != 0) { // var zLock [30]int8 at bp+16, 30 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+16 /* &zLock[0] */, ts+1238 /* "%d" */, libc.VaList(bp, eLock)) tvfsExecTcl(tls, p, ts+34607 /* "xLock" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), tcl.XTcl_NewStringObj(tls, bp+16 /* &zLock[0] */, -1), uintptr(0), uintptr(0)) } return sqlite3.Xsqlite3OsLock(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, eLock) } // Unlock an tvfs-file. func tvfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* test_vfs.c:494:12: */ bp := tls.Alloc(46) defer tls.Free(46) var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_UNLOCK_MASK) != 0) { // var zLock [30]int8 at bp+16, 30 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+16 /* &zLock[0] */, ts+1238 /* "%d" */, libc.VaList(bp, eLock)) tvfsExecTcl(tls, p, ts+34613 /* "xUnlock" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), tcl.XTcl_NewStringObj(tls, bp+16 /* &zLock[0] */, -1), uintptr(0), uintptr(0)) } if (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_WRITE_MASK) != 0) && (tvfsInjectIoerr(tls, p) != 0) { return (SQLITE_IOERR | (int32(8) << 8)) } return sqlite3.Xsqlite3OsUnlock(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, eLock) } // Check if another file-handle holds a RESERVED lock on an tvfs-file. func tvfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_vfs.c:512:12: */ var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_CKLOCK_MASK) != 0) { tvfsExecTcl(tls, p, ts+37155 /* "xCheckReservedLo..." */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), uintptr(0), uintptr(0), uintptr(0)) } return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, pResOut) } // File control method. For custom operations on an tvfs-file. func tvfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_vfs.c:525:12: */ bp := tls.Alloc(84) defer tls.Free(84) var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if op == SQLITE_FCNTL_PRAGMA { var argv uintptr = pArg if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), ts+10311 /* "error" */) == 0 { var rc int32 = SQLITE_ERROR if *(*uintptr)(unsafe.Pointer(argv + 2*8)) != 0 { var z uintptr = *(*uintptr)(unsafe.Pointer(argv + 2*8)) var x int32 = libc.Xatoi(tls, z) if x != 0 { rc = x for (int32(sqlite3.Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0 { z++ } for (int32(sqlite3.Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x01) != 0 { z++ } } if *(*int8)(unsafe.Pointer(z)) != 0 { *(*uintptr)(unsafe.Pointer(argv)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp, z)) } } return rc } if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)), ts+4665 /* "filename" */) == 0 { *(*uintptr)(unsafe.Pointer(argv)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, libc.VaList(bp+16, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename)) return SQLITE_OK } } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_FCNTL_MASK) != 0) { *(*[3]Fcntl)(unsafe.Pointer(bp + 32 /* aF */)) = [3]Fcntl{ {FiFnctl: SQLITE_FCNTL_BEGIN_ATOMIC_WRITE, FzFnctl: ts + 37174 /* "BEGIN_ATOMIC_WRI..." */}, {FiFnctl: SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, FzFnctl: ts + 37193 /* "COMMIT_ATOMIC_WR..." */}, {FiFnctl: SQLITE_FCNTL_ZIPVFS, FzFnctl: ts + 37213 /* "ZIPVFS" */}, } var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof([3]Fcntl{})) / uint64(unsafe.Sizeof(Fcntl{}))); i++ { if op == (*Fcntl)(unsafe.Pointer(bp+32 /* &aF */ +uintptr(i)*16)).FiFnctl { break } } if uint64(i) < (uint64(unsafe.Sizeof([3]Fcntl{})) / uint64(unsafe.Sizeof(Fcntl{}))) { *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) = 0 tvfsExecTcl(tls, p, ts+34635, /* "xFileControl" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), tcl.XTcl_NewStringObj(tls, (*Fcntl)(unsafe.Pointer(bp+32 /* &aF */ +uintptr(i)*16)).FzFnctl, -1), uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp+80 /* &rc */) if *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) != 0 { return func() int32 { if *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) < 0 { return SQLITE_OK } return *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) }() } } } return sqlite3.Xsqlite3OsFileControl(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, op, pArg) } type Fcntl = struct { FiFnctl int32 _ [4]byte FzFnctl uintptr } /* test_vfs.c:550:5 */ // Return the sector-size in bytes for an tvfs-file. func tvfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* test_vfs.c:579:12: */ var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FiSectorsize >= 0 { return (*Testvfs)(unsafe.Pointer(p)).FiSectorsize } return sqlite3.Xsqlite3OsSectorSize(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal) } // Return the device characteristic flags supported by an tvfs-file. func tvfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* test_vfs.c:591:12: */ var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FiDevchar >= 0 { return (*Testvfs)(unsafe.Pointer(p)).FiDevchar } return sqlite3.Xsqlite3OsDeviceCharacteristics(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal) } // Open an tvfs file handle. func tvfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_vfs.c:603:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var rc int32 at bp, 4 var pTestfile uintptr = pFile var pFd uintptr var pId uintptr = uintptr(0) var p uintptr = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData pFd = tcl.XTcl_Alloc(tls, (uint32(uint64(unsafe.Sizeof(TestvfsFd{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(((*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent))).FszOsFile)))) libc.Xmemset(tls, pFd, 0, (uint64(unsafe.Sizeof(TestvfsFd{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(((*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent))).FszOsFile))) (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm = uintptr(0) (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId = uintptr(0) (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename = zName (*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs = pVfs (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal = (pFd + 1*56) libc.Xmemset(tls, pTestfile, 0, uint64(unsafe.Sizeof(TestvfsFile{}))) (*TestvfsFile)(unsafe.Pointer(pTestfile)).FpFd = pFd // Evaluate the Tcl script: // // SCRIPT xOpen FILENAME KEY-VALUE-ARGS // // If the script returns an SQLite error code other than SQLITE_OK, an // error is returned to the caller. If it returns SQLITE_OK, the new // connection is named "anon". Otherwise, the value returned by the // script is used as the connection name. tcl.XTcl_ResetResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_OPEN_MASK) != 0) { var pArg uintptr = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pArg)).FrefCount++ if (flags & SQLITE_OPEN_MAIN_DB) != 0 { var z uintptr = (zName + uintptr((libc.Xstrlen(tls, zName) + uint64(1)))) for *(*int8)(unsafe.Pointer(z)) != 0 { tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pArg, tcl.XTcl_NewStringObj(tls, z, -1)) z += (uintptr(libc.Xstrlen(tls, z) + uint64(1))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pArg, tcl.XTcl_NewStringObj(tls, z, -1)) z += (uintptr(libc.Xstrlen(tls, z) + uint64(1))) } } tvfsExecTcl(tls, p, ts+26592 /* "xOpen" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), pArg, uintptr(0), uintptr(0)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pArg if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } else { pId = tcl.XTcl_GetObjResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) } } if (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_OPEN_MASK) != 0) && (tvfsInjectIoerr(tls, p) != 0) { return SQLITE_IOERR } if tvfsInjectCantopenerr(tls, p) != 0 { return SQLITE_CANTOPEN } if tvfsInjectFullerr(tls, p) != 0 { return SQLITE_FULL } if !(pId != 0) { pId = tcl.XTcl_NewStringObj(tls, ts+37220 /* "anon" */, -1) } (*Tcl_Obj)(unsafe.Pointer(pId)).FrefCount++ (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId = pId tcl.XTcl_ResetResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3OsOpen(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, zName, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, flags, pOutFlags) if (*sqlite3_file)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpReal)).FpMethods != 0 { var pMethods uintptr var nByte int32 if (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion > 1 { nByte = int32(unsafe.Sizeof(sqlite3_io_methods{})) } else { nByte = int32((uintptr(0) + 104 /* &.xShmMap */)) } pMethods = tcl.XTcl_Alloc(tls, uint32(nByte)) libc.Xmemcpy(tls, pMethods, uintptr(unsafe.Pointer(&tvfs_io_methods)), uint64(nByte)) (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FiVersion = (*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpReal)).FpMethods)).FiVersion if (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FiVersion > (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion { (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FiVersion = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion } if ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion > 1) && ((*Testvfs)(unsafe.Pointer(((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FisNoshm != 0) { (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FxShmUnmap = uintptr(0) (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FxShmLock = uintptr(0) (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FxShmBarrier = uintptr(0) (*sqlite3_io_methods)(unsafe.Pointer(pMethods)).FxShmMap = uintptr(0) } (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = pMethods } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Delete the file located at zPath. If the dirSync argument is true, // ensure the file-system modifications are synced to disk before // returning. func tvfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_vfs.c:702:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var p uintptr = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_DELETE_MASK) != 0) { tvfsExecTcl(tls, p, ts+34672, /* "xDelete" */ tcl.XTcl_NewStringObj(tls, zPath, -1), tcl.XTcl_NewIntObj(tls, dirSync), uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3.Xsqlite3OsDelete(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, zPath, dirSync) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Test for access permissions. Return true if the requested permission // is available, or false otherwise. func tvfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_vfs.c:722:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_ACCESS_MASK) != 0) { // var rc int32 at bp, 4 var zArg uintptr = uintptr(0) if flags == SQLITE_ACCESS_EXISTS { zArg = ts + 37225 /* "SQLITE_ACCESS_EX..." */ } if flags == SQLITE_ACCESS_READWRITE { zArg = ts + 37246 /* "SQLITE_ACCESS_RE..." */ } if flags == SQLITE_ACCESS_READ { zArg = ts + 37270 /* "SQLITE_ACCESS_RE..." */ } tvfsExecTcl(tls, p, ts+34680, /* "xAccess" */ tcl.XTcl_NewStringObj(tls, zPath, -1), tcl.XTcl_NewStringObj(tls, zArg, -1), uintptr(0), uintptr(0)) if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } else { var interp uintptr = (*Testvfs)(unsafe.Pointer(p)).Finterp if TCL_OK == tcl.XTcl_GetBooleanFromObj(tls, uintptr(0), tcl.XTcl_GetObjResult(tls, interp), pResOut) { return SQLITE_OK } } } return sqlite3.Xsqlite3OsAccess(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, zPath, flags, pResOut) } // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. func tvfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* test_vfs.c:755:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_FULLPATHNAME_MASK) != 0) { // var rc int32 at bp, 4 tvfsExecTcl(tls, p, ts+34688 /* "xFullPathname" */, tcl.XTcl_NewStringObj(tls, zPath, -1), uintptr(0), uintptr(0), uintptr(0)) if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } } return sqlite3.Xsqlite3OsFullPathname(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, zPath, nOut, zOut) } // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. func tvfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* test_vfs.c:808:12: */ return sqlite3.Xsqlite3OsRandomness(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, nByte, zBufOut) } // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. func tvfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* test_vfs.c:816:12: */ return sqlite3.Xsqlite3OsSleep(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, nMicro) } // Return the current time as a Julian Day number in *pTimeOut. func tvfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* test_vfs.c:823:12: */ return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent + 120 /* &.xCurrentTime */))))(tls, (*Testvfs)(unsafe.Pointer((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FpParent, pTimeOut) } func tvfsShmOpen(tls *libc.TLS, pFile uintptr) int32 { /* test_vfs.c:827:12: */ bp := tls.Alloc(4) defer tls.Free(4) var p uintptr *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK // Return code var pBuffer uintptr // Buffer to open connection to var pFd uintptr // The testvfs file structure pFd = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd p = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData // Evaluate the Tcl script: // // SCRIPT xShmOpen FILENAME tcl.XTcl_ResetResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMOPEN_MASK) != 0) { tvfsExecTcl(tls, p, ts+37289 /* "xShmOpen" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), uintptr(0), uintptr(0), uintptr(0)) if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } } if (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMOPEN_MASK) != 0) && (tvfsInjectIoerr(tls, p) != 0) { return SQLITE_IOERR } // Search for a TestvfsBuffer. Create a new one if required. for pBuffer = (*Testvfs)(unsafe.Pointer(p)).FpBuffer; pBuffer != 0; pBuffer = (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FpNext { if 0 == libc.Xstrcmp(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FzFile) { break } } if !(pBuffer != 0) { var szName int32 = int32(libc.Xstrlen(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename)) var nByte int32 = (int32((uint64(unsafe.Sizeof(TestvfsBuffer{})) + uint64(szName)) + uint64(1))) pBuffer = tcl.XTcl_Alloc(tls, uint32(nByte)) libc.Xmemset(tls, pBuffer, 0, uint64(nByte)) (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FzFile = (pBuffer + 1*8224) libc.Xmemcpy(tls, (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FzFile, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, (uint64(szName + 1))) (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FpNext = (*Testvfs)(unsafe.Pointer(p)).FpBuffer (*Testvfs)(unsafe.Pointer(p)).FpBuffer = pBuffer } // Connect the TestvfsBuffer to the new TestvfsShm handle and return. (*TestvfsFd)(unsafe.Pointer(pFd)).FpNext = (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FpFile (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FpFile = pFd (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm = pBuffer return *(*int32)(unsafe.Pointer(bp /* rc */)) } func tvfsAllocPage(tls *libc.TLS, p uintptr, iPage int32, pgsz int32) { /* test_vfs.c:877:13: */ if *(*uintptr)(unsafe.Pointer((p + 16 /* &.aPage */) + uintptr(iPage)*8)) == uintptr(0) { *(*uintptr)(unsafe.Pointer((p + 16 /* &.aPage */) + uintptr(iPage)*8)) = tcl.XTcl_Alloc(tls, uint32(pgsz)) libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer((p + 16 /* &.aPage */) + uintptr(iPage)*8)), 0, uint64(pgsz)) (*TestvfsBuffer)(unsafe.Pointer(p)).Fpgsz = pgsz } } func tvfsShmMap(tls *libc.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite int32, pp uintptr) int32 { /* test_vfs.c:886:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { var pReal uintptr = (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 104 /* &.xShmMap */))))(tls, pReal, iPage, pgsz, isWrite, libc.AtomicLoadUintptr(&pp)) } if uintptr(0) == (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm { *(*int32)(unsafe.Pointer(bp /* rc */)) = tvfsShmOpen(tls, pFile) if *(*int32)(unsafe.Pointer(bp /* rc */)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMMAP_MASK) != 0) { var pArg uintptr = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pArg)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pArg, tcl.XTcl_NewIntObj(tls, iPage)) tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pArg, tcl.XTcl_NewIntObj(tls, pgsz)) tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pArg, tcl.XTcl_NewIntObj(tls, isWrite)) tvfsExecTcl(tls, p, ts+34765, /* "xShmMap" */ tcl.XTcl_NewStringObj(tls, (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, pArg, uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pArg if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } if ((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMMAP_MASK) != 0)) && (tvfsInjectIoerr(tls, p) != 0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_IOERR } if ((*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) && (isWrite != 0)) && !(int32(*(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8))) != 0) { tvfsAllocPage(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm, iPage, pgsz) } if (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) || (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_READONLY) { *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer(((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm + 16 /* &.aPage */) + uintptr(iPage)*8)) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } func tvfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* test_vfs.c:936:12: */ bp := tls.Alloc(108) defer tls.Free(108) *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData var nLock int32 // var zLock [80]int8 at bp+24, 80 if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { var pReal uintptr = (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 112 /* &.xShmLock */))))(tls, pReal, ofst, n, flags) } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMLOCK_MASK) != 0) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([80]int8{})), bp+24 /* &zLock[0] */, ts+17519 /* "%d %d" */, libc.VaList(bp, ofst, n)) nLock = int32(libc.Xstrlen(tls, bp+24 /* &zLock[0] */)) if (flags & SQLITE_SHM_LOCK) != 0 { libc.Xstrcpy(tls, (bp + 24 /* &zLock */ + uintptr(nLock)), ts+37298 /* " lock" */) } else { libc.Xstrcpy(tls, (bp + 24 /* &zLock */ + uintptr(nLock)), ts+37304 /* " unlock" */) } nLock = nLock + (int32(libc.Xstrlen(tls, (bp + 24 /* &zLock */ + uintptr(nLock))))) if (flags & SQLITE_SHM_SHARED) != 0 { libc.Xstrcpy(tls, (bp + 24 /* &zLock */ + uintptr(nLock)), ts+37312 /* " shared" */) } else { libc.Xstrcpy(tls, (bp + 24 /* &zLock */ + uintptr(nLock)), ts+37320 /* " exclusive" */) } tvfsExecTcl(tls, p, ts+34744, /* "xShmLock" */ tcl.XTcl_NewStringObj(tls, (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, tcl.XTcl_NewStringObj(tls, bp+24 /* &zLock[0] */, -1), uintptr(0)) tvfsResultCode(tls, p, bp+104 /* &rc */) } if ((*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) == SQLITE_OK) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMLOCK_MASK) != 0)) && (tvfsInjectIoerr(tls, p) != 0) { *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_IOERR } if *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) == SQLITE_OK { var isLock int32 = (flags & SQLITE_SHM_LOCK) var isExcl int32 = (flags & SQLITE_SHM_EXCLUSIVE) var mask u32 = (u32(((int32(1) << n) - 1) << ofst)) if isLock != 0 { var p2 uintptr for p2 = (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FpFile; p2 != 0; p2 = (*TestvfsFd)(unsafe.Pointer(p2)).FpNext { if p2 == pFd { continue } if (((*TestvfsFd)(unsafe.Pointer(p2)).Fexcllock & mask) != 0) || ((isExcl != 0) && (((*TestvfsFd)(unsafe.Pointer(p2)).Fsharedlock & mask) != 0)) { *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_BUSY break } } if *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) == SQLITE_OK { if isExcl != 0 { *(*u32)(unsafe.Pointer(pFd + 40 /* &.excllock */)) |= (mask) } if !(isExcl != 0) { *(*u32)(unsafe.Pointer(pFd + 44 /* &.sharedlock */)) |= (mask) } } } else { if isExcl != 0 { *(*u32)(unsafe.Pointer(pFd + 40 /* &.excllock */)) &= (^mask) } if !(isExcl != 0) { *(*u32)(unsafe.Pointer(pFd + 44 /* &.sharedlock */)) &= (^mask) } } } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) } func tvfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* test_vfs.c:1004:13: */ var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMBARRIER_MASK) != 0) { var z uintptr if (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm != 0 { z = (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile } else { z = ts + 489 /* "" */ } tvfsExecTcl(tls, p, ts+34753 /* "xShmBarrier" */, tcl.XTcl_NewStringObj(tls, z, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) } if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { var pReal uintptr = (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 120 /* &.xShmBarrier */))))(tls, pReal) return } } func tvfsShmUnmap(tls *libc.TLS, pFile uintptr, deleteFlag int32) int32 { /* test_vfs.c:1020:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData var pBuffer uintptr = (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm var ppFd uintptr if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { var pReal uintptr = (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, pReal, deleteFlag) } if !(pBuffer != 0) { return SQLITE_OK } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & TESTVFS_SHMCLOSE_MASK) != 0) { tvfsExecTcl(tls, p, ts+34734, /* "xShmUnmap" */ tcl.XTcl_NewStringObj(tls, (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } for ppFd = (pBuffer + 8208 /* &.pFile */); *(*uintptr)(unsafe.Pointer(ppFd)) != pFd; ppFd = (*(*uintptr)(unsafe.Pointer(ppFd)) + 48 /* &.pNext */) { } *(*uintptr)(unsafe.Pointer(ppFd)) = (*TestvfsFd)(unsafe.Pointer(pFd)).FpNext (*TestvfsFd)(unsafe.Pointer(pFd)).FpNext = uintptr(0) if (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FpFile == uintptr(0) { var i int32 var pp uintptr for pp = (p + 40 /* &.pBuffer */); *(*uintptr)(unsafe.Pointer(pp)) != pBuffer; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 8216 /* &.pNext */) { } *(*uintptr)(unsafe.Pointer(pp)) = (*TestvfsBuffer)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext for i = 0; *(*uintptr)(unsafe.Pointer((pBuffer + 16 /* &.aPage */) + uintptr(i)*8)) != 0; i++ { tcl.XTcl_Free(tls, *(*uintptr)(unsafe.Pointer((pBuffer + 16 /* &.aPage */) + uintptr(i)*8))) } tcl.XTcl_Free(tls, pBuffer) } (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm = uintptr(0) return *(*int32)(unsafe.Pointer(bp /* rc */)) } func tvfsFetch(tls *libc.TLS, pFile uintptr, iOfst sqlite3_int64, iAmt int32, pp uintptr) int32 { /* test_vfs.c:1065:12: */ var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd return sqlite3.Xsqlite3OsFetch(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iOfst, iAmt, pp) } func tvfsUnfetch(tls *libc.TLS, pFile uintptr, iOfst sqlite3_int64, p uintptr) int32 { /* test_vfs.c:1075:12: */ var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd return sqlite3.Xsqlite3OsUnfetch(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, iOfst, p) } func testvfs_obj_cmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_vfs.c:1080:26: */ bp := tls.Alloc(600) defer tls.Free(600) var p uintptr = cd *(*[10]TestvfsSubcmd)(unsafe.Pointer(bp + 128 /* aSubcmd */)) = [10]TestvfsSubcmd{ {FzName: ts + 37331 /* "shm" */}, {FzName: ts + 37335 /* "delete" */, FeCmd: uint32(1) /* CMD_DELETE */}, {FzName: ts + 37342 /* "filter" */, FeCmd: uint32(2) /* CMD_FILTER */}, {FzName: ts + 37349 /* "ioerr" */, FeCmd: uint32(3) /* CMD_IOERR */}, {FzName: ts + 37355 /* "fullerr" */, FeCmd: uint32(7) /* CMD_FULLERR */}, {FzName: ts + 37363 /* "cantopenerr" */, FeCmd: uint32(8) /* CMD_CANTOPENERR */}, {FzName: ts + 37375 /* "script" */, FeCmd: uint32(4) /* CMD_SCRIPT */}, {FzName: ts + 37382 /* "devchar" */, FeCmd: uint32(5) /* CMD_DEVCHAR */}, {FzName: ts + 37390 /* "sectorsize" */, FeCmd: uint32(6) /* CMD_SECTORSIZE */}, {}, } // var i int32 at bp+288, 4 if objc < 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1860 /* "SUBCOMMAND ..." */) return TCL_ERROR } if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+128 /* &aSubcmd[0] */, int32(unsafe.Sizeof(TestvfsSubcmd{})), ts+37401 /* "subcommand" */, 0, bp+288 /* &i */) != 0 { return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) switch (*TestvfsSubcmd)(unsafe.Pointer(bp + 128 /* &aSubcmd */ + uintptr(*(*int32)(unsafe.Pointer(bp + 288 /* i */)))*16)).FeCmd { case uint32(0) /* CMD_SHM */ : { var pObj uintptr var rc int32 var pBuffer uintptr var zName uintptr if (objc != 3) && (objc != 4) { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+37412 /* "FILE ?VALUE?" */) return TCL_ERROR } zName = tcl.XTcl_Alloc(tls, uint32((*sqlite3_vfs)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpParent)).FmxPathname)) rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Testvfs)(unsafe.Pointer(p)).FpParent + 64 /* &.xFullPathname */))))(tls, (*Testvfs)(unsafe.Pointer(p)).FpParent, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), (*sqlite3_vfs)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpParent)).FmxPathname, zName) if rc != SQLITE_OK { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+37425, /* "failed to get fu..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), 0)) tcl.XTcl_Free(tls, zName) return TCL_ERROR } for pBuffer = (*Testvfs)(unsafe.Pointer(p)).FpBuffer; pBuffer != 0; pBuffer = (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FpNext { if 0 == libc.Xstrcmp(tls, (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).FzFile, zName) { break } } tcl.XTcl_Free(tls, zName) if !(pBuffer != 0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+37451 /* "no such file: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), 0)) return TCL_ERROR } if objc == 4 { // var n int32 at bp+292, 4 var a uintptr = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+292 /* &n */) var pgsz int32 = (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).Fpgsz if pgsz == 0 { pgsz = 65536 } for *(*int32)(unsafe.Pointer(bp + 288 /* i */)) = 0; (*(*int32)(unsafe.Pointer(bp + 288 /* i */)) * pgsz) < *(*int32)(unsafe.Pointer(bp + 292 /* n */)); *(*int32)(unsafe.Pointer(bp + 288 /* i */))++ { var nByte int32 = pgsz tvfsAllocPage(tls, pBuffer, *(*int32)(unsafe.Pointer(bp + 288 /* i */)), pgsz) if (*(*int32)(unsafe.Pointer(bp + 292 /* n */)) - (*(*int32)(unsafe.Pointer(bp + 288 /* i */)) * pgsz)) < pgsz { nByte = *(*int32)(unsafe.Pointer(bp + 292 /* n */)) } libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((pBuffer + 16 /* &.aPage */) + uintptr(*(*int32)(unsafe.Pointer(bp + 288 /* i */)))*8)), (a + uintptr((*(*int32)(unsafe.Pointer(bp + 288 /* i */)) * pgsz))), uint64(nByte)) } } pObj = tcl.XTcl_NewObj(tls) for *(*int32)(unsafe.Pointer(bp + 288 /* i */)) = 0; *(*uintptr)(unsafe.Pointer((pBuffer + 16 /* &.aPage */) + uintptr(*(*int32)(unsafe.Pointer(bp + 288 /* i */)))*8)) != 0; *(*int32)(unsafe.Pointer(bp + 288 /* i */))++ { var pgsz int32 = (*TestvfsBuffer)(unsafe.Pointer(pBuffer)).Fpgsz if pgsz == 0 { pgsz = 65536 } tcl.XTcl_AppendObjToObj(tls, pObj, tcl.XTcl_NewByteArrayObj(tls, *(*uintptr)(unsafe.Pointer((pBuffer + 16 /* &.aPage */) + uintptr(*(*int32)(unsafe.Pointer(bp + 288 /* i */)))*8)), pgsz)) } tcl.XTcl_SetObjResult(tls, interp, pObj) break } // TESTVFS filter METHOD-LIST // // Activate special processing for those methods contained in the list case uint32(2) /* CMD_FILTER */ : { *(*uintptr)(unsafe.Pointer(bp + 304 /* apElem */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 296 /* nElem */)) = 0 var mask int32 = 0 if objc != 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+31501 /* "LIST" */) return TCL_ERROR } if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+296 /* &nElem */, bp+304 /* &apElem */) != 0 { return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) for *(*int32)(unsafe.Pointer(bp + 288 /* i */)) = 0; *(*int32)(unsafe.Pointer(bp + 288 /* i */)) < *(*int32)(unsafe.Pointer(bp + 296 /* nElem */)); *(*int32)(unsafe.Pointer(bp + 288 /* i */))++ { var iMethod int32 var zElem uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 304 /* apElem */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 288 /* i */)))*8))) for iMethod = 0; iMethod < (int32(uint64(unsafe.Sizeof(vfsmethod)) / uint64(unsafe.Sizeof(VfsMethod{})))); iMethod++ { if libc.Xstrcmp(tls, zElem, vfsmethod[iMethod].FzName) == 0 { mask = mask | (vfsmethod[iMethod].Fmask) break } } if iMethod == (int32(uint64(unsafe.Sizeof(vfsmethod)) / uint64(unsafe.Sizeof(VfsMethod{})))) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+64, ts+37466 /* "unknown method: " */, zElem, 0)) return TCL_ERROR } } (*Testvfs)(unsafe.Pointer(p)).Fmask = mask break } // TESTVFS script ?SCRIPT? // // Query or set the script to be run when filtered VFS events // occur. case uint32(4) /* CMD_SCRIPT */ : { if objc == 3 { // var nByte int32 at bp+312, 4 if (*Testvfs)(unsafe.Pointer(p)).FpScript != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*Testvfs)(unsafe.Pointer(p)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } (*Testvfs)(unsafe.Pointer(p)).FpScript = uintptr(0) } tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+312 /* &nByte */) if *(*int32)(unsafe.Pointer(bp + 312 /* nByte */)) > 0 { (*Testvfs)(unsafe.Pointer(p)).FpScript = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) (*Tcl_Obj)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpScript)).FrefCount++ } } else if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12940 /* "?SCRIPT?" */) return TCL_ERROR } tcl.XTcl_ResetResult(tls, interp) if (*Testvfs)(unsafe.Pointer(p)).FpScript != 0 { tcl.XTcl_SetObjResult(tls, interp, (*Testvfs)(unsafe.Pointer(p)).FpScript) } break } // TESTVFS ioerr ?IFAIL PERSIST? // // Where IFAIL is an integer and PERSIST is boolean. case uint32(8) /* CMD_CANTOPENERR */ : fallthrough case uint32(3) /* CMD_IOERR */ : fallthrough case uint32(7) /* CMD_FULLERR */ : { var pTest uintptr = uintptr(0) var iRet int32 switch (*TestvfsSubcmd)(unsafe.Pointer(bp + 128 /* &aSubcmd */ + uintptr(*(*int32)(unsafe.Pointer(bp + 288 /* i */)))*16)).FeCmd { case uint32(3) /* CMD_IOERR */ : pTest = (p + 60 /* &.ioerr_err */) break case uint32(7) /* CMD_FULLERR */ : pTest = (p + 72 /* &.full_err */) break case uint32(8) /* CMD_CANTOPENERR */ : pTest = (p + 84 /* &.cantopen_err */) break default: } iRet = (*TestFaultInject)(unsafe.Pointer(pTest)).FnFail (*TestFaultInject)(unsafe.Pointer(pTest)).FnFail = 0 (*TestFaultInject)(unsafe.Pointer(pTest)).FeFault = 0 (*TestFaultInject)(unsafe.Pointer(pTest)).FiCnt = 0 if objc == 4 { // var iCnt int32 at bp+316, 4 // var iPersist int32 at bp+320, 4 if (TCL_OK != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+316 /* &iCnt */)) || (TCL_OK != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+320 /* &iPersist */)) { return TCL_ERROR } (*TestFaultInject)(unsafe.Pointer(pTest)).FeFault = func() int32 { if *(*int32)(unsafe.Pointer(bp + 320 /* iPersist */)) != 0 { return FAULT_INJECT_PERSISTENT } return FAULT_INJECT_TRANSIENT }() (*TestFaultInject)(unsafe.Pointer(pTest)).FiCnt = *(*int32)(unsafe.Pointer(bp + 316 /* iCnt */)) } else if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+37483 /* "?CNT PERSIST?" */) return TCL_ERROR } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, iRet)) break } case uint32(1) /* CMD_DELETE */ : { tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))) break } case uint32(5) /* CMD_DEVCHAR */ : { *(*[16]DeviceFlag)(unsafe.Pointer(bp + 336 /* aFlag */)) = [16]DeviceFlag{ {FzName: ts + 37497 /* "default" */, FiValue: -1}, {FzName: ts + 25746 /* "atomic" */, FiValue: SQLITE_IOCAP_ATOMIC}, {FzName: ts + 25753 /* "atomic512" */, FiValue: SQLITE_IOCAP_ATOMIC512}, {FzName: ts + 25763 /* "atomic1k" */, FiValue: SQLITE_IOCAP_ATOMIC1K}, {FzName: ts + 25772 /* "atomic2k" */, FiValue: SQLITE_IOCAP_ATOMIC2K}, {FzName: ts + 25781 /* "atomic4k" */, FiValue: SQLITE_IOCAP_ATOMIC4K}, {FzName: ts + 25790 /* "atomic8k" */, FiValue: SQLITE_IOCAP_ATOMIC8K}, {FzName: ts + 25799 /* "atomic16k" */, FiValue: SQLITE_IOCAP_ATOMIC16K}, {FzName: ts + 25809 /* "atomic32k" */, FiValue: SQLITE_IOCAP_ATOMIC32K}, {FzName: ts + 25819 /* "atomic64k" */, FiValue: SQLITE_IOCAP_ATOMIC64K}, {FzName: ts + 25829 /* "sequential" */, FiValue: SQLITE_IOCAP_SEQUENTIAL}, {FzName: ts + 25840 /* "safe_append" */, FiValue: SQLITE_IOCAP_SAFE_APPEND}, {FzName: ts + 37505 /* "undeletable_when..." */, FiValue: SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN}, {FzName: ts + 25852 /* "powersafe_overwr..." */, FiValue: SQLITE_IOCAP_POWERSAFE_OVERWRITE}, {FzName: ts + 37527 /* "immutable" */, FiValue: SQLITE_IOCAP_IMMUTABLE}, {}, } var pRet uintptr var iFlag int32 if objc > 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+37537 /* "?ATTR-LIST?" */) return TCL_ERROR } if objc == 3 { var j int32 var iNew int32 = 0 *(*uintptr)(unsafe.Pointer(bp + 328 /* flags */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 324 /* nFlags */)) = 0 if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+324 /* &nFlags */, bp+328 /* &flags */) != 0 { return TCL_ERROR } for j = 0; j < *(*int32)(unsafe.Pointer(bp + 324 /* nFlags */)); j++ { *(*int32)(unsafe.Pointer(bp + 592 /* idx */)) = 0 if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 328 /* flags */)) + uintptr(j)*8)), bp+336, /* &aFlag[0] */ int32(unsafe.Sizeof(DeviceFlag{})), ts+17196 /* "flag" */, 0, bp+592 /* &idx */) != 0 { return TCL_ERROR } if ((*DeviceFlag)(unsafe.Pointer(bp+336 /* &aFlag */ +uintptr(*(*int32)(unsafe.Pointer(bp + 592 /* idx */)))*16)).FiValue < 0) && (*(*int32)(unsafe.Pointer(bp + 324 /* nFlags */)) > 1) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp+96, ts+37549 /* "bad flags: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), 0)) return TCL_ERROR } iNew = iNew | ((*DeviceFlag)(unsafe.Pointer(bp + 336 /* &aFlag */ + uintptr(*(*int32)(unsafe.Pointer(bp + 592 /* idx */)))*16)).FiValue) } (*Testvfs)(unsafe.Pointer(p)).FiDevchar = (iNew | 0x10000000) } pRet = tcl.XTcl_NewObj(tls) for iFlag = 0; uint64(iFlag) < (uint64(unsafe.Sizeof([16]DeviceFlag{})) / uint64(unsafe.Sizeof(DeviceFlag{}))); iFlag++ { if ((*Testvfs)(unsafe.Pointer(p)).FiDevchar & (*DeviceFlag)(unsafe.Pointer(bp+336 /* &aFlag */ +uintptr(iFlag)*16)).FiValue) != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, (*DeviceFlag)(unsafe.Pointer(bp+336 /* &aFlag */ +uintptr(iFlag)*16)).FzName, -1)) } } tcl.XTcl_SetObjResult(tls, interp, pRet) break } case uint32(6) /* CMD_SECTORSIZE */ : { if objc > 3 { tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+37561 /* "?VALUE?" */) return TCL_ERROR } if objc == 3 { *(*int32)(unsafe.Pointer(bp + 596 /* iNew */)) = 0 if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+596 /* &iNew */) != 0 { return TCL_ERROR } (*Testvfs)(unsafe.Pointer(p)).FiSectorsize = *(*int32)(unsafe.Pointer(bp + 596 /* iNew */)) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, (*Testvfs)(unsafe.Pointer(p)).FiSectorsize)) break } } return TCL_OK } type TestvfsSubcmd = struct { FzName uintptr FeCmd uint32 _ [4]byte } /* test_vfs.c:1092:3 */ type VfsMethod = struct { FzName uintptr Fmask int32 _ [4]byte } /* test_vfs.c:1179:14 */ var vfsmethod = [18]VfsMethod{ {FzName: ts + 37289 /* "xShmOpen" */, Fmask: TESTVFS_SHMOPEN_MASK}, {FzName: ts + 34744 /* "xShmLock" */, Fmask: TESTVFS_SHMLOCK_MASK}, {FzName: ts + 34753 /* "xShmBarrier" */, Fmask: TESTVFS_SHMBARRIER_MASK}, {FzName: ts + 34734 /* "xShmUnmap" */, Fmask: TESTVFS_SHMCLOSE_MASK}, {FzName: ts + 34765 /* "xShmMap" */, Fmask: TESTVFS_SHMMAP_MASK}, {FzName: ts + 27020 /* "xSync" */, Fmask: TESTVFS_SYNC_MASK}, {FzName: ts + 34672 /* "xDelete" */, Fmask: TESTVFS_DELETE_MASK}, {FzName: ts + 34580 /* "xWrite" */, Fmask: TESTVFS_WRITE_MASK}, {FzName: ts + 34574 /* "xRead" */, Fmask: TESTVFS_READ_MASK}, {FzName: ts + 34587 /* "xTruncate" */, Fmask: TESTVFS_TRUNCATE_MASK}, {FzName: ts + 26592 /* "xOpen" */, Fmask: TESTVFS_OPEN_MASK}, {FzName: ts + 34567 /* "xClose" */, Fmask: TESTVFS_CLOSE_MASK}, {FzName: ts + 34680 /* "xAccess" */, Fmask: TESTVFS_ACCESS_MASK}, {FzName: ts + 34688 /* "xFullPathname" */, Fmask: TESTVFS_FULLPATHNAME_MASK}, {FzName: ts + 34613 /* "xUnlock" */, Fmask: TESTVFS_UNLOCK_MASK}, {FzName: ts + 34607 /* "xLock" */, Fmask: TESTVFS_LOCK_MASK}, {FzName: ts + 37155 /* "xCheckReservedLo..." */, Fmask: TESTVFS_CKLOCK_MASK}, {FzName: ts + 34635 /* "xFileControl" */, Fmask: TESTVFS_FCNTL_MASK}, } /* test_vfs.c:1182:9 */ func testvfs_obj_del(tls *libc.TLS, cd ClientData) { /* test_vfs.c:1393:27: */ var p uintptr = cd if (*Testvfs)(unsafe.Pointer(p)).FpScript != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*Testvfs)(unsafe.Pointer(p)).FpScript if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } sqlite3.Xsqlite3_vfs_unregister(tls, (*Testvfs)(unsafe.Pointer(p)).FpVfs) libc.Xmemset(tls, (*Testvfs)(unsafe.Pointer(p)).FpVfs, 0, uint64(unsafe.Sizeof(sqlite3_vfs{}))) tcl.XTcl_Free(tls, (*Testvfs)(unsafe.Pointer(p)).FpVfs) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Testvfs{}))) tcl.XTcl_Free(tls, p) } // Usage: testvfs VFSNAME ?SWITCHES? // // Switches are: // // -noshm BOOLEAN (True to omit shm methods. Default false) // -default BOOLEAN (True to make the vfs default. Default false) // // This command creates two things when it is invoked: an SQLite VFS, and // a Tcl command. Both are named VFSNAME. The VFS is installed. It is not // installed as the default VFS. // // The VFS passes all file I/O calls through to the underlying VFS. // // Whenever the xShmMap method of the VFS // is invoked, the SCRIPT is executed as follows: // // SCRIPT xShmMap FILENAME ID // // The value returned by the invocation of SCRIPT above is interpreted as // an SQLite error code and returned to SQLite. Either a symbolic // "SQLITE_OK" or numeric "0" value may be returned. // // The contents of the shared-memory buffer associated with a given file // may be read and set using the following command: // // VFSNAME shm FILENAME ?NEWVALUE? // // When the xShmLock method is invoked by SQLite, the following script is // run: // // SCRIPT xShmLock FILENAME ID LOCK // // where LOCK is of the form "OFFSET NBYTE lock/unlock shared/exclusive" func testvfs_cmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_vfs.c:1438:26: */ bp := tls.Alloc(28) defer tls.Free(28) var p uintptr // New object var pVfs uintptr // New VFS var zVfs uintptr var nByte int32 // Bytes of space to allocate at p var i int32 // var isNoshm int32 at bp+4, 4 // True if -noshm is passed // var isFullshm int32 at bp+24, 4 // True if -fullshm is passed // var isDefault int32 at bp+8, 4 // True if -default is passed // var szOsFile int32 at bp+12, 4 // Value passed to -szosfile // var mxPathname int32 at bp+16, 4 // Value passed to -mxpathname // var iVersion int32 at bp+20, 4 // var nSwitch int32 at bp, 4 var zSwitch uintptr *(*int32)(unsafe.Pointer(bp + 4 /* isNoshm */)) = 0 *(*int32)(unsafe.Pointer(bp + 24 /* isFullshm */)) = 0 *(*int32)(unsafe.Pointer(bp + 8 /* isDefault */)) = 0 *(*int32)(unsafe.Pointer(bp + 12 /* szOsFile */)) = 0 *(*int32)(unsafe.Pointer(bp + 16 /* mxPathname */)) = -1 *(*int32)(unsafe.Pointer(bp + 20 /* iVersion */)) = 3 // Value passed to -iversion if !((objc < 2) || (0 != (objc % 2))) { goto __1 } goto bad_args __1: ; i = 2 __2: if !(i < objc) { goto __4 } zSwitch = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp /* &nSwitch */) if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == libc.Xstrncmp(tls, ts+37569 /* "-noshm" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __5 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+4 /* &isNoshm */) != 0) { goto __7 } return TCL_ERROR __7: ; if !(*(*int32)(unsafe.Pointer(bp + 4 /* isNoshm */)) != 0) { goto __8 } *(*int32)(unsafe.Pointer(bp + 24 /* isFullshm */)) = 0 __8: ; goto __6 __5: if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == libc.Xstrncmp(tls, ts+26122 /* "-default" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __9 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+8 /* &isDefault */) != 0) { goto __11 } return TCL_ERROR __11: ; goto __10 __9: if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == libc.Xstrncmp(tls, ts+37576 /* "-szosfile" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __12 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+12 /* &szOsFile */) != 0) { goto __14 } return TCL_ERROR __14: ; goto __13 __12: if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == libc.Xstrncmp(tls, ts+37586 /* "-mxpathname" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __15 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+16 /* &mxPathname */) != 0) { goto __17 } return TCL_ERROR __17: ; goto __16 __15: if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == libc.Xstrncmp(tls, ts+37598 /* "-iversion" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __18 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+20 /* &iVersion */) != 0) { goto __20 } return TCL_ERROR __20: ; goto __19 __18: if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == libc.Xstrncmp(tls, ts+37608 /* "-fullshm" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __21 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+24 /* &isFullshm */) != 0) { goto __23 } return TCL_ERROR __23: ; if !(*(*int32)(unsafe.Pointer(bp + 24 /* isFullshm */)) != 0) { goto __24 } *(*int32)(unsafe.Pointer(bp + 4 /* isNoshm */)) = 0 __24: ; goto __22 __21: goto bad_args __22: ; __19: ; __16: ; __13: ; __10: ; __6: ; goto __3 __3: i = i + (2) goto __2 goto __4 __4: ; if !(uint64(*(*int32)(unsafe.Pointer(bp + 12 /* szOsFile */))) < uint64(unsafe.Sizeof(TestvfsFile{}))) { goto __25 } *(*int32)(unsafe.Pointer(bp + 12 /* szOsFile */)) = int32(unsafe.Sizeof(TestvfsFile{})) __25: ; zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) nByte = (int32((uint64(unsafe.Sizeof(Testvfs{})) + uint64(int32(libc.Xstrlen(tls, zVfs)))) + uint64(1))) p = tcl.XTcl_Alloc(tls, uint32(nByte)) libc.Xmemset(tls, p, 0, uint64(nByte)) (*Testvfs)(unsafe.Pointer(p)).FiDevchar = -1 (*Testvfs)(unsafe.Pointer(p)).FiSectorsize = -1 // Create the new object command before querying SQLite for a default VFS // to use for 'real' IO operations. This is because creating the new VFS // may delete an existing [testvfs] VFS of the same name. If such a VFS // is currently the default, the new [testvfs] may end up calling the // methods of a deleted object. tcl.XTcl_CreateObjCommand(tls, interp, zVfs, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{testvfs_obj_cmd})), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{testvfs_obj_del}))) (*Testvfs)(unsafe.Pointer(p)).FpParent = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) (*Testvfs)(unsafe.Pointer(p)).Finterp = interp (*Testvfs)(unsafe.Pointer(p)).FzName = (p + 1*104) libc.Xmemcpy(tls, (*Testvfs)(unsafe.Pointer(p)).FzName, zVfs, (libc.Xstrlen(tls, zVfs) + uint64(1))) pVfs = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(sqlite3_vfs{}))) libc.Xmemcpy(tls, pVfs, uintptr(unsafe.Pointer(&tvfs_vfs)), uint64(unsafe.Sizeof(sqlite3_vfs{}))) (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData = p (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion = *(*int32)(unsafe.Pointer(bp + 20 /* iVersion */)) (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName = (*Testvfs)(unsafe.Pointer(p)).FzName (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname = (*sqlite3_vfs)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpParent)).FmxPathname if !((*(*int32)(unsafe.Pointer(bp + 16 /* mxPathname */)) >= 0) && (*(*int32)(unsafe.Pointer(bp + 16 /* mxPathname */)) < (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname)) { goto __26 } (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname = *(*int32)(unsafe.Pointer(bp + 16 /* mxPathname */)) __26: ; (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile = *(*int32)(unsafe.Pointer(bp + 12 /* szOsFile */)) (*Testvfs)(unsafe.Pointer(p)).FpVfs = pVfs (*Testvfs)(unsafe.Pointer(p)).FisNoshm = *(*int32)(unsafe.Pointer(bp + 4 /* isNoshm */)) (*Testvfs)(unsafe.Pointer(p)).FisFullshm = *(*int32)(unsafe.Pointer(bp + 24 /* isFullshm */)) (*Testvfs)(unsafe.Pointer(p)).Fmask = TESTVFS_ALL_MASK sqlite3.Xsqlite3_vfs_register(tls, pVfs, *(*int32)(unsafe.Pointer(bp + 8 /* isDefault */))) return TCL_OK bad_args: tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37617 /* "VFSNAME ?-noshm ..." */) return TCL_ERROR } var tvfs_vfs = sqlite3_vfs{ FiVersion: 3, // pAppData FxOpen: 0, // xOpen FxDelete: 0, // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, // xSleep FxCurrentTime: 0, // xNextSystemCall } /* test_vfs.c:1444:22 */ // tclcmd: vfs_shmlock DB DBNAME (shared|exclusive) (lock|unlock) OFFSET N func test_vfs_shmlock(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_vfs.c:1586:26: */ bp := tls.Alloc(88) defer tls.Free(88) *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azArg1 */)) = [3]uintptr{ts + 37721 /* "shared" */, ts + 13660 /* "exclusive" */, uintptr(0)} *(*[3]uintptr)(unsafe.Pointer(bp + 40 /* azArg2 */)) = [3]uintptr{ts + 37728 /* "lock" */, ts + 37733 /* "unlock" */, uintptr(0)} *(*uintptr)(unsafe.Pointer(bp /* db */)) = uintptr(0) var rc int32 = SQLITE_OK var zDbname uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* iArg1 */)) = 0 *(*int32)(unsafe.Pointer(bp + 64 /* iArg2 */)) = 0 *(*int32)(unsafe.Pointer(bp + 68 /* iOffset */)) = 0 *(*int32)(unsafe.Pointer(bp + 72 /* n */)) = 0 // var pFd uintptr at bp+80, 8 if objc != 7 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37740 /* "DB DBNAME (share..." */) return TCL_ERROR } zDbname = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if ((((getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) || (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+8 /* &azArg1[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+37792 /* "ARG" */, 0, bp+32 /* &iArg1 */) != 0)) || (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+40 /* &azArg2[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+37792 /* "ARG" */, 0, bp+64 /* &iArg2 */) != 0)) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 5*8)), bp+68 /* &iOffset */) != 0)) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 6*8)), bp+72 /* &n */) != 0) { return TCL_ERROR } sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zDbname, SQLITE_FCNTL_FILE_POINTER, bp+80 /* &pFd */) if *(*uintptr)(unsafe.Pointer(bp + 80 /* pFd */)) == uintptr(0) { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* pFd */)))).FpMethods + 112 /* &.xShmLock */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pFd */)), *(*int32)(unsafe.Pointer(bp + 68 /* iOffset */)), *(*int32)(unsafe.Pointer(bp + 72 /* n */)), ((func() int32 { if *(*int32)(unsafe.Pointer(bp + 32 /* iArg1 */)) == 0 { return SQLITE_SHM_SHARED } return SQLITE_SHM_EXCLUSIVE }()) | (func() int32 { if *(*int32)(unsafe.Pointer(bp + 64 /* iArg2 */)) == 0 { return SQLITE_SHM_LOCK } return SQLITE_SHM_UNLOCK }()))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_OK } func test_vfs_set_readmark(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_vfs.c:1632:26: */ bp := tls.Alloc(56) defer tls.Free(56) *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)) = uintptr(0) var rc int32 = SQLITE_OK var zDbname uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* iSlot */)) = 0 *(*int32)(unsafe.Pointer(bp + 36 /* iVal */)) = -1 // var pFd uintptr at bp+40, 8 *(*uintptr)(unsafe.Pointer(bp + 48 /* pShm */)) = uintptr(0) var aShm uintptr var iOff int32 if (objc != 4) && (objc != 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37796 /* "DB DBNAME SLOT ?..." */) return TCL_ERROR } zDbname = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) if ((getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp+24 /* &db */) != 0) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+32 /* &iSlot */) != 0)) || ((objc == 5) && (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+36 /* &iVal */) != 0)) { return TCL_ERROR } sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), zDbname, SQLITE_FCNTL_FILE_POINTER, bp+40 /* &pFd */) if *(*uintptr)(unsafe.Pointer(bp + 40 /* pFd */)) == uintptr(0) { return TCL_ERROR } rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* pFd */)))).FpMethods + 104 /* &.xShmMap */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pFd */)), 0, (32 * 1024), 0, bp+48 /* &pShm */) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } if libc.AtomicLoadPUintptr(bp+48 /* pShm */) == uintptr(0) { tcl.XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+37819 /* "*-shm is not yet..." */, 0)) return TCL_ERROR } aShm = libc.AtomicLoadPUintptr(bp + 48 /* pShm */) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 32 /* iSlot */))) if objc == 5 { *(*u32)(unsafe.Pointer(aShm + uintptr(iOff)*4)) = u32(*(*int32)(unsafe.Pointer(bp + 36 /* iVal */))) } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, int32(*(*u32)(unsafe.Pointer(aShm + uintptr(iOff)*4))))) return TCL_OK } func Sqlitetestvfs_Init(tls *libc.TLS, interp uintptr) int32 { /* test_vfs.c:1685:5: */ tcl.XTcl_CreateObjCommand(tls, interp, ts+37843 /* "testvfs" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32 }{testvfs_cmd})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+37851 /* "vfs_shmlock" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_vfs_shmlock})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, ts+37863 /* "vfs_set_readmark" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_vfs_set_readmark})), uintptr(0), uintptr(0)) return TCL_OK } // Implementation of the POSIX getenv() function using the Win32 API. // This function is not thread-safe. func windirent_getenv(tls *libc.TLS, name uintptr) uintptr { /* test_windirent.c:23:12: */ // Maximum length, per MSDN var dwSize DWORD = (uint32(uint64(unsafe.Sizeof(value)) / uint64(unsafe.Sizeof(int8(0))))) // Size in chars var dwRet DWORD // Value returned by GetEnvironmentVariableA() libc.Xmemset(tls, uintptr(unsafe.Pointer(&value)), 0, uint64(unsafe.Sizeof(value))) dwRet = libc.XGetEnvironmentVariableA(tls, name, uintptr(unsafe.Pointer(&value)), dwSize) if (dwRet == DWORD(0)) || (dwRet > dwSize) { // The function call to GetEnvironmentVariableA() failed -OR- // the buffer is not large enough. Either way, return NULL. return uintptr(0) } else { // The function call to GetEnvironmentVariableA() succeeded // -AND- the buffer contains the entire value. return uintptr(unsafe.Pointer(&value)) } return uintptr(0) } var value [32768]int8 /* test_windirent.c:26:15: */ // Implementation of the POSIX opendir() function using the MSVCRT. func opendir(tls *libc.TLS, dirname uintptr) LPDIR { /* test_windirent.c:50:7: */ bp := tls.Alloc(312) defer tls.Free(312) // var data _finddata64i32_t at bp+16, 296 var dirp LPDIR var namesize SIZE_T dirp = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(DIR{}))) namesize = (uint64(unsafe.Sizeof([260]int8{})) / uint64(unsafe.Sizeof(int8(0)))) if !(dirp == (uintptr(0))) { goto __1 } return uintptr(0) __1: ; libc.Xmemset(tls, dirp, 0, uint64(unsafe.Sizeof(DIR{}))) // TODO: Remove this if Unix-style root paths are not used. if !(sqlite3.Xsqlite3_stricmp(tls, dirname, ts+37880 /* "/" */) == 0) { goto __2 } dirname = windirent_getenv(tls, ts+30046 /* "SystemDrive" */) __2: ; libc.Xmemset(tls, bp+16 /* &data */, 0, uint64(unsafe.Sizeof(_finddata64i32_t{}))) libc.X_snprintf(tls, bp+16 /* &data */ +36 /* &.name */, namesize, ts+37882 /* "%s\\*" */, libc.VaList(bp, dirname)) (*DIR)(unsafe.Pointer(dirp)).Fd_handle = libc.X_findfirst64i32(tls, bp+16 /* &data */ +36 /* &.name */, bp+16 /* &data */) if !((*DIR)(unsafe.Pointer(dirp)).Fd_handle == (int64(-1))) { goto __3 } closedir(tls, dirp) return uintptr(0) __3: ; // TODO: Remove this block to allow hidden and/or system files. if !(((((*_finddata64i32_t)(unsafe.Pointer(bp + 16 /* &data */)).Fattrib) & uint32(X_A_HIDDEN)) != 0) || ((((*_finddata64i32_t)(unsafe.Pointer(bp + 16 /* &data */)).Fattrib) & uint32(X_A_SYSTEM)) != 0)) { goto __4 } next: libc.Xmemset(tls, bp+16 /* &data */, 0, uint64(unsafe.Sizeof(_finddata64i32_t{}))) if !(libc.X_findnext64i32(tls, (*DIR)(unsafe.Pointer(dirp)).Fd_handle, bp+16 /* &data */) == -1) { goto __5 } closedir(tls, dirp) return uintptr(0) __5: ; // TODO: Remove this block to allow hidden and/or system files. if !(((((*_finddata64i32_t)(unsafe.Pointer(bp + 16 /* &data */)).Fattrib) & uint32(X_A_HIDDEN)) != 0) || ((((*_finddata64i32_t)(unsafe.Pointer(bp + 16 /* &data */)).Fattrib) & uint32(X_A_SYSTEM)) != 0)) { goto __6 } goto next __6: ; __4: ; (*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_attributes = (*_finddata64i32_t)(unsafe.Pointer(bp + 16 /* &data */)).Fattrib libc.Xstrncpy(tls, dirp+8 /* &.d_first */ +8 /* &.d_name */, bp+16 /* &data */ +36 /* &.name */, uint64(FILENAME_MAX)) *(*int8)(unsafe.Pointer((dirp + 8 /* &.d_first */ + 8 /* &.d_name */) + 260)) = int8(0) return dirp } // Implementation of the POSIX readdir() function using the MSVCRT. func readdir(tls *libc.TLS, dirp LPDIR) LPDIRENT { /* test_windirent.c:98:10: */ bp := tls.Alloc(296) defer tls.Free(296) // var data _finddata64i32_t at bp, 296 if !(dirp == (uintptr(0))) { goto __1 } return uintptr(0) __1: ; if !(int32((*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_ino) == 0) { goto __2 } (*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_ino++ (*DIR)(unsafe.Pointer(dirp)).Fd_next.Fd_ino++ return (dirp + 8 /* &.d_first */) __2: ; next: libc.Xmemset(tls, bp /* &data */, 0, uint64(unsafe.Sizeof(_finddata64i32_t{}))) if !(libc.X_findnext64i32(tls, (*DIR)(unsafe.Pointer(dirp)).Fd_handle, bp /* &data */) == -1) { goto __3 } return uintptr(0) __3: ; // TODO: Remove this block to allow hidden and/or system files. if !(((((*_finddata64i32_t)(unsafe.Pointer(bp /* &data */)).Fattrib) & uint32(X_A_HIDDEN)) != 0) || ((((*_finddata64i32_t)(unsafe.Pointer(bp /* &data */)).Fattrib) & uint32(X_A_SYSTEM)) != 0)) { goto __4 } goto next __4: ; (*DIR)(unsafe.Pointer(dirp)).Fd_next.Fd_ino++ (*DIR)(unsafe.Pointer(dirp)).Fd_next.Fd_attributes = (*_finddata64i32_t)(unsafe.Pointer(bp /* &data */)).Fattrib libc.Xstrncpy(tls, dirp+280 /* &.d_next */ +8 /* &.d_name */, bp /* &data */ +36 /* &.name */, uint64(FILENAME_MAX)) *(*int8)(unsafe.Pointer((dirp + 280 /* &.d_next */ + 8 /* &.d_name */) + 260)) = int8(0) return (dirp + 280 /* &.d_next */) } // Implementation of the POSIX readdir_r() function using the MSVCRT. func readdir_r(tls *libc.TLS, dirp LPDIR, entry LPDIRENT, result uintptr) INT { /* test_windirent.c:131:5: */ bp := tls.Alloc(296) defer tls.Free(296) // var data _finddata64i32_t at bp, 296 if !(dirp == (uintptr(0))) { goto __1 } return EBADF __1: ; if !(int32((*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_ino) == 0) { goto __2 } (*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_ino++ (*DIR)(unsafe.Pointer(dirp)).Fd_next.Fd_ino++ (*DIRENT)(unsafe.Pointer(entry)).Fd_ino = (*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_ino (*DIRENT)(unsafe.Pointer(entry)).Fd_attributes = (*DIR)(unsafe.Pointer(dirp)).Fd_first.Fd_attributes libc.Xstrncpy(tls, entry+8 /* &.d_name */, dirp+8 /* &.d_first */ +8 /* &.d_name */, uint64(FILENAME_MAX)) *(*int8)(unsafe.Pointer((entry + 8 /* &.d_name */) + 260)) = int8(0) *(*LPDIRENT)(unsafe.Pointer(result)) = entry return 0 __2: ; next: libc.Xmemset(tls, bp /* &data */, 0, uint64(unsafe.Sizeof(_finddata64i32_t{}))) if !(libc.X_findnext64i32(tls, (*DIR)(unsafe.Pointer(dirp)).Fd_handle, bp /* &data */) == -1) { goto __3 } *(*LPDIRENT)(unsafe.Pointer(result)) = uintptr(0) return ENOENT __3: ; // TODO: Remove this block to allow hidden and/or system files. if !(((((*_finddata64i32_t)(unsafe.Pointer(bp /* &data */)).Fattrib) & uint32(X_A_HIDDEN)) != 0) || ((((*_finddata64i32_t)(unsafe.Pointer(bp /* &data */)).Fattrib) & uint32(X_A_SYSTEM)) != 0)) { goto __4 } goto next __4: ; (*DIRENT)(unsafe.Pointer(entry)).Fd_ino = libc.Uint16(libc.Uint16FromInt32(-1)) // not available (*DIRENT)(unsafe.Pointer(entry)).Fd_attributes = (*_finddata64i32_t)(unsafe.Pointer(bp /* &data */)).Fattrib libc.Xstrncpy(tls, entry+8 /* &.d_name */, bp /* &data */ +36 /* &.name */, uint64(FILENAME_MAX)) *(*int8)(unsafe.Pointer((entry + 8 /* &.d_name */) + 260)) = int8(0) *(*LPDIRENT)(unsafe.Pointer(result)) = entry return 0 } // Implementation of the POSIX closedir() function using the MSVCRT. func closedir(tls *libc.TLS, dirp LPDIR) INT { /* test_windirent.c:176:5: */ var result INT = 0 if dirp == (uintptr(0)) { return EINVAL } if ((*DIR)(unsafe.Pointer(dirp)).Fd_handle != (int64(0))) && ((*DIR)(unsafe.Pointer(dirp)).Fd_handle != (int64(-1))) { result = libc.X_findclose(tls, (*DIR)(unsafe.Pointer(dirp)).Fd_handle) } sqlite3.Xsqlite3_free(tls, dirp) return result } type TestWindow1 = struct { FxStep uintptr FxFinal uintptr FxValue uintptr FxInverse uintptr Finterp uintptr } /* test_window.c:24:9 */ type TestWindow = TestWindow1 /* test_window.c:24:27 */ type TestWindowCtx1 = struct{ FpVal uintptr } /* test_window.c:33:9 */ type TestWindowCtx = TestWindowCtx1 /* test_window.c:33:30 */ func doTestWindowStep(tls *libc.TLS, bInverse int32, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:38:13: */ var i int32 var p uintptr = sqlite3.Xsqlite3_user_data(tls, ctx) var pEval uintptr = tcl.XTcl_DuplicateObj(tls, func() uintptr { if bInverse != 0 { return (*TestWindow)(unsafe.Pointer(p)).FxInverse } return (*TestWindow)(unsafe.Pointer(p)).FxStep }()) var pCtx uintptr = sqlite3.Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(TestWindowCtx{}))) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ if pCtx != 0 { var zResult uintptr var rc int32 if (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal != 0 { tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_DuplicateObj(tls, (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal)) } else { tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, ts+489 /* "" */, -1)) } for i = 0; i < nArg; i++ { var pArg uintptr pArg = tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + uintptr(i)*8))), -1) tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, pArg) } rc = tcl.XTcl_EvalObjEx(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, TCL_EVAL_GLOBAL) if rc != TCL_OK { zResult = tcl.XTcl_GetStringResult(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp) sqlite3.Xsqlite3_result_error(tls, ctx, zResult, -1) } else { if (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal = tcl.XTcl_DuplicateObj(tls, tcl.XTcl_GetObjResult(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp)) (*Tcl_Obj)(unsafe.Pointer((*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal)).FrefCount++ } } for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } func doTestWindowFinalize(tls *libc.TLS, bValue int32, ctx uintptr) { /* test_window.c:76:13: */ var p uintptr = sqlite3.Xsqlite3_user_data(tls, ctx) var pEval uintptr = tcl.XTcl_DuplicateObj(tls, func() uintptr { if bValue != 0 { return (*TestWindow)(unsafe.Pointer(p)).FxValue } return (*TestWindow)(unsafe.Pointer(p)).FxFinal }()) var pCtx uintptr = sqlite3.Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(TestWindowCtx{}))) (*Tcl_Obj)(unsafe.Pointer(pEval)).FrefCount++ if pCtx != 0 { var zResult uintptr var rc int32 if (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal != 0 { tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_DuplicateObj(tls, (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal)) } else { tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, ts+489 /* "" */, -1)) } rc = tcl.XTcl_EvalObjEx(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, TCL_EVAL_GLOBAL) zResult = tcl.XTcl_GetStringResult(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp) if rc != TCL_OK { sqlite3.Xsqlite3_result_error(tls, ctx, zResult, -1) } else { sqlite3.Xsqlite3_result_text(tls, ctx, zResult, -1, libc.UintptrFromInt32(-1)) } if bValue == 0 { if (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal != 0 { for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal = uintptr(0) } } for ok1 := true; ok1; ok1 = 0 != 0 { var _objPtr uintptr = pEval if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { tcl.XTclFreeObj(tls, _objPtr) } } } func testWindowStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:107:13: */ doTestWindowStep(tls, 0, ctx, nArg, apArg) } func testWindowInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:114:13: */ doTestWindowStep(tls, 1, ctx, nArg, apArg) } func testWindowFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:122:13: */ doTestWindowFinalize(tls, 0, ctx) } func testWindowValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:125:13: */ doTestWindowFinalize(tls, 1, ctx) } func testWindowDestroy(tls *libc.TLS, pCtx uintptr) { /* test_window.c:129:13: */ tcl.XTcl_Free(tls, pCtx) } // Usage: sqlite3_create_window_function DB NAME XSTEP XFINAL XVALUE XINVERSE func test_create_window(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_window.c:136:26: */ bp := tls.Alloc(8) defer tls.Free(8) var pNew uintptr // var db uintptr at bp, 8 var zName uintptr var rc int32 if objc != 7 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37887 /* "DB NAME XSTEP XF..." */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))) pNew = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(TestWindow{}))) libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(TestWindow{}))) (*TestWindow)(unsafe.Pointer(pNew)).FxStep = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8))) (*TestWindow)(unsafe.Pointer(pNew)).FxFinal = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8))) (*TestWindow)(unsafe.Pointer(pNew)).FxValue = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 5*8))) (*TestWindow)(unsafe.Pointer(pNew)).FxInverse = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 6*8))) (*TestWindow)(unsafe.Pointer(pNew)).Finterp = interp (*Tcl_Obj)(unsafe.Pointer((*TestWindow)(unsafe.Pointer(pNew)).FxStep)).FrefCount++ (*Tcl_Obj)(unsafe.Pointer((*TestWindow)(unsafe.Pointer(pNew)).FxFinal)).FrefCount++ (*Tcl_Obj)(unsafe.Pointer((*TestWindow)(unsafe.Pointer(pNew)).FxValue)).FrefCount++ (*Tcl_Obj)(unsafe.Pointer((*TestWindow)(unsafe.Pointer(pNew)).FxInverse)).FrefCount++ rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), zName, -1, SQLITE_UTF8, pNew, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowValue})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowInverse})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowDestroy}))) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } return TCL_OK } func test_create_window_misuse(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_window.c:179:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if !(objc != 2) { goto __1 } tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR __1: ; if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0) { goto __2 } return TCL_ERROR __2: ; rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37924 /* "fff" */, -1, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowValue})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowInverse})), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __3 } goto error __3: ; rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37924 /* "fff" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowStep})), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowValue})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowInverse})), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __4 } goto error __4: ; rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37924 /* "fff" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowFinal})), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowInverse})), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __5 } goto error __5: ; rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37924 /* "fff" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{testWindowStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{testWindowValue})), uintptr(0), uintptr(0)) if !(rc != SQLITE_MISUSE) { goto __6 } goto error __6: ; return TCL_OK error: tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, ts+37928 /* "misuse test erro..." */, -1)) return TCL_ERROR } // xStep for sumint(). func sumintStep(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:225:13: */ var pInt uintptr if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_INTEGER { sqlite3.Xsqlite3_result_error(tls, ctx, ts+37946 /* "invalid argument" */, -1) return } pInt = sqlite3.Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(sqlite3_int64(0)))) if pInt != 0 { *(*sqlite3_int64)(unsafe.Pointer(pInt)) += (sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg)))) } } // xInverse for sumint(). func sumintInverse(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_window.c:246:13: */ var pInt uintptr pInt = sqlite3.Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(sqlite3_int64(0)))) *(*sqlite3_int64)(unsafe.Pointer(pInt)) -= (sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg)))) } // xFinal for sumint(). func sumintFinal(tls *libc.TLS, ctx uintptr) { /* test_window.c:259:13: */ var res sqlite3_int64 = int64(0) var pInt uintptr pInt = sqlite3.Xsqlite3_aggregate_context(tls, ctx, 0) if pInt != 0 { res = *(*sqlite3_int64)(unsafe.Pointer(pInt)) } sqlite3.Xsqlite3_result_int64(tls, ctx, res) } // xValue for sumint(). func sumintValue(tls *libc.TLS, ctx uintptr) { /* test_window.c:270:13: */ var res sqlite3_int64 = int64(0) var pInt uintptr pInt = sqlite3.Xsqlite3_aggregate_context(tls, ctx, 0) if pInt != 0 { res = *(*sqlite3_int64)(unsafe.Pointer(pInt)) } sqlite3.Xsqlite3_result_int64(tls, ctx, res) } func test_create_sumint(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_window.c:278:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37963 /* "sumint" */, 1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{sumintStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sumintFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sumintValue})), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{sumintInverse})), uintptr(0)) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } return TCL_OK } func test_override_sum(tls *libc.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_window.c:305:26: */ bp := tls.Alloc(8) defer tls.Free(8) // var db uintptr at bp, 8 var rc int32 if objc != 2 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1911 /* "DB" */) return TCL_ERROR } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), bp /* &db */) != 0 { return TCL_ERROR } rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37970 /* "sum" */, -1, SQLITE_UTF8, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{sumintStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sumintFinal}))) if rc != SQLITE_OK { tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) return TCL_ERROR } return TCL_OK } func Sqlitetest_window_Init(tls *libc.TLS, interp uintptr) int32 { /* test_window.c:331:5: */ var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd14)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{}))); i++ { var c ClientData = uintptr(intptr_t(aObjCmd14[i].FclientData)) tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd14[i].FzName, aObjCmd14[i].FxProc, c, uintptr(0)) } return TCL_OK } var aObjCmd14 = [4]struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{ {FzName: ts + 37974 /* "sqlite3_create_w..." */, FxProc: 0}, {FzName: ts + 38005 /* "test_create_wind..." */, FxProc: 0}, {FzName: ts + 38040 /* "test_create_sumi..." */, FxProc: 0}, {FzName: ts + 38059 /* "test_override_su..." */, FxProc: 0}, } /* test_window.c:336:5 */ // 2008 September 1 // // The author disclaims copyright to this source code. In place of // a legal notice, here is a blessing: // // May you do good and not evil. // May you find forgiveness for yourself and forgive others. // May you share freely, never taking more than you give. // // // // The code in this file contains sample implementations of the // sqlite3_wsd_init() and sqlite3_wsd_find() functions required if the // SQLITE_OMIT_WSD symbol is defined at build time. func init() { *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 8 /* .xClose */)) = cfClose // test6.c:577:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 16 /* .xRead */)) = cfRead // test6.c:578:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 24 /* .xWrite */)) = cfWrite // test6.c:579:3: *(*func(*libc.TLS, uintptr, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 32 /* .xTruncate */)) = cfTruncate // test6.c:580:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 40 /* .xSync */)) = cfSync // test6.c:581:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 48 /* .xFileSize */)) = cfFileSize // test6.c:582:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 56 /* .xLock */)) = cfLock // test6.c:583:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 64 /* .xUnlock */)) = cfUnlock // test6.c:584:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 72 /* .xCheckReservedLock */)) = cfCheckReservedLock // test6.c:585:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 80 /* .xFileControl */)) = cfFileControl // test6.c:586:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 88 /* .xSectorSize */)) = cfSectorSize // test6.c:587:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 96 /* .xDeviceCharacteristics */)) = cfDeviceCharacteristics // test6.c:588:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 104 /* .xShmMap */)) = cfShmMap // test6.c:589:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 112 /* .xShmLock */)) = cfShmLock // test6.c:590:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 120 /* .xShmBarrier */)) = cfShmBarrier // test6.c:591:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CrashFileVtab)) + 128 /* .xShmUnmap */)) = cfShmUnmap // test6.c:592:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 8 /* .xCreate */)) = csvtabCreate // csv.c:874:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 16 /* .xConnect */)) = csvtabConnect // csv.c:875:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 24 /* .xBestIndex */)) = csvtabBestIndex // csv.c:876:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 32 /* .xDisconnect */)) = csvtabDisconnect // csv.c:877:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 40 /* .xDestroy */)) = csvtabDisconnect // csv.c:878:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 48 /* .xOpen */)) = csvtabOpen // csv.c:879:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 56 /* .xClose */)) = csvtabClose // csv.c:880:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 64 /* .xFilter */)) = csvtabFilter // csv.c:881:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 72 /* .xNext */)) = csvtabNext // csv.c:882:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 80 /* .xEof */)) = csvtabEof // csv.c:883:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 88 /* .xColumn */)) = csvtabColumn // csv.c:884:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModule)) + 96 /* .xRowid */)) = csvtabRowid // csv.c:885:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 8 /* .xCreate */)) = csvtabCreate // csv.c:906:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 16 /* .xConnect */)) = csvtabConnect // csv.c:907:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 24 /* .xBestIndex */)) = csvtabBestIndex // csv.c:908:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 32 /* .xDisconnect */)) = csvtabDisconnect // csv.c:909:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 40 /* .xDestroy */)) = csvtabDisconnect // csv.c:910:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 48 /* .xOpen */)) = csvtabOpen // csv.c:911:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 56 /* .xClose */)) = csvtabClose // csv.c:912:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 64 /* .xFilter */)) = csvtabFilter // csv.c:913:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 72 /* .xNext */)) = csvtabNext // csv.c:914:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 80 /* .xEof */)) = csvtabEof // csv.c:915:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 88 /* .xColumn */)) = csvtabColumn // csv.c:916:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 96 /* .xRowid */)) = csvtabRowid // csv.c:917:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&CsvModuleFauxWrite)) + 104 /* .xUpdate */)) = csvtabUpdate // csv.c:918:3: *(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&IncrblobChannelType)) + 16 /* .closeProc */)) = incrblobClose // tclsqlite.c:372:3: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&IncrblobChannelType)) + 24 /* .inputProc */)) = incrblobInput // tclsqlite.c:373:3: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&IncrblobChannelType)) + 32 /* .outputProc */)) = incrblobOutput // tclsqlite.c:374:3: *(*func(*libc.TLS, ClientData, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&IncrblobChannelType)) + 40 /* .seekProc */)) = incrblobSeek // tclsqlite.c:375:3: *(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&IncrblobChannelType)) + 64 /* .watchProc */)) = incrblobWatch // tclsqlite.c:378:3: *(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&IncrblobChannelType)) + 72 /* .getHandleProc */)) = incrblobHandle // tclsqlite.c:379:3: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 8 /* .xProc */)) = f5tCreateTokenizer // fts5_tcl.c:1125:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 32 /* .xProc */)) = f5tTokenizerReturn // fts5_tcl.c:1126:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 56 /* .xProc */)) = f5tTokenize // fts5_tcl.c:1127:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 80 /* .xProc */)) = f5tCreateFunction // fts5_tcl.c:1128:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 104 /* .xProc */)) = f5tMayBeCorrupt // fts5_tcl.c:1129:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 128 /* .xProc */)) = f5tTokenHash // fts5_tcl.c:1130:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 152 /* .xProc */)) = f5tRegisterMatchinfo // fts5_tcl.c:1131:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd)) + 176 /* .xProc */)) = f5tRegisterTok // fts5_tcl.c:1132:45: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{db_enter})) // test1.c:8229:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{db_leave})) // test1.c:8230:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_int})) // test1.c:8231:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_int64})) // test1.c:8232:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_long})) // test1.c:8233:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_str})) // test1.c:8234:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_snprintf_str})) // test1.c:8235:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_stronly})) // test1.c:8236:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_double})) // test1.c:8237:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_scaled})) // test1.c:8238:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite3_mprintf_hexdouble})) // test1.c:8239:39: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 184 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_mprintf_z})) // test1.c:8240:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 200 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_mprintf_n})) // test1.c:8241:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 216 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_snprintf_int})) // test1.c:8242:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 232 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_last_rowid})) // test1.c:8243:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 248 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_exec_printf})) // test1.c:8244:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 264 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_exec_hex})) // test1.c:8245:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 280 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_exec})) // test1.c:8246:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 296 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_exec_nr})) // test1.c:8247:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 312 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_get_table_printf})) // test1.c:8249:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 328 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite_test_close})) // test1.c:8251:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 344 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite_test_close_v2})) // test1.c:8252:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 360 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_create_function})) // test1.c:8253:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 376 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_create_aggregate})) // test1.c:8254:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 392 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_drop_modules})) // test1.c:8255:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 408 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_register_func})) // test1.c:8256:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 424 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite_abort})) // test1.c:8257:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 440 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_bind})) // test1.c:8258:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 456 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_breakpoint})) // test1.c:8259:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 472 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_key})) // test1.c:8260:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 488 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_rekey})) // test1.c:8261:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 504 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{sqlite_set_magic})) // test1.c:8262:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 520 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_interrupt})) // test1.c:8263:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 536 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{delete_function})) // test1.c:8264:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 552 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{delete_collation})) // test1.c:8265:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 568 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{get_autocommit})) // test1.c:8266:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 584 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_busy_timeout})) // test1.c:8267:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 600 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_printf})) // test1.c:8268:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 616 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_io_trace})) // test1.c:8269:39: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd1)) + 632 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{clang_sanitize_address})) // test1.c:8270:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_open})) // test2.c:708:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_close})) // test2.c:709:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_commit})) // test2.c:710:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_rollback})) // test2.c:711:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_stmt_begin})) // test2.c:712:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_stmt_commit})) // test2.c:713:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_stmt_rollback})) // test2.c:714:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_stats})) // test2.c:715:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_pagecount})) // test2.c:716:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{page_get})) // test2.c:717:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{page_lookup})) // test2.c:718:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 184 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{page_unref})) // test2.c:719:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 200 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{page_read})) // test2.c:720:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 216 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{page_write})) // test2.c:721:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 232 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{page_number})) // test2.c:722:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 248 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{pager_truncate})) // test2.c:723:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 264 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fake_big_file})) // test2.c:725:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 280 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{testBitvecBuiltinTest})) // test2.c:727:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 296 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{testPendingByte})) // test2.c:728:45: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd2)) + 312 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{faultInstallCmd})) // test2.c:729:45: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_open})) // test3.c:666:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_close})) // test3.c:667:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_begin_transaction})) // test3.c:668:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_pager_stats})) // test3.c:669:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_cursor})) // test3.c:670:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_close_cursor})) // test3.c:671:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_next})) // test3.c:672:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_eof})) // test3.c:673:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_payload_size})) // test3.c:674:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_first})) // test3.c:675:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_varint_test})) // test3.c:676:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 184 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_from_db})) // test3.c:677:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 200 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_ismemdb})) // test3.c:678:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd3)) + 216 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{btree_set_cache_size})) // test3.c:679:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd4)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{binarize})) // test5.c:210:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd4)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_value_overhead})) // test5.c:211:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd4)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_translate})) // test5.c:212:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd4)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_translate_selftest})) // test5.c:213:34: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 8 /* .xProc */)) = test_multiplex_initialize // test_multiplex.c:1311:39: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 24 /* .xProc */)) = test_multiplex_shutdown // test_multiplex.c:1312:37: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 40 /* .xProc */)) = test_multiplex_control // test_multiplex.c:1313:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_shutdown})) // test_mutex.c:485:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_initialize})) // test_mutex.c:486:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_config})) // test_mutex.c:487:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_enter_static_mutex})) // test_mutex.c:489:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_leave_static_mutex})) // test_mutex.c:490:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_enter_db_mutex})) // test_mutex.c:492:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_leave_db_mutex})) // test_mutex.c:493:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_alloc_mutex})) // test_mutex.c:495:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_install_mutex_counters})) // test_mutex.c:496:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_read_mutex_counters})) // test_mutex.c:497:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_clear_mutex_counters})) // test_mutex.c:498:34: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 8 /* .xProc */)) = test_quota_initialize // test_quota.c:1949:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 24 /* .xProc */)) = test_quota_shutdown // test_quota.c:1950:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 40 /* .xProc */)) = test_quota_set // test_quota.c:1951:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 56 /* .xProc */)) = test_quota_file // test_quota.c:1952:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 72 /* .xProc */)) = test_quota_dump // test_quota.c:1953:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 88 /* .xProc */)) = test_quota_fopen // test_quota.c:1954:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 104 /* .xProc */)) = test_quota_fread // test_quota.c:1955:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 120 /* .xProc */)) = test_quota_fwrite // test_quota.c:1956:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 136 /* .xProc */)) = test_quota_fclose // test_quota.c:1957:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 152 /* .xProc */)) = test_quota_fflush // test_quota.c:1958:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 168 /* .xProc */)) = test_quota_fseek // test_quota.c:1959:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 184 /* .xProc */)) = test_quota_rewind // test_quota.c:1960:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 200 /* .xProc */)) = test_quota_ftell // test_quota.c:1961:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 216 /* .xProc */)) = test_quota_ftruncate // test_quota.c:1962:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 232 /* .xProc */)) = test_quota_file_size // test_quota.c:1963:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 248 /* .xProc */)) = test_quota_file_truesize // test_quota.c:1964:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 264 /* .xProc */)) = test_quota_file_mtime // test_quota.c:1965:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 280 /* .xProc */)) = test_quota_remove // test_quota.c:1966:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 296 /* .xProc */)) = test_quota_glob // test_quota.c:1967:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 312 /* .xProc */)) = test_quota_file_available // test_quota.c:1968:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 328 /* .xProc */)) = test_quota_ferror // test_quota.c:1969:38: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 8 /* .pInit */)) = sqlite3_amatch_init // test1.c:7526:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 24 /* .pInit */)) = sqlite3_appendvfs_init // test1.c:7527:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 40 /* .pInit */)) = sqlite3_carray_init // test1.c:7528:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 56 /* .pInit */)) = sqlite3_closure_init // test1.c:7529:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 72 /* .pInit */)) = sqlite3_csv_init // test1.c:7530:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 88 /* .pInit */)) = sqlite3_decimal_init // test1.c:7531:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 104 /* .pInit */)) = sqlite3_eval_init // test1.c:7532:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 120 /* .pInit */)) = sqlite3_explain_init // test1.c:7533:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 136 /* .pInit */)) = sqlite3_fileio_init // test1.c:7534:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 152 /* .pInit */)) = sqlite3_fuzzer_init // test1.c:7535:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 168 /* .pInit */)) = sqlite3_ieee_init // test1.c:7536:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 184 /* .pInit */)) = sqlite3_nextchar_init // test1.c:7537:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 200 /* .pInit */)) = sqlite3_percentile_init // test1.c:7538:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 216 /* .pInit */)) = sqlite3_prefixes_init // test1.c:7540:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 232 /* .pInit */)) = sqlite3_regexp_init // test1.c:7542:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 248 /* .pInit */)) = sqlite3_remember_init // test1.c:7543:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 264 /* .pInit */)) = sqlite3_series_init // test1.c:7544:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 280 /* .pInit */)) = sqlite3_spellfix_init // test1.c:7545:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 296 /* .pInit */)) = sqlite3_totype_init // test1.c:7546:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 312 /* .pInit */)) = sqlite3_unionvtab_init // test1.c:7547:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 328 /* .pInit */)) = sqlite3_wholenumber_init // test1.c:7548:32: *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 344 /* .pInit */)) = sqlite3_zipfile_init // test1.c:7550:32: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 16 /* .xFunc */)) = decimalFunc // decimal.c:607:29: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 40 /* .xFunc */)) = decimalCmpFunc // decimal.c:608:29: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 64 /* .xFunc */)) = decimalAddFunc // decimal.c:609:29: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 88 /* .xFunc */)) = decimalSubFunc // decimal.c:610:29: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 112 /* .xFunc */)) = decimalMulFunc // decimal.c:611:29: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 16 /* .xFunc */)) = ieee754func // ieee754.c:270:36: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 40 /* .xFunc */)) = ieee754func // ieee754.c:271:36: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 64 /* .xFunc */)) = ieee754func // ieee754.c:272:36: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 88 /* .xFunc */)) = ieee754func // ieee754.c:273:36: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 112 /* .xFunc */)) = ieee754func_to_blob // ieee754.c:274:36: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 136 /* .xFunc */)) = ieee754func_from_blob // ieee754.c:275:36: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 16 /* .xFunc */)) = randStr // test_func.c:675:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 40 /* .xFunc */)) = test_destructor // test_func.c:676:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 64 /* .xFunc */)) = test_destructor16 // test_func.c:678:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 88 /* .xFunc */)) = testHexToUtf16be // test_func.c:679:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 112 /* .xFunc */)) = testHexToUtf16le // test_func.c:680:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 136 /* .xFunc */)) = testHexToUtf8 // test_func.c:682:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 160 /* .xFunc */)) = test_destructor_count // test_func.c:683:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 184 /* .xFunc */)) = test_auxdata // test_func.c:684:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 208 /* .xFunc */)) = test_error // test_func.c:685:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 232 /* .xFunc */)) = test_error // test_func.c:686:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 256 /* .xFunc */)) = test_eval // test_func.c:687:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 280 /* .xFunc */)) = test_isolation // test_func.c:688:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 304 /* .xFunc */)) = counterFunc // test_func.c:689:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 328 /* .xFunc */)) = real2hex // test_func.c:690:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 352 /* .xFunc */)) = test_decode // test_func.c:691:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 376 /* .xFunc */)) = test_extract // test_func.c:692:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 400 /* .xFunc */)) = test_zeroblob // test_func.c:693:62: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 424 /* .xFunc */)) = test_getsubtype // test_func.c:694:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 448 /* .xFunc */)) = test_setsubtype // test_func.c:695:48: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 472 /* .xFunc */)) = test_frombind // test_func.c:696:48: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 8 /* .xProc */)) = test_sqlite3rbu // test_rbu.c:370:21: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 24 /* .xProc */)) = test_sqlite3rbu_vacuum // test_rbu.c:371:28: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 40 /* .xProc */)) = test_sqlite3rbu_create_vfs // test_rbu.c:372:32: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 56 /* .xProc */)) = test_sqlite3rbu_destroy_vfs // test_rbu.c:373:33: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 72 /* .xProc */)) = test_sqlite3rbu_internal_test // test_rbu.c:374:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 8 /* .xProc */)) = test_sqlite3_db_config // test1.c:8277:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 32 /* .xProc */)) = test_sqlite3_txn_state // test1.c:8278:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 56 /* .xProc */)) = test_bad_behavior // test1.c:8279:41: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 64 /* .clientData */)) = uintptr(unsafe.Pointer(&iZero)) // test1.c:8279:61: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 80 /* .xProc */)) = test_register_dbstat_vtab // test1.c:8280:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 104 /* .xProc */)) = get_sqlite_pointer // test1.c:8281:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 128 /* .xProc */)) = test_intarray_addr // test1.c:8282:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 152 /* .xProc */)) = test_int64array_addr // test1.c:8283:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 176 /* .xProc */)) = test_doublearray_addr // test1.c:8284:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 200 /* .xProc */)) = test_textarray_addr // test1.c:8285:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 224 /* .xProc */)) = test_bind_int // test1.c:8286:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 248 /* .xProc */)) = test_bind_zeroblob // test1.c:8287:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 272 /* .xProc */)) = test_bind_zeroblob64 // test1.c:8288:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 296 /* .xProc */)) = test_bind_int64 // test1.c:8289:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 320 /* .xProc */)) = test_bind_double // test1.c:8290:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 344 /* .xProc */)) = test_bind_null // test1.c:8291:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 368 /* .xProc */)) = test_bind_text // test1.c:8292:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 392 /* .xProc */)) = test_bind_text16 // test1.c:8293:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 416 /* .xProc */)) = test_bind_blob // test1.c:8294:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 440 /* .xProc */)) = test_carray_bind // test1.c:8296:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 464 /* .xProc */)) = test_bind_parameter_count // test1.c:8298:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 488 /* .xProc */)) = test_bind_parameter_name // test1.c:8299:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 512 /* .xProc */)) = test_bind_parameter_index // test1.c:8300:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 536 /* .xProc */)) = test_clear_bindings // test1.c:8301:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 560 /* .xProc */)) = test_sleep // test1.c:8302:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 584 /* .xProc */)) = test_errcode // test1.c:8303:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 608 /* .xProc */)) = test_ex_errcode // test1.c:8304:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 632 /* .xProc */)) = test_errmsg // test1.c:8305:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 656 /* .xProc */)) = test_errmsg16 // test1.c:8306:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 680 /* .xProc */)) = test_open // test1.c:8307:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 704 /* .xProc */)) = test_open16 // test1.c:8308:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 728 /* .xProc */)) = test_open_v2 // test1.c:8309:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 752 /* .xProc */)) = test_complete16 // test1.c:8310:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 776 /* .xProc */)) = test_normalize // test1.c:8311:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 800 /* .xProc */)) = test_prepare // test1.c:8313:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 824 /* .xProc */)) = test_prepare16 // test1.c:8314:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 848 /* .xProc */)) = test_prepare_v2 // test1.c:8315:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 872 /* .xProc */)) = test_prepare_v3 // test1.c:8316:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 896 /* .xProc */)) = test_prepare_tkt3134 // test1.c:8317:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 920 /* .xProc */)) = test_prepare16_v2 // test1.c:8318:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 944 /* .xProc */)) = test_finalize // test1.c:8319:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 968 /* .xProc */)) = test_stmt_status // test1.c:8320:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 992 /* .xProc */)) = test_reset // test1.c:8321:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1016 /* .xProc */)) = test_expired // test1.c:8322:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1040 /* .xProc */)) = test_transfer_bind // test1.c:8323:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1064 /* .xProc */)) = test_changes // test1.c:8324:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1088 /* .xProc */)) = test_step // test1.c:8325:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1112 /* .xProc */)) = test_sql // test1.c:8326:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1136 /* .xProc */)) = test_ex_sql // test1.c:8327:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1160 /* .xProc */)) = test_next_stmt // test1.c:8331:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1184 /* .xProc */)) = test_stmt_readonly // test1.c:8332:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1208 /* .xProc */)) = test_stmt_isexplain // test1.c:8333:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1232 /* .xProc */)) = test_stmt_busy // test1.c:8334:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1256 /* .xProc */)) = uses_stmt_journal // test1.c:8335:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1280 /* .xProc */)) = test_release_memory // test1.c:8337:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1304 /* .xProc */)) = test_db_release_memory // test1.c:8338:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1328 /* .xProc */)) = test_db_cacheflush // test1.c:8339:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1352 /* .xProc */)) = test_system_errno // test1.c:8340:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1376 /* .xProc */)) = test_db_filename // test1.c:8341:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1400 /* .xProc */)) = test_db_readonly // test1.c:8342:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1424 /* .xProc */)) = test_soft_heap_limit // test1.c:8343:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1448 /* .xProc */)) = test_soft_heap_limit // test1.c:8344:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1472 /* .xProc */)) = test_hard_heap_limit // test1.c:8345:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1496 /* .xProc */)) = test_thread_cleanup // test1.c:8346:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1520 /* .xProc */)) = test_pager_refcounts // test1.c:8347:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1544 /* .xProc */)) = test_load_extension // test1.c:8349:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1568 /* .xProc */)) = test_enable_load // test1.c:8350:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1592 /* .xProc */)) = test_extended_result_codes // test1.c:8351:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1616 /* .xProc */)) = test_limit // test1.c:8352:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1640 /* .xProc */)) = test_dbconfig_maindbname_icecube // test1.c:8353:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1664 /* .xProc */)) = save_prng_state // test1.c:8355:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1688 /* .xProc */)) = restore_prng_state // test1.c:8356:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1712 /* .xProc */)) = reset_prng_state // test1.c:8357:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1736 /* .xProc */)) = prng_seed // test1.c:8358:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1760 /* .xProc */)) = extra_schema_checks // test1.c:8359:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1784 /* .xProc */)) = database_never_corrupt // test1.c:8360:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1808 /* .xProc */)) = database_may_be_corrupt // test1.c:8361:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1832 /* .xProc */)) = optimization_control // test1.c:8362:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1856 /* .xProc */)) = win32_file_lock // test1.c:8364:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1880 /* .xProc */)) = win32_exists_path // test1.c:8365:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1904 /* .xProc */)) = win32_find_file // test1.c:8366:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1928 /* .xProc */)) = win32_delete_file // test1.c:8367:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1952 /* .xProc */)) = win32_mkdir // test1.c:8368:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1976 /* .xProc */)) = win32_rmdir // test1.c:8369:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2000 /* .xProc */)) = runAsObjProc // test1.c:8371:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2024 /* .xProc */)) = test_column_count // test1.c:8374:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2048 /* .xProc */)) = test_data_count // test1.c:8375:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2072 /* .xProc */)) = test_column_type // test1.c:8376:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2096 /* .xProc */)) = test_column_blob // test1.c:8377:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2120 /* .xProc */)) = test_column_double // test1.c:8378:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2144 /* .xProc */)) = test_column_int64 // test1.c:8379:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2168 /* .xProc */)) = test_stmt_utf8 // test1.c:8380:33: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2176 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_text})) // test1.c:8380:50: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2192 /* .xProc */)) = test_stmt_utf8 // test1.c:8381:33: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2200 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_name})) // test1.c:8381:50: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2216 /* .xProc */)) = test_stmt_int // test1.c:8382:33: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2224 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{sqlite3.Xsqlite3_column_int})) // test1.c:8382:50: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2240 /* .xProc */)) = test_stmt_int // test1.c:8383:33: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2248 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{sqlite3.Xsqlite3_column_bytes})) // test1.c:8383:50: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2264 /* .xProc */)) = test_stmt_utf8 // test1.c:8385:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2272 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_decltype})) // test1.c:8385:49: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2288 /* .xProc */)) = test_stmt_utf8 // test1.c:8388:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2296 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_database_name})) // test1.c:8388:49: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2312 /* .xProc */)) = test_stmt_utf8 // test1.c:8389:31: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2320 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_table_name})) // test1.c:8389:46: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2336 /* .xProc */)) = test_stmt_utf8 // test1.c:8390:32: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2344 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_origin_name})) // test1.c:8390:47: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2360 /* .xProc */)) = test_stmt_int // test1.c:8394:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2368 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{sqlite3.Xsqlite3_column_bytes16})) // test1.c:8394:49: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2384 /* .xProc */)) = test_stmt_utf16 // test1.c:8395:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2392 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_text16})) // test1.c:8395:51: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2408 /* .xProc */)) = test_stmt_utf16 // test1.c:8396:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2416 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_name16})) // test1.c:8396:51: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2432 /* .xProc */)) = add_alignment_test_collations // test1.c:8397:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2456 /* .xProc */)) = test_stmt_utf16 // test1.c:8399:36: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2464 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_decltype16})) // test1.c:8399:52: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2480 /* .xProc */)) = test_stmt_utf16 // test1.c:8403:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2488 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_database_name16})) // test1.c:8403:20: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2504 /* .xProc */)) = test_stmt_utf16 // test1.c:8404:33: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2512 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_table_name16})) // test1.c:8404:50: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2528 /* .xProc */)) = test_stmt_utf16 // test1.c:8405:34: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2536 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_origin_name16})) // test1.c:8405:51: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2552 /* .xProc */)) = test_create_collation_v2 // test1.c:8408:39: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2576 /* .xProc */)) = test_global_recover // test1.c:8409:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2600 /* .xProc */)) = working_64bit_int // test1.c:8410:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2624 /* .xProc */)) = vfs_unlink_test // test1.c:8411:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2648 /* .xProc */)) = vfs_initfail_test // test1.c:8412:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2672 /* .xProc */)) = vfs_unregister_all // test1.c:8413:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2696 /* .xProc */)) = vfs_reregister_all // test1.c:8414:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2720 /* .xProc */)) = file_control_test // test1.c:8415:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2744 /* .xProc */)) = file_control_lasterrno_test // test1.c:8416:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2768 /* .xProc */)) = file_control_lockproxy_test // test1.c:8417:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2792 /* .xProc */)) = file_control_chunksize_test // test1.c:8418:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2816 /* .xProc */)) = file_control_sizehint_test // test1.c:8419:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2840 /* .xProc */)) = file_control_data_version // test1.c:8420:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2864 /* .xProc */)) = file_control_win32_av_retry // test1.c:8422:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2888 /* .xProc */)) = file_control_win32_get_handle // test1.c:8423:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2912 /* .xProc */)) = file_control_win32_set_handle // test1.c:8424:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2936 /* .xProc */)) = file_control_persist_wal // test1.c:8426:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2960 /* .xProc */)) = file_control_powersafe_overwrite // test1.c:8427:43: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2984 /* .xProc */)) = file_control_vfsname // test1.c:8428:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3008 /* .xProc */)) = file_control_reservebytes // test1.c:8429:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3032 /* .xProc */)) = file_control_tempfilename // test1.c:8430:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3056 /* .xProc */)) = vfs_list // test1.c:8431:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3080 /* .xProc */)) = test_create_function_v2 // test1.c:8432:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3104 /* .xProc */)) = test_collate // test1.c:8436:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3128 /* .xProc */)) = test_collate_needed // test1.c:8437:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3152 /* .xProc */)) = test_function // test1.c:8438:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3176 /* .xProc */)) = test_utf16bin_collate // test1.c:8439:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3200 /* .xProc */)) = test_errstr // test1.c:8441:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3224 /* .xProc */)) = tcl_variable_type // test1.c:8442:35: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3248 /* .xProc */)) = test_enable_shared // test1.c:8444:39: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3272 /* .xProc */)) = sqlite3BtreeSharedCacheReport // test1.c:8445:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3296 /* .xProc */)) = test_libversion_number // test1.c:8447:37: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3320 /* .xProc */)) = test_table_column_metadata // test1.c:8448:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3344 /* .xProc */)) = test_blob_reopen // test1.c:8450:31: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3368 /* .xProc */)) = test_pcache_stats // test1.c:8452:30: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3392 /* .xProc */)) = test_unlock_notify // test1.c:8454:33: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3416 /* .xProc */)) = test_wal_checkpoint // test1.c:8456:36: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3440 /* .xProc */)) = test_wal_checkpoint_v2 // test1.c:8457:36: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3464 /* .xProc */)) = test_wal_autocheckpoint // test1.c:8458:37: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3488 /* .xProc */)) = test_sqlite3_log // test1.c:8459:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3512 /* .xProc */)) = test_print_eqp // test1.c:8461:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3536 /* .xProc */)) = test_test_control // test1.c:8463:32: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3560 /* .xProc */)) = tclLoadStaticExtensionCmd // test1.c:8467:33: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3584 /* .xProc */)) = sorter_test_fakeheap // test1.c:8468:32: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3608 /* .xProc */)) = sorter_test_sort4_helper // test1.c:8469:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3632 /* .xProc */)) = vfsCurrentTimeInt64 // test1.c:8483:44: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3656 /* .xProc */)) = test_snapshot_get // test1.c:8485:32: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3680 /* .xProc */)) = test_snapshot_open // test1.c:8486:33: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3704 /* .xProc */)) = test_snapshot_free // test1.c:8487:33: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3728 /* .xProc */)) = test_snapshot_cmp // test1.c:8488:32: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3752 /* .xProc */)) = test_snapshot_recover // test1.c:8489:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3776 /* .xProc */)) = test_snapshot_get_blob // test1.c:8490:37: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3800 /* .xProc */)) = test_snapshot_open_blob // test1.c:8491:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3824 /* .xProc */)) = test_snapshot_cmp_blob // test1.c:8492:37: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3848 /* .xProc */)) = test_delete_database // test1.c:8494:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3872 /* .xProc */)) = test_atomic_batch_write // test1.c:8495:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3896 /* .xProc */)) = test_mmap_warm // test1.c:8496:35: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3920 /* .xProc */)) = test_config_sorterref // test1.c:8497:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3944 /* .xProc */)) = test_decode_hexdb // test1.c:8498:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3968 /* .xProc */)) = test_write_db // test1.c:8499:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3992 /* .xProc */)) = test_register_cksumvfs // test1.c:8500:37: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 4016 /* .xProc */)) = test_unregister_cksumvfs // test1.c:8501:39: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 8 /* .xProc */)) = test_intarray_create // test_intarray.c:381:35: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 32 /* .xProc */)) = test_intarray_bind // test_intarray.c:382:33: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 8 /* .xProc */)) = test_malloc // test_malloc.c:1473:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 32 /* .xProc */)) = test_realloc // test_malloc.c:1474:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 56 /* .xProc */)) = test_free // test_malloc.c:1475:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 80 /* .xProc */)) = test_memset // test_malloc.c:1476:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 104 /* .xProc */)) = test_memget // test_malloc.c:1477:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 128 /* .xProc */)) = test_memory_used // test_malloc.c:1478:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 152 /* .xProc */)) = test_memory_highwater // test_malloc.c:1479:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 176 /* .xProc */)) = test_memdebug_backtrace // test_malloc.c:1480:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 200 /* .xProc */)) = test_memdebug_dump // test_malloc.c:1481:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 224 /* .xProc */)) = test_memdebug_fail // test_malloc.c:1482:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 248 /* .xProc */)) = test_memdebug_pending // test_malloc.c:1483:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 272 /* .xProc */)) = test_memdebug_settitle // test_malloc.c:1484:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 296 /* .xProc */)) = test_memdebug_malloc_count // test_malloc.c:1485:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 320 /* .xProc */)) = test_memdebug_log // test_malloc.c:1486:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 344 /* .xProc */)) = test_config_pagecache // test_malloc.c:1487:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 368 /* .xProc */)) = test_alt_pcache // test_malloc.c:1488:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 392 /* .xProc */)) = test_status // test_malloc.c:1489:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 416 /* .xProc */)) = test_db_status // test_malloc.c:1490:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 440 /* .xProc */)) = test_install_malloc_faultsim // test_malloc.c:1491:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 464 /* .xProc */)) = test_config_heap // test_malloc.c:1492:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 488 /* .xProc */)) = test_config_heap_size // test_malloc.c:1493:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 512 /* .xProc */)) = test_config_memstatus // test_malloc.c:1494:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 536 /* .xProc */)) = test_config_lookaside // test_malloc.c:1495:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 560 /* .xProc */)) = test_config_error // test_malloc.c:1496:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 584 /* .xProc */)) = test_config_uri // test_malloc.c:1497:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 608 /* .xProc */)) = test_config_cis // test_malloc.c:1498:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 632 /* .xProc */)) = test_config_pmasz // test_malloc.c:1499:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 656 /* .xProc */)) = test_db_config_lookaside // test_malloc.c:1500:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 680 /* .xProc */)) = test_dump_memsys3 // test_malloc.c:1501:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 704 /* .xProc */)) = test_dump_memsys3 // test_malloc.c:1502:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 728 /* .xProc */)) = test_install_memsys3 // test_malloc.c:1503:38: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 752 /* .xProc */)) = test_vfs_oom_test // test_malloc.c:1504:41: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd12)) + 8 /* .xProc */)) = register_schema_module // test_schema.c:336:34: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd13)) + 8 /* .xProc */)) = register_tclvar_module // test_tclvar.c:553:36: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 8 /* .xProc */)) = test_create_window // test_window.c:337:42: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 32 /* .xProc */)) = test_create_window_misuse // test_window.c:338:46: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 56 /* .xProc */)) = test_create_sumint // test_window.c:339:30: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 80 /* .xProc */)) = test_override_sum // test_window.c:340:29: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 8 /* .xProc */)) = register_echo_module // test8.c:1434:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 32 /* .xProc */)) = declare_vtab // test8.c:1435:38: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 8 /* .xProc */)) = c_misuse_test // test9.c:194:28: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 32 /* .xProc */)) = c_realloc_test // test9.c:195:28: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 56 /* .xProc */)) = c_collation_test // test9.c:196:28: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 8 /* .xProc */)) = register_tcl_module // test_bestindex.c:611:33: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 8 /* .xProc */)) = test_blob_open // test_blob.c:318:40: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 24 /* .xProc */)) = test_blob_close // test_blob.c:319:40: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 40 /* .xProc */)) = test_blob_bytes // test_blob.c:320:40: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 56 /* .xProc */)) = test_blob_read // test_blob.c:321:40: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 72 /* .xProc */)) = test_blob_write // test_blob.c:322:40: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd6)) + 8 /* .xProc */)) = register_fs_module // test_fs.c:908:32: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 8 /* .xProc */)) = autoinstall_test_funcs // test_func.c:938:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 24 /* .xProc */)) = abuse_create_function // test_func.c:939:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 40 /* .xProc */)) = install_fts3_rank_function // test_func.c:940:41: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 8 /* .xProc */)) = hexio_read // test_hexio.c:451:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 24 /* .xProc */)) = hexio_write // test_hexio.c:452:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 40 /* .xProc */)) = hexio_get_int // test_hexio.c:453:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 56 /* .xProc */)) = hexio_render_int16 // test_hexio.c:454:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 72 /* .xProc */)) = hexio_render_int32 // test_hexio.c:455:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 88 /* .xProc */)) = utf8_to_utf8 // test_hexio.c:456:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 104 /* .xProc */)) = read_fts3varint // test_hexio.c:457:40: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 120 /* .xProc */)) = make_fts3record // test_hexio.c:458:40: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 8 /* .xProc */)) = init_wrapper_install // test_init.c:283:32: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 24 /* .xProc */)) = init_wrapper_query // test_init.c:284:32: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 40 /* .xProc */)) = init_wrapper_uninstall // test_init.c:285:32: *(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 56 /* .xProc */)) = init_wrapper_clear // test_init.c:286:32: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 8 /* .xCreate */)) = amatchConnect // amatch.c:1456:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 16 /* .xConnect */)) = amatchConnect // amatch.c:1457:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 24 /* .xBestIndex */)) = amatchBestIndex // amatch.c:1458:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 32 /* .xDisconnect */)) = amatchDisconnect // amatch.c:1459:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 40 /* .xDestroy */)) = amatchDisconnect // amatch.c:1460:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 48 /* .xOpen */)) = amatchOpen // amatch.c:1461:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 56 /* .xClose */)) = amatchClose // amatch.c:1462:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 64 /* .xFilter */)) = amatchFilter // amatch.c:1463:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 72 /* .xNext */)) = amatchNext // amatch.c:1464:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 80 /* .xEof */)) = amatchEof // amatch.c:1465:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 88 /* .xColumn */)) = amatchColumn // amatch.c:1466:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 96 /* .xRowid */)) = amatchRowid // amatch.c:1467:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&amatchModule)) + 104 /* .xUpdate */)) = amatchUpdate // amatch.c:1468:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 8 /* .xClose */)) = apndClose // appendvfs.c:204:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 16 /* .xRead */)) = apndRead // appendvfs.c:205:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 24 /* .xWrite */)) = apndWrite // appendvfs.c:206:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 32 /* .xTruncate */)) = apndTruncate // appendvfs.c:207:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 40 /* .xSync */)) = apndSync // appendvfs.c:208:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 48 /* .xFileSize */)) = apndFileSize // appendvfs.c:209:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 56 /* .xLock */)) = apndLock // appendvfs.c:210:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 64 /* .xUnlock */)) = apndUnlock // appendvfs.c:211:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 72 /* .xCheckReservedLock */)) = apndCheckReservedLock // appendvfs.c:212:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 80 /* .xFileControl */)) = apndFileControl // appendvfs.c:213:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 88 /* .xSectorSize */)) = apndSectorSize // appendvfs.c:214:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 96 /* .xDeviceCharacteristics */)) = apndDeviceCharacteristics // appendvfs.c:215:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 104 /* .xShmMap */)) = apndShmMap // appendvfs.c:216:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 112 /* .xShmLock */)) = apndShmLock // appendvfs.c:217:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 120 /* .xShmBarrier */)) = apndShmBarrier // appendvfs.c:218:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 128 /* .xShmUnmap */)) = apndShmUnmap // appendvfs.c:219:3: *(*func(*libc.TLS, uintptr, sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 136 /* .xFetch */)) = apndFetch // appendvfs.c:220:3: *(*func(*libc.TLS, uintptr, sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_io_methods)) + 144 /* .xUnfetch */)) = apndUnfetch // appendvfs.c:221:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 40 /* .xOpen */)) = apndOpen // appendvfs.c:184:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 48 /* .xDelete */)) = apndDelete // appendvfs.c:185:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 56 /* .xAccess */)) = apndAccess // appendvfs.c:186:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 64 /* .xFullPathname */)) = apndFullPathname // appendvfs.c:187:3: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 72 /* .xDlOpen */)) = apndDlOpen // appendvfs.c:188:3: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 80 /* .xDlError */)) = apndDlError // appendvfs.c:189:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 88 /* .xDlSym */)) = apndDlSym // appendvfs.c:190:3: *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 96 /* .xDlClose */)) = apndDlClose // appendvfs.c:191:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 104 /* .xRandomness */)) = apndRandomness // appendvfs.c:192:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 112 /* .xSleep */)) = apndSleep // appendvfs.c:193:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 120 /* .xCurrentTime */)) = apndCurrentTime // appendvfs.c:194:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 128 /* .xGetLastError */)) = apndGetLastError // appendvfs.c:195:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 136 /* .xCurrentTimeInt64 */)) = apndCurrentTimeInt64 // appendvfs.c:196:3: *(*func(*libc.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 144 /* .xSetSystemCall */)) = apndSetSystemCall // appendvfs.c:197:3: *(*func(*libc.TLS, uintptr, uintptr) sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 152 /* .xGetSystemCall */)) = apndGetSystemCall // appendvfs.c:198:3: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&apnd_vfs)) + 160 /* .xNextSystemCall */)) = apndNextSystemCall // appendvfs.c:199:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 16 /* .xConnect */)) = carrayConnect // carray.c:368:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 24 /* .xBestIndex */)) = carrayBestIndex // carray.c:369:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 32 /* .xDisconnect */)) = carrayDisconnect // carray.c:370:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 48 /* .xOpen */)) = carrayOpen // carray.c:372:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 56 /* .xClose */)) = carrayClose // carray.c:373:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 64 /* .xFilter */)) = carrayFilter // carray.c:374:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 72 /* .xNext */)) = carrayNext // carray.c:375:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 80 /* .xEof */)) = carrayEof // carray.c:376:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 88 /* .xColumn */)) = carrayColumn // carray.c:377:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&carrayModule)) + 96 /* .xRowid */)) = carrayRowid // carray.c:378:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 8 /* .xClose */)) = cksmClose // cksumvfs.c:274:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 16 /* .xRead */)) = cksmRead // cksumvfs.c:275:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 24 /* .xWrite */)) = cksmWrite // cksumvfs.c:276:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 32 /* .xTruncate */)) = cksmTruncate // cksumvfs.c:277:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 40 /* .xSync */)) = cksmSync // cksumvfs.c:278:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 48 /* .xFileSize */)) = cksmFileSize // cksumvfs.c:279:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 56 /* .xLock */)) = cksmLock // cksumvfs.c:280:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 64 /* .xUnlock */)) = cksmUnlock // cksumvfs.c:281:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 72 /* .xCheckReservedLock */)) = cksmCheckReservedLock // cksumvfs.c:282:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 80 /* .xFileControl */)) = cksmFileControl // cksumvfs.c:283:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 88 /* .xSectorSize */)) = cksmSectorSize // cksumvfs.c:284:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 96 /* .xDeviceCharacteristics */)) = cksmDeviceCharacteristics // cksumvfs.c:285:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 104 /* .xShmMap */)) = cksmShmMap // cksumvfs.c:286:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 112 /* .xShmLock */)) = cksmShmLock // cksumvfs.c:287:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 120 /* .xShmBarrier */)) = cksmShmBarrier // cksumvfs.c:288:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 128 /* .xShmUnmap */)) = cksmShmUnmap // cksumvfs.c:289:3: *(*func(*libc.TLS, uintptr, sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 136 /* .xFetch */)) = cksmFetch // cksumvfs.c:290:3: *(*func(*libc.TLS, uintptr, sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_io_methods)) + 144 /* .xUnfetch */)) = cksmUnfetch // cksumvfs.c:291:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 40 /* .xOpen */)) = cksmOpen // cksumvfs.c:254:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 48 /* .xDelete */)) = cksmDelete // cksumvfs.c:255:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 56 /* .xAccess */)) = cksmAccess // cksumvfs.c:256:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 64 /* .xFullPathname */)) = cksmFullPathname // cksumvfs.c:257:3: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 72 /* .xDlOpen */)) = cksmDlOpen // cksumvfs.c:258:3: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 80 /* .xDlError */)) = cksmDlError // cksumvfs.c:259:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 88 /* .xDlSym */)) = cksmDlSym // cksumvfs.c:260:3: *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 96 /* .xDlClose */)) = cksmDlClose // cksumvfs.c:261:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 104 /* .xRandomness */)) = cksmRandomness // cksumvfs.c:262:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 112 /* .xSleep */)) = cksmSleep // cksumvfs.c:263:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 120 /* .xCurrentTime */)) = cksmCurrentTime // cksumvfs.c:264:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 128 /* .xGetLastError */)) = cksmGetLastError // cksumvfs.c:265:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 136 /* .xCurrentTimeInt64 */)) = cksmCurrentTimeInt64 // cksumvfs.c:266:3: *(*func(*libc.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 144 /* .xSetSystemCall */)) = cksmSetSystemCall // cksumvfs.c:267:3: *(*func(*libc.TLS, uintptr, uintptr) sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 152 /* .xGetSystemCall */)) = cksmGetSystemCall // cksumvfs.c:268:3: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&cksm_vfs)) + 160 /* .xNextSystemCall */)) = cksmNextSystemCall // cksumvfs.c:269:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 8 /* .xCreate */)) = closureConnect // closure.c:920:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 16 /* .xConnect */)) = closureConnect // closure.c:921:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 24 /* .xBestIndex */)) = closureBestIndex // closure.c:922:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 32 /* .xDisconnect */)) = closureDisconnect // closure.c:923:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 40 /* .xDestroy */)) = closureDisconnect // closure.c:924:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 48 /* .xOpen */)) = closureOpen // closure.c:925:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 56 /* .xClose */)) = closureClose // closure.c:926:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 64 /* .xFilter */)) = closureFilter // closure.c:927:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 72 /* .xNext */)) = closureNext // closure.c:928:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 80 /* .xEof */)) = closureEof // closure.c:929:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 88 /* .xColumn */)) = closureColumn // closure.c:930:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&closureModule)) + 96 /* .xRowid */)) = closureRowid // closure.c:931:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 40 /* .xOpen */)) = cfOpen // test6.c:857:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 48 /* .xDelete */)) = cfDelete // test6.c:858:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 56 /* .xAccess */)) = cfAccess // test6.c:859:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 64 /* .xFullPathname */)) = cfFullPathname // test6.c:860:5: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 72 /* .xDlOpen */)) = cfDlOpen // test6.c:861:5: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 80 /* .xDlError */)) = cfDlError // test6.c:862:5: *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 88 /* .xDlSym */)) = cfDlSym // test6.c:863:5: *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 96 /* .xDlClose */)) = cfDlClose // test6.c:864:5: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 104 /* .xRandomness */)) = cfRandomness // test6.c:865:5: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 112 /* .xSleep */)) = cfSleep // test6.c:866:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 120 /* .xCurrentTime */)) = cfCurrentTime // test6.c:867:5: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 128 /* .xGetLastError */)) = cfGetLastError // test6.c:868:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 8 /* .xClose */)) = devsymClose // test_devsym.c:229:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 16 /* .xRead */)) = devsymRead // test_devsym.c:230:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 24 /* .xWrite */)) = devsymWrite // test_devsym.c:231:3: *(*func(*libc.TLS, uintptr, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 32 /* .xTruncate */)) = devsymTruncate // test_devsym.c:232:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 40 /* .xSync */)) = devsymSync // test_devsym.c:233:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 48 /* .xFileSize */)) = devsymFileSize // test_devsym.c:234:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 56 /* .xLock */)) = devsymLock // test_devsym.c:235:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 64 /* .xUnlock */)) = devsymUnlock // test_devsym.c:236:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 72 /* .xCheckReservedLock */)) = devsymCheckReservedLock // test_devsym.c:237:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 80 /* .xFileControl */)) = devsymFileControl // test_devsym.c:238:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 88 /* .xSectorSize */)) = devsymSectorSize // test_devsym.c:239:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 96 /* .xDeviceCharacteristics */)) = devsymDeviceCharacteristics // test_devsym.c:240:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 104 /* .xShmMap */)) = devsymShmMap // test_devsym.c:241:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 112 /* .xShmLock */)) = devsymShmLock // test_devsym.c:242:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 120 /* .xShmBarrier */)) = devsymShmBarrier // test_devsym.c:243:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 128 /* .xShmUnmap */)) = devsymShmUnmap // test_devsym.c:244:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 40 /* .xOpen */)) = devsymOpen // test_devsym.c:428:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 48 /* .xDelete */)) = devsymDelete // test_devsym.c:429:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 56 /* .xAccess */)) = devsymAccess // test_devsym.c:430:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 64 /* .xFullPathname */)) = devsymFullPathname // test_devsym.c:431:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 104 /* .xRandomness */)) = devsymRandomness // test_devsym.c:443:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 112 /* .xSleep */)) = devsymSleep // test_devsym.c:444:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_vfs)) + 120 /* .xCurrentTime */)) = devsymCurrentTime // test_devsym.c:445:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 8 /* .xCreate */)) = echoCreate // test8.c:1301:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 16 /* .xConnect */)) = echoConnect // test8.c:1302:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 24 /* .xBestIndex */)) = echoBestIndex // test8.c:1303:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 32 /* .xDisconnect */)) = echoDisconnect // test8.c:1304:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 40 /* .xDestroy */)) = echoDestroy // test8.c:1305:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 48 /* .xOpen */)) = echoOpen // test8.c:1306:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 56 /* .xClose */)) = echoClose // test8.c:1307:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 64 /* .xFilter */)) = echoFilter // test8.c:1308:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 72 /* .xNext */)) = echoNext // test8.c:1309:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 80 /* .xEof */)) = echoEof // test8.c:1310:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 88 /* .xColumn */)) = echoColumn // test8.c:1311:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 96 /* .xRowid */)) = echoRowid // test8.c:1312:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 104 /* .xUpdate */)) = echoUpdate // test8.c:1313:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 112 /* .xBegin */)) = echoBegin // test8.c:1314:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 120 /* .xSync */)) = echoSync // test8.c:1315:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 128 /* .xCommit */)) = echoCommit // test8.c:1316:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 136 /* .xRollback */)) = echoRollback // test8.c:1317:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 144 /* .xFindFunction */)) = echoFindFunction // test8.c:1318:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModule)) + 152 /* .xRename */)) = echoRename // test8.c:1319:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 8 /* .xCreate */)) = echoCreate // test8.c:1324:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 16 /* .xConnect */)) = echoConnect // test8.c:1325:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 24 /* .xBestIndex */)) = echoBestIndex // test8.c:1326:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 32 /* .xDisconnect */)) = echoDisconnect // test8.c:1327:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 40 /* .xDestroy */)) = echoDestroy // test8.c:1328:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 48 /* .xOpen */)) = echoOpen // test8.c:1329:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 56 /* .xClose */)) = echoClose // test8.c:1330:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 64 /* .xFilter */)) = echoFilter // test8.c:1331:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 72 /* .xNext */)) = echoNext // test8.c:1332:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 80 /* .xEof */)) = echoEof // test8.c:1333:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 88 /* .xColumn */)) = echoColumn // test8.c:1334:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 96 /* .xRowid */)) = echoRowid // test8.c:1335:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 104 /* .xUpdate */)) = echoUpdate // test8.c:1336:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 112 /* .xBegin */)) = echoBegin // test8.c:1337:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 120 /* .xSync */)) = echoSync // test8.c:1338:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 128 /* .xCommit */)) = echoCommit // test8.c:1339:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 136 /* .xRollback */)) = echoRollback // test8.c:1340:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 144 /* .xFindFunction */)) = echoFindFunction // test8.c:1341:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 152 /* .xRename */)) = echoRename // test8.c:1342:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 160 /* .xSavepoint */)) = echoSavepoint // test8.c:1343:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 168 /* .xRelease */)) = echoRelease // test8.c:1344:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&echoModuleV2)) + 176 /* .xRollbackTo */)) = echoRollbackTo // test8.c:1345:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 8 /* .xCreate */)) = expertConnect // sqlite3expert.c:625:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 16 /* .xConnect */)) = expertConnect // sqlite3expert.c:626:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 24 /* .xBestIndex */)) = expertBestIndex // sqlite3expert.c:627:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 32 /* .xDisconnect */)) = expertDisconnect // sqlite3expert.c:628:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 40 /* .xDestroy */)) = expertDisconnect // sqlite3expert.c:629:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 48 /* .xOpen */)) = expertOpen // sqlite3expert.c:630:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 56 /* .xClose */)) = expertClose // sqlite3expert.c:631:5: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 64 /* .xFilter */)) = expertFilter // sqlite3expert.c:632:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 72 /* .xNext */)) = expertNext // sqlite3expert.c:633:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 80 /* .xEof */)) = expertEof // sqlite3expert.c:634:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 88 /* .xColumn */)) = expertColumn // sqlite3expert.c:635:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 96 /* .xRowid */)) = expertRowid // sqlite3expert.c:636:5: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&expertModule)) + 104 /* .xUpdate */)) = expertUpdate // sqlite3expert.c:637:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 16 /* .xConnect */)) = explainConnect // explain.c:274:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 24 /* .xBestIndex */)) = explainBestIndex // explain.c:275:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 32 /* .xDisconnect */)) = explainDisconnect // explain.c:276:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 48 /* .xOpen */)) = explainOpen // explain.c:278:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 56 /* .xClose */)) = explainClose // explain.c:279:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 64 /* .xFilter */)) = explainFilter // explain.c:280:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 72 /* .xNext */)) = explainNext // explain.c:281:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 80 /* .xEof */)) = explainEof // explain.c:282:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 88 /* .xColumn */)) = explainColumn // explain.c:283:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&explainModule)) + 96 /* .xRowid */)) = explainRowid // explain.c:284:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 8 /* .xCreate */)) = fsConnect // test_fs.c:800:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 16 /* .xConnect */)) = fsConnect // test_fs.c:801:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 24 /* .xBestIndex */)) = fsBestIndex // test_fs.c:802:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 32 /* .xDisconnect */)) = fsDisconnect // test_fs.c:803:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 40 /* .xDestroy */)) = fsDisconnect // test_fs.c:804:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 48 /* .xOpen */)) = fsOpen // test_fs.c:805:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 56 /* .xClose */)) = fsClose // test_fs.c:806:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 64 /* .xFilter */)) = fsFilter // test_fs.c:807:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 72 /* .xNext */)) = fsNext // test_fs.c:808:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 80 /* .xEof */)) = fsEof // test_fs.c:809:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 88 /* .xColumn */)) = fsColumn // test_fs.c:810:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsModule)) + 96 /* .xRowid */)) = fsRowid // test_fs.c:811:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 8 /* .xClose */)) = fsClose1 // test_onefile.c:210:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 16 /* .xRead */)) = fsRead // test_onefile.c:211:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 24 /* .xWrite */)) = fsWrite // test_onefile.c:212:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 32 /* .xTruncate */)) = fsTruncate // test_onefile.c:213:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 40 /* .xSync */)) = fsSync // test_onefile.c:214:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 48 /* .xFileSize */)) = fsFileSize // test_onefile.c:215:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 56 /* .xLock */)) = fsLock // test_onefile.c:216:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 64 /* .xUnlock */)) = fsUnlock // test_onefile.c:217:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 72 /* .xCheckReservedLock */)) = fsCheckReservedLock // test_onefile.c:218:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 80 /* .xFileControl */)) = fsFileControl // test_onefile.c:219:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 88 /* .xSectorSize */)) = fsSectorSize // test_onefile.c:220:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_io_methods)) + 96 /* .xDeviceCharacteristics */)) = fsDeviceCharacteristics // test_onefile.c:221:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 40 /* .xOpen */)) = fsOpen1 // test_onefile.c:191:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 48 /* .xDelete */)) = fsDelete // test_onefile.c:192:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 56 /* .xAccess */)) = fsAccess // test_onefile.c:193:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 64 /* .xFullPathname */)) = fsFullPathname // test_onefile.c:194:5: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 72 /* .xDlOpen */)) = fsDlOpen // test_onefile.c:195:5: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 80 /* .xDlError */)) = fsDlError // test_onefile.c:196:5: *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 88 /* .xDlSym */)) = fsDlSym // test_onefile.c:197:5: *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 96 /* .xDlClose */)) = fsDlClose // test_onefile.c:198:5: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 104 /* .xRandomness */)) = fsRandomness // test_onefile.c:199:5: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 112 /* .xSleep */)) = fsSleep // test_onefile.c:200:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fs_vfs)) + 120 /* .xCurrentTime */)) = fsCurrentTime // test_onefile.c:201:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 8 /* .xCreate */)) = fsdirConnect1 // test_fs.c:823:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 16 /* .xConnect */)) = fsdirConnect1 // test_fs.c:824:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 24 /* .xBestIndex */)) = fsdirBestIndex1 // test_fs.c:825:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 32 /* .xDisconnect */)) = fsdirDisconnect1 // test_fs.c:826:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 40 /* .xDestroy */)) = fsdirDisconnect1 // test_fs.c:827:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 48 /* .xOpen */)) = fsdirOpen1 // test_fs.c:828:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 56 /* .xClose */)) = fsdirClose1 // test_fs.c:829:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 64 /* .xFilter */)) = fsdirFilter1 // test_fs.c:830:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 72 /* .xNext */)) = fsdirNext1 // test_fs.c:831:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 80 /* .xEof */)) = fsdirEof1 // test_fs.c:832:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 88 /* .xColumn */)) = fsdirColumn1 // test_fs.c:833:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule)) + 96 /* .xRowid */)) = fsdirRowid1 // test_fs.c:834:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 16 /* .xConnect */)) = fsdirConnect // fileio.c:942:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 24 /* .xBestIndex */)) = fsdirBestIndex // fileio.c:943:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 32 /* .xDisconnect */)) = fsdirDisconnect // fileio.c:944:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 48 /* .xOpen */)) = fsdirOpen // fileio.c:946:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 56 /* .xClose */)) = fsdirClose // fileio.c:947:5: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 64 /* .xFilter */)) = fsdirFilter // fileio.c:948:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 72 /* .xNext */)) = fsdirNext // fileio.c:949:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 80 /* .xEof */)) = fsdirEof // fileio.c:950:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 88 /* .xColumn */)) = fsdirColumn // fileio.c:951:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fsdirModule1)) + 96 /* .xRowid */)) = fsdirRowid // fileio.c:952:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 8 /* .xCreate */)) = fstreeConnect // test_fs.c:846:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 16 /* .xConnect */)) = fstreeConnect // test_fs.c:847:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 24 /* .xBestIndex */)) = fstreeBestIndex // test_fs.c:848:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 32 /* .xDisconnect */)) = fstreeDisconnect // test_fs.c:849:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 40 /* .xDestroy */)) = fstreeDisconnect // test_fs.c:850:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 48 /* .xOpen */)) = fstreeOpen // test_fs.c:851:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 56 /* .xClose */)) = fstreeClose // test_fs.c:852:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 64 /* .xFilter */)) = fstreeFilter // test_fs.c:853:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 72 /* .xNext */)) = fstreeNext // test_fs.c:854:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 80 /* .xEof */)) = fstreeEof // test_fs.c:855:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 88 /* .xColumn */)) = fstreeColumn // test_fs.c:856:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fstreeModule)) + 96 /* .xRowid */)) = fstreeRowid // test_fs.c:857:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 8 /* .xCreate */)) = fts5tokConnectMethod // fts5_test_tok.c:453:6: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 16 /* .xConnect */)) = fts5tokConnectMethod // fts5_test_tok.c:454:6: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 24 /* .xBestIndex */)) = fts5tokBestIndexMethod // fts5_test_tok.c:455:6: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 32 /* .xDisconnect */)) = fts5tokDisconnectMethod // fts5_test_tok.c:456:6: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 40 /* .xDestroy */)) = fts5tokDisconnectMethod // fts5_test_tok.c:457:6: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 48 /* .xOpen */)) = fts5tokOpenMethod // fts5_test_tok.c:458:6: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 56 /* .xClose */)) = fts5tokCloseMethod // fts5_test_tok.c:459:6: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 64 /* .xFilter */)) = fts5tokFilterMethod // fts5_test_tok.c:460:6: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 72 /* .xNext */)) = fts5tokNextMethod // fts5_test_tok.c:461:6: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 80 /* .xEof */)) = fts5tokEofMethod // fts5_test_tok.c:462:6: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 88 /* .xColumn */)) = fts5tokColumnMethod // fts5_test_tok.c:463:6: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5tok_module)) + 96 /* .xRowid */)) = fts5tokRowidMethod // fts5_test_tok.c:464:6: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 8 /* .xCreate */)) = fuzzerConnect // fuzzer.c:1149:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 16 /* .xConnect */)) = fuzzerConnect // fuzzer.c:1150:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 24 /* .xBestIndex */)) = fuzzerBestIndex // fuzzer.c:1151:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 32 /* .xDisconnect */)) = fuzzerDisconnect // fuzzer.c:1152:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 40 /* .xDestroy */)) = fuzzerDisconnect // fuzzer.c:1153:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 48 /* .xOpen */)) = fuzzerOpen // fuzzer.c:1154:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 56 /* .xClose */)) = fuzzerClose // fuzzer.c:1155:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 64 /* .xFilter */)) = fuzzerFilter // fuzzer.c:1156:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 72 /* .xNext */)) = fuzzerNext // fuzzer.c:1157:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 80 /* .xEof */)) = fuzzerEof // fuzzer.c:1158:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 88 /* .xColumn */)) = fuzzerColumn // fuzzer.c:1159:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fuzzerModule)) + 96 /* .xRowid */)) = fuzzerRowid // fuzzer.c:1160:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 8 /* .xCreate */)) = intarrayCreate // test_intarray.c:189:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 16 /* .xConnect */)) = intarrayCreate // test_intarray.c:190:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 24 /* .xBestIndex */)) = intarrayBestIndex // test_intarray.c:191:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 32 /* .xDisconnect */)) = intarrayDestroy // test_intarray.c:192:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 40 /* .xDestroy */)) = intarrayDestroy // test_intarray.c:193:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 48 /* .xOpen */)) = intarrayOpen // test_intarray.c:194:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 56 /* .xClose */)) = intarrayClose // test_intarray.c:195:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 64 /* .xFilter */)) = intarrayFilter // test_intarray.c:196:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 72 /* .xNext */)) = intarrayNext // test_intarray.c:197:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 80 /* .xEof */)) = intarrayEof // test_intarray.c:198:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 88 /* .xColumn */)) = intarrayColumn // test_intarray.c:199:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&intarrayModule)) + 96 /* .xRowid */)) = intarrayRowid // test_intarray.c:200:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 8 /* .xClose */)) = jtClose // test_journal.c:189:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 16 /* .xRead */)) = jtRead // test_journal.c:190:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 24 /* .xWrite */)) = jtWrite // test_journal.c:191:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 32 /* .xTruncate */)) = jtTruncate // test_journal.c:192:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 40 /* .xSync */)) = jtSync // test_journal.c:193:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 48 /* .xFileSize */)) = jtFileSize // test_journal.c:194:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 56 /* .xLock */)) = jtLock // test_journal.c:195:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 64 /* .xUnlock */)) = jtUnlock // test_journal.c:196:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 72 /* .xCheckReservedLock */)) = jtCheckReservedLock // test_journal.c:197:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 80 /* .xFileControl */)) = jtFileControl // test_journal.c:198:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 88 /* .xSectorSize */)) = jtSectorSize // test_journal.c:199:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_io_methods)) + 96 /* .xDeviceCharacteristics */)) = jtDeviceCharacteristics // test_journal.c:200:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 40 /* .xOpen */)) = jtOpen // test_journal.c:172:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 48 /* .xDelete */)) = jtDelete // test_journal.c:173:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 56 /* .xAccess */)) = jtAccess // test_journal.c:174:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 64 /* .xFullPathname */)) = jtFullPathname // test_journal.c:175:3: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 72 /* .xDlOpen */)) = jtDlOpen // test_journal.c:176:3: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 80 /* .xDlError */)) = jtDlError // test_journal.c:177:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 88 /* .xDlSym */)) = jtDlSym // test_journal.c:178:3: *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 96 /* .xDlClose */)) = jtDlClose // test_journal.c:179:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 104 /* .xRandomness */)) = jtRandomness // test_journal.c:180:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 112 /* .xSleep */)) = jtSleep // test_journal.c:181:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 120 /* .xCurrentTime */)) = jtCurrentTime // test_journal.c:182:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 128 /* .xGetLastError */)) = jtGetLastError // test_journal.c:183:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jt_vfs)) + 136 /* .xCurrentTimeInt64 */)) = jtCurrentTimeInt64 // test_journal.c:184:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 16 /* .xConnect */)) = prefixesConnect // prefixes.c:230:21: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 24 /* .xBestIndex */)) = prefixesBestIndex // prefixes.c:231:21: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 32 /* .xDisconnect */)) = prefixesDisconnect // prefixes.c:232:21: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 48 /* .xOpen */)) = prefixesOpen // prefixes.c:234:21: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 56 /* .xClose */)) = prefixesClose // prefixes.c:235:21: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 64 /* .xFilter */)) = prefixesFilter // prefixes.c:236:21: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 72 /* .xNext */)) = prefixesNext // prefixes.c:237:21: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 80 /* .xEof */)) = prefixesEof // prefixes.c:238:21: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 88 /* .xColumn */)) = prefixesColumn // prefixes.c:239:21: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 96 /* .xRowid */)) = prefixesRowid // prefixes.c:240:21: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&pzNeededCollation)) + 0)) = uintptr(unsafe.Pointer(&zNeededCollation)) // test1.c:3130:34: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 8 /* .xCreate */)) = schemaCreate // test_schema.c:276:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 16 /* .xConnect */)) = schemaCreate // test_schema.c:277:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 24 /* .xBestIndex */)) = schemaBestIndex // test_schema.c:278:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 32 /* .xDisconnect */)) = schemaDestroy // test_schema.c:279:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 40 /* .xDestroy */)) = schemaDestroy // test_schema.c:280:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 48 /* .xOpen */)) = schemaOpen // test_schema.c:281:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 56 /* .xClose */)) = schemaClose // test_schema.c:282:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 64 /* .xFilter */)) = schemaFilter // test_schema.c:283:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 72 /* .xNext */)) = schemaNext // test_schema.c:284:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 80 /* .xEof */)) = schemaEof // test_schema.c:285:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 88 /* .xColumn */)) = schemaColumn // test_schema.c:286:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 96 /* .xRowid */)) = schemaRowid // test_schema.c:287:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 16 /* .xConnect */)) = seriesConnect // series.c:400:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 24 /* .xBestIndex */)) = seriesBestIndex // series.c:401:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 32 /* .xDisconnect */)) = seriesDisconnect // series.c:402:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 48 /* .xOpen */)) = seriesOpen // series.c:404:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 56 /* .xClose */)) = seriesClose // series.c:405:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 64 /* .xFilter */)) = seriesFilter // series.c:406:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 72 /* .xNext */)) = seriesNext // series.c:407:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 80 /* .xEof */)) = seriesEof // series.c:408:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 88 /* .xColumn */)) = seriesColumn // series.c:409:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&seriesModule)) + 96 /* .xRowid */)) = seriesRowid // series.c:410:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 8 /* .xCreate */)) = spellfix1Create // spellfix.c:2993:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 16 /* .xConnect */)) = spellfix1Connect // spellfix.c:2994:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 24 /* .xBestIndex */)) = spellfix1BestIndex // spellfix.c:2995:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 32 /* .xDisconnect */)) = spellfix1Disconnect // spellfix.c:2996:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 40 /* .xDestroy */)) = spellfix1Destroy // spellfix.c:2997:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 48 /* .xOpen */)) = spellfix1Open // spellfix.c:2998:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 56 /* .xClose */)) = spellfix1Close // spellfix.c:2999:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 64 /* .xFilter */)) = spellfix1Filter // spellfix.c:3000:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 72 /* .xNext */)) = spellfix1Next // spellfix.c:3001:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 80 /* .xEof */)) = spellfix1Eof // spellfix.c:3002:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 88 /* .xColumn */)) = spellfix1Column // spellfix.c:3003:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 96 /* .xRowid */)) = spellfix1Rowid // spellfix.c:3004:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 104 /* .xUpdate */)) = spellfix1Update // spellfix.c:3005:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&spellfix1Module)) + 152 /* .xRename */)) = spellfix1Rename // spellfix.c:3011:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 8 /* .xCreate */)) = tclConnect // test_bestindex.c:551:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 16 /* .xConnect */)) = tclConnect // test_bestindex.c:552:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 24 /* .xBestIndex */)) = tclBestIndex // test_bestindex.c:553:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 32 /* .xDisconnect */)) = tclDisconnect // test_bestindex.c:554:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 40 /* .xDestroy */)) = tclDisconnect // test_bestindex.c:555:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 48 /* .xOpen */)) = tclOpen // test_bestindex.c:556:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 56 /* .xClose */)) = tclClose // test_bestindex.c:557:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 64 /* .xFilter */)) = tclFilter // test_bestindex.c:558:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 72 /* .xNext */)) = tclNext // test_bestindex.c:559:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 80 /* .xEof */)) = tclEof // test_bestindex.c:560:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 88 /* .xColumn */)) = tclColumn // test_bestindex.c:561:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclModule)) + 96 /* .xRowid */)) = tclRowid // test_bestindex.c:562:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 8 /* .xCreate */)) = tclvarConnect // test_tclvar.c:471:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 16 /* .xConnect */)) = tclvarConnect // test_tclvar.c:472:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 24 /* .xBestIndex */)) = tclvarBestIndex // test_tclvar.c:473:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 32 /* .xDisconnect */)) = tclvarDisconnect // test_tclvar.c:474:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 40 /* .xDestroy */)) = tclvarDisconnect // test_tclvar.c:475:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 48 /* .xOpen */)) = tclvarOpen // test_tclvar.c:476:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 56 /* .xClose */)) = tclvarClose // test_tclvar.c:477:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 64 /* .xFilter */)) = tclvarFilter // test_tclvar.c:478:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 72 /* .xNext */)) = tclvarNext // test_tclvar.c:479:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 80 /* .xEof */)) = tclvarEof // test_tclvar.c:480:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 88 /* .xColumn */)) = tclvarColumn // test_tclvar.c:481:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 96 /* .xRowid */)) = tclvarRowid // test_tclvar.c:482:3: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclvarModule)) + 104 /* .xUpdate */)) = tclvarUpdate // test_tclvar.c:483:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 8 /* .pArg */)) = uintptr(unsafe.Pointer(&testpcacheGlobal)) // test_pcache.c:435:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 16 /* .xInit */)) = testpcacheInit // test_pcache.c:436:5: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 24 /* .xShutdown */)) = testpcacheShutdown // test_pcache.c:437:5: *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 32 /* .xCreate */)) = testpcacheCreate // test_pcache.c:438:5: *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 40 /* .xCachesize */)) = testpcacheCachesize // test_pcache.c:439:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 48 /* .xPagecount */)) = testpcachePagecount // test_pcache.c:440:5: *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 56 /* .xFetch */)) = testpcacheFetch // test_pcache.c:441:5: *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 64 /* .xUnpin */)) = testpcacheUnpin // test_pcache.c:442:5: *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 72 /* .xRekey */)) = testpcacheRekey // test_pcache.c:443:5: *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 80 /* .xTruncate */)) = testpcacheTruncate // test_pcache.c:444:5: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&testPcache)) + 88 /* .xDestroy */)) = testpcacheDestroy // test_pcache.c:445:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 8 /* .xClose */)) = tmpClose // test_onefile.c:231:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 16 /* .xRead */)) = tmpRead // test_onefile.c:232:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 24 /* .xWrite */)) = tmpWrite // test_onefile.c:233:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 32 /* .xTruncate */)) = tmpTruncate // test_onefile.c:234:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 40 /* .xSync */)) = tmpSync // test_onefile.c:235:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 48 /* .xFileSize */)) = tmpFileSize // test_onefile.c:236:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 56 /* .xLock */)) = tmpLock // test_onefile.c:237:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 64 /* .xUnlock */)) = tmpUnlock // test_onefile.c:238:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 72 /* .xCheckReservedLock */)) = tmpCheckReservedLock // test_onefile.c:239:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 80 /* .xFileControl */)) = tmpFileControl // test_onefile.c:240:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 88 /* .xSectorSize */)) = tmpSectorSize // test_onefile.c:241:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tmp_io_methods)) + 96 /* .xDeviceCharacteristics */)) = tmpDeviceCharacteristics // test_onefile.c:242:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 8 /* .xClose */)) = tvfsClose // test_vfs.c:206:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 16 /* .xRead */)) = tvfsRead // test_vfs.c:207:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 24 /* .xWrite */)) = tvfsWrite // test_vfs.c:208:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 32 /* .xTruncate */)) = tvfsTruncate // test_vfs.c:209:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 40 /* .xSync */)) = tvfsSync // test_vfs.c:210:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 48 /* .xFileSize */)) = tvfsFileSize // test_vfs.c:211:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 56 /* .xLock */)) = tvfsLock // test_vfs.c:212:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 64 /* .xUnlock */)) = tvfsUnlock // test_vfs.c:213:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 72 /* .xCheckReservedLock */)) = tvfsCheckReservedLock // test_vfs.c:214:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 80 /* .xFileControl */)) = tvfsFileControl // test_vfs.c:215:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 88 /* .xSectorSize */)) = tvfsSectorSize // test_vfs.c:216:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 96 /* .xDeviceCharacteristics */)) = tvfsDeviceCharacteristics // test_vfs.c:217:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 104 /* .xShmMap */)) = tvfsShmMap // test_vfs.c:218:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 112 /* .xShmLock */)) = tvfsShmLock // test_vfs.c:219:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 120 /* .xShmBarrier */)) = tvfsShmBarrier // test_vfs.c:220:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 128 /* .xShmUnmap */)) = tvfsShmUnmap // test_vfs.c:221:3: *(*func(*libc.TLS, uintptr, sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 136 /* .xFetch */)) = tvfsFetch // test_vfs.c:222:3: *(*func(*libc.TLS, uintptr, sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_io_methods)) + 144 /* .xUnfetch */)) = tvfsUnfetch // test_vfs.c:223:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 40 /* .xOpen */)) = tvfsOpen // test_vfs.c:1451:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 48 /* .xDelete */)) = tvfsDelete // test_vfs.c:1452:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 56 /* .xAccess */)) = tvfsAccess // test_vfs.c:1453:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 64 /* .xFullPathname */)) = tvfsFullPathname // test_vfs.c:1454:5: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 104 /* .xRandomness */)) = tvfsRandomness // test_vfs.c:1466:5: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 112 /* .xSleep */)) = tvfsSleep // test_vfs.c:1467:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tvfs_vfs)) + 120 /* .xCurrentTime */)) = tvfsCurrentTime // test_vfs.c:1468:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 8 /* .xCreate */)) = unionConnect // unionvtab.c:1332:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 16 /* .xConnect */)) = unionConnect // unionvtab.c:1333:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 24 /* .xBestIndex */)) = unionBestIndex // unionvtab.c:1334:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 32 /* .xDisconnect */)) = unionDisconnect // unionvtab.c:1335:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 40 /* .xDestroy */)) = unionDisconnect // unionvtab.c:1336:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 48 /* .xOpen */)) = unionOpen // unionvtab.c:1337:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 56 /* .xClose */)) = unionClose // unionvtab.c:1338:5: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 64 /* .xFilter */)) = unionFilter // unionvtab.c:1339:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 72 /* .xNext */)) = unionNext // unionvtab.c:1340:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 80 /* .xEof */)) = unionEof // unionvtab.c:1341:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 88 /* .xColumn */)) = unionColumn // unionvtab.c:1342:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 96 /* .xRowid */)) = unionRowid // unionvtab.c:1343:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 8 /* .xClose */)) = vfslogClose // test_osinst.c:204:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 16 /* .xRead */)) = vfslogRead // test_osinst.c:205:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 24 /* .xWrite */)) = vfslogWrite // test_osinst.c:206:3: *(*func(*libc.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 32 /* .xTruncate */)) = vfslogTruncate // test_osinst.c:207:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 40 /* .xSync */)) = vfslogSync // test_osinst.c:208:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 48 /* .xFileSize */)) = vfslogFileSize // test_osinst.c:209:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 56 /* .xLock */)) = vfslogLock // test_osinst.c:210:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 64 /* .xUnlock */)) = vfslogUnlock // test_osinst.c:211:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 72 /* .xCheckReservedLock */)) = vfslogCheckReservedLock // test_osinst.c:212:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 80 /* .xFileControl */)) = vfslogFileControl // test_osinst.c:213:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 88 /* .xSectorSize */)) = vfslogSectorSize // test_osinst.c:214:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 96 /* .xDeviceCharacteristics */)) = vfslogDeviceCharacteristics // test_osinst.c:215:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 104 /* .xShmMap */)) = vfslogShmMap // test_osinst.c:216:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 112 /* .xShmLock */)) = vfslogShmLock // test_osinst.c:217:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 120 /* .xShmBarrier */)) = vfslogShmBarrier // test_osinst.c:218:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 128 /* .xShmUnmap */)) = vfslogShmUnmap // test_osinst.c:219:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 8 /* .xCreate */)) = vlogConnect // test_osinst.c:1074:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 16 /* .xConnect */)) = vlogConnect // test_osinst.c:1075:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 24 /* .xBestIndex */)) = vlogBestIndex // test_osinst.c:1076:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 32 /* .xDisconnect */)) = vlogDisconnect // test_osinst.c:1077:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 40 /* .xDestroy */)) = vlogDisconnect // test_osinst.c:1078:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 48 /* .xOpen */)) = vlogOpen // test_osinst.c:1079:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 56 /* .xClose */)) = vlogClose // test_osinst.c:1080:5: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 64 /* .xFilter */)) = vlogFilter // test_osinst.c:1081:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 72 /* .xNext */)) = vlogNext // test_osinst.c:1082:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 80 /* .xEof */)) = vlogEof // test_osinst.c:1083:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 88 /* .xColumn */)) = vlogColumn // test_osinst.c:1084:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_module)) + 96 /* .xRowid */)) = vlogRowid // test_osinst.c:1085:5: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 40 /* .xOpen */)) = vfslogOpen // test_osinst.c:187:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 48 /* .xDelete */)) = vfslogDelete // test_osinst.c:188:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 56 /* .xAccess */)) = vfslogAccess // test_osinst.c:189:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 64 /* .xFullPathname */)) = vfslogFullPathname // test_osinst.c:190:3: *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 72 /* .xDlOpen */)) = vfslogDlOpen // test_osinst.c:191:3: *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 80 /* .xDlError */)) = vfslogDlError // test_osinst.c:192:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 88 /* .xDlSym */)) = vfslogDlSym // test_osinst.c:193:3: *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 96 /* .xDlClose */)) = vfslogDlClose // test_osinst.c:194:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 104 /* .xRandomness */)) = vfslogRandomness // test_osinst.c:195:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 112 /* .xSleep */)) = vfslogSleep // test_osinst.c:196:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 120 /* .xCurrentTime */)) = vfslogCurrentTime // test_osinst.c:197:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 128 /* .xGetLastError */)) = vfslogGetLastError // test_osinst.c:198:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_vfs)) + 136 /* .xCurrentTimeInt64 */)) = vfslogCurrentTimeInt64 // test_osinst.c:199:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 8 /* .xCreate */)) = wholenumberConnect // wholenumber.c:238:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 16 /* .xConnect */)) = wholenumberConnect // wholenumber.c:239:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 24 /* .xBestIndex */)) = wholenumberBestIndex // wholenumber.c:240:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 32 /* .xDisconnect */)) = wholenumberDisconnect // wholenumber.c:241:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 40 /* .xDestroy */)) = wholenumberDisconnect // wholenumber.c:242:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 48 /* .xOpen */)) = wholenumberOpen // wholenumber.c:243:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 56 /* .xClose */)) = wholenumberClose // wholenumber.c:244:3: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 64 /* .xFilter */)) = wholenumberFilter // wholenumber.c:245:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 72 /* .xNext */)) = wholenumberNext // wholenumber.c:246:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 80 /* .xEof */)) = wholenumberEof // wholenumber.c:247:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 88 /* .xColumn */)) = wholenumberColumn // wholenumber.c:248:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&wholenumberModule)) + 96 /* .xRowid */)) = wholenumberRowid // wholenumber.c:249:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 8 /* .xClose */)) = devsymClose // test_devsym.c:393:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 16 /* .xRead */)) = devsymRead // test_devsym.c:394:3: *(*func(*libc.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 24 /* .xWrite */)) = writecrashWrite // test_devsym.c:395:3: *(*func(*libc.TLS, uintptr, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 32 /* .xTruncate */)) = devsymTruncate // test_devsym.c:396:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 40 /* .xSync */)) = devsymSync // test_devsym.c:397:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 48 /* .xFileSize */)) = devsymFileSize // test_devsym.c:398:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 56 /* .xLock */)) = devsymLock // test_devsym.c:399:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 64 /* .xUnlock */)) = devsymUnlock // test_devsym.c:400:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 72 /* .xCheckReservedLock */)) = devsymCheckReservedLock // test_devsym.c:401:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 80 /* .xFileControl */)) = devsymFileControl // test_devsym.c:402:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 88 /* .xSectorSize */)) = writecrashSectorSize // test_devsym.c:403:3: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 96 /* .xDeviceCharacteristics */)) = writecrashDeviceCharacteristics // test_devsym.c:404:3: *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 104 /* .xShmMap */)) = devsymShmMap // test_devsym.c:405:3: *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 112 /* .xShmLock */)) = devsymShmLock // test_devsym.c:406:3: *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 120 /* .xShmBarrier */)) = devsymShmBarrier // test_devsym.c:407:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_io_methods)) + 128 /* .xShmUnmap */)) = devsymShmUnmap // test_devsym.c:408:3: *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 40 /* .xOpen */)) = writecrashOpen // test_devsym.c:457:3: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 48 /* .xDelete */)) = devsymDelete // test_devsym.c:458:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 56 /* .xAccess */)) = devsymAccess // test_devsym.c:459:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 64 /* .xFullPathname */)) = devsymFullPathname // test_devsym.c:460:3: *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 104 /* .xRandomness */)) = devsymRandomness // test_devsym.c:472:3: *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 112 /* .xSleep */)) = devsymSleep // test_devsym.c:473:3: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 120 /* .xCurrentTime */)) = devsymCurrentTime // test_devsym.c:474:3: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 8 /* .xCreate */)) = zipfileConnect // zipfile.c:2145:5: *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 16 /* .xConnect */)) = zipfileConnect // zipfile.c:2146:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 24 /* .xBestIndex */)) = zipfileBestIndex // zipfile.c:2147:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 32 /* .xDisconnect */)) = zipfileDisconnect // zipfile.c:2148:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 40 /* .xDestroy */)) = zipfileDisconnect // zipfile.c:2149:5: *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 48 /* .xOpen */)) = zipfileOpen // zipfile.c:2150:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 56 /* .xClose */)) = zipfileClose // zipfile.c:2151:5: *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 64 /* .xFilter */)) = zipfileFilter // zipfile.c:2152:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 72 /* .xNext */)) = zipfileNext // zipfile.c:2153:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 80 /* .xEof */)) = zipfileEof // zipfile.c:2154:5: *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 88 /* .xColumn */)) = zipfileColumn // zipfile.c:2155:5: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 104 /* .xUpdate */)) = zipfileUpdate // zipfile.c:2157:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 112 /* .xBegin */)) = zipfileBegin // zipfile.c:2158:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 128 /* .xCommit */)) = zipfileCommit // zipfile.c:2160:5: *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 136 /* .xRollback */)) = zipfileRollback // zipfile.c:2161:5: *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 144 /* .xFindFunction */)) = zipfileFindFunction // zipfile.c:2162:5: } var ts1 = "%s\x00internal error!\x00SELECT * FROM main.%Q WHERE sample()\x00expert\x00PRAGMA table_xinfo=%Q\x00main\x00, \x00%Q\x00 COLLATE %Q\x00 COLLATE %s\x00 DESC\x00PRAGMA index_list=%Q\x00PRAGMA index_xInfo=%Q\x00%s_idx_%08x\x00CREATE INDEX '%q' ON %Q(%s)\x00CREATE INDEX %s ON %s(%s)\x00EXPLAIN QUERY PLAN %s\x00 USING INDEX \x00 USING COVERING INDEX \x00%s\n\x00%s;\n\x00SELECT 'CREATE TEMP' || substr(sql, 7) FROM sqlite_schema WHERE tbl_name = %Q AND type IN ('table', 'trigger') ORDER BY type;\x00ALTER TABLE temp.%Q RENAME TO %Q\x00INSERT INTO %Q VALUES(\x00%s?\x00\x00)\x00UPDATE %Q SET \x00%s%Q=?\x00DELETE FROM %Q\x00t592690916721053953805701627921227776\x00DROP TABLE t592690916721053953805701627921227776\x00SELECT type, name, sql, 1 FROM sqlite_schema WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%%' UNION ALL SELECT type, name, sql, 2 FROM sqlite_schema WHERE type = 'trigger' AND tbl_name IN(SELECT name FROM sqlite_schema WHERE type = 'view') ORDER BY 4, 1\x00CREATE TABLE x(\x00%s%Q COLLATE %s\x00CREATE VIRTUAL TABLE %Q USING expert(%Q)\x00SELECT max(i.seqno) FROM sqlite_schema AS s, pragma_index_list(s.name) AS l, pragma_index_info(l.name) AS i WHERE s.type = 'table'\x00%sx.%Q IS rem(%d, x.%Q) COLLATE %s\x00%s%d\x00SELECT %s FROM %Q x ORDER BY %s\x00SELECT %s FROM temp.t592690916721053953805701627921227776 x ORDER BY %s\x00%d\x00 %d\x00DROP TABLE IF EXISTS temp.t592690916721053953805701627921227776\x00CREATE TABLE temp.t592690916721053953805701627921227776 AS SELECT * FROM %Q\x00SELECT s.rowid, s.name, l.name FROM sqlite_schema AS s, pragma_index_list(s.name) AS l WHERE s.type = 'table'\x00SELECT name, coll FROM pragma_index_xinfo(?) WHERE key\x00INSERT INTO sqlite_stat1 VALUES(?, ?, ?)\x00ANALYZE; PRAGMA writable_schema=1\x00rem\x00sample\x00ANALYZE sqlite_schema\x00:memory:\x00SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%' AND sql NOT LIKE 'CREATE VIRTUAL %%'\x00%s;%s%s\n\x00 -- stat1: \x00no such handle: \x00sql\x00TABLE\x00analyze\x00count\x00report\x00STMT EREPORT\x00destroy\x00SUBCOMMAND ...\x00sub-command\x00indexes\x00plan\x00candidates\x00DB\x00sqlite3expert%d\x00out of memory\x00sqlite3_expert_new\x00SQLITE_DONE\x00SQLITE_ERROR\x00SQLITE_OK\x00SELECT fts5(?1)\x00error: \x00fts5_api_ptr\x00f5t_2_%lld\x00xColumnCount\x00xRowCount\x00xColumnTotalSize\x00COL\x00xTokenize\x00TEXT SCRIPT\x00xPhraseCount\x00xPhraseSize\x00PHRASE\x00xInstCount\x00xInst\x00IDX\x00xRowid\x00xColumnText\x00xColumnSize\x00xQueryPhrase\x00PHRASE SCRIPT\x00xSetAuxdata\x00VALUE\x00xGetAuxdata\x00CLEAR\x00xSetAuxdataInt\x00INTEGER\x00xGetAuxdataInt\x00xPhraseForeach\x00IPHRASE COLVAR OFFVAR SCRIPT\x00xPhraseColumnForeach\x00IPHRASE COLVAR SCRIPT\x00SUB-COMMAND\x00f5t_%lld\x00bytearray\x00boolean\x00double\x00wideInt\x00int\x00DB NAME SCRIPT\x00?-subst? DB NAME TEXT\x00-subst\x00unrecognized option: \x00no such tokenizer: \x00error in tokenizer.xCreate()\x00error in tokenizer.xTokenize()\x00document\x00aux\x00query\x00prefixquery\x00invalid\x00-colocated\x00sqlite3_fts5_token may only be used by tokenizer callback\x00?-colocated? TEXT START END\x00error in fts5_api.xCreateTokenizer()\x00?BOOLEAN?\x00NSLOT TOKEN\x00sqlite3_fts5_create_tokenizer\x00sqlite3_fts5_token\x00sqlite3_fts5_tokenize\x00sqlite3_fts5_create_function\x00sqlite3_fts5_may_be_corrupt\x00sqlite3_fts5_token_hash\x00sqlite3_fts5_register_matchinfo\x00sqlite3_fts5_register_fts5tokenize\x00unrecognized matchinfo flag: %c\x00pcx\x00matchinfo\x00CREATE TABLE x(input HIDDEN, token, start, end, position)\x00fts5tokenize\x00apndvfs\x00Start-Of-SQLite3-\x00apnd(%lld)/%z\x00SQLite format 3\x00%s: cost must be between 1 and %d\x00%s: maximum string length is %d\x00%s: iLang must be between 0 and %d\x00?\x00SELECT * FROM %Q.%Q\x00%s: %s\x00%s: %s has %d columns, expected 4\x00vocabulary_table\x00vocabulary_word\x00vocabulary_language\x00edit_distances\x00unrecognized argument: [%s]\n\x00no edit_distances table specified\x00CREATE TABLE x(word,distance,language,command HIDDEN,nword HIDDEN)\x000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^abcdefghijklmnopqrstuvwxyz~\x00SELECT \"%w\" FROM \"%w\"\x00 WHERE \"%w\">=?1 AND \"%w\"=?2 ORDER BY 1\x00SELECT \"%w\" FROM \"%w\" WHERE \"%w\">=?1 ORDER BY 1\x00*\x00DELETE from %s is not allowed\x00UPDATE of %s is not allowed\x00INSERT INTO %s allowed for column [command] only\x00approximate_match\x00int32\x00int64\x00char*\x00CREATE TABLE x(value,pointer hidden,count hidden,ctype hidden)\x00carray-bind\x00carray\x00unknown datatype: %Q\x00inttoptr\x00cksmvfs\x00ZV-\x00checksum fault offset %lld of \"%s\"\x00checksum_verification\x00enable%\x00yes\x00on\x00page_size\x00cksm/%z\x00verify_checksum\x00tablename\x00idcolumn\x00parentcolumn\x00CREATE TABLE x(id,depth,root HIDDEN,tablename HIDDEN,idcolumn HIDDEN,parentcolumn HIDDEN)\x00SELECT \"%w\".\"%w\" FROM \"%w\" WHERE \"%w\".\"%w\"=?1\x00transitive_closure\x00rb\x00cannot open '%s' for reading\x00line %d: unescaped %c character\x00line %d: unterminated %c-quoted field\n\x00more than one '%s' parameter\x00true\x00no\x00off\x00false\x00header\x00more than one 'header' parameter\x00testflags\x00columns\x00more than one 'columns' parameter\x00column= value must be positive\x00bad parameter: '%s'\x00must specify either filename= or data= but not both\x00%sc%d TEXT\x00,\x00%s\"%w\" TEXT\x00bad schema: '%s' - %s\x00filename\x00data\x00schema\x00csv\x00csv_wr\x00decimal_sum\x00decimal\x00decimal_cmp\x00decimal_add\x00decimal_sub\x00decimal_mul\x00 \x00eval\x00CREATE TABLE x(addr,opcode,p1,p2,p3,p4,p5,comment,sql HIDDEN)\x00EXPLAIN %s\x00explain\x00wb\x00wrong number of arguments to function writefile()\x00failed to create symlink: %s\x00failed to create directory: %s\x00failed to write file: %s\x00CREATE TABLE x(name,mode,mtime,data,path HIDDEN,dir HIDDEN)\x00cannot read directory: %s\x00%s/%s\x00cannot stat file: %s\x00table function fsdir requires an argument\x00table function fsdir requires a non-NULL argument\x00fsdir\x00readfile\x00writefile\x00lsmode\x00%s: ruleset must be between 0 and %d\x00%s: wrong number of CREATE VIRTUAL TABLE arguments\x00CREATE TABLE x(word,distance,ruleset)\x00fuzzer\x00ieee754(%lld,%d)\x00ieee754\x00ieee754_mantissa\x00ieee754_exponent\x00ieee754_to_blob\x00ieee754_from_blob\x00BEGIN; SELECT * FROM %s%q%ssqlite_schema\x00'\x00'.\x00PRAGMA %s%q%spage_size\x00sqlite3_mmap_warm_cache: Warmed up %d pages of %s\x00END\x00AND (%s)\x00collate \"%w\"\x00SELECT %s FROM %s WHERE %s>=(?1 || ?2) %s AND %s<=(?1 || char(1114111)) %s %s ORDER BY 1 %s ASC LIMIT 1\x00next_char\x00NULL\x00is\x00not\x00in(\x00in(select\x00in(with\x00?,?,?\x002nd argument to percentile() is not a number between 0.0 and 100.0\x002nd argument to percentile() is not the same for all input rows\x001st argument to percentile() is not numeric\x00Inf input to percentile()\x00percentile\x00CREATE TABLE prefixes(prefix TEXT, original_string TEXT HIDDEN)\x00prefixes\x00prefix_length\x00unknown \\ escape\x00afnrtv\\()*.+?[$^{|}]\x00\a\f\n\r\t\v\x00unmatched '('\x00'*' without operand\x00'+' without operand\x00'?' without operand\x00'{m,n}' without operand\x00unmatched '{'\x00n less than m in '{m,n}'\x00both m and n are zero in '{m,n}'\x00POSIX character classes not supported\x00unclosed '['\x00unrecognized character\x00regexp\x00remember\x00CREATE TABLE x(value,start hidden,stop hidden,step hidden)\x00generate_series() requires SQLite 3.8.12 or later\x00generate_series\x00.ABCDHLRMY9 ?\x00non-ASCII input to editdist()\x00NULL input to editdist()\x00SELECT iLang, cFrom, cTo, iCost FROM \"%w\" WHERE iLang>=0 ORDER BY iLang\x00editdist3\x00DROP TABLE IF EXISTS \"%w\".\"%w_vocab\"\x00CREATE TABLE x(word,rank,distance,langid, score, matchlen, phonehash HIDDEN, top HIDDEN, scope HIDDEN, srchcnt HIDDEN, soundslike HIDDEN, command HIDDEN)\x00CREATE TABLE IF NOT EXISTS \"%w\".\"%w_vocab\"(\n id INTEGER PRIMARY KEY,\n rank INT,\n langid INT,\n word TEXT,\n k1 TEXT,\n k2 TEXT\n);\n\x00CREATE INDEX IF NOT EXISTS \"%w\".\"%w_vocab_index_langid_k2\" ON \"%w_vocab\"(langid,k2);\x00edit_cost_table=\x00bad argument to spellfix1(): \"%s\"\x00SELECT id, word, rank, coalesce(k1,word) FROM \"%w\".\"%w_vocab\" WHERE langid=%d AND k2>=?1 AND k2=%lld\x00AND\x00%z %s rowid<=%lld\x00CREATE TABLE x(value)\x00wholenumber\x00CREATE TABLE y(name PRIMARY KEY,mode,mtime,sz,rawdata,data,method,z HIDDEN) WITHOUT ROWID;\x00zipfile\x00zipfile constructor requires one argument\x00error in fread()\x00error in fwrite()\x00failed to read CDS at offset %lld\x00%.*s\x00failed to read LFH at offset %d\x001.2.11\x00inflateInit2() failed (%d)\x00inflate() failed (%d)\x00zipfile: deflate() error\x00cannot find end of central directory record\x00zipfile() function requires an argument\x00cannot open file: %s\x00-rwxrwxrwx\x00zipfile: mode does not match data\x00zipfile: parse error in mode: %s\x00zipfile: missing filename\x00ab+\x00zipfile: failed to open file %s for writing\x00sz must be NULL\x00rawdata must be NULL\x00unknown compression method: %d\x00%s/\x00duplicate name: \"%s\"\x00{\"version-made-by\" : %u, \"version-to-extract\" : %u, \"flags\" : %u, \"compression\" : %u, \"time\" : %u, \"date\" : %u, \"crc32\" : %u, \"compressed-size\" : %u, \"uncompressed-size\" : %u, \"file-name-length\" : %u, \"extra-field-length\" : %u, \"file-comment-length\" : %u, \"disk-number-start\" : %u, \"internal-attr\" : %u, \"external-attr\" : %u, \"offset\" : %u }\x00zipfile_cds\x00wrong number of arguments to function zipfile()\x00first argument to zipfile() must be non-NULL\x00illegal method value: %d\x00non-directory name must not end with /\x00rbu_delta\x00step\x00close\x00create_rbu_delta\x00savestate\x00dbMain_eval\x00SQL\x00bp_progress\x00db\x00RBU\x00state\x00progress\x00close_no_error\x00temp_size_limit\x00LIMIT\x00temp_size\x00dbRbu_eval\x00METHOD\x00method\x00 - \x00oal\x00move\x00checkpoint\x00done\x00error\x00NAME TARGET-DB RBU-DB ?STATE-DB?\x00NAME TARGET-DB ?STATE-DB?\x00?-default? NAME PARENT\x00NAME\x00sqlite3rbu_db(0, 0)!=0\x00sqlite3rbu\x00sqlite3rbu_vacuum\x00sqlite3rbu_create_vfs\x00sqlite3rbu_destroy_vfs\x00sqlite3rbu_internal_test\x00incrblob\x00incrblob_%d\x00%lld\x00sqlite_unlock_notify_arg\x00sqlite_unlock_notify_argcount\x00DELETE\x00INSERT\x00UPDATE\x00SQLITE_COPY\x00SQLITE_CREATE_INDEX\x00SQLITE_CREATE_TABLE\x00SQLITE_CREATE_TEMP_INDEX\x00SQLITE_CREATE_TEMP_TABLE\x00SQLITE_CREATE_TEMP_TRIGGER\x00SQLITE_CREATE_TEMP_VIEW\x00SQLITE_CREATE_TRIGGER\x00SQLITE_CREATE_VIEW\x00SQLITE_DELETE\x00SQLITE_DROP_INDEX\x00SQLITE_DROP_TABLE\x00SQLITE_DROP_TEMP_INDEX\x00SQLITE_DROP_TEMP_TABLE\x00SQLITE_DROP_TEMP_TRIGGER\x00SQLITE_DROP_TEMP_VIEW\x00SQLITE_DROP_TRIGGER\x00SQLITE_DROP_VIEW\x00SQLITE_INSERT\x00SQLITE_PRAGMA\x00SQLITE_READ\x00SQLITE_SELECT\x00SQLITE_TRANSACTION\x00SQLITE_UPDATE\x00SQLITE_ATTACH\x00SQLITE_DETACH\x00SQLITE_ALTER_TABLE\x00SQLITE_REINDEX\x00SQLITE_ANALYZE\x00SQLITE_CREATE_VTABLE\x00SQLITE_DROP_VTABLE\x00SQLITE_FUNCTION\x00SQLITE_SAVEPOINT\x00SQLITE_RECURSIVE\x00????\x00SQLITE_DENY\x00SQLITE_IGNORE\x00RELEASE _tcl_transaction\x00COMMIT\x00ROLLBACK TO _tcl_transaction ; RELEASE _tcl_transaction\x00option\x00?CALLBACK?\x00?DATABASE? FILENAME\x00cannot open target database: \x00backup failed: \x00CALLBACK\x00cache option ?arg?\x00flush\x00size\x00size n\x00cannot convert \"\x00\" to integer\x00bad option \"\x00\": must be flush or size\x00NAME SCRIPT\x00SCRIPT\x00?OPTION? ?BOOLEAN?\x00unknown config option: \"\x00\"\x00CONFLICT-ALGORITHM TABLE FILENAME ?SEPARATOR? ?NULLINDICATOR?\x00\t\x00Error: non-null separator required for copy\x00rollback\x00abort\x00fail\x00ignore\x00replace\x00Error: \"\x00\", conflict-algorithm must be one of: rollback, abort, fail, ignore, or replace\x00SELECT * FROM '%q'\x00Error: no such table: \x00Error: \x00Error: can't malloc()\x00INSERT OR %q INTO '%q' VALUES(?\x00Error: cannot open file: \x00BEGIN\x00Error: %s line %d: expected %d columns of data but found %d\x00, failed while processing line: \x00?DATABASE? VALUE\x00-maxsize\x00-readonly\x00unknown option: \x00unable to set MEMDB content\x00extension loading is turned off at compile-time\x00-withoutnulls\x00unknown option: \"\x00?OPTIONS? SQL ?ARRAY-NAME? ?SCRIPT?\x00NAME ?SWITCHES? SCRIPT\x00-argcount\x00option requires an argument: \x00number of arguments must be non-negative\x00-deterministic\x00-directonly\x00-innocuous\x00-returntype\x00real\x00text\x00blob\x00any\x00type\x00\": must be -argcount, -deterministic, -directonly, -innocuous, or -returntype\x00?-readonly? ?DB? TABLE COLUMN ROWID\x00NULLVALUE\x00N CALLBACK\x00KEY\x00cannot open source database: \x00restore failed: \x00restore failed: source database busy\x00?DATABASE?\x00(step|sort|autoindex)\x00sort\x00autoindex\x00vmstep\x00bad argument: should be autoindex, step, sort or vmstep\x00MILLISECONDS\x00?CALLBACK? ?MASK?\x00trace type\x00SAVEPOINT _tcl_transaction\x00[TYPE] SCRIPT\x00transaction type\x00BEGIN EXCLUSIVE\x00BEGIN IMMEDIATE\x00?SCRIPT?\x00SUB-COMMAND ?ARGS?\x00hook ?SCRIPT?\x00INDEX\x00-use-legacy-prepare\x00-last-stmt-ptr\x00%p\x00unknown argument: \x00authorizer\x00backup\x00bind_fallback\x00busy\x00cache\x00changes\x00collate\x00collation_needed\x00commit_hook\x00complete\x00config\x00copy\x00deserialize\x00enable_load_extension\x00errorcode\x00exists\x00function\x00interrupt\x00last_insert_rowid\x00nullvalue\x00onecolumn\x00preupdate\x00profile\x00rekey\x00restore\x00rollback_hook\x00serialize\x00status\x00timeout\x00total_changes\x00trace\x00trace_v2\x00transaction\x00unlock_notify\x00update_hook\x00version\x00wal_hook\x00defensive\x00dqs_ddl\x00dqs_dml\x00enable_fkey\x00enable_qpsg\x00enable_trigger\x00enable_view\x00fts3_tokenizer\x00legacy_alter_table\x00legacy_file_format\x00load_extension\x00no_ckpt_on_close\x00reset_database\x00trigger_eqp\x00trusted_schema\x00writable_schema\x00statement\x00row\x00deferred\x00exclusive\x00immediate\x00depth\x00hook\x00new\x00old\x00HANDLE ?FILENAME? ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nofollow BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?\x00-version\x00-sourceid\x00-has-codec\x000\x00-key\x00-vfs\x00-create\x00-nofollow\x00-nomutex\x00-fullmutex\x00-uri\x00-translatefilename\x00sqlite3\x00sqlite\x003.35.5\x00if {[llength $argv]>=1} {\nset argv0 [lindex $argv 0]\nset argv [lrange $argv 1 end]\nsource $argv0\n} else {\nset line {}\nwhile {![eof stdin]} {\nif {$line!=\"\"} {\nputs -nonewline \"> \"\n} else {\nputs -nonewline \"% \"\n}\nflush stdout\nappend line [gets stdin]\nif {[info complete $line]} {\nif {[catch {uplevel #0 $line} result]} {\nputs stderr \"Error: $result\"\n} elseif {$result!=\"\"} {\nputs $result\n}\nset line {}\n} else {\nappend line \\n\n}\n}\n}\n\x00SQLITE_DEBUG_BREAK\x00attach debugger to process %d and press any key to continue.\n\x00utf-8\x00argc\x00argv0\x00argv\x00errorInfo\x00%s: %s\n\x00SQLITE-CONNECTION\x00command not found: \x00error code %s (%d) does not match sqlite3_errcode %s (%d)\x00OMIT_MISUSE\x00wrong # args: should be \"\x00 DB FORMAT STRING\x00 DB HEX\x00 DB\x00 DB SQL\x00%z%s%s\x00%s%n\x00abcdefghijklmnopqrstuvwxyz\x00 DB FORMAT STRING ?COUNT?\x00 DB\"\x00 FILENAME\"\x00%02x\x00%04x\x00tkt2213 is not fixed\x00text16\x00bytes\x00bytes16\x00noop\x00x_coalesce\x00hex8\x00hex16\x00tkt2213func\x00pointer_change\x00counter1\x00counter2\x00intreal\x00x_sqlite_exec\x00value of 40 handed to x_count\x00x_count totals to 42\x00x_count\x00legacy_count\x00 TEXT\"\x00 FORMAT INT INT INT\"\x00argument is not a valid 64-bit integer\x00 FORMAT INT INT ?STRING?\"\x00 INT FORMAT INT INT ?STRING?\"\x00N must be non-negative\x00 FORMAT INT INT DOUBLE\"\x00 FORMAT DOUBLE DOUBLE\"\x00 FORMAT STRING\"\x00%08x%08x\x002nd argument should be 16-characters of hex\x00DB BOOLEAN\x00DB dbname tblname colname\x00CHANNEL ROWID\x00DB-HANDLE NAME CMP-PROC DEL-PROC\x00sqlite3_create_collate_v2() failed to detect an invalid encoding\x00utf8\x00utf16\x00utf16le\x00utf16be\x00DB NAME NARG ENC SWITCHES...\x00encoding\x00-func\x00-step\x00-final\x00-destroy\x00switch\x00DB-HANDLE FILE ?PROC?\x00this build omits sqlite3_load_extension()\x00DB-HANDLE ONOFF\x00string\x00value\x00first argument should be one of: int int64 string double null value\x00 DB FUNCTION-NAME\x00 \x00STMT PARAMETER RESETFLAG\x00SQLITE_STMTSTATUS_FULLSCAN_STEP\x00SQLITE_STMTSTATUS_SORT\x00SQLITE_STMTSTATUS_AUTOINDEX\x00SQLITE_STMTSTATUS_VM_STEP\x00SQLITE_STMTSTATUS_REPREPARE\x00SQLITE_STMTSTATUS_RUN\x00SQLITE_STMTSTATUS_MEMUSED\x00NBYTE\x00DB DBNAME\x00DB DBNAME SNAPSHOT\x00SNAPSHOT\x00SNAPSHOT1 SNAPSHOT2\x00bad SNAPSHOT\x00FILE\x00PATH\x00 DB STMT\x00 STMT\x00 FROM-STMT TO-STMT\x00 VM IDX VALUE (null|static|normal)\"\x00static\x00static-nbytes\x00normal\x00blob10\x00abc\x00xyz\x00pq\x004th argument should be \"null\" or \"static\" or \"normal\"\x00(%d) \x00test_collate\x00UTF-8\x00UTF-16LE\x00UTF-16BE\x00 \x00utf16bin\x00utf16_unaligned\x00utf16_aligned\x00test_function\x00\x00STMT IDX N\x00 STMT N VALUE\x00NaN\x00SNaN\x00-NaN\x00-SNaN\x00+Inf\x00-Inf\x00Epsilon\x00-Epsilon\x00NaN0\x00-NaN0\x00 STMT N\x00 STMT N VALUE BYTES\x00 STMT N DATA BYTES\x00cannot use %d blob bytes, have %d\x00-transient\x00-static\x00-int32\x00-int64\x00-double\x00-text\x00--\x00text data must be either -static or -transient\x00cannot be both -static and -transient\x00[OPTIONS] STMT IDX VALUE ...\x00STMT\x00STMT N\x00STMT NAME\x00 DB sql bytes ?tailvar?\x00 DB sql bytes tailvar\x00 DB sql bytes flags tailvar\x00\x00SELECT 1\x00 filename options-list\x00FILENAME FLAGS VFS\x00SQLITE_OPEN_READONLY\x00SQLITE_OPEN_READWRITE\x00SQLITE_OPEN_CREATE\x00SQLITE_OPEN_DELETEONCLOSE\x00SQLITE_OPEN_EXCLUSIVE\x00SQLITE_OPEN_AUTOPROXY\x00SQLITE_OPEN_MAIN_DB\x00SQLITE_OPEN_TEMP_DB\x00SQLITE_OPEN_TRANSIENT_DB\x00SQLITE_OPEN_MAIN_JOURNAL\x00SQLITE_OPEN_TEMP_JOURNAL\x00SQLITE_OPEN_SUBJOURNAL\x00SQLITE_OPEN_SUPER_JOURNAL\x00SQLITE_OPEN_NOMUTEX\x00SQLITE_OPEN_FULLMUTEX\x00SQLITE_OPEN_SHAREDCACHE\x00SQLITE_OPEN_PRIVATECACHE\x00SQLITE_OPEN_WAL\x00SQLITE_OPEN_URI\x00flag\x00\x00 STMT column\x00FLOAT\x00TEXT\x00BLOB\x00 DB MAGIC\x00SQLITE_MAGIC_OPEN\x00SQLITE_MAGIC_CLOSED\x00SQLITE_MAGIC_BUSY\x00SQLITE_MAGIC_ERROR\x00 DB function-name\x00VARIABLE\x00?N?\x001234567890000000\x00__one\x00__two\x00notadatabase\x00Unexpected non-zero errno: \x00DB [DBNAME]\x00%u\x00DB DBNAME SIZE\x00 DB PWD\x00 DB NRETRY DELAY\x00%d %d %d\x00%d %p\x00 DB HANDLE\x00 DB FLAG\x00%d %d\x00 DB ?AUXDB?\x00DB N\x00 DB ID VALUE\x00unknown limit type: \x00SQLITE_LIMIT_LENGTH\x00SQLITE_LIMIT_SQL_LENGTH\x00SQLITE_LIMIT_COLUMN\x00SQLITE_LIMIT_EXPR_DEPTH\x00SQLITE_LIMIT_COMPOUND_SELECT\x00SQLITE_LIMIT_VDBE_OP\x00SQLITE_LIMIT_FUNCTION_ARG\x00SQLITE_LIMIT_ATTACHED\x00SQLITE_LIMIT_LIKE_PATTERN_LENGTH\x00SQLITE_LIMIT_VARIABLE_NUMBER\x00SQLITE_LIMIT_TRIGGER_DEPTH\x00SQLITE_LIMIT_WORKER_THREADS\x00SQLITE_LIMIT_TOOSMALL\x00SQLITE_LIMIT_TOOBIG\x00SEED ?DB?\x00BOOLEAN\x00current\x00max\x00min\x00recyclable\x00DB ?NAME?\x00passive\x00full\x00restart\x00truncate\x00DB MODE ?NAME?\x00mode\x00DB VALUE\x00COMMAND ...\x00command has no objProc: \x00%d %d %d %s\n\x00SQLITE_TESTCTRL_LOCALTIME_FAULT\x00SQLITE_TESTCTRL_SORTER_MMAP\x00SQLITE_TESTCTRL_IMPOSTER\x00SQLITE_TESTCTRL_INTERNAL_FUNCTIONS\x00VERB ARGS...\x00VERB\x00ONOFF\x00DB LIMIT\x00DB dbName onOff tnum\x00FILENAME DELAY1 DELAY2\x00%d %d %d %d %d\x00cannot open file: \x00cannot create event: \x000x%x\x00wait failed: \x00win32_file_lock\x00PATTERN\x00FILENAME\x00DIRECTORY\x00DB OPT BOOLEAN\x00unknown optimization - should be one of:\x00all\x00none\x00query-flattener\x00groupby-order\x00factor-constants\x00distinct-opt\x00cover-idx-scan\x00order-by-idx-join\x00transitive\x00omit-noop-join\x00stat4\x00skip-scan\x00push-down\x00DB NAME ...\x00no such extension: \x00initialization of \x00 failed: \x00amatch\x00appendvfs\x00closure\x00fileio\x00nextchar\x00series\x00spellfix\x00totype\x00BOOL\x00DB SQL1 NSTEP SQL2\x00data error: (a!=b)\x00checksum mismatch\x00sql error: \x00TYPE\x00Deliberate panic\x00DB SETTING [VALUE]\x00SQLITE_*\x00DBCONFIG_*\x00ENABLE_*\x00unknown sqlite3_db_config setting\x00FKEY\x00TRIGGER\x00FTS3_TOKENIZER\x00LOAD_EXTENSION\x00NO_CKPT_ON_CLOSE\x00QPSG\x00TRIGGER_EQP\x00RESET_DB\x00DEFENSIVE\x00WRITABLE_SCHEMA\x00LEGACY_ALTER_TABLE\x00DQS_DML\x00DQS_DDL\x00LEGACY_FILE_FORMAT\x00DB ?SCHEMA?\x00icecube\x00DB ?DBNAME?\x00DB OFFSET DATA\x00HEXDB\x00| size %d pagesize %d\x00bad 'pagesize' field\x00bad 'size' field\x00| page %d offset %d\x00| %d: %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\x00sqlite_search_count\x00sqlite_found_count\x00sqlite_sort_count\x00sqlite3_max_blobsize\x00sqlite_like_count\x00sqlite_interrupt_count\x00sqlite_open_file_count\x00sqlite_current_time\x00sqlite3_xferopt_count\x00sqlite3_pager_readdb_count\x00sqlite3_pager_writedb_count\x00sqlite3_pager_writej_count\x00unaligned_string_counter\x00sqlite_last_needed_collation\x00sqlite_os_type\x00sqlite_query_plan\x00sqlite_opentemp_count\x00sqlite_static_bind_value\x00sqlite_static_bind_nbyte\x00sqlite_temp_directory\x00sqlite_data_directory\x00bitmask_size\x00longdouble_size\x00sqlite_sync_count\x00sqlite_fullsync_count\x00db_enter\x00db_leave\x00sqlite3_mprintf_int\x00sqlite3_mprintf_int64\x00sqlite3_mprintf_long\x00sqlite3_mprintf_str\x00sqlite3_snprintf_str\x00sqlite3_mprintf_stronly\x00sqlite3_mprintf_double\x00sqlite3_mprintf_scaled\x00sqlite3_mprintf_hexdouble\x00sqlite3_mprintf_z_test\x00sqlite3_mprintf_n_test\x00sqlite3_snprintf_int\x00sqlite3_last_insert_rowid\x00sqlite3_exec_printf\x00sqlite3_exec_hex\x00sqlite3_exec\x00sqlite3_exec_nr\x00sqlite3_get_table_printf\x00sqlite3_close\x00sqlite3_close_v2\x00sqlite3_create_function\x00sqlite3_create_aggregate\x00sqlite3_drop_modules\x00sqlite_register_test_function\x00sqlite_abort\x00sqlite_bind\x00breakpoint\x00sqlite3_key\x00sqlite3_rekey\x00sqlite_set_magic\x00sqlite3_interrupt\x00sqlite_delete_function\x00sqlite_delete_collation\x00sqlite3_get_autocommit\x00sqlite3_busy_timeout\x00printf\x00sqlite3IoTrace\x00clang_sanitize_address\x00sqlite3_db_config\x00sqlite3_txn_state\x00bad_behavior\x00register_dbstat_vtab\x00sqlite3_connection_pointer\x00intarray_addr\x00int64array_addr\x00doublearray_addr\x00textarray_addr\x00sqlite3_bind_int\x00sqlite3_bind_zeroblob\x00sqlite3_bind_zeroblob64\x00sqlite3_bind_int64\x00sqlite3_bind_double\x00sqlite3_bind_null\x00sqlite3_bind_text\x00sqlite3_bind_text16\x00sqlite3_bind_blob\x00sqlite3_carray_bind\x00sqlite3_bind_parameter_count\x00sqlite3_bind_parameter_name\x00sqlite3_bind_parameter_index\x00sqlite3_clear_bindings\x00sqlite3_sleep\x00sqlite3_errcode\x00sqlite3_extended_errcode\x00sqlite3_errmsg\x00sqlite3_errmsg16\x00sqlite3_open\x00sqlite3_open16\x00sqlite3_open_v2\x00sqlite3_complete16\x00sqlite3_normalize\x00sqlite3_prepare\x00sqlite3_prepare16\x00sqlite3_prepare_v2\x00sqlite3_prepare_v3\x00sqlite3_prepare_tkt3134\x00sqlite3_prepare16_v2\x00sqlite3_finalize\x00sqlite3_stmt_status\x00sqlite3_reset\x00sqlite3_expired\x00sqlite3_transfer_bindings\x00sqlite3_changes\x00sqlite3_step\x00sqlite3_sql\x00sqlite3_expanded_sql\x00sqlite3_next_stmt\x00sqlite3_stmt_readonly\x00sqlite3_stmt_isexplain\x00sqlite3_stmt_busy\x00uses_stmt_journal\x00sqlite3_release_memory\x00sqlite3_db_release_memory\x00sqlite3_db_cacheflush\x00sqlite3_system_errno\x00sqlite3_db_filename\x00sqlite3_db_readonly\x00sqlite3_soft_heap_limit\x00sqlite3_soft_heap_limit64\x00sqlite3_hard_heap_limit64\x00sqlite3_thread_cleanup\x00sqlite3_pager_refcounts\x00sqlite3_load_extension\x00sqlite3_enable_load_extension\x00sqlite3_extended_result_codes\x00sqlite3_limit\x00dbconfig_maindbname_icecube\x00save_prng_state\x00restore_prng_state\x00reset_prng_state\x00prng_seed\x00extra_schema_checks\x00database_never_corrupt\x00database_may_be_corrupt\x00optimization_control\x00lock_win32_file\x00exists_win32_path\x00find_win32_file\x00delete_win32_file\x00make_win32_dir\x00remove_win32_dir\x00tcl_objproc\x00sqlite3_column_count\x00sqlite3_data_count\x00sqlite3_column_type\x00sqlite3_column_blob\x00sqlite3_column_double\x00sqlite3_column_int64\x00sqlite3_column_text\x00sqlite3_column_name\x00sqlite3_column_int\x00sqlite3_column_bytes\x00sqlite3_column_decltype\x00sqlite3_column_database_name\x00sqlite3_column_table_name\x00sqlite3_column_origin_name\x00sqlite3_column_bytes16\x00sqlite3_column_text16\x00sqlite3_column_name16\x00add_alignment_test_collations\x00sqlite3_column_decltype16\x00sqlite3_column_database_name16\x00sqlite3_column_table_name16\x00sqlite3_column_origin_name16\x00sqlite3_create_collation_v2\x00sqlite3_global_recover\x00working_64bit_int\x00vfs_unlink_test\x00vfs_initfail_test\x00vfs_unregister_all\x00vfs_reregister_all\x00file_control_test\x00file_control_lasterrno_test\x00file_control_lockproxy_test\x00file_control_chunksize_test\x00file_control_sizehint_test\x00file_control_data_version\x00file_control_win32_av_retry\x00file_control_win32_get_handle\x00file_control_win32_set_handle\x00file_control_persist_wal\x00file_control_powersafe_overwrite\x00file_control_vfsname\x00file_control_reservebytes\x00file_control_tempfilename\x00sqlite3_vfs_list\x00sqlite3_create_function_v2\x00add_test_collate\x00add_test_collate_needed\x00add_test_function\x00add_test_utf16bin_collate\x00sqlite3_test_errstr\x00tcl_variable_type\x00sqlite3_enable_shared_cache\x00sqlite3_shared_cache_report\x00sqlite3_libversion_number\x00sqlite3_table_column_metadata\x00sqlite3_blob_reopen\x00pcache_stats\x00sqlite3_unlock_notify\x00sqlite3_wal_checkpoint\x00sqlite3_wal_checkpoint_v2\x00sqlite3_wal_autocheckpoint\x00test_sqlite3_log\x00print_explain_query_plan\x00sqlite3_test_control\x00load_static_extension\x00sorter_test_fakeheap\x00sorter_test_sort4_helper\x00vfs_current_time_int64\x00sqlite3_snapshot_get\x00sqlite3_snapshot_open\x00sqlite3_snapshot_free\x00sqlite3_snapshot_cmp\x00sqlite3_snapshot_recover\x00sqlite3_snapshot_get_blob\x00sqlite3_snapshot_open_blob\x00sqlite3_snapshot_cmp_blob\x00sqlite3_delete_database\x00atomic_batch_write\x00sqlite3_mmap_warm\x00sqlite3_config_sorterref\x00decode_hexdb\x00test_write_db\x00sqlite3_register_cksumvfs\x00sqlite3_unregister_cksumvfs\x00*** OBSOLETE VARIABLE ***\x00 FILENAME N-PAGE\"\x00 ID\"\x00ref\x00page\x00err\x00hit\x00miss\x00ovfl\x00 ID PGNO\"\x00 PAGE\"\x00 PAGE DATA\"\x00 N-MEGABYTES FILE\"\x00open failed: \x00Hello, World!\x00write failed: \x00 PENDING-BYTE\"\x00fault simulator script failed: [%s]\x00 SCRIPT\"\x00 SIZE PROGRAM\"\x00sqlite_io_error_pending\x00sqlite_io_error_persist\x00sqlite_io_error_hit\x00sqlite_io_error_hardhit\x00sqlite_diskfull_pending\x00sqlite_diskfull\x00sqlite_pending_byte\x00pager_open\x00pager_close\x00pager_commit\x00pager_rollback\x00pager_stmt_begin\x00pager_stmt_commit\x00pager_stmt_rollback\x00pager_stats\x00pager_pagecount\x00page_get\x00page_lookup\x00page_unref\x00page_read\x00page_write\x00page_number\x00pager_truncate\x00fake_big_file\x00sqlite3BitvecBuiltinTest\x00sqlite3_test_control_pending_byte\x00sqlite3_test_control_fault_install\x00 FILENAME NCACHE FLAGS\"\x00read\x00write\x00 ID TABLENUM WRITEABLE\"\x00 START MULTIPLIER COUNT INCREMENT\"\x00putVarint returned %d - should be between 1 and 9\x00putVarint returned %d and getVarint returned %d\x00Wrote 0x%016llx and got back 0x%016llx\x00putVarint returned %d and GetVarint32 returned %d\x00Wrote 0x%016llx and got back 0x%016llx from GetVarint32\x00 DB-HANDLE ?N?\"\x00No such db-handle: \"\x00 BT NCACHE\"\x00?-intkey? CSR KEY VALUE\x00btree_insert\x00btree_open\x00btree_close\x00btree_begin_transaction\x00btree_pager_stats\x00btree_cursor\x00btree_close_cursor\x00btree_next\x00btree_eof\x00btree_payload_size\x00btree_first\x00btree_varint_test\x00btree_from_db\x00btree_ismemdb\x00btree_set_cache_size\x00 \x00hello world\x00UTF8\x00UTF16LE\x00UTF16BE\x00UTF16\x00No such encoding: \x00 \x00binarize\x00test_value_overhead\x00test_translate\x00translate_selftest\x00out of memory in the crash simulator\n\x00atomic\x00atomic512\x00atomic1k\x00atomic2k\x00atomic4k\x00atomic8k\x00atomic16k\x00atomic32k\x00atomic64k\x00sequential\x00safe_append\x00powersafe_overwrite\x00batch-atomic\x00-sectorsize\x00-characteristics\x00Bad option: \"\x00\" - must be \"-characteristics\" or \"-sectorsize\"\x00Option requires an argument: \"\x00no such flag\x00ENABLE ?DEFAULT?\x00crash\x00?OPTIONS? DELAY CRASHFILE\x00Filename is too long: \"\x00NWRITE\x00?-default? PARENT-VFS\x00-default\x00\": must be -default\x00Error in jt_register\x00sqlite3_crash_enable\x00sqlite3_crashparams\x00sqlite3_crash_now\x00sqlite3_simulate_device\x00sqlite3_crash_on_write\x00unregister_devsim\x00register_jt_vfs\x00unregister_jt_vfs\x00echo_module_fail(%s,%s)\x00echo-vtab-error: %s\x00SELECT * FROM %Q\x00PRAGMA index_list(%s)\x00PRAGMA index_info(%s)\x00echo_module\x00SELECT sql FROM sqlite_schema WHERE type = 'table' AND name = ?\x00%s%s\x00xCreate\x00CREATE TABLE %Q(logmsg)\x00xConnect\x00xDisconnect\x00xDestroy\x00DROP TABLE %Q\x00xOpen\x00xNext\x00xColumn\x00xFilter\x00, *\x00%z, %s\x00%z, NULL\x00echo_module_ignore_usable\x00xBestIndex\x00echo_module_cost\x00SELECT count(*) FROM %Q\x00SELECT rowid%z FROM %Q\x00rowid\x00=\x00<\x00>\x00<=\x00>=\x00LIKE\x00like\x00glob\x00 %s %s LIKE (SELECT '%%'||?||'%%')\x00 %s %s %s ?\x00DESC\x00ASC\x00 ORDER BY %s %s\x00xUpdate\x00 SET\x00UPDATE %Q\x00 SET rowid=?1 \x00%s %Q=?%d\x00 WHERE rowid=?%d\x00DELETE FROM %Q WHERE rowid = ?1\x00INSERT INTO %Q (\x00%s%Q\x00%s?%d\x00) VALUES(\x00echo(%s)\x00xBegin\x00echo_module_begin_fail\x00xSync\x00echo_module_sync_fail\x00xCommit\x00xRollback\x00::echo_glob_overload\x00xRename\x00ALTER TABLE %s RENAME TO %s%s\x00echo\x00echo_v2\x00DB SQL\x00register_echo_module\x00sqlite3_declare_vtab\x00N/A\x00sqlite3_create_collation\x00Error testing function: \x00sqlite3_malloc\x00sqlite3_realloc\x00c_misuse_test\x00c_realloc_test\x00c_collation_test\x00sqlite3_reset_auto_extension\x00npage\x00finish\x00remaining\x00pagecount\x00CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME\x00sqlite3_backup_init() failed\x00sqlite3_backup\x00wrong number of arguments\x00unexpected: %s\x00eq\x00gt\x00le\x00lt\x00ge\x00match\x00ne\x00isnot\x00isnotnull\x00isnull\x00op\x00column\x00usable\x00desc\x00cost\x00orderby\x00idxnum\x00idxstr\x00rows\x00use\x00omit\x00unexpected: %d\x00tcl\x00register_tcl_module\x00incrblob_\x00DB DATABASE TABLE COLUMN ROWID FLAGS VARNAME\x00HANDLE\x00CHANNEL OFFSET N\x00out of memory in testdata/sqlite-src-3350500/src/test_blob.c\x00HANDLE OFFSET DATA ?NDATA?\x00sqlite3_blob_open\x00sqlite3_blob_close\x00sqlite3_blob_bytes\x00sqlite3_blob_read\x00sqlite3_blob_write\x00sqlite_options\x00malloc_usable_size\x00rowid32\x00casesensitivelike\x00curdir\x001\x00win32malloc\x00debug\x00default_ckptfullfsync\x00direct_read\x00dirsync\x00lfs\x00pagecache_overflow_stats\x00mmap\x00worker_threads\x008\x00memdebug\x008_3_names\x00cursorhints\x00hiddencolumns\x00mathlib\x00mem3\x00mem5\x00offset_sql_func\x00snapshot\x00mutex\x00mutex_noop\x00altertable\x00api_armor\x00atomicwrite\x00json1\x00has_codec\x00like_match_blobs\x00attach\x00auth\x00autoinc\x00autoreset\x00autovacuum\x00default_autovacuum\x00between_opt\x00builtin_test\x00bloblit\x00cast\x00check\x00cte\x00columnmetadata\x00oversize_cell_check\x00compileoption_diags\x00compound\x00conflict\x00crashtest\x00datetime\x00decltype\x00deprecated\x00diskio\x00floatingpoint\x00foreignkey\x00fts1\x00fts2\x00fts3\x00fts5\x00fts3_unicode\x00fts4_deferred\x00gettable\x00icu\x00icu_collations\x00integrityck\x00legacyformat\x00like_opt\x00load_ext\x00localtime\x00lookaside\x00long_double\x00memorydb\x00memorymanage\x00mergesort\x00null_trim\x00or_opt\x00rbu\x00pager_pragmas\x00pragma\x00reindex\x00rtree\x00rtree_int_only\x00schema_pragmas\x00schema_version\x00session\x00stmtvtab\x00scanstatus\x00lock_proxy_pragmas\x00prefer_proxy_locking\x00shared_cache\x00subquery\x00tclvar\x00threadsafe\x00threadsafe1\x00threadsafe2\x00tempdb\x00trigger\x00truncate_opt\x00vacuum\x00view\x00vtab\x00wal\x00wsd\x00update_delete_limit\x00fast_secure_delete\x00secure_delete\x00userauth\x00multiplex_ext_overwrite\x00yytrackmaxstackdepth\x00sqllog\x00uri_00_error\x00normalize\x00windowfunc\x00SQLITE_MAX_LENGTH\x00SQLITE_MAX_COLUMN\x00SQLITE_MAX_SQL_LENGTH\x00SQLITE_MAX_EXPR_DEPTH\x00SQLITE_MAX_COMPOUND_SELECT\x00SQLITE_MAX_VDBE_OP\x00SQLITE_MAX_FUNCTION_ARG\x00SQLITE_MAX_VARIABLE_NUMBER\x00SQLITE_MAX_PAGE_SIZE\x00SQLITE_MAX_PAGE_COUNT\x00SQLITE_MAX_LIKE_PATTERN_LENGTH\x00SQLITE_MAX_TRIGGER_DEPTH\x00SQLITE_DEFAULT_CACHE_SIZE\x00SQLITE_DEFAULT_PAGE_SIZE\x00SQLITE_DEFAULT_FILE_FORMAT\x00SQLITE_DEFAULT_SYNCHRONOUS\x00SQLITE_DEFAULT_WAL_SYNCHRONOUS\x00SQLITE_MAX_ATTACHED\x00SQLITE_MAX_DEFAULT_PAGE_SIZE\x00SQLITE_MAX_WORKER_THREADS\x00TEMP_STORE\x00_MSC_VER\x00__GNUC__\x00%s-journal\x00%s-wal\x00%s-shm\x00%s%03d\x00%s-journal%03d\x00%s-wal%03d\x00win32\x00devsym\x00writecrash\x00CREATE TABLE xyz(dir, name);\x00CREATE TABLE xyz(path, size, data);\x00WITH r(d) AS ( SELECT CASE WHEN dir=?2 THEN ?3 ELSE dir END || '/' || name FROM fsdir WHERE dir=?1 AND name NOT LIKE '.%' UNION ALL SELECT dir || '/' || name FROM r, fsdir WHERE dir=d AND name NOT LIKE '.%') SELECT d FROM r;\x00fstreeDrive\x00SystemDrive\x00%s%c\x00CREATE TABLE x(path TEXT, data TEXT)\x00SELECT * FROM %Q.%Q WHERE rowid=?\x00fs\x00fstree\x00register_fs_module\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-!,:*^+=_|?/<> \x00sqlite3_prepare_v2() error: %s\x000123456789abcdef\x00x'\x00test_agg_errmsg16\x00randstr\x00test_destructor\x00test_destructor16\x00hex_to_utf16be\x00hex_to_utf16le\x00hex_to_utf8\x00test_destructor_count\x00test_auxdata\x00test_error\x00test_eval\x00test_isolation\x00test_counter\x00real2hex\x00test_decode\x00test_extract\x00test_zeroblob\x00test_getsubtype\x00test_setsubtype\x00test_frombind\x00tx\x00funcxx_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789\x00nullx_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789\x00sqlite3_create_function abused test failed\x00invalid matchinfo blob passed to function rank()\x00wrong number of arguments to function rank()\x00rank\x00autoinstall_test_functions\x00abuse_create_function\x00install_fts3_rank_function\x000123456789ABCDEF\x00FILENAME OFFSET AMT\x00r\x00cannot open input file \x00FILENAME OFFSET HEXDATA\x00r+b\x00r+\x00cannot open output file \x00HEXDATA\x00[utf8_to_utf8] unavailable - SQLITE_DEBUG not defined\x00BLOB VARNAME\x00LIST\x00hexio_read\x00hexio_write\x00hexio_get_int\x00hexio_render_int16\x00hexio_render_int32\x00utf8_to_utf8\x00read_fts3varint\x00make_fts3record\x00mem\x00pcache\x00Unknown argument: \"\x00init_wrapper_install\x00init_wrapper_query\x00init_wrapper_uninstall\x00init_wrapper_clear\x00CREATE TABLE x(value INTEGER PRIMARY KEY)\x00CREATE VIRTUAL TABLE temp.%Q USING %Q\x00INTARRAY\x00SQLITE_NOMEM\x00sqlite3_intarray_create\x00sqlite3_intarray_bind\x00jt\x00-journal\x00NBYTES\x00PRIOR NBYTES\x00bad pointer: \x00PRIOR\x00ADDRESS SIZE HEX\x00size must be positive\x00no data\x00ADDRESS SIZE\x00?RESET?\x00DEPT\x00COUNTER ?OPTIONS?\x00-repeat\x00-benigncnt\x00TITLE\x00SUB-COMMAND ...\x00start\x00stop\x00dump\x00clear\x00sync\x00SIZE N\x00INSTALLFLAG DISCARDCHANCE PRNGSEEED HIGHSTRESS\x00discard-chance should be between 0 and 100\x00SIZE COUNT\x00BUFID SIZE COUNT\x00illegal arguments - see documentation\x00NBYTE NMINALLOC\x00[DB]\x00sqlite3_db_config(db, 99999) does not return SQLITE_ERROR\x00sqlite3_config(99999) does not return SQLITE_ERROR\x00PARAMETER RESETFLAG\x00SQLITE_STATUS_MEMORY_USED\x00SQLITE_STATUS_MALLOC_SIZE\x00SQLITE_STATUS_PAGECACHE_USED\x00SQLITE_STATUS_PAGECACHE_OVERFLOW\x00SQLITE_STATUS_PAGECACHE_SIZE\x00SQLITE_STATUS_SCRATCH_USED\x00SQLITE_STATUS_SCRATCH_OVERFLOW\x00SQLITE_STATUS_SCRATCH_SIZE\x00SQLITE_STATUS_PARSER_STACK\x00SQLITE_STATUS_MALLOC_COUNT\x00DB PARAMETER RESETFLAG\x00SQLITE_\x00DBSTATUS_\x00LOOKASIDE_USED\x00CACHE_USED\x00SCHEMA_USED\x00STMT_USED\x00LOOKASIDE_HIT\x00LOOKASIDE_MISS_SIZE\x00LOOKASIDE_MISS_FULL\x00CACHE_HIT\x00CACHE_MISS\x00CACHE_WRITE\x00DEFERRED_FKS\x00CACHE_USED_SHARED\x00CACHE_SPILL\x00?INTEGER?\x00sqlite3_free\x00memset\x00memget\x00sqlite3_memory_used\x00sqlite3_memory_highwater\x00sqlite3_memdebug_backtrace\x00sqlite3_memdebug_dump\x00sqlite3_memdebug_fail\x00sqlite3_memdebug_pending\x00sqlite3_memdebug_settitle\x00sqlite3_memdebug_malloc_count\x00sqlite3_memdebug_log\x00sqlite3_config_pagecache\x00sqlite3_config_alt_pcache\x00sqlite3_status\x00sqlite3_db_status\x00install_malloc_faultsim\x00sqlite3_config_heap\x00sqlite3_config_heap_size\x00sqlite3_config_memstatus\x00sqlite3_config_lookaside\x00sqlite3_config_error\x00sqlite3_config_uri\x00sqlite3_config_cis\x00sqlite3_config_pmasz\x00sqlite3_db_config_lookaside\x00sqlite3_dump_memsys3\x00sqlite3_dump_memsys5\x00sqlite3_install_memsys3\x00sqlite3_memdebug_vfs_oom_test\x00%05u\x00 FILENAME [OFFSET AMT]\"\x00unable to open file \"\x00\" for reading\x00md5\x00md5-10x8\x00md5file\x00md5file-10x8\x00md5sum\x00%03d\x00multiplexor.xAccess failure on %s\x00multiplexor.xOpen failure on %s\x00multiplex_control\x00chunksize\x00multiplex_truncate\x00multiplex/%z\x00multiplex\x00NAME MAKEDEFAULT\x00-force\x00?-force?\x00enable\x00chunk_size\x00max_chunks\x00HANDLE DBNAME SUB-COMMAND INT-VALUE\x00expected database handle, got \"\x00sqlite3_multiplex_initialize\x00sqlite3_multiplex_shutdown\x00sqlite3_multiplex_control\x00fast\x00recursive\x00static_main\x00static_mem\x00static_open\x00static_prng\x00static_lru\x00static_pmem\x00static_app1\x00static_app2\x00static_app3\x00static_vfs1\x00static_vfs2\x00static_vfs3\x00mutex counters are \x00already installed\x00not installed\x00singlethread\x00multithread\x00serialized\x00mutex name\x00disable_mutex_init\x00disable_mutex_try\x00sqlite3_shutdown\x00sqlite3_initialize\x00sqlite3_config\x00enter_static_mutex\x00leave_static_mutex\x00enter_db_mutex\x00leave_db_mutex\x00alloc_dealloc_mutex\x00install_mutex_counters\x00read_mutex_counters\x00clear_mutex_counters\x00\x00\x00\x00\x00\x00\x00\x00vfslog/%z\x00sqlite_ostrace1.....\x00xClose\x00xRead\x00xWrite\x00xTruncate\x00xFilesize\x00xLock\x00xUnlock\x00xCheckResLock\x00xFileControl\x00xSectorSize\x00xDeviceChar\x00xDelete\x00xAccess\x00xFullPathname\x00xRandomness\x00xSleep\x00xCurrentTime\x00xShmUnmap\x00xShmLock\x00xShmBarrier\x00xShmMap\x00annotation\x00CREATE TABLE xxx(event, file, click, rc, size, offset)\x00vfslog\x00VFS\x00failed\x00VFS PARENT LOGFILE\x00bad sqlite3 handle: \x00annotate\x00finalize\x00register\x00quota/%z\x00quota\x00::piLimit_\x00PATTERN LIMIT SCRIPT\x00FILENAME MODE\x00HANDLE SIZE NELEM\x00HANDLE SIZE NELEM CONTENT\x00HANDLE ?HARDSYNC?\x00HANDLE OFFSET WHENCE\x00SEEK_SET\x00SEEK_CUR\x00SEEK_END\x00WHENCE should be SEEK_SET, SEEK_CUR, or SEEK_END\x00HANDLE SIZE\x00PATTERN TEXT\x00sqlite3_quota_initialize\x00sqlite3_quota_shutdown\x00sqlite3_quota_set\x00sqlite3_quota_file\x00sqlite3_quota_dump\x00sqlite3_quota_fopen\x00sqlite3_quota_fread\x00sqlite3_quota_fwrite\x00sqlite3_quota_fclose\x00sqlite3_quota_fflush\x00sqlite3_quota_fseek\x00sqlite3_quota_rewind\x00sqlite3_quota_ftell\x00sqlite3_quota_ftruncate\x00sqlite3_quota_file_size\x00sqlite3_quota_file_truesize\x00sqlite3_quota_file_mtime\x00sqlite3_quota_remove\x00sqlite3_quota_glob\x00sqlite3_quota_file_available\x00sqlite3_quota_ferror\x00cube\x00circle\x00Qcircle\x00breadthfirstsearch\x00register_cube_geom\x00register_circle_geom\x00CREATE TABLE x(database,tablename,cid,name,type,not_null,dflt_value,pk)\x00SELECT name FROM sqlite_temp_schema WHERE type='table'\x00SELECT name FROM %Q.sqlite_schema WHERE type='table'\x00PRAGMA %Q.table_info(%Q)\x00PRAGMA database_list\x00register_schema_module\x00PRAGMA main.journal_mode\x00CMDNAME PATH ?VFS? ?BUSY-HANDLER-SCRIPT?\x00sqlite3demo_superlock\x00load_testfixture_extensions\x00SLAVE\x00CREATE TABLE x( name TEXT, arrayname TEXT, value TEXT, fullname TEXT PRIMARY KEY) WITHOUT ROWID\x00array names\x00tclvar_filter_cmd\x00%s(%s)\x00expr {[info exists ::tclvar_set_omit] && $::tclvar_set_omit}\x00the 'fullname' column must be TEXT\x00prohibited TCL variable change\x00proc like {pattern str} {\n set p [string map {% * _ ?} $pattern]\n string match $p $str\n}\nproc tclvar_filter_cmd {eq match glob regexp like} {\n set res {}\n set pattern $eq\n if {$pattern=={}} { set pattern $match }\n if {$pattern=={}} { set pattern * }\n foreach v [uplevel #0 info vars $pattern] {\n if {($glob=={} || [string match $glob [uplevel #0 set $v]])\n && ($like=={} || [like $like [uplevel #0 set $v]])\n && ($regexp=={} || [regexp $regexp [uplevel #0 set $v]])\n } {\n lappend res $v\n }\n }\n set res\n}\n\x00register_tclvar_module\x00clock_seconds\x00sqlthread\x00set\x00Error in Tcl_CreateThread()\x00no parent thread\x00parent\x00spawn\x00VARNAME SCRIPT\x00open\x00DBNAME\x00id\x00SQLITE_IOERR\x00SQLITE_LOCKED\x00SQLITE_BUSY\x00SQLITE_READONLY\x00SQLITE_READONLY_CANTINIT\x00SQLITE_NOTFOUND\x00SQLITE_OMIT\x00normal|dataonly\x00full|dataonly\x00xCheckReservedLock\x00BEGIN_ATOMIC_WRITE\x00COMMIT_ATOMIC_WRITE\x00ZIPVFS\x00anon\x00SQLITE_ACCESS_EXISTS\x00SQLITE_ACCESS_READWRITE\x00SQLITE_ACCESS_READ\x00xShmOpen\x00 lock\x00 unlock\x00 shared\x00 exclusive\x00shm\x00delete\x00filter\x00ioerr\x00fullerr\x00cantopenerr\x00script\x00devchar\x00sectorsize\x00subcommand\x00FILE ?VALUE?\x00failed to get full path: \x00no such file: \x00unknown method: \x00?CNT PERSIST?\x00default\x00undeletable_when_open\x00immutable\x00?ATTR-LIST?\x00bad flags: \x00?VALUE?\x00-noshm\x00-szosfile\x00-mxpathname\x00-iversion\x00-fullshm\x00VFSNAME ?-noshm BOOL? ?-fullshm BOOL? ?-default BOOL? ?-mxpathname INT? ?-szosfile INT? ?-iversion INT?\x00shared\x00lock\x00unlock\x00DB DBNAME (shared|exclusive) (lock|unlock) OFFSET N\x00ARG\x00DB DBNAME SLOT ?VALUE?\x00*-shm is not yet mapped\x00testvfs\x00vfs_shmlock\x00vfs_set_readmark\x00/\x00%s\\*\x00DB NAME XSTEP XFINAL XVALUE XINVERSE\x00fff\x00misuse test error\x00invalid argument\x00sumint\x00sum\x00sqlite3_create_window_function\x00test_create_window_function_misuse\x00test_create_sumint\x00test_override_sum\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data